pub(super) struct SourceToDefCache<'db> {
pub(super) dynmap_cache: FxHashMap<(ChildContainer, HirFileId), DynMap>,
expansion_info_cache: FxHashMap<MacroCallId, ExpansionInfo<'db>>,
pub(super) file_to_def_cache: FxHashMap<FileId, SmallVec<[ModuleId; 1]>>,
pub(super) included_file_cache: FxHashMap<EditionedFileId, Option<MacroCallId>>,
pub(super) root_to_file_cache: FxHashMap<SyntaxNode, HirFileId>,
}Fields§
§dynmap_cache: FxHashMap<(ChildContainer, HirFileId), DynMap>§expansion_info_cache: FxHashMap<MacroCallId, ExpansionInfo<'db>>§file_to_def_cache: FxHashMap<FileId, SmallVec<[ModuleId; 1]>>§included_file_cache: FxHashMap<EditionedFileId, Option<MacroCallId>>§root_to_file_cache: FxHashMap<SyntaxNode, HirFileId>Rootnode to HirFileId cache
Implementations§
Source§impl<'db> SourceToDefCache<'db>
impl<'db> SourceToDefCache<'db>
pub(super) fn cache( root_to_file_cache: &mut FxHashMap<SyntaxNode, HirFileId>, root_node: SyntaxNode, file_id: HirFileId, )
pub(super) fn get_or_insert_include_for( &mut self, db: &dyn HirDatabase, file: EditionedFileId, ) -> Option<MacroCallId>
pub(super) fn get_or_insert_expansion( &mut self, db: &'db dyn HirDatabase, macro_file: MacroCallId, ) -> &ExpansionInfo<'db>
Trait Implementations§
Source§impl<'db> Default for SourceToDefCache<'db>
impl<'db> Default for SourceToDefCache<'db>
Source§fn default() -> SourceToDefCache<'db>
fn default() -> SourceToDefCache<'db>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'db> Freeze for SourceToDefCache<'db>
impl<'db> !RefUnwindSafe for SourceToDefCache<'db>
impl<'db> !Send for SourceToDefCache<'db>
impl<'db> !Sync for SourceToDefCache<'db>
impl<'db> Unpin for SourceToDefCache<'db>
impl<'db> UnsafeUnpin for SourceToDefCache<'db>
impl<'db> !UnwindSafe for SourceToDefCache<'db>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more