DefsGroup

Trait DefsGroup 

Source
pub trait DefsGroup: Database {
Show 52 methods // Provided methods fn default_macro_plugins_input(&self) -> &[MacroPluginLongId] { ... } fn macro_plugin_overrides_input( &self, ) -> &OrderedHashMap<CrateInput, Arc<[MacroPluginLongId]>> { ... } fn inline_macro_plugin_overrides_input( &self, ) -> &OrderedHashMap<CrateInput, Arc<OrderedHashMap<String, InlineMacroExprPluginLongId>>> { ... } fn default_inline_macro_plugins_input( &self, ) -> &OrderedHashMap<String, InlineMacroExprPluginLongId> { ... } fn default_macro_plugins<'db>(&'db self) -> &'db [MacroPluginId<'db>] { ... } fn macro_plugin_overrides<'db>( &'db self, ) -> &'db OrderedHashMap<CrateId<'db>, Vec<MacroPluginId<'db>>> { ... } fn crate_macro_plugins<'db>( &'db self, crate_id: CrateId<'db>, ) -> &'db [MacroPluginId<'db>] { ... } fn default_inline_macro_plugins<'db>( &'db self, ) -> &'db OrderedHashMap<String, InlineMacroExprPluginId<'db>> { ... } fn inline_macro_plugin_overrides<'db>( &'db self, ) -> &'db OrderedHashMap<CrateId<'db>, OrderedHashMap<String, InlineMacroExprPluginId<'db>>> { ... } fn crate_inline_macro_plugins<'db>( &'db self, crate_id: CrateId<'db>, ) -> &'db OrderedHashMap<String, InlineMacroExprPluginId<'db>> { ... } fn allowed_attributes<'db>( &'db self, crate_id: CrateId<'db>, ) -> &'db OrderedHashSet<SmolStrId<'db>> { ... } fn allowed_statement_attributes<'db>( &'db self, ) -> &'db OrderedHashSet<SmolStrId<'db>> { ... } fn declared_derives<'db>( &'db self, crate_id: CrateId<'db>, ) -> &'db OrderedHashSet<SmolStrId<'db>> { ... } fn declared_phantom_type_attributes<'db>( &'db self, crate_id: CrateId<'db>, ) -> &'db OrderedHashSet<SmolStrId<'db>> { ... } fn is_submodule_inline<'db>(&self, submodule_id: SubmoduleId<'db>) -> bool { ... } fn module_main_file<'db>( &'db self, module_id: ModuleId<'db>, ) -> Maybe<FileId<'db>> { ... } fn module_files<'db>( &'db self, module_id: ModuleId<'db>, ) -> Maybe<&'db [FileId<'db>]> { ... } fn module_dir<'db>( &'db self, module_id: ModuleId<'db>, ) -> Maybe<&'db Directory<'db>> { ... } fn crate_modules<'db>( &'db self, crate_id: CrateId<'db>, ) -> &'db [ModuleId<'db>] { ... } fn file_modules<'db>( &'db self, file_id: FileId<'db>, ) -> Maybe<&'db Vec<ModuleId<'db>>> { ... } fn cached_crate_modules<'db>( &'db self, crate_id: CrateId<'db>, ) -> Option<ModuleDataCacheAndLoadingData<'db>> { ... } fn module_submodules_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Maybe<&'db [SubmoduleId<'db>]> { ... } fn module_constants_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Maybe<&'db [ConstantId<'db>]> { ... } fn module_constant_by_id<'db>( &'db self, constant_data: ConstantId<'db>, ) -> Maybe<ItemConstant<'db>> { ... } fn module_free_functions_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Maybe<&'db [FreeFunctionId<'db>]> { ... } fn module_free_function_by_id<'db>( &'db self, free_function_id: FreeFunctionId<'db>, ) -> Maybe<FunctionWithBody<'db>> { ... } fn module_item_name_stable_ptr<'db>( &'db self, module_id: ModuleId<'db>, item_id: ModuleItemId<'db>, ) -> Maybe<SyntaxStablePtrId<'db>> { ... } fn module_uses_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Maybe<&'db [UseId<'db>]> { ... } fn module_use_by_id<'db>( &'db self, use_id: UseId<'db>, ) -> Maybe<UsePathLeaf<'db>> { ... } fn module_global_use_by_id<'db>( &'db self, global_use_id: GlobalUseId<'db>, ) -> Maybe<UsePathStar<'db>> { ... } fn module_structs_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Maybe<&'db [StructId<'db>]> { ... } fn module_struct_by_id<'db>( &'db self, struct_id: StructId<'db>, ) -> Maybe<ItemStruct<'db>> { ... } fn module_enums_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Maybe<&'db [EnumId<'db>]> { ... } fn module_enum_by_id<'db>( &'db self, enum_id: EnumId<'db>, ) -> Maybe<ItemEnum<'db>> { ... } fn module_type_aliases_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Maybe<&'db [ModuleTypeAliasId<'db>]> { ... } fn module_type_alias_by_id<'db>( &'db self, module_type_alias_id: ModuleTypeAliasId<'db>, ) -> Maybe<ItemTypeAlias<'db>> { ... } fn module_impl_aliases_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Maybe<&'db [ImplAliasId<'db>]> { ... } fn module_impl_alias_by_id<'db>( &'db self, impl_alias_id: ImplAliasId<'db>, ) -> Maybe<ItemImplAlias<'db>> { ... } fn module_traits_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Maybe<&'db [TraitId<'db>]> { ... } fn module_trait_by_id<'db>( &'db self, trait_id: TraitId<'db>, ) -> Maybe<ItemTrait<'db>> { ... } fn module_impls_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Maybe<&'db [ImplDefId<'db>]> { ... } fn module_impl_by_id<'db>( &'db self, impl_id: ImplDefId<'db>, ) -> Maybe<ItemImpl<'db>> { ... } fn module_extern_types_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Maybe<&'db [ExternTypeId<'db>]> { ... } fn module_extern_type_by_id<'db>( &'db self, extern_type_id: ExternTypeId<'db>, ) -> Maybe<ItemExternType<'db>> { ... } fn module_extern_functions_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Maybe<&'db [ExternFunctionId<'db>]> { ... } fn module_extern_function_by_id<'db>( &'db self, extern_function_id: ExternFunctionId<'db>, ) -> Maybe<ItemExternFunction<'db>> { ... } fn module_macro_declarations_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Maybe<&'db [MacroDeclarationId<'db>]> { ... } fn module_macro_declaration_by_id<'db>( &'db self, macro_declaration_id: MacroDeclarationId<'db>, ) -> Maybe<ItemMacroDeclaration<'db>> { ... } fn module_macro_calls_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Maybe<&'db [MacroCallId<'db>]> { ... } fn module_macro_call_by_id<'db>( &'db self, macro_call_id: MacroCallId<'db>, ) -> Maybe<ItemInlineMacro<'db>> { ... } fn module_ancestors<'db>( &'db self, module_id: ModuleId<'db>, ) -> &'db OrderedHashSet<ModuleId<'db>> { ... } fn module_perceived_module<'db>( &'db self, module_id: ModuleId<'db>, ) -> ModuleId<'db> { ... }
}
Expand description

Salsa database interface. See super::ids for further details.

Provided Methods§

Source

fn default_macro_plugins_input(&self) -> &[MacroPluginLongId]

Source

fn macro_plugin_overrides_input( &self, ) -> &OrderedHashMap<CrateInput, Arc<[MacroPluginLongId]>>

Source

fn inline_macro_plugin_overrides_input( &self, ) -> &OrderedHashMap<CrateInput, Arc<OrderedHashMap<String, InlineMacroExprPluginLongId>>>

Source

fn default_inline_macro_plugins_input( &self, ) -> &OrderedHashMap<String, InlineMacroExprPluginLongId>

Source

fn default_macro_plugins<'db>(&'db self) -> &'db [MacroPluginId<'db>]

Interned version of default_macro_plugins_input.

Source

fn macro_plugin_overrides<'db>( &'db self, ) -> &'db OrderedHashMap<CrateId<'db>, Vec<MacroPluginId<'db>>>

Interned version of macro_plugin_overrides_input.

Source

fn crate_macro_plugins<'db>( &'db self, crate_id: CrateId<'db>, ) -> &'db [MacroPluginId<'db>]

Returns MacroPluginIds of the plugins set for the crate with CrateId. Provides an override if it has been set with DefsGroupEx::set_override_crate_macro_plugins or the default (DefsGroup::default_macro_plugins) otherwise.

Source

fn default_inline_macro_plugins<'db>( &'db self, ) -> &'db OrderedHashMap<String, InlineMacroExprPluginId<'db>>

