Trait cairo_lang_defs::db::DefsGroup
source · pub trait DefsGroup: Database + HasQueryGroup<DefsDatabase> + FilesGroup + SyntaxGroup + Upcast<dyn SyntaxGroup> + ParserGroup + Upcast<dyn FilesGroup> {
Show 107 methods
// Required methods
fn intern_constant(&self, key0: ConstantLongId) -> ConstantId;
fn lookup_intern_constant(&self, key0: ConstantId) -> ConstantLongId;
fn intern_submodule(&self, key0: SubmoduleLongId) -> SubmoduleId;
fn lookup_intern_submodule(&self, key0: SubmoduleId) -> SubmoduleLongId;
fn intern_use(&self, key0: UseLongId) -> UseId;
fn lookup_intern_use(&self, key0: UseId) -> UseLongId;
fn intern_free_function(&self, key0: FreeFunctionLongId) -> FreeFunctionId;
fn lookup_intern_free_function(
&self,
key0: FreeFunctionId,
) -> FreeFunctionLongId;
fn intern_impl_type_def(&self, key0: ImplTypeDefLongId) -> ImplTypeDefId;
fn lookup_intern_impl_type_def(
&self,
key0: ImplTypeDefId,
) -> ImplTypeDefLongId;
fn intern_impl_constant_def(
&self,
key0: ImplConstantDefLongId,
) -> ImplConstantDefId;
fn lookup_intern_impl_constant_def(
&self,
key0: ImplConstantDefId,
) -> ImplConstantDefLongId;
fn intern_impl_function(&self, key0: ImplFunctionLongId) -> ImplFunctionId;
fn lookup_intern_impl_function(
&self,
key0: ImplFunctionId,
) -> ImplFunctionLongId;
fn intern_struct(&self, key0: StructLongId) -> StructId;
fn lookup_intern_struct(&self, key0: StructId) -> StructLongId;
fn intern_enum(&self, key0: EnumLongId) -> EnumId;
fn lookup_intern_enum(&self, key0: EnumId) -> EnumLongId;
fn intern_module_type_alias(
&self,
key0: ModuleTypeAliasLongId,
) -> ModuleTypeAliasId;
fn lookup_intern_module_type_alias(
&self,
key0: ModuleTypeAliasId,
) -> ModuleTypeAliasLongId;
fn intern_impl_alias(&self, key0: ImplAliasLongId) -> ImplAliasId;
fn lookup_intern_impl_alias(&self, key0: ImplAliasId) -> ImplAliasLongId;
fn intern_member(&self, key0: MemberLongId) -> MemberId;
fn lookup_intern_member(&self, key0: MemberId) -> MemberLongId;
fn intern_variant(&self, key0: VariantLongId) -> VariantId;
fn lookup_intern_variant(&self, key0: VariantId) -> VariantLongId;
fn intern_trait(&self, key0: TraitLongId) -> TraitId;
fn lookup_intern_trait(&self, key0: TraitId) -> TraitLongId;
fn intern_trait_type(&self, key0: TraitTypeLongId) -> TraitTypeId;
fn lookup_intern_trait_type(&self, key0: TraitTypeId) -> TraitTypeLongId;
fn intern_trait_constant(
&self,
key0: TraitConstantLongId,
) -> TraitConstantId;
fn lookup_intern_trait_constant(
&self,
key0: TraitConstantId,
) -> TraitConstantLongId;
fn intern_trait_impl(&self, key0: TraitImplLongId) -> TraitImplId;
fn lookup_intern_trait_impl(&self, key0: TraitImplId) -> TraitImplLongId;
fn intern_trait_function(
&self,
key0: TraitFunctionLongId,
) -> TraitFunctionId;
fn lookup_intern_trait_function(
&self,
key0: TraitFunctionId,
) -> TraitFunctionLongId;
fn intern_impl(&self, key0: ImplDefLongId) -> ImplDefId;
fn lookup_intern_impl(&self, key0: ImplDefId) -> ImplDefLongId;
fn intern_extern_type(&self, key0: ExternTypeLongId) -> ExternTypeId;
fn lookup_intern_extern_type(&self, key0: ExternTypeId) -> ExternTypeLongId;
fn intern_extern_function(
&self,
key0: ExternFunctionLongId,
) -> ExternFunctionId;
fn lookup_intern_extern_function(
&self,
key0: ExternFunctionId,
) -> ExternFunctionLongId;
fn intern_param(&self, key0: ParamLongId) -> ParamId;
fn lookup_intern_param(&self, key0: ParamId) -> ParamLongId;
fn intern_generic_param(&self, key0: GenericParamLongId) -> GenericParamId;
fn lookup_intern_generic_param(
&self,
key0: GenericParamId,
) -> GenericParamLongId;
fn intern_local_var(&self, key0: LocalVarLongId) -> LocalVarId;
fn lookup_intern_local_var(&self, key0: LocalVarId) -> LocalVarLongId;
fn macro_plugins(&self) -> Vec<Arc<dyn MacroPlugin>>;
fn set_macro_plugins(&mut self, value__: Vec<Arc<dyn MacroPlugin>>);
fn set_macro_plugins_with_durability(
&mut self,
value__: Vec<Arc<dyn MacroPlugin>>,
durability__: Durability,
);
fn inline_macro_plugins(
&self,
) -> Arc<OrderedHashMap<String, Arc<dyn InlineMacroExprPlugin>>>;
fn set_inline_macro_plugins(
&mut self,
value__: Arc<OrderedHashMap<String, Arc<dyn InlineMacroExprPlugin>>>,
);
fn set_inline_macro_plugins_with_durability(
&mut self,
value__: Arc<OrderedHashMap<String, Arc<dyn InlineMacroExprPlugin>>>,
durability__: Durability,
);
fn allowed_attributes(&self) -> Arc<OrderedHashSet<String>>;
fn allowed_statement_attributes(&self) -> Arc<OrderedHashSet<String>>;
fn declared_derives(&self) -> Arc<OrderedHashSet<String>>;
fn module_main_file(&self, key0: ModuleId) -> Maybe<FileId>;
fn module_files(&self, key0: ModuleId) -> Maybe<Arc<Vec<FileId>>>;
fn module_file(&self, key0: ModuleFileId) -> Maybe<FileId>;
fn module_dir(&self, key0: ModuleId) -> Maybe<Directory>;
fn get_item_documentation(&self, key0: LookupItemId) -> Option<String>;
fn get_item_signature(&self, key0: LookupItemId) -> String;
fn crate_modules(&self, key0: CrateId) -> Arc<Vec<ModuleId>>;
fn priv_file_to_module_mapping(
&self,
) -> Arc<OrderedHashMap<FileId, Vec<ModuleId>>>;
fn file_modules(&self, key0: FileId) -> Maybe<Arc<Vec<ModuleId>>>;
fn priv_module_data(&self, key0: ModuleId) -> Maybe<ModuleData>;
fn module_submodules(
&self,
key0: ModuleId,
) -> Maybe<Arc<OrderedHashMap<SubmoduleId, ItemModule>>>;
fn module_submodules_ids(
&self,
key0: ModuleId,
) -> Maybe<Arc<Vec<SubmoduleId>>>;
fn module_constants(
&self,
key0: ModuleId,
) -> Maybe<Arc<OrderedHashMap<ConstantId, ItemConstant>>>;
fn module_constants_ids(
&self,
key0: ModuleId,
) -> Maybe<Arc<Vec<ConstantId>>>;
fn module_constant_by_id(
&self,
key0: ConstantId,
) -> Maybe<Option<ItemConstant>>;
fn module_free_functions(
&self,
key0: ModuleId,
) -> Maybe<Arc<OrderedHashMap<FreeFunctionId, FunctionWithBody>>>;
fn module_free_functions_ids(
&self,
key0: ModuleId,
) -> Maybe<Arc<Vec<FreeFunctionId>>>;
fn module_free_function_by_id(
&self,
key0: FreeFunctionId,
) -> Maybe<Option<FunctionWithBody>>;
fn module_items(&self, key0: ModuleId) -> Maybe<Arc<Vec<ModuleItemId>>>;
fn module_item_name_stable_ptr(
&self,
key0: ModuleId,
key1: ModuleItemId,
) -> Maybe<SyntaxStablePtrId>;
fn module_uses(
&self,
key0: ModuleId,
) -> Maybe<Arc<OrderedHashMap<UseId, UsePathLeaf>>>;
fn module_uses_ids(&self, key0: ModuleId) -> Maybe<Arc<Vec<UseId>>>;
fn module_use_by_id(&self, key0: UseId) -> Maybe<Option<UsePathLeaf>>;
fn module_structs(
&self,
key0: ModuleId,
) -> Maybe<Arc<OrderedHashMap<StructId, ItemStruct>>>;
fn module_structs_ids(&self, key0: ModuleId) -> Maybe<Arc<Vec<StructId>>>;
fn module_struct_by_id(&self, key0: StructId) -> Maybe<Option<ItemStruct>>;
fn module_enums(
&self,
key0: ModuleId,
) -> Maybe<Arc<OrderedHashMap<EnumId, ItemEnum>>>;
fn module_enums_ids(&self, key0: ModuleId) -> Maybe<Arc<Vec<EnumId>>>;
fn module_enum_by_id(&self, key0: EnumId) -> Maybe<Option<ItemEnum>>;
fn module_type_aliases(
&self,
key0: ModuleId,
) -> Maybe<Arc<OrderedHashMap<ModuleTypeAliasId, ItemTypeAlias>>>;
fn module_type_aliases_ids(
&self,
key0: ModuleId,
) -> Maybe<Arc<Vec<ModuleTypeAliasId>>>;
fn module_type_alias_by_id(
&self,
key0: ModuleTypeAliasId,
) -> Maybe<Option<ItemTypeAlias>>;
fn module_impl_aliases(
&self,
key0: ModuleId,
) -> Maybe<Arc<OrderedHashMap<ImplAliasId, ItemImplAlias>>>;
fn module_impl_aliases_ids(
&self,
key0: ModuleId,
) -> Maybe<Arc<Vec<ImplAliasId>>>;
fn module_impl_alias_by_id(
&self,
key0: ImplAliasId,
) -> Maybe<Option<ItemImplAlias>>;
fn module_traits(
&self,
key0: ModuleId,
) -> Maybe<Arc<OrderedHashMap<TraitId, ItemTrait>>>;
fn module_traits_ids(&self, key0: ModuleId) -> Maybe<Arc<Vec<TraitId>>>;
fn module_trait_by_id(&self, key0: TraitId) -> Maybe<Option<ItemTrait>>;
fn module_impls(
&self,
key0: ModuleId,
) -> Maybe<Arc<OrderedHashMap<ImplDefId, ItemImpl>>>;
fn module_impls_ids(&self, key0: ModuleId) -> Maybe<Arc<Vec<ImplDefId>>>;
fn module_impl_by_id(&self, key0: ImplDefId) -> Maybe<Option<ItemImpl>>;
fn module_extern_types(
&self,
key0: ModuleId,
) -> Maybe<Arc<OrderedHashMap<ExternTypeId, ItemExternType>>>;
fn module_extern_types_ids(
&self,
key0: ModuleId,
) -> Maybe<Arc<Vec<ExternTypeId>>>;
fn module_extern_type_by_id(
&self,
key0: ExternTypeId,
) -> Maybe<Option<ItemExternType>>;
fn module_extern_functions(
&self,
key0: ModuleId,
) -> Maybe<Arc<OrderedHashMap<ExternFunctionId, ItemExternFunction>>>;
fn module_extern_functions_ids(
&self,
key0: ModuleId,
) -> Maybe<Arc<Vec<ExternFunctionId>>>;
fn module_extern_function_by_id(
&self,
key0: ExternFunctionId,
) -> Maybe<Option<ItemExternFunction>>;
fn module_ancestors(&self, key0: ModuleId) -> OrderedHashSet<ModuleId>;
fn module_generated_file_infos(
&self,
key0: ModuleId,
) -> Maybe<Arc<Vec<Option<GeneratedFileInfo>>>>;
fn module_plugin_diagnostics(
&self,
key0: ModuleId,
) -> Maybe<Arc<Vec<(ModuleFileId, PluginDiagnostic)>>>;
}Expand description
Salsa database interface.
See super::ids for further details.
Required Methods§
fn intern_constant(&self, key0: ConstantLongId) -> ConstantId
fn lookup_intern_constant(&self, key0: ConstantId) -> ConstantLongId
fn intern_submodule(&self, key0: SubmoduleLongId) -> SubmoduleId
fn lookup_intern_submodule(&self, key0: SubmoduleId) -> SubmoduleLongId
fn intern_use(&self, key0: UseLongId) -> UseId
fn lookup_intern_use(&self, key0: UseId) -> UseLongId
fn intern_free_function(&self, key0: FreeFunctionLongId) -> FreeFunctionId
fn lookup_intern_free_function( &self, key0: FreeFunctionId, ) -> FreeFunctionLongId
fn intern_impl_type_def(&self, key0: ImplTypeDefLongId) -> ImplTypeDefId
fn lookup_intern_impl_type_def(&self, key0: ImplTypeDefId) -> ImplTypeDefLongId
fn intern_impl_constant_def( &self, key0: ImplConstantDefLongId, ) -> ImplConstantDefId
fn lookup_intern_impl_constant_def( &self, key0: ImplConstantDefId, ) -> ImplConstantDefLongId
fn intern_impl_function(&self, key0: ImplFunctionLongId) -> ImplFunctionId
fn lookup_intern_impl_function( &self, key0: ImplFunctionId, ) -> ImplFunctionLongId
fn intern_struct(&self, key0: StructLongId) -> StructId
fn lookup_intern_struct(&self, key0: StructId) -> StructLongId
fn intern_enum(&self, key0: EnumLongId) -> EnumId
fn lookup_intern_enum(&self, key0: EnumId) -> EnumLongId
fn intern_module_type_alias( &self, key0: ModuleTypeAliasLongId, ) -> ModuleTypeAliasId
fn lookup_intern_module_type_alias( &self, key0: ModuleTypeAliasId, ) -> ModuleTypeAliasLongId
fn intern_impl_alias(&self, key0: ImplAliasLongId) -> ImplAliasId
fn lookup_intern_impl_alias(&self, key0: ImplAliasId) -> ImplAliasLongId
fn intern_member(&self, key0: MemberLongId) -> MemberId
fn lookup_intern_member(&self, key0: MemberId) -> MemberLongId
fn intern_variant(&self, key0: VariantLongId) -> VariantId
fn lookup_intern_variant(&self, key0: VariantId) -> VariantLongId
fn intern_trait(&self, key0: TraitLongId) -> TraitId
fn lookup_intern_trait(&self, key0: TraitId) -> TraitLongId
fn intern_trait_type(&self, key0: TraitTypeLongId) -> TraitTypeId
fn lookup_intern_trait_type(&self, key0: TraitTypeId) -> TraitTypeLongId
fn intern_trait_constant(&self, key0: TraitConstantLongId) -> TraitConstantId
fn lookup_intern_trait_constant( &self, key0: TraitConstantId, ) -> TraitConstantLongId
fn intern_trait_impl(&self, key0: TraitImplLongId) -> TraitImplId
fn lookup_intern_trait_impl(&self, key0: TraitImplId) -> TraitImplLongId
fn intern_trait_function(&self, key0: TraitFunctionLongId) -> TraitFunctionId
fn lookup_intern_trait_function( &self, key0: TraitFunctionId, ) -> TraitFunctionLongId
fn intern_impl(&self, key0: ImplDefLongId) -> ImplDefId
fn lookup_intern_impl(&self, key0: ImplDefId) -> ImplDefLongId
fn intern_extern_type(&self, key0: ExternTypeLongId) -> ExternTypeId
fn lookup_intern_extern_type(&self, key0: ExternTypeId) -> ExternTypeLongId
fn intern_extern_function(&self, key0: ExternFunctionLongId) -> ExternFunctionId
fn lookup_intern_extern_function( &self, key0: ExternFunctionId, ) -> ExternFunctionLongId
fn intern_param(&self, key0: ParamLongId) -> ParamId
fn lookup_intern_param(&self, key0: ParamId) -> ParamLongId
fn intern_generic_param(&self, key0: GenericParamLongId) -> GenericParamId
fn lookup_intern_generic_param( &self, key0: GenericParamId, ) -> GenericParamLongId
fn intern_local_var(&self, key0: LocalVarLongId) -> LocalVarId
fn lookup_intern_local_var(&self, key0: LocalVarId) -> LocalVarLongId
fn macro_plugins(&self) -> Vec<Arc<dyn MacroPlugin>>
sourcefn set_macro_plugins(&mut self, value__: Vec<Arc<dyn MacroPlugin>>)
fn set_macro_plugins(&mut self, value__: Vec<Arc<dyn MacroPlugin>>)
Set the value of the macro_plugins input.
See macro_plugins for details.
Note: Setting values will trigger cancellation of any ongoing queries; this method blocks until those queries have been cancelled.
sourcefn set_macro_plugins_with_durability(
&mut self,
value__: Vec<Arc<dyn MacroPlugin>>,
durability__: Durability,
)
fn set_macro_plugins_with_durability( &mut self, value__: Vec<Arc<dyn MacroPlugin>>, durability__: Durability, )
Set the value of the macro_plugins input and promise
that its value will never change again.
See macro_plugins for details.
Note: Setting values will trigger cancellation of any ongoing queries; this method blocks until those queries have been cancelled.
fn inline_macro_plugins( &self, ) -> Arc<OrderedHashMap<String, Arc<dyn InlineMacroExprPlugin>>>
sourcefn set_inline_macro_plugins(
&mut self,
value__: Arc<OrderedHashMap<String, Arc<dyn InlineMacroExprPlugin>>>,
)
fn set_inline_macro_plugins( &mut self, value__: Arc<OrderedHashMap<String, Arc<dyn InlineMacroExprPlugin>>>, )
Set the value of the inline_macro_plugins input.
See inline_macro_plugins for details.
Note: Setting values will trigger cancellation of any ongoing queries; this method blocks until those queries have been cancelled.
sourcefn set_inline_macro_plugins_with_durability(
&mut self,
value__: Arc<OrderedHashMap<String, Arc<dyn InlineMacroExprPlugin>>>,
durability__: Durability,
)
fn set_inline_macro_plugins_with_durability( &mut self, value__: Arc<OrderedHashMap<String, Arc<dyn InlineMacroExprPlugin>>>, durability__: Durability, )
Set the value of the inline_macro_plugins input and promise
that its value will never change again.
See inline_macro_plugins for details.
Note: Setting values will trigger cancellation of any ongoing queries; this method blocks until those queries have been cancelled.
sourcefn allowed_attributes(&self) -> Arc<OrderedHashSet<String>>
fn allowed_attributes(&self) -> Arc<OrderedHashSet<String>>
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.
sourcefn allowed_statement_attributes(&self) -> Arc<OrderedHashSet<String>>
fn allowed_statement_attributes(&self) -> Arc<OrderedHashSet<String>>
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.
sourcefn declared_derives(&self) -> Arc<OrderedHashSet<String>>
fn declared_derives(&self) -> Arc<OrderedHashSet<String>>
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.
sourcefn module_main_file(&self, key0: ModuleId) -> Maybe<FileId>
fn module_main_file(&self, key0: ModuleId) -> Maybe<FileId>
Gets the main file of the module. A module might have more virtual files generated by plugins.
sourcefn module_files(&self, key0: ModuleId) -> Maybe<Arc<Vec<FileId>>>
fn module_files(&self, key0: ModuleId) -> Maybe<Arc<Vec<FileId>>>
Gets all the files of a module - main files and generated virtual files.
sourcefn module_file(&self, key0: ModuleFileId) -> Maybe<FileId>
fn module_file(&self, key0: ModuleFileId) -> Maybe<FileId>
Gets a file from a module and a FileIndex (i.e. ModuleFileId).
sourcefn module_dir(&self, key0: ModuleId) -> Maybe<Directory>
fn module_dir(&self, key0: ModuleId) -> Maybe<Directory>
Gets the directory of a module.
sourcefn get_item_documentation(&self, key0: LookupItemId) -> Option<String>
fn get_item_documentation(&self, key0: LookupItemId) -> Option<String>
Gets the documentation above an item definition.
sourcefn get_item_signature(&self, key0: LookupItemId) -> String
fn get_item_signature(&self, key0: LookupItemId) -> String
Gets the signature of an item (i.e., item without its body).
fn crate_modules(&self, key0: CrateId) -> Arc<Vec<ModuleId>>
fn priv_file_to_module_mapping( &self, ) -> Arc<OrderedHashMap<FileId, Vec<ModuleId>>>
fn file_modules(&self, key0: FileId) -> Maybe<Arc<Vec<ModuleId>>>
fn priv_module_data(&self, key0: ModuleId) -> Maybe<ModuleData>
fn module_submodules( &self, key0: ModuleId, ) -> Maybe<Arc<OrderedHashMap<SubmoduleId, ItemModule>>>
fn module_submodules_ids(&self, key0: ModuleId) -> Maybe<Arc<Vec<SubmoduleId>>>
fn module_constants( &self, key0: ModuleId, ) -> Maybe<Arc<OrderedHashMap<ConstantId, ItemConstant>>>
fn module_constants_ids(&self, key0: ModuleId) -> Maybe<Arc<Vec<ConstantId>>>
fn module_constant_by_id(&self, key0: ConstantId) -> Maybe<Option<ItemConstant>>
fn module_free_functions( &self, key0: ModuleId, ) -> Maybe<Arc<OrderedHashMap<FreeFunctionId, FunctionWithBody>>>
fn module_free_functions_ids( &self, key0: ModuleId, ) -> Maybe<Arc<Vec<FreeFunctionId>>>
fn module_free_function_by_id( &self, key0: FreeFunctionId, ) -> Maybe<Option<FunctionWithBody>>
fn module_items(&self, key0: ModuleId) -> Maybe<Arc<Vec<ModuleItemId>>>
sourcefn module_item_name_stable_ptr(
&self,
key0: ModuleId,
key1: ModuleItemId,
) -> Maybe<SyntaxStablePtrId>
fn module_item_name_stable_ptr( &self, key0: ModuleId, key1: ModuleItemId, ) -> Maybe<SyntaxStablePtrId>
Returns the stable ptr of the name of a module item.