pub struct ModuleData<'db>(/* private fields */);Implementations§
Source§impl ModuleData<'static>
impl ModuleData<'static>
pub fn ingredient(db: &dyn Database) -> &IngredientImpl<Self>
Source§impl<'db> ModuleData<'db>
impl<'db> ModuleData<'db>
pub fn new<Db_>( db: &'db Db_, items: Vec<ModuleItemId<'db>>, types_data: ModuleTypesData<'db>, named_items_data: ModuleNamedItemsData<'db>, unnamed_items_data: ModuleUnnamedItemsData<'db>, files_data: ModuleFilesData<'db>, ) -> Self
Source§impl<'_db> ModuleData<'_db>
impl<'_db> ModuleData<'_db>
Sourcepub fn default_debug_fmt(this: Self, f: &mut Formatter<'_>) -> Resultwhere
for<'db> Vec<ModuleItemId<'db>>: Debug,
for<'db> ModuleTypesData<'db>: Debug,
for<'db> ModuleNamedItemsData<'db>: Debug,
for<'db> ModuleUnnamedItemsData<'db>: Debug,
for<'db> ModuleFilesData<'db>: Debug,
pub fn default_debug_fmt(this: Self, f: &mut Formatter<'_>) -> Resultwhere
for<'db> Vec<ModuleItemId<'db>>: Debug,
for<'db> ModuleTypesData<'db>: Debug,
for<'db> ModuleNamedItemsData<'db>: Debug,
for<'db> ModuleUnnamedItemsData<'db>: Debug,
for<'db> ModuleFilesData<'db>: Debug,
Default debug formatting for this struct (may be useful if you define your own Debug impl)
Source§impl<'db> ModuleData<'db>
impl<'db> ModuleData<'db>
Sourcepub fn constants(
&self,
db: &'db dyn Database,
) -> &'db OrderedHashMap<ConstantId<'db>, ItemConstant<'db>>
pub fn constants( &self, db: &'db dyn Database, ) -> &'db OrderedHashMap<ConstantId<'db>, ItemConstant<'db>>
All the constants of the given module.
Sourcepub fn submodules(
&self,
db: &'db dyn Database,
) -> &'db OrderedHashMap<SubmoduleId<'db>, ItemModule<'db>>
pub fn submodules( &self, db: &'db dyn Database, ) -> &'db OrderedHashMap<SubmoduleId<'db>, ItemModule<'db>>
All the submodules of the given module.
Sourcepub fn uses(
&self,
db: &'db dyn Database,
) -> &'db OrderedHashMap<UseId<'db>, UsePathLeaf<'db>>
pub fn uses( &self, db: &'db dyn Database, ) -> &'db OrderedHashMap<UseId<'db>, UsePathLeaf<'db>>
All the uses of the given module.
Sourcepub fn free_functions(
&self,
db: &'db dyn Database,
) -> &'db OrderedHashMap<FreeFunctionId<'db>, FunctionWithBody<'db>>
pub fn free_functions( &self, db: &'db dyn Database, ) -> &'db OrderedHashMap<FreeFunctionId<'db>, FunctionWithBody<'db>>
All the free functions of the given module.
Sourcepub fn structs(
&self,
db: &'db dyn Database,
) -> &'db OrderedHashMap<StructId<'db>, ItemStruct<'db>>
pub fn structs( &self, db: &'db dyn Database, ) -> &'db OrderedHashMap<StructId<'db>, ItemStruct<'db>>
All the structs of the given module.
Sourcepub fn enums(
&self,
db: &'db dyn Database,
) -> &'db OrderedHashMap<EnumId<'db>, ItemEnum<'db>>
pub fn enums( &self, db: &'db dyn Database, ) -> &'db OrderedHashMap<EnumId<'db>, ItemEnum<'db>>
All the enums of the given module.
Sourcepub fn type_aliases(
&self,
db: &'db dyn Database,
) -> &'db OrderedHashMap<ModuleTypeAliasId<'db>, ItemTypeAlias<'db>>
pub fn type_aliases( &self, db: &'db dyn Database, ) -> &'db OrderedHashMap<ModuleTypeAliasId<'db>, ItemTypeAlias<'db>>
All the type aliases of the given module.
Sourcepub fn impl_aliases(
&self,
db: &'db dyn Database,
) -> &'db OrderedHashMap<ImplAliasId<'db>, ItemImplAlias<'db>>
pub fn impl_aliases( &self, db: &'db dyn Database, ) -> &'db OrderedHashMap<ImplAliasId<'db>, ItemImplAlias<'db>>
All the impl aliases of the given module.
Sourcepub fn traits(
&self,
db: &'db dyn Database,
) -> &'db OrderedHashMap<TraitId<'db>, ItemTrait<'db>>
pub fn traits( &self, db: &'db dyn Database, ) -> &'db OrderedHashMap<TraitId<'db>, ItemTrait<'db>>
All the traits of the given module.
Sourcepub fn impls(
&self,
db: &'db dyn Database,
) -> &'db OrderedHashMap<ImplDefId<'db>, ItemImpl<'db>>
pub fn impls( &self, db: &'db dyn Database, ) -> &'db OrderedHashMap<ImplDefId<'db>, ItemImpl<'db>>
All the impls of the given module.
Sourcepub fn extern_types(
&self,
db: &'db dyn Database,
) -> &'db OrderedHashMap<ExternTypeId<'db>, ItemExternType<'db>>
pub fn extern_types( &self, db: &'db dyn Database, ) -> &'db OrderedHashMap<ExternTypeId<'db>, ItemExternType<'db>>
All the extern types of the given module.
Sourcepub fn extern_functions(
&self,
db: &'db dyn Database,
) -> &'db OrderedHashMap<ExternFunctionId<'db>, ItemExternFunction<'db>>
pub fn extern_functions( &self, db: &'db dyn Database, ) -> &'db OrderedHashMap<ExternFunctionId<'db>, ItemExternFunction<'db>>
All the extern functions of the given module.
Sourcepub fn macro_declarations(
&self,
db: &'db dyn Database,
) -> &'db OrderedHashMap<MacroDeclarationId<'db>, ItemMacroDeclaration<'db>>
pub fn macro_declarations( &self, db: &'db dyn Database, ) -> &'db OrderedHashMap<MacroDeclarationId<'db>, ItemMacroDeclaration<'db>>
All the macro declarations of the given module.
Sourcepub fn global_uses(
&self,
db: &'db dyn Database,
) -> &'db OrderedHashMap<GlobalUseId<'db>, UsePathStar<'db>>
pub fn global_uses( &self, db: &'db dyn Database, ) -> &'db OrderedHashMap<GlobalUseId<'db>, UsePathStar<'db>>
All the global uses of the given module.
Sourcepub fn macro_calls(
&self,
db: &'db dyn Database,
) -> &'db OrderedHashMap<MacroCallId<'db>, ItemInlineMacro<'db>>
pub fn macro_calls( &self, db: &'db dyn Database, ) -> &'db OrderedHashMap<MacroCallId<'db>, ItemInlineMacro<'db>>
Calls to inline macros in the module (only those that were not handled by plugins).
Sourcepub fn files(&self, db: &'db dyn Database) -> &'db Vec<FileId<'db>>
pub fn files(&self, db: &'db dyn Database) -> &'db Vec<FileId<'db>>
All the files of the given module.
Sourcepub fn generated_file_aux_data(
&self,
db: &'db dyn Database,
) -> &'db OrderedHashMap<FileId<'db>, Option<DynGeneratedFileAuxData>>
pub fn generated_file_aux_data( &self, db: &'db dyn Database, ) -> &'db OrderedHashMap<FileId<'db>, Option<DynGeneratedFileAuxData>>
Generation info for each file. Virtual files have Some. Other files have None.
pub fn plugin_diagnostics( &self, db: &'db dyn Database, ) -> &'db Vec<(ModuleId<'db>, PluginDiagnostic<'db>)>
Sourcepub fn diagnostics_notes(
&self,
db: &'db dyn Database,
) -> &'db PluginFileDiagnosticNotes<'db>
pub fn diagnostics_notes( &self, db: &'db dyn Database, ) -> &'db PluginFileDiagnosticNotes<'db>
Diagnostic notes for diagnostics originating in the plugin generated files identified by
FileId.
Diagnostic notes are added with note: prefix at the end of diagnostic display.
Trait Implementations§
Source§impl<'db> Clone for ModuleData<'db>
impl<'db> Clone for ModuleData<'db>
Source§fn clone(&self) -> ModuleData<'db>
fn clone(&self) -> ModuleData<'db>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Configuration for ModuleData<'static>
impl Configuration for ModuleData<'static>
const LOCATION: Location
Source§const DEBUG_NAME: &'static str = "ModuleData"
const DEBUG_NAME: &'static str = "ModuleData"
Source§const TRACKED_FIELD_NAMES: &'static [&'static str]
const TRACKED_FIELD_NAMES: &'static [&'static str]
Source§const TRACKED_FIELD_INDICES: &'static [usize]
const TRACKED_FIELD_INDICES: &'static [usize]
Source§type Fields<'db> = (Vec<ModuleItemId<'db>>, ModuleTypesData<'db>, ModuleNamedItemsData<'db>, ModuleUnnamedItemsData<'db>, ModuleFilesData<'db>)
type Fields<'db> = (Vec<ModuleItemId<'db>>, ModuleTypesData<'db>, ModuleNamedItemsData<'db>, ModuleUnnamedItemsData<'db>, ModuleFilesData<'db>)
type Revisions = [Revision; 0]
type Struct<'db> = ModuleData<'db>
fn untracked_fields(fields: &Self::Fields<'_>) -> impl Hash
Source§fn new_revisions(current_revision: Revision_) -> Self::Revisions
fn new_revisions(current_revision: Revision_) -> Self::Revisions
current_revision.Source§unsafe fn update_fields<'db>(
current_revision: Revision_,
revisions: &mut Self::Revisions,
old_fields: *mut Self::Fields<'db>,
new_fields: Self::Fields<'db>,
) -> bool
unsafe fn update_fields<'db>( current_revision: Revision_, revisions: &mut Self::Revisions, old_fields: *mut Self::Fields<'db>, new_fields: Self::Fields<'db>, ) -> bool
revisions array (tracked fields only). Read moreSource§fn serialize<S: Serializer>(
fields: &Self::Fields<'_>,
serializer: S,
) -> Result<S::Ok, S::Error>
fn serialize<S: Serializer>( fields: &Self::Fields<'_>, serializer: S, ) -> Result<S::Ok, S::Error>
serde. Read moreSource§fn deserialize<'de, D: Deserializer<'de>>(
deserializer: D,
) -> Result<Self::Fields<'static>, D::Error>
fn deserialize<'de, D: Deserializer<'de>>( deserializer: D, ) -> Result<Self::Fields<'static>, D::Error>
serde. Read moreSource§impl<'db> HasJar for ModuleData<'db>
impl<'db> HasJar for ModuleData<'db>
Source§impl<'db> Hash for ModuleData<'db>
impl<'db> Hash for ModuleData<'db>
Source§impl<'db> PartialEq for ModuleData<'db>
impl<'db> PartialEq for ModuleData<'db>
Source§impl SalsaStructInDb for ModuleData<'_>
impl SalsaStructInDb for ModuleData<'_>
type MemoIngredientMap = MemoIngredientSingletonIndex
Source§fn lookup_ingredient_index(aux: &Zalsa) -> IngredientIndices
fn lookup_ingredient_index(aux: &Zalsa) -> IngredientIndices
Source§fn entries(zalsa: &Zalsa) -> impl Iterator<Item = DatabaseKeyIndex> + '_
fn entries(zalsa: &Zalsa) -> impl Iterator<Item = DatabaseKeyIndex> + '_
Source§impl TrackedStructInDb for ModuleData<'_>
impl TrackedStructInDb for ModuleData<'_>
Source§fn database_key_index(zalsa: &Zalsa, id: Id) -> DatabaseKeyIndex
fn database_key_index(zalsa: &Zalsa, id: Id) -> DatabaseKeyIndex
DatabaseKeyIndex.Source§impl Update for ModuleData<'_>
impl Update for ModuleData<'_>
impl<'db> Copy for ModuleData<'db>
impl<'db> Eq for ModuleData<'db>
impl Send for ModuleData<'_>
impl<'db> StructuralPartialEq for ModuleData<'db>
impl Sync for ModuleData<'_>
Auto Trait Implementations§
impl<'db> Freeze for ModuleData<'db>
impl<'db> RefUnwindSafe for ModuleData<'db>
impl<'db> Unpin for ModuleData<'db>
impl<'db> UnwindSafe for ModuleData<'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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<'db, T> DebugDbUpcast<'db, T> for Twhere
T: ?Sized,
impl<'db, T> DebugDbUpcast<'db, T> for Twhere
T: ?Sized,
fn debug_db_upcast(&'db self) -> &'db T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
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>
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