Interned version of default_inline_macro_plugins_input.

Source

fn inline_macro_plugin_overrides<'db>( &'db self, ) -> &'db OrderedHashMap<CrateId<'db>, OrderedHashMap<String, InlineMacroExprPluginId<'db>>>

Interned version of inline_macro_plugin_overrides_input.

Source

fn crate_inline_macro_plugins<'db>( &'db self, crate_id: CrateId<'db>, ) -> &'db OrderedHashMap<String, InlineMacroExprPluginId<'db>>

Returns InlineMacroExprPluginIds of the plugins set for the crate with CrateId. Provides an override if it has been set with DefsGroupEx::set_override_crate_inline_macro_plugins or the default (DefsGroup::default_inline_macro_plugins) otherwise.

Source

fn allowed_attributes<'db>( &'db self, crate_id: CrateId<'db>, ) -> &'db OrderedHashSet<SmolStrId<'db>>

Returns the set of attributes allowed anywhere. An attribute on any item that is not in this set will be handled as an unknown attribute.

Source

fn allowed_statement_attributes<'db>( &'db self, ) -> &'db OrderedHashSet<SmolStrId<'db>>

Returns the set of attributes allowed on statements. An attribute on a statement that is not in this set will be handled as an unknown attribute.

Source

fn declared_derives<'db>( &'db self, crate_id: CrateId<'db>, ) -> &'db OrderedHashSet<SmolStrId<'db>>

Returns the set of derive that were declared as by a plugin. A derive that is not in this set will be handled as an unknown derive.

Source

fn declared_phantom_type_attributes<'db>( &'db self, crate_id: CrateId<'db>, ) -> &'db OrderedHashSet<SmolStrId<'db>>

Returns the set of attributes that were declared as phantom type attributes by a plugin, i.e. a type marked with this attribute is considered a phantom type.

Source

fn is_submodule_inline<'db>(&self, submodule_id: SubmoduleId<'db>) -> bool

Checks whether the submodule is defined as inline.

Source

fn module_main_file<'db>( &'db self, module_id: ModuleId<'db>, ) -> Maybe<FileId<'db>>

Gets the main file of the module. A module might have more virtual files generated by plugins.

Source

fn module_files<'db>( &'db self, module_id: ModuleId<'db>, ) -> Maybe<&'db [FileId<'db>]>

Gets all the files of a module - main files and generated virtual files.

Source

fn module_dir<'db>( &'db self, module_id: ModuleId<'db>, ) -> Maybe<&'db Directory<'db>>

Gets the directory of a module.

Source

fn crate_modules<'db>(&'db self, crate_id: CrateId<'db>) -> &'db [ModuleId<'db>]

Source

fn file_modules<'db>( &'db self, file_id: FileId<'db>, ) -> Maybe<&'db Vec<ModuleId<'db>>>

Source

fn cached_crate_modules<'db>( &'db self, crate_id: CrateId<'db>, ) -> Option<ModuleDataCacheAndLoadingData<'db>>

Returns the ModuleData of all modules in the crate’s cache, and the loading data of the DefsGroup in the crate.

Source

fn module_submodules_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Maybe<&'db [SubmoduleId<'db>]>

Source

fn module_constants_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Maybe<&'db [ConstantId<'db>]>

Source

fn module_constant_by_id<'db>( &'db self, constant_data: ConstantId<'db>, ) -> Maybe<ItemConstant<'db>>

Source

