pub(super) struct SourceToDefCache {
pub(super) dynmap_cache: FxHashMap<(ChildContainer, HirFileId), DynMap>,
expansion_info_cache: FxHashMap<MacroCallId, ExpansionInfo>,
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>§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 SourceToDefCache
impl SourceToDefCache
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: &dyn HirDatabase, macro_file: MacroCallId, ) -> &ExpansionInfo
Trait Implementations§
Source§impl Default for SourceToDefCache
impl Default for SourceToDefCache
Source§fn default() -> SourceToDefCache
fn default() -> SourceToDefCache
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SourceToDefCache
impl !RefUnwindSafe for SourceToDefCache
impl !Send for SourceToDefCache
impl !Sync for SourceToDefCache
impl Unpin for SourceToDefCache
impl !UnwindSafe for SourceToDefCache
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