fn module_free_functions_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Maybe<&'db [FreeFunctionId<'db>]>

Source

fn module_free_function_by_id<'db>( &'db self, free_function_id: FreeFunctionId<'db>, ) -> Maybe<FunctionWithBody<'db>>

Source

fn module_item_name_stable_ptr<'db>( &'db self, module_id: ModuleId<'db>, item_id: ModuleItemId<'db>, ) -> Maybe<SyntaxStablePtrId<'db>>

Returns the stable ptr of the name of a module item.

Source

fn module_uses_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Maybe<&'db [UseId<'db>]>

Source

fn module_use_by_id<'db>( &'db self, use_id: UseId<'db>, ) -> Maybe<UsePathLeaf<'db>>

Source

fn module_global_use_by_id<'db>( &'db self, global_use_id: GlobalUseId<'db>, ) -> Maybe<UsePathStar<'db>>

Source

fn module_structs_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Maybe<&'db [StructId<'db>]>

Source

fn module_struct_by_id<'db>( &'db self, struct_id: StructId<'db>, ) -> Maybe<ItemStruct<'db>>

Source

fn module_enums_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Maybe<&'db [EnumId<'db>]>

Source

fn module_enum_by_id<'db>( &'db self, enum_id: EnumId<'db>, ) -> Maybe<ItemEnum<'db>>

Source

fn module_type_aliases_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Maybe<&'db [ModuleTypeAliasId<'db>]>

Source

fn module_type_alias_by_id<'db>( &'db self, module_type_alias_id: ModuleTypeAliasId<'db>, ) -> Maybe<ItemTypeAlias<'db>>

Source

fn module_impl_aliases_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Maybe<&'db [ImplAliasId<'db>]>

Source

fn module_impl_alias_by_id<'db>( &'db self, impl_alias_id: ImplAliasId<'db>, ) -> Maybe<ItemImplAlias<'db>>

Source

fn module_traits_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Maybe<&'db [TraitId<'db>]>

Source

fn module_trait_by_id<'db>( &'db self, trait_id: TraitId<'db>, ) -> Maybe<ItemTrait<'db>>

Source

fn module_impls_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Maybe<&'db [ImplDefId<'db>]>

Source

fn module_impl_by_id<'db>( &'db self, impl_id: ImplDefId<'db>, ) -> Maybe<ItemImpl<'db>>

Source

fn module_extern_types_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Maybe<&'db [ExternTypeId<'db>]>

Source

fn module_extern_type_by_id<'db>( &'db self, extern_type_id: ExternTypeId<'db>, ) -> Maybe<ItemExternType<'db>>

Source

fn module_extern_functions_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Maybe<&'db [ExternFunctionId<'db>]>

Source

fn module_extern_function_by_id<'db>( &'db self, extern_function_id: ExternFunctionId<'db>, ) -> Maybe<ItemExternFunction<'db>>

Source

fn module_macro_declarations_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Maybe<&'db [MacroDeclarationId<'db>]>

Returns the IDs of the macro declarations in the module.

Source

fn module_macro_declaration_by_id<'db>( &'db self, macro_declaration_id: MacroDeclarationId<'db>, ) -> Maybe<ItemMacroDeclaration<'db>>

Returns the macro declaration by its ID.

Source

fn module_macro_calls_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Maybe<&'db [MacroCallId<'db>]>

Returns the IDs of the macro calls in the module.

Source

fn module_macro_call_by_id<'db>( &'db self, macro_call_id: MacroCallId<'db>, ) -> Maybe<ItemInlineMacro<'db>>

Returns the macro call by its ID.

Source

fn module_ancestors<'db>( &'db self, module_id: ModuleId<'db>, ) -> &'db OrderedHashSet<ModuleId<'db>>

Returns the ancestors of a module.

Source

fn module_perceived_module<'db>( &'db self, module_id: ModuleId<'db>, ) -> ModuleId<'db>

Returns the module that the module is perceives as. Specifically if this is a macro call, it returns the module that the macro call was called from, including recursive calls.

Implementors§

Source§

impl<T: Database + ?Sized> DefsGroup for T