Struct cairo_lang_compiler::db::RootDatabase
source · pub struct RootDatabase { /* private fields */ }
Implementations§
source§impl RootDatabase
impl RootDatabase
pub fn new(plugins: Vec<Arc<dyn SemanticPlugin>>) -> Self
pub fn empty() -> Self
pub fn builder() -> RootDatabaseBuilder
Trait Implementations§
source§impl AsFilesGroupMut for RootDatabase
impl AsFilesGroupMut for RootDatabase
fn as_files_group_mut(&mut self) -> &mut (dyn FilesGroup + 'static)
source§impl Database for RootDatabase
impl Database for RootDatabase
source§fn sweep_all(&self, strategy: SweepStrategy)
fn sweep_all(&self, strategy: SweepStrategy)
Iterates through all query storage and removes any values that
have not been used since the last revision was created. The
intended use-cycle is that you first execute all of your
“main” queries; this will ensure that all query values they
consume are marked as used. You then invoke this method to
remove other values that were not needed for your main query
results.
source§fn salsa_event(&self, event_fn: Event)
fn salsa_event(&self, event_fn: Event)
This function is invoked at key points in the salsa
runtime. It permits the database to be customized and to
inject logging or other custom behavior.
source§fn on_propagated_panic(&self) -> !
fn on_propagated_panic(&self) -> !
This function is invoked when a dependent query is being computed by the
other thread, and that thread panics.
source§fn salsa_runtime(&self) -> &Runtime
fn salsa_runtime(&self) -> &Runtime
Gives access to the underlying salsa runtime.
source§fn salsa_runtime_mut(&mut self) -> &mut Runtime
fn salsa_runtime_mut(&mut self) -> &mut Runtime
Gives access to the underlying salsa runtime.
source§impl DatabaseOps for RootDatabase
impl DatabaseOps for RootDatabase
source§fn ops_database(&self) -> &dyn Database
fn ops_database(&self) -> &dyn Database
Upcast this type to a
dyn Database
.source§fn ops_salsa_runtime(&self) -> &Runtime
fn ops_salsa_runtime(&self) -> &Runtime
Gives access to the underlying salsa runtime.
source§fn ops_salsa_runtime_mut(&mut self) -> &mut Runtime
fn ops_salsa_runtime_mut(&mut self) -> &mut Runtime
Gives access to the underlying salsa runtime.
source§fn fmt_index(&self, input: DatabaseKeyIndex, fmt: &mut Formatter<'_>) -> Result
fn fmt_index(&self, input: DatabaseKeyIndex, fmt: &mut Formatter<'_>) -> Result
Formats a database key index in a human readable fashion.
source§fn maybe_changed_since(&self, input: DatabaseKeyIndex, revision: Revision) -> bool
fn maybe_changed_since(&self, input: DatabaseKeyIndex, revision: Revision) -> bool
True if the computed value for
input
may have changed since revision
.source§fn for_each_query(&self, op: &mut dyn FnMut(&dyn QueryStorageMassOps))
fn for_each_query(&self, op: &mut dyn FnMut(&dyn QueryStorageMassOps))
Executes the callback for each kind of query.
source§impl DatabaseStorageTypes for RootDatabase
impl DatabaseStorageTypes for RootDatabase
§type DatabaseStorage = __SalsaDatabaseStorage
type DatabaseStorage = __SalsaDatabaseStorage
Defines the “storage type”, where all the query data is kept.
This type is defined by the
database_storage
macro.source§impl Default for RootDatabase
impl Default for RootDatabase
source§impl HasMacroPlugins for RootDatabase
impl HasMacroPlugins for RootDatabase
fn macro_plugins(&self) -> Vec<Arc<dyn MacroPlugin>> ⓘ
source§impl HasQueryGroup<DefsDatabase> for RootDatabase
impl HasQueryGroup<DefsDatabase> for RootDatabase
source§fn group_storage(&self) -> &<DefsDatabase as QueryGroup>::GroupStorage
fn group_storage(&self) -> &<DefsDatabase as QueryGroup>::GroupStorage
Access the group storage struct from the database.
source§impl HasQueryGroup<FilesDatabase> for RootDatabase
impl HasQueryGroup<FilesDatabase> for RootDatabase
source§fn group_storage(&self) -> &<FilesDatabase as QueryGroup>::GroupStorage
fn group_storage(&self) -> &<FilesDatabase as QueryGroup>::GroupStorage
Access the group storage struct from the database.
source§impl HasQueryGroup<LoweringDatabase> for RootDatabase
impl HasQueryGroup<LoweringDatabase> for RootDatabase
source§fn group_storage(&self) -> &<LoweringDatabase as QueryGroup>::GroupStorage
fn group_storage(&self) -> &<LoweringDatabase as QueryGroup>::GroupStorage
Access the group storage struct from the database.
source§impl HasQueryGroup<ParserDatabase> for RootDatabase
impl HasQueryGroup<ParserDatabase> for RootDatabase
source§fn group_storage(&self) -> &<ParserDatabase as QueryGroup>::GroupStorage
fn group_storage(&self) -> &<ParserDatabase as QueryGroup>::GroupStorage
Access the group storage struct from the database.
source§impl HasQueryGroup<SemanticDatabase> for RootDatabase
impl HasQueryGroup<SemanticDatabase> for RootDatabase
source§fn group_storage(&self) -> &<SemanticDatabase as QueryGroup>::GroupStorage
fn group_storage(&self) -> &<SemanticDatabase as QueryGroup>::GroupStorage
Access the group storage struct from the database.
source§impl HasQueryGroup<SierraGenDatabase> for RootDatabase
impl HasQueryGroup<SierraGenDatabase> for RootDatabase
source§fn group_storage(&self) -> &<SierraGenDatabase as QueryGroup>::GroupStorage
fn group_storage(&self) -> &<SierraGenDatabase as QueryGroup>::GroupStorage
Access the group storage struct from the database.
source§impl HasQueryGroup<SyntaxDatabase> for RootDatabase
impl HasQueryGroup<SyntaxDatabase> for RootDatabase
source§fn group_storage(&self) -> &<SyntaxDatabase as QueryGroup>::GroupStorage
fn group_storage(&self) -> &<SyntaxDatabase as QueryGroup>::GroupStorage
Access the group storage struct from the database.
source§impl Upcast<dyn DefsGroup + 'static> for RootDatabase
impl Upcast<dyn DefsGroup + 'static> for RootDatabase
source§impl Upcast<dyn FilesGroup + 'static> for RootDatabase
impl Upcast<dyn FilesGroup + 'static> for RootDatabase
fn upcast(&self) -> &(dyn FilesGroup + 'static)
source§impl Upcast<dyn LoweringGroup + 'static> for RootDatabase
impl Upcast<dyn LoweringGroup + 'static> for RootDatabase
fn upcast(&self) -> &(dyn LoweringGroup + 'static)
source§impl Upcast<dyn SemanticGroup + 'static> for RootDatabase
impl Upcast<dyn SemanticGroup + 'static> for RootDatabase
fn upcast(&self) -> &(dyn SemanticGroup + 'static)
source§impl Upcast<dyn SyntaxGroup + 'static> for RootDatabase
impl Upcast<dyn SyntaxGroup + 'static> for RootDatabase
fn upcast(&self) -> &(dyn SyntaxGroup + 'static)
Auto Trait Implementations§
impl !RefUnwindSafe for RootDatabase
impl Send for RootDatabase
impl !Sync for RootDatabase
impl Unpin for RootDatabase
impl !UnwindSafe for RootDatabase
Blanket Implementations§
source§impl<DB> DefsGroup for DBwhere
DB: FilesGroup + SyntaxGroup + Upcast<dyn SyntaxGroup + 'static> + ParserGroup + Upcast<dyn FilesGroup + 'static> + HasMacroPlugins + Database + HasQueryGroup<DefsDatabase>,
impl<DB> DefsGroup for DBwhere
DB: FilesGroup + SyntaxGroup + Upcast<dyn SyntaxGroup + 'static> + ParserGroup + Upcast<dyn FilesGroup + 'static> + HasMacroPlugins + Database + HasQueryGroup<DefsDatabase>,
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_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_type_alias(&self, key0: TypeAliasLongId) -> TypeAliasId
fn lookup_intern_type_alias(&self, key0: TypeAliasId) -> TypeAliasLongId
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_function(&self, key0: TraitFunctionLongId) -> TraitFunctionId
fn lookup_intern_trait_function(
&self,
key0: TraitFunctionId
) -> TraitFunctionLongId
fn intern_impl(&self, key0: ImplLongId) -> ImplId
fn lookup_intern_impl(&self, key0: ImplId) -> ImplLongId
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
source§fn module_main_file(&self, key0: ModuleId) -> Result<FileId, DiagnosticAdded>
fn module_main_file(&self, key0: ModuleId) -> Result<FileId, DiagnosticAdded>
Gets the main file of the module.
A module might have more virtual files generated by plugins.
source§fn module_files(
&self,
key0: ModuleId
) -> Result<Vec<FileId, Global>, DiagnosticAdded>
fn module_files(
&self,
key0: ModuleId
) -> Result<Vec<FileId, Global>, DiagnosticAdded>
Gets all the files of a module - main files and generated virtual files.
source§fn module_file(&self, key0: ModuleFileId) -> Result<FileId, DiagnosticAdded>
fn module_file(&self, key0: ModuleFileId) -> Result<FileId, DiagnosticAdded>
Gets a file from a module and a FileIndex (i.e. ModuleFileId).
source§fn module_dir(&self, key0: ModuleId) -> Result<Directory, DiagnosticAdded>
fn module_dir(&self, key0: ModuleId) -> Result<Directory, DiagnosticAdded>
Gets the directory of a module.
fn crate_modules(&self, key0: CrateId) -> Arc<Vec<ModuleId, Global>>
fn priv_file_to_module_mapping(
&self
) -> OrderedHashMap<FileId, Vec<ModuleId, Global>>
fn file_modules(
&self,
key0: FileId
) -> Result<Vec<ModuleId, Global>, DiagnosticAdded>
fn priv_module_data(&self, key0: ModuleId) -> Result<ModuleData, DiagnosticAdded>
fn module_submodules(
&self,
key0: ModuleId
) -> Result<OrderedHashMap<SubmoduleId, ItemModule>, DiagnosticAdded>
fn module_submodules_ids(
&self,
key0: ModuleId
) -> Result<Vec<SubmoduleId, Global>, DiagnosticAdded>
fn module_constants(
&self,
key0: ModuleId
) -> Result<OrderedHashMap<ConstantId, ItemConstant>, DiagnosticAdded>
fn module_constants_ids(
&self,
key0: ModuleId
) -> Result<Vec<ConstantId, Global>, DiagnosticAdded>
fn module_free_functions(
&self,
key0: ModuleId
) -> Result<OrderedHashMap<FreeFunctionId, FunctionWithBody>, DiagnosticAdded>
fn module_free_functions_ids(
&self,
key0: ModuleId
) -> Result<Vec<FreeFunctionId, Global>, DiagnosticAdded>
fn module_items(
&self,
key0: ModuleId
) -> Result<Arc<Vec<ModuleItemId, Global>>, DiagnosticAdded>
fn module_uses(
&self,
key0: ModuleId
) -> Result<OrderedHashMap<UseId, ItemUse>, DiagnosticAdded>
fn module_uses_ids(
&self,
key0: ModuleId
) -> Result<Vec<UseId, Global>, DiagnosticAdded>
fn module_structs(
&self,
key0: ModuleId
) -> Result<OrderedHashMap<StructId, ItemStruct>, DiagnosticAdded>
fn module_structs_ids(
&self,
key0: ModuleId
) -> Result<Vec<StructId, Global>, DiagnosticAdded>
fn module_enums(
&self,
key0: ModuleId
) -> Result<OrderedHashMap<EnumId, ItemEnum>, DiagnosticAdded>
fn module_enums_ids(
&self,
key0: ModuleId
) -> Result<Vec<EnumId, Global>, DiagnosticAdded>
fn module_type_aliases(
&self,
key0: ModuleId
) -> Result<OrderedHashMap<TypeAliasId, ItemTypeAlias>, DiagnosticAdded>
fn module_type_aliases_ids(
&self,
key0: ModuleId
) -> Result<Vec<TypeAliasId, Global>, DiagnosticAdded>
fn module_traits(
&self,
key0: ModuleId
) -> Result<OrderedHashMap<TraitId, ItemTrait>, DiagnosticAdded>
fn module_traits_ids(
&self,
key0: ModuleId
) -> Result<Vec<TraitId, Global>, DiagnosticAdded>
fn module_impls(
&self,
key0: ModuleId
) -> Result<OrderedHashMap<ImplId, ItemImpl>, DiagnosticAdded>
fn module_impls_ids(
&self,
key0: ModuleId
) -> Result<Vec<ImplId, Global>, DiagnosticAdded>
fn module_extern_types(
&self,
key0: ModuleId
) -> Result<OrderedHashMap<ExternTypeId, ItemExternType>, DiagnosticAdded>
fn module_extern_types_ids(
&self,
key0: ModuleId
) -> Result<Vec<ExternTypeId, Global>, DiagnosticAdded>
fn module_extern_functions(
&self,
key0: ModuleId
) -> Result<OrderedHashMap<ExternFunctionId, ItemExternFunction>, DiagnosticAdded>
fn module_extern_functions_ids(
&self,
key0: ModuleId
) -> Result<Vec<ExternFunctionId, Global>, DiagnosticAdded>
fn module_generated_file_info(
&self,
key0: ModuleId
) -> Result<Vec<Option<GeneratedFileInfo>, Global>, DiagnosticAdded>
fn module_plugin_diagnostics(
&self,
key0: ModuleId
) -> Result<Vec<(ModuleFileId, PluginDiagnostic), Global>, DiagnosticAdded>
source§impl<T> Elongate for Twhere
T: Upcast<dyn SemanticGroup + 'static>,
impl<T> Elongate for Twhere
T: Upcast<dyn SemanticGroup + 'static>,
fn elongate(&self) -> &(dyn SemanticGroup + 'static)
source§impl<DB> FilesGroup for DBwhere
DB: Database + HasQueryGroup<FilesDatabase>,
impl<DB> FilesGroup for DBwhere
DB: Database + HasQueryGroup<FilesDatabase>,
fn intern_crate(&self, key0: CrateLongId) -> CrateId
fn lookup_intern_crate(&self, key0: CrateId) -> CrateLongId
fn intern_file(&self, key0: FileLongId) -> FileId
fn lookup_intern_file(&self, key0: FileId) -> FileLongId
source§fn crate_roots(&self) -> Arc<HashMap<CrateId, Directory, RandomState>>
fn crate_roots(&self) -> Arc<HashMap<CrateId, Directory, RandomState>>
Main input of the project. Lists all the crates.
source§fn set_crate_roots(
&mut self,
value__: Arc<HashMap<CrateId, Directory, RandomState>>
)
fn set_crate_roots(
&mut self,
value__: Arc<HashMap<CrateId, Directory, RandomState>>
)
Set the value of the
crate_roots
input. Read moresource§fn set_crate_roots_with_durability(
&mut self,
value__: Arc<HashMap<CrateId, Directory, RandomState>>,
durability__: Durability
)
fn set_crate_roots_with_durability(
&mut self,
value__: Arc<HashMap<CrateId, Directory, RandomState>>,
durability__: Durability
)
Set the value of the
crate_roots
input and promise
that its value will never change again. Read moresource§fn file_overrides(&self) -> Arc<HashMap<FileId, Arc<String>, RandomState>>
fn file_overrides(&self) -> Arc<HashMap<FileId, Arc<String>, RandomState>>
Overrides for file content. Mostly used by language server and tests.
TODO(spapini): Currently, when this input changes, all the file_content() queries will
be invalidated.
Change this mechanism to hold file_overrides on the db struct outside salsa mechanism,
and invalidate manually.
source§fn set_file_overrides(
&mut self,
value__: Arc<HashMap<FileId, Arc<String>, RandomState>>
)
fn set_file_overrides(
&mut self,
value__: Arc<HashMap<FileId, Arc<String>, RandomState>>
)
Set the value of the
file_overrides
input. Read moresource§fn set_file_overrides_with_durability(
&mut self,
value__: Arc<HashMap<FileId, Arc<String>, RandomState>>,
durability__: Durability
)
fn set_file_overrides_with_durability(
&mut self,
value__: Arc<HashMap<FileId, Arc<String>, RandomState>>,
durability__: Durability
)
Set the value of the
file_overrides
input and promise
that its value will never change again. Read moresource§fn priv_raw_file_content(&self, key0: FileId) -> Option<Arc<String>>
fn priv_raw_file_content(&self, key0: FileId) -> Option<Arc<String>>
Query for raw file contents. Private.
source§fn file_content(&self, key0: FileId) -> Option<Arc<String>>
fn file_content(&self, key0: FileId) -> Option<Arc<String>>
Query for the file contents. This takes overrides into consideration.
fn file_summary(&self, key0: FileId) -> Option<Arc<FileSummary>>
source§impl<T> FilesGroupEx for Twhere
T: Upcast<dyn FilesGroup + 'static> + AsFilesGroupMut + ?Sized,
impl<T> FilesGroupEx for Twhere
T: Upcast<dyn FilesGroup + 'static> + AsFilesGroupMut + ?Sized,
source§impl<DB> LoweringGroup for DBwhere
DB: SemanticGroup + Upcast<dyn SemanticGroup + 'static> + Database + HasQueryGroup<LoweringDatabase>,
impl<DB> LoweringGroup for DBwhere
DB: SemanticGroup + Upcast<dyn SemanticGroup + 'static> + Database + HasQueryGroup<LoweringDatabase>,
source§fn priv_function_with_body_lowered_structured(
&self,
key0: FunctionWithBodyId
) -> Result<Arc<StructuredLowered>, DiagnosticAdded>
fn priv_function_with_body_lowered_structured(
&self,
key0: FunctionWithBodyId
) -> Result<Arc<StructuredLowered>, DiagnosticAdded>
Computes the lowered representation of a function with a body.
fn priv_inline_data(
&self,
key0: FunctionWithBodyId
) -> Result<Arc<PrivInlineData>, DiagnosticAdded>
source§fn priv_function_with_body_lowered_flat(
&self,
key0: FunctionWithBodyId
) -> Result<Arc<FlatLowered>, DiagnosticAdded>
fn priv_function_with_body_lowered_flat(
&self,
key0: FunctionWithBodyId
) -> Result<Arc<FlatLowered>, DiagnosticAdded>
Computes the lowered representation of a function with a body.
source§fn priv_concrete_function_with_body_lowered_flat(
&self,
key0: ConcreteFunctionWithBodyId
) -> Result<Arc<FlatLowered>, DiagnosticAdded>
fn priv_concrete_function_with_body_lowered_flat(
&self,
key0: ConcreteFunctionWithBodyId
) -> Result<Arc<FlatLowered>, DiagnosticAdded>
A concrete version of priv_function_with_body_lowered_flat
source§fn concrete_function_with_body_lowered(
&self,
key0: ConcreteFunctionWithBodyId
) -> Result<Arc<FlatLowered>, DiagnosticAdded>
fn concrete_function_with_body_lowered(
&self,
key0: ConcreteFunctionWithBodyId
) -> Result<Arc<FlatLowered>, DiagnosticAdded>
Computes the final lowered representation (after all the internal transformations).
source§fn function_with_body_lowering_diagnostics(
&self,
key0: FunctionWithBodyId
) -> Result<Arc<Diagnostics<LoweringDiagnostic>>, DiagnosticAdded>
fn function_with_body_lowering_diagnostics(
&self,
key0: FunctionWithBodyId
) -> Result<Arc<Diagnostics<LoweringDiagnostic>>, DiagnosticAdded>
Aggregates function level semantic diagnostics.
source§fn module_lowering_diagnostics(
&self,
key0: ModuleId
) -> Result<Diagnostics<LoweringDiagnostic>, DiagnosticAdded>
fn module_lowering_diagnostics(
&self,
key0: ModuleId
) -> Result<Diagnostics<LoweringDiagnostic>, DiagnosticAdded>
Aggregates module level semantic diagnostics.
source§fn file_lowering_diagnostics(
&self,
key0: FileId
) -> Result<Diagnostics<LoweringDiagnostic>, DiagnosticAdded>
fn file_lowering_diagnostics(
&self,
key0: FileId
) -> Result<Diagnostics<LoweringDiagnostic>, DiagnosticAdded>
Aggregates file level lowering diagnostics.
source§fn function_scc_representative(
&self,
key0: FunctionWithBodyId
) -> SCCRepresentative
fn function_scc_representative(
&self,
key0: FunctionWithBodyId
) -> SCCRepresentative
Returns the representative of the function’s strongly connected component. The
representative is consistently chosen for all the functions in the same SCC.
source§fn function_scc_explicit_implicits(
&self,
key0: SCCRepresentative
) -> Result<HashSet<TypeId, RandomState>, DiagnosticAdded>
fn function_scc_explicit_implicits(
&self,
key0: SCCRepresentative
) -> Result<HashSet<TypeId, RandomState>, DiagnosticAdded>
Returns the explicit implicits required by all the functions in the SCC of this function.
These are all the implicit parameters that are explicitly declared in the functions of
the given function’s SCC. Read more
source§fn function_all_implicits(
&self,
key0: FunctionId
) -> Result<Vec<TypeId, Global>, DiagnosticAdded>
fn function_all_implicits(
&self,
key0: FunctionId
) -> Result<Vec<TypeId, Global>, DiagnosticAdded>
Returns all the implicit parameters that the function requires (according to both its
signature and the functions it calls). The items in the returned vector are unique and the
order is consistent, but not necessarily related to the order of the explicit implicits in
the signature of the function.
source§fn function_with_body_all_implicits(
&self,
key0: FunctionWithBodyId
) -> Result<HashSet<TypeId, RandomState>, DiagnosticAdded>
fn function_with_body_all_implicits(
&self,
key0: FunctionWithBodyId
) -> Result<HashSet<TypeId, RandomState>, DiagnosticAdded>
Returns all the implicit parameters that a function with a body requires (according to both
its signature and the functions it calls).
source§fn function_with_body_all_implicits_vec(
&self,
key0: FunctionWithBodyId
) -> Result<Vec<TypeId, Global>, DiagnosticAdded>
fn function_with_body_all_implicits_vec(
&self,
key0: FunctionWithBodyId
) -> Result<Vec<TypeId, Global>, DiagnosticAdded>
Returns all the implicit parameters that a function with a body requires (according to both
its signature and the functions it calls). The items in the returned vector are unique
and the order is consistent, but not necessarily related to the order of the explicit
implicits in the signature of the function.
source§fn function_may_panic(&self, key0: FunctionId) -> Result<bool, DiagnosticAdded>
fn function_may_panic(&self, key0: FunctionId) -> Result<bool, DiagnosticAdded>
Returns whether the function may panic.
source§fn function_with_body_may_panic(
&self,
key0: FunctionWithBodyId
) -> Result<bool, DiagnosticAdded>
fn function_with_body_may_panic(
&self,
key0: FunctionWithBodyId
) -> Result<bool, DiagnosticAdded>
Returns whether the function may panic.
source§fn function_with_body_scc(
&self,
key0: FunctionWithBodyId
) -> Vec<FunctionWithBodyId, Global> ⓘ
fn function_with_body_scc(
&self,
key0: FunctionWithBodyId
) -> Vec<FunctionWithBodyId, Global> ⓘ
Returns all the functions in the same strongly connected component as the given function.
source§fn implicit_precedence(&self) -> Arc<Vec<TypeId, Global>>
fn implicit_precedence(&self) -> Arc<Vec<TypeId, Global>>
An array that sets the precedence of implicit types.
source§fn set_implicit_precedence(&mut self, value__: Arc<Vec<TypeId, Global>>)
fn set_implicit_precedence(&mut self, value__: Arc<Vec<TypeId, Global>>)
Set the value of the
implicit_precedence
input. Read moresource§fn set_implicit_precedence_with_durability(
&mut self,
value__: Arc<Vec<TypeId, Global>>,
durability__: Durability
)
fn set_implicit_precedence_with_durability(
&mut self,
value__: Arc<Vec<TypeId, Global>>,
durability__: Durability
)
Set the value of the
implicit_precedence
input and promise
that its value will never change again. Read moresource§impl<DB> ParserGroup for DBwhere
DB: SyntaxGroup + Upcast<dyn SyntaxGroup + 'static> + FilesGroup + Database + HasQueryGroup<ParserDatabase>,
impl<DB> ParserGroup for DBwhere
DB: SyntaxGroup + Upcast<dyn SyntaxGroup + 'static> + FilesGroup + Database + HasQueryGroup<ParserDatabase>,
source§fn priv_file_syntax_data(&self, key0: FileId) -> SyntaxData
fn priv_file_syntax_data(&self, key0: FileId) -> SyntaxData
Should only be used internally.
Parses a file and returns the result and the generated ParserDiagnostic.
source§fn file_syntax(&self, key0: FileId) -> Result<Arc<SyntaxFile>, DiagnosticAdded>
fn file_syntax(&self, key0: FileId) -> Result<Arc<SyntaxFile>, DiagnosticAdded>
Parses a file and returns its AST.
source§fn file_syntax_diagnostics(&self, key0: FileId) -> Diagnostics<ParserDiagnostic>
fn file_syntax_diagnostics(&self, key0: FileId) -> Diagnostics<ParserDiagnostic>
Returns the parser diagnostics for this file.
source§impl<'a, T> SemanticEnumEx<'a> for Twhere
T: Upcast<dyn SemanticGroup + 'a> + ?Sized,
impl<'a, T> SemanticEnumEx<'a> for Twhere
T: Upcast<dyn SemanticGroup + 'a> + ?Sized,
source§fn concrete_enum_variant(
&self,
concrete_enum_id: ConcreteEnumId,
variant: &Variant
) -> Result<ConcreteVariant, DiagnosticAdded>
fn concrete_enum_variant(
&self,
concrete_enum_id: ConcreteEnumId,
variant: &Variant
) -> Result<ConcreteVariant, DiagnosticAdded>
source§fn concrete_enum_variants(
&self,
concrete_enum_id: ConcreteEnumId
) -> Result<Vec<ConcreteVariant, Global>, DiagnosticAdded>
fn concrete_enum_variants(
&self,
concrete_enum_id: ConcreteEnumId
) -> Result<Vec<ConcreteVariant, Global>, DiagnosticAdded>
Retrieves all the ConcreteVariants for a ConcreteEnumId.
source§impl<'a, T> SemanticExprLookup<'a> for Twhere
T: Upcast<dyn SemanticGroup + 'a> + ?Sized,
impl<'a, T> SemanticExprLookup<'a> for Twhere
T: Upcast<dyn SemanticGroup + 'a> + ?Sized,
fn lookup_expr_by_ptr(
&self,
function_id: FunctionWithBodyId,
ptr: ExprPtr
) -> Result<Id<Expr>, DiagnosticAdded>
source§impl<DB> SemanticGroup for DBwhere
DB: DefsGroup + Upcast<dyn DefsGroup + 'static> + ParserGroup + Upcast<dyn FilesGroup + 'static> + AsFilesGroupMut + Elongate + Database + HasQueryGroup<SemanticDatabase>,
impl<DB> SemanticGroup for DBwhere
DB: DefsGroup + Upcast<dyn DefsGroup + 'static> + ParserGroup + Upcast<dyn FilesGroup + 'static> + AsFilesGroupMut + Elongate + Database + HasQueryGroup<SemanticDatabase>,
fn intern_function(&self, key0: FunctionLongId) -> FunctionId
fn lookup_intern_function(&self, key0: FunctionId) -> FunctionLongId
fn intern_concrete_function_with_body(
&self,
key0: ConcreteFunctionWithBody
) -> ConcreteFunctionWithBodyId
fn lookup_intern_concrete_function_with_body(
&self,
key0: ConcreteFunctionWithBodyId
) -> ConcreteFunctionWithBody
fn intern_concrete_struct(&self, key0: ConcreteStructLongId) -> ConcreteStructId
fn lookup_intern_concrete_struct(
&self,
key0: ConcreteStructId
) -> ConcreteStructLongId
fn intern_concrete_enum(&self, key0: ConcreteEnumLongId) -> ConcreteEnumId
fn lookup_intern_concrete_enum(&self, key0: ConcreteEnumId) -> ConcreteEnumLongId
fn intern_concrete_extern_type(
&self,
key0: ConcreteExternTypeLongId
) -> ConcreteExternTypeId
fn lookup_intern_concrete_extern_type(
&self,
key0: ConcreteExternTypeId
) -> ConcreteExternTypeLongId
fn intern_concrete_trait(&self, key0: ConcreteTraitLongId) -> ConcreteTraitId
fn lookup_intern_concrete_trait(
&self,
key0: ConcreteTraitId
) -> ConcreteTraitLongId
fn intern_concrete_trait_function(
&self,
key0: ConcreteTraitGenericFunctionLongId
) -> ConcreteTraitGenericFunctionId
fn lookup_intern_concrete_trait_function(
&self,
key0: ConcreteTraitGenericFunctionId
) -> ConcreteTraitGenericFunctionLongId
fn intern_concrete_impl(&self, key0: ConcreteImplLongId) -> ConcreteImplId
fn lookup_intern_concrete_impl(&self, key0: ConcreteImplId) -> ConcreteImplLongId
fn intern_type(&self, key0: TypeLongId) -> TypeId
fn lookup_intern_type(&self, key0: TypeId) -> TypeLongId
fn intern_literal(&self, key0: LiteralLongId) -> LiteralId
fn lookup_intern_literal(&self, key0: LiteralId) -> LiteralLongId
source§fn priv_constant_semantic_data(
&self,
key0: ConstantId
) -> Result<ConstantData, DiagnosticAdded>
fn priv_constant_semantic_data(
&self,
key0: ConstantId
) -> Result<ConstantData, DiagnosticAdded>
Private query to compute data about a constant definition.
source§fn constant_semantic_diagnostics(
&self,
key0: ConstantId
) -> Diagnostics<SemanticDiagnostic>
fn constant_semantic_diagnostics(
&self,
key0: ConstantId
) -> Diagnostics<SemanticDiagnostic>
Returns the semantic diagnostics of a constant definition.
source§fn constant_semantic_data(
&self,
key0: ConstantId
) -> Result<Constant, DiagnosticAdded>
fn constant_semantic_data(
&self,
key0: ConstantId
) -> Result<Constant, DiagnosticAdded>
Returns the semantic data of a constant definition.
fn constant_resolved_lookback(
&self,
key0: ConstantId
) -> Result<Arc<ResolvedLookback>, DiagnosticAdded>
source§fn priv_use_semantic_data(&self, key0: UseId) -> Result<UseData, DiagnosticAdded>
fn priv_use_semantic_data(&self, key0: UseId) -> Result<UseData, DiagnosticAdded>
Private query to compute data about a use.
source§fn use_semantic_diagnostics(
&self,
key0: UseId
) -> Diagnostics<SemanticDiagnostic>
fn use_semantic_diagnostics(
&self,
key0: UseId
) -> Diagnostics<SemanticDiagnostic>
Returns the semantic diagnostics of a use.
source§fn use_resolved_item(
&self,
key0: UseId
) -> Result<ResolvedGenericItem, DiagnosticAdded>
fn use_resolved_item(
&self,
key0: UseId
) -> Result<ResolvedGenericItem, DiagnosticAdded>
Returns the semantic diagnostics of a use.
fn use_resolved_lookback(
&self,
key0: UseId
) -> Result<Arc<ResolvedLookback>, DiagnosticAdded>
source§fn priv_module_items_data(
&self,
key0: ModuleId
) -> Result<Arc<ModuleSemanticData>, DiagnosticAdded>
fn priv_module_items_data(
&self,
key0: ModuleId
) -> Result<Arc<ModuleSemanticData>, DiagnosticAdded>
Private query to compute data about the module.
source§fn module_item_by_name(
&self,
key0: ModuleId,
key1: SmolStr
) -> Result<Option<ModuleItemId>, DiagnosticAdded>
fn module_item_by_name(
&self,
key0: ModuleId,
key1: SmolStr
) -> Result<Option<ModuleItemId>, DiagnosticAdded>
Returns Maybe::Err if the module was not properly resolved.
Returns [Maybe::Ok(Option::None)] if the item does not exist.
source§fn module_attributes(
&self,
key0: ModuleId
) -> Result<Vec<Attribute, Global>, DiagnosticAdded>
fn module_attributes(
&self,
key0: ModuleId
) -> Result<Vec<Attribute, Global>, DiagnosticAdded>
Returns the attributes of a module
source§fn priv_struct_semantic_data(
&self,
key0: StructId
) -> Result<StructData, DiagnosticAdded>
fn priv_struct_semantic_data(
&self,
key0: StructId
) -> Result<StructData, DiagnosticAdded>
Private query to compute data about a struct.
source§fn struct_semantic_diagnostics(
&self,
key0: StructId
) -> Diagnostics<SemanticDiagnostic>
fn struct_semantic_diagnostics(
&self,
key0: StructId
) -> Diagnostics<SemanticDiagnostic>
Returns the semantic diagnostics of a struct.
source§fn struct_generic_params(
&self,
key0: StructId
) -> Result<Vec<GenericParamId, Global>, DiagnosticAdded>
fn struct_generic_params(
&self,
key0: StructId
) -> Result<Vec<GenericParamId, Global>, DiagnosticAdded>
Returns the generic parameters of an enum.
source§fn struct_members(
&self,
key0: StructId
) -> Result<OrderedHashMap<SmolStr, Member>, DiagnosticAdded>
fn struct_members(
&self,
key0: StructId
) -> Result<OrderedHashMap<SmolStr, Member>, DiagnosticAdded>
Returns the members of a struct.
source§fn struct_attributes(
&self,
key0: StructId
) -> Result<Vec<Attribute, Global>, DiagnosticAdded>
fn struct_attributes(
&self,
key0: StructId
) -> Result<Vec<Attribute, Global>, DiagnosticAdded>
Returns the attributes of a struct.
source§fn struct_resolved_lookback(
&self,
key0: StructId
) -> Result<Arc<ResolvedLookback>, DiagnosticAdded>
fn struct_resolved_lookback(
&self,
key0: StructId
) -> Result<Arc<ResolvedLookback>, DiagnosticAdded>
Returns the resolution lookback of a struct.
source§fn priv_enum_semantic_data(
&self,
key0: EnumId
) -> Result<EnumData, DiagnosticAdded>
fn priv_enum_semantic_data(
&self,
key0: EnumId
) -> Result<EnumData, DiagnosticAdded>
Private query to compute data about an enum.
source§fn enum_semantic_diagnostics(
&self,
key0: EnumId
) -> Diagnostics<SemanticDiagnostic>
fn enum_semantic_diagnostics(
&self,
key0: EnumId
) -> Diagnostics<SemanticDiagnostic>
Returns the semantic diagnostics of an enum.
source§fn enum_generic_params(
&self,
key0: EnumId
) -> Result<Vec<GenericParamId, Global>, DiagnosticAdded>
fn enum_generic_params(
&self,
key0: EnumId
) -> Result<Vec<GenericParamId, Global>, DiagnosticAdded>
Returns the generic parameters of an enum.
source§fn enum_variants(
&self,
key0: EnumId
) -> Result<OrderedHashMap<SmolStr, VariantId>, DiagnosticAdded>
fn enum_variants(
&self,
key0: EnumId
) -> Result<OrderedHashMap<SmolStr, VariantId>, DiagnosticAdded>
Returns the members of an enum.
source§fn variant_semantic(
&self,
key0: EnumId,
key1: VariantId
) -> Result<Variant, DiagnosticAdded>
fn variant_semantic(
&self,
key0: EnumId,
key1: VariantId
) -> Result<Variant, DiagnosticAdded>
Returns the semantic model of a variant.
source§fn enum_resolved_lookback(
&self,
key0: EnumId
) -> Result<Arc<ResolvedLookback>, DiagnosticAdded>
fn enum_resolved_lookback(
&self,
key0: EnumId
) -> Result<Arc<ResolvedLookback>, DiagnosticAdded>
Returns the resolution lookback of an enum.
source§fn priv_type_alias_semantic_data(
&self,
key0: TypeAliasId
) -> Result<TypeAliasData, DiagnosticAdded>
fn priv_type_alias_semantic_data(
&self,
key0: TypeAliasId
) -> Result<TypeAliasData, DiagnosticAdded>
Private query to compute data about a type alias.
source§fn type_alias_semantic_diagnostics(
&self,
key0: TypeAliasId
) -> Diagnostics<SemanticDiagnostic>
fn type_alias_semantic_diagnostics(
&self,
key0: TypeAliasId
) -> Diagnostics<SemanticDiagnostic>
Returns the semantic diagnostics of a type alias.
source§fn type_alias_resolved_type(
&self,
key0: TypeAliasId
) -> Result<TypeId, DiagnosticAdded>
fn type_alias_resolved_type(
&self,
key0: TypeAliasId
) -> Result<TypeId, DiagnosticAdded>
Returns the resolved type of a type alias.
source§fn type_alias_generic_params(
&self,
key0: TypeAliasId
) -> Result<Vec<GenericParamId, Global>, DiagnosticAdded>
fn type_alias_generic_params(
&self,
key0: TypeAliasId
) -> Result<Vec<GenericParamId, Global>, DiagnosticAdded>
Returns the generic parameters of a type alias.
source§fn type_alias_resolved_lookback(
&self,
key0: TypeAliasId
) -> Result<Arc<ResolvedLookback>, DiagnosticAdded>
fn type_alias_resolved_lookback(
&self,
key0: TypeAliasId
) -> Result<Arc<ResolvedLookback>, DiagnosticAdded>
Returns the resolution lookback of a type alias.
source§fn priv_trait_semantic_data(
&self,
key0: TraitId
) -> Result<TraitData, DiagnosticAdded>
fn priv_trait_semantic_data(
&self,
key0: TraitId
) -> Result<TraitData, DiagnosticAdded>
Private query to compute data about a trait.
source§fn trait_semantic_diagnostics(
&self,
key0: TraitId
) -> Diagnostics<SemanticDiagnostic>
fn trait_semantic_diagnostics(
&self,
key0: TraitId
) -> Diagnostics<SemanticDiagnostic>
Returns the semantic diagnostics of a trait.
source§fn trait_generic_params(
&self,
key0: TraitId
) -> Result<Vec<GenericParamId, Global>, DiagnosticAdded>
fn trait_generic_params(
&self,
key0: TraitId
) -> Result<Vec<GenericParamId, Global>, DiagnosticAdded>
Returns the generic parameters of a trait.
source§fn trait_attributes(
&self,
key0: TraitId
) -> Result<Vec<Attribute, Global>, DiagnosticAdded>
fn trait_attributes(
&self,
key0: TraitId
) -> Result<Vec<Attribute, Global>, DiagnosticAdded>
Returns the attributes of a trait.
source§fn trait_functions(
&self,
key0: TraitId
) -> Result<OrderedHashMap<SmolStr, TraitFunctionId>, DiagnosticAdded>
fn trait_functions(
&self,
key0: TraitId
) -> Result<OrderedHashMap<SmolStr, TraitFunctionId>, DiagnosticAdded>
Returns the functions of a trait.
source§fn trait_function_by_name(
&self,
key0: TraitId,
key1: SmolStr
) -> Result<Option<TraitFunctionId>, DiagnosticAdded>
fn trait_function_by_name(
&self,
key0: TraitId,
key1: SmolStr
) -> Result<Option<TraitFunctionId>, DiagnosticAdded>
Returns the function with the given name of the given trait, if exists.
source§fn priv_trait_function_data(
&self,
key0: TraitFunctionId
) -> Result<TraitFunctionData, DiagnosticAdded>
fn priv_trait_function_data(
&self,
key0: TraitFunctionId
) -> Result<TraitFunctionData, DiagnosticAdded>
Private query to compute data about a trait function.
source§fn trait_function_diagnostics(
&self,
key0: TraitFunctionId
) -> Diagnostics<SemanticDiagnostic>
fn trait_function_diagnostics(
&self,
key0: TraitFunctionId
) -> Diagnostics<SemanticDiagnostic>
Returns the semantic diagnostics of a trait function.
source§fn trait_function_signature(
&self,
key0: TraitFunctionId
) -> Result<Signature, DiagnosticAdded>
fn trait_function_signature(
&self,
key0: TraitFunctionId
) -> Result<Signature, DiagnosticAdded>
Returns the signature of a trait function.
source§fn trait_function_attributes(
&self,
key0: TraitFunctionId
) -> Result<Vec<Attribute, Global>, DiagnosticAdded>
fn trait_function_attributes(
&self,
key0: TraitFunctionId
) -> Result<Vec<Attribute, Global>, DiagnosticAdded>
Returns the attributes of a trait function.
source§fn trait_function_generic_params(
&self,
key0: TraitFunctionId
) -> Result<Vec<GenericParamId, Global>, DiagnosticAdded>
fn trait_function_generic_params(
&self,
key0: TraitFunctionId
) -> Result<Vec<GenericParamId, Global>, DiagnosticAdded>
Returns the generic params of a trait function.
source§fn trait_function_resolved_lookback(
&self,
key0: TraitFunctionId
) -> Result<Arc<ResolvedLookback>, DiagnosticAdded>
fn trait_function_resolved_lookback(
&self,
key0: TraitFunctionId
) -> Result<Arc<ResolvedLookback>, DiagnosticAdded>
Returns the resolution lookback of a trait function.
source§fn priv_impl_declaration_data(
&self,
key0: ImplId
) -> Result<ImplDeclarationData, DiagnosticAdded>
fn priv_impl_declaration_data(
&self,
key0: ImplId
) -> Result<ImplDeclarationData, DiagnosticAdded>
Private query to compute declaration data about an impl.
source§fn impl_semantic_declaration_diagnostics(
&self,
key0: ImplId
) -> Diagnostics<SemanticDiagnostic>
fn impl_semantic_declaration_diagnostics(
&self,
key0: ImplId
) -> Diagnostics<SemanticDiagnostic>
Returns the semantic declaration diagnostics of an impl.
source§fn impl_generic_params(
&self,
key0: ImplId
) -> Result<Vec<GenericParamId, Global>, DiagnosticAdded>
fn impl_generic_params(
&self,
key0: ImplId
) -> Result<Vec<GenericParamId, Global>, DiagnosticAdded>
Returns the generic parameters of an impl.
source§fn impl_resolved_lookback(
&self,
key0: ImplId
) -> Result<Arc<ResolvedLookback>, DiagnosticAdded>
fn impl_resolved_lookback(
&self,
key0: ImplId
) -> Result<Arc<ResolvedLookback>, DiagnosticAdded>
Returns the resolution lookback of an impl.
source§fn impl_trait(&self, key0: ImplId) -> Result<ConcreteTraitId, DiagnosticAdded>
fn impl_trait(&self, key0: ImplId) -> Result<ConcreteTraitId, DiagnosticAdded>
Returns the concrete trait that is implemented by the impl.
source§fn priv_impl_definition_data(
&self,
key0: ImplId
) -> Result<ImplDefinitionData, DiagnosticAdded>
fn priv_impl_definition_data(
&self,
key0: ImplId
) -> Result<ImplDefinitionData, DiagnosticAdded>
Private query to compute data about an impl.
source§fn impl_semantic_definition_diagnostics(
&self,
key0: ImplId
) -> Diagnostics<SemanticDiagnostic>
fn impl_semantic_definition_diagnostics(
&self,
key0: ImplId
) -> Diagnostics<SemanticDiagnostic>
Returns the semantic definition diagnostics of an impl.
source§fn impl_functions(
&self,
key0: ImplId
) -> Result<OrderedHashMap<SmolStr, ImplFunctionId>, DiagnosticAdded>
fn impl_functions(
&self,
key0: ImplId
) -> Result<OrderedHashMap<SmolStr, ImplFunctionId>, DiagnosticAdded>
Returns the functions in the impl.
source§fn impl_function_by_trait_function(
&self,
key0: ImplId,
key1: TraitFunctionId
) -> Result<Option<ImplFunctionId>, DiagnosticAdded>
fn impl_function_by_trait_function(
&self,
key0: ImplId,
key1: TraitFunctionId
) -> Result<Option<ImplFunctionId>, DiagnosticAdded>
Returns the impl function that matches the given trait function, if exists.
Note that a function that doesn’t exist in the impl doesn’t necessarily indicate an error,
as, e.g., a trait function that has a default implementation doesn’t have to be
implemented in the impl.
source§fn impl_function_signature(
&self,
key0: ImplFunctionId
) -> Result<Signature, DiagnosticAdded>
fn impl_function_signature(
&self,
key0: ImplFunctionId
) -> Result<Signature, DiagnosticAdded>
Returns the signature of an impl function.
source§fn impl_function_declaration_implicits(
&self,
key0: ImplFunctionId
) -> Result<Vec<TypeId, Global>, DiagnosticAdded>
fn impl_function_declaration_implicits(
&self,
key0: ImplFunctionId
) -> Result<Vec<TypeId, Global>, DiagnosticAdded>
Returns the explicit implicits of a signature of an impl function.
source§fn impl_function_generic_params(
&self,
key0: ImplFunctionId
) -> Result<Vec<GenericParamId, Global>, DiagnosticAdded>
fn impl_function_generic_params(
&self,
key0: ImplFunctionId
) -> Result<Vec<GenericParamId, Global>, DiagnosticAdded>
Returns the generic params of an impl function.
source§fn impl_function_declaration_diagnostics(
&self,
key0: ImplFunctionId
) -> Diagnostics<SemanticDiagnostic>
fn impl_function_declaration_diagnostics(
&self,
key0: ImplFunctionId
) -> Diagnostics<SemanticDiagnostic>
Returns the semantic diagnostics of an impl function’s declaration (signature).
source§fn impl_function_resolved_lookback(
&self,
key0: ImplFunctionId
) -> Result<Arc<ResolvedLookback>, DiagnosticAdded>
fn impl_function_resolved_lookback(
&self,
key0: ImplFunctionId
) -> Result<Arc<ResolvedLookback>, DiagnosticAdded>
Returns the resolution lookback of an impl function’s declaration.
source§fn priv_impl_function_declaration_data(
&self,
key0: ImplFunctionId
) -> Result<FunctionDeclarationData, DiagnosticAdded>
fn priv_impl_function_declaration_data(
&self,
key0: ImplFunctionId
) -> Result<FunctionDeclarationData, DiagnosticAdded>
Private query to compute data about an impl function declaration.
source§fn impl_function_body_diagnostics(
&self,
key0: ImplFunctionId
) -> Diagnostics<SemanticDiagnostic>
fn impl_function_body_diagnostics(
&self,
key0: ImplFunctionId
) -> Diagnostics<SemanticDiagnostic>
Returns the semantic diagnostics of an impl function definition (declaration + body).
source§fn impl_function_body(
&self,
key0: ImplFunctionId
) -> Result<Arc<FunctionBody>, DiagnosticAdded>
fn impl_function_body(
&self,
key0: ImplFunctionId
) -> Result<Arc<FunctionBody>, DiagnosticAdded>
Returns the definition of an impl function.
source§fn impl_function_body_resolved_lookback(
&self,
key0: ImplFunctionId
) -> Result<Arc<ResolvedLookback>, DiagnosticAdded>
fn impl_function_body_resolved_lookback(
&self,
key0: ImplFunctionId
) -> Result<Arc<ResolvedLookback>, DiagnosticAdded>
Returns the resolution lookback of an impl function’s definition.
source§fn priv_impl_function_body_data(
&self,
key0: ImplFunctionId
) -> Result<FunctionBodyData, DiagnosticAdded>
fn priv_impl_function_body_data(
&self,
key0: ImplFunctionId
) -> Result<FunctionBodyData, DiagnosticAdded>
Private query to compute data about an impl function definition (declaration + body)
source§fn free_function_declaration_diagnostics(
&self,
key0: FreeFunctionId
) -> Diagnostics<SemanticDiagnostic>
fn free_function_declaration_diagnostics(
&self,
key0: FreeFunctionId
) -> Diagnostics<SemanticDiagnostic>
Returns the semantic diagnostics of a free function’s declaration (signature).
source§fn free_function_signature(
&self,
key0: FreeFunctionId
) -> Result<Signature, DiagnosticAdded>
fn free_function_signature(
&self,
key0: FreeFunctionId
) -> Result<Signature, DiagnosticAdded>
Returns the signature of a free function.
source§fn free_function_declaration_implicits(
&self,
key0: FreeFunctionId
) -> Result<Vec<TypeId, Global>, DiagnosticAdded>
fn free_function_declaration_implicits(
&self,
key0: FreeFunctionId
) -> Result<Vec<TypeId, Global>, DiagnosticAdded>
Returns the explicit implicits of a signature of a free function.
source§fn free_function_generic_params(
&self,
key0: FreeFunctionId
) -> Result<Vec<GenericParamId, Global>, DiagnosticAdded>
fn free_function_generic_params(
&self,
key0: FreeFunctionId
) -> Result<Vec<GenericParamId, Global>, DiagnosticAdded>
Returns the generic params of a free function.
source§fn free_function_declaration_resolved_lookback(
&self,
key0: FreeFunctionId
) -> Result<Arc<ResolvedLookback>, DiagnosticAdded>
fn free_function_declaration_resolved_lookback(
&self,
key0: FreeFunctionId
) -> Result<Arc<ResolvedLookback>, DiagnosticAdded>
Returns the resolution lookback of a free function’s declaration.
source§fn priv_free_function_declaration_data(
&self,
key0: FreeFunctionId
) -> Result<FunctionDeclarationData, DiagnosticAdded>
fn priv_free_function_declaration_data(
&self,
key0: FreeFunctionId
) -> Result<FunctionDeclarationData, DiagnosticAdded>
Private query to compute data about a free function declaration - its signature excluding
its body.
source§fn free_function_body_diagnostics(
&self,
key0: FreeFunctionId
) -> Diagnostics<SemanticDiagnostic>
fn free_function_body_diagnostics(
&self,
key0: FreeFunctionId
) -> Diagnostics<SemanticDiagnostic>
Returns the semantic diagnostics of a free function’s body.
source§fn free_function_body_resolved_lookback(
&self,
key0: FreeFunctionId
) -> Result<Arc<ResolvedLookback>, DiagnosticAdded>
fn free_function_body_resolved_lookback(
&self,
key0: FreeFunctionId
) -> Result<Arc<ResolvedLookback>, DiagnosticAdded>
Returns the resolution lookback of a free function’s body.
source§fn priv_free_function_body_data(
&self,
key0: FreeFunctionId
) -> Result<FunctionBodyData, DiagnosticAdded>
fn priv_free_function_body_data(
&self,
key0: FreeFunctionId
) -> Result<FunctionBodyData, DiagnosticAdded>
Private query to compute data about a free function’s body.
source§fn function_declaration_diagnostics(
&self,
key0: FunctionWithBodyId
) -> Diagnostics<SemanticDiagnostic>
fn function_declaration_diagnostics(
&self,
key0: FunctionWithBodyId
) -> Diagnostics<SemanticDiagnostic>
Returns the semantic diagnostics of a declaration (signature) of a function with a body.
source§fn function_with_body_signature(
&self,
key0: FunctionWithBodyId
) -> Result<Signature, DiagnosticAdded>
fn function_with_body_signature(
&self,
key0: FunctionWithBodyId
) -> Result<Signature, DiagnosticAdded>
Returns the signature of a function with a body.
source§fn function_with_body_generic_params(
&self,
key0: FunctionWithBodyId
) -> Result<Vec<GenericParamId, Global>, DiagnosticAdded>
fn function_with_body_generic_params(
&self,
key0: FunctionWithBodyId
) -> Result<Vec<GenericParamId, Global>, DiagnosticAdded>
Returns the generic params of a function with a body.
source§fn function_with_body_attributes(
&self,
key0: FunctionWithBodyId
) -> Result<Vec<Attribute, Global>, DiagnosticAdded>
fn function_with_body_attributes(
&self,
key0: FunctionWithBodyId
) -> Result<Vec<Attribute, Global>, DiagnosticAdded>
Returns the attributes of a function with a body.
source§fn function_body_diagnostics(
&self,
key0: FunctionWithBodyId
) -> Diagnostics<SemanticDiagnostic>
fn function_body_diagnostics(
&self,
key0: FunctionWithBodyId
) -> Diagnostics<SemanticDiagnostic>
Returns the semantic diagnostics of a body of a function (with a body).
source§fn function_body_expr(
&self,
key0: FunctionWithBodyId
) -> Result<Id<Expr>, DiagnosticAdded>
fn function_body_expr(
&self,
key0: FunctionWithBodyId
) -> Result<Id<Expr>, DiagnosticAdded>
Returns the body expr of a function (with a body).
source§fn function_body(
&self,
key0: FunctionWithBodyId
) -> Result<Arc<FunctionBody>, DiagnosticAdded>
fn function_body(
&self,
key0: FunctionWithBodyId
) -> Result<Arc<FunctionBody>, DiagnosticAdded>
Returns the body of a function (with a body).
source§fn function_with_body_direct_callees(
&self,
key0: FunctionWithBodyId
) -> Result<HashSet<FunctionId, RandomState>, DiagnosticAdded>
fn function_with_body_direct_callees(
&self,
key0: FunctionWithBodyId
) -> Result<HashSet<FunctionId, RandomState>, DiagnosticAdded>
Returns the set of direct callees of a function with a body.
source§fn function_with_body_direct_function_with_body_callees(
&self,
key0: FunctionWithBodyId
) -> Result<HashSet<FunctionWithBodyId, RandomState>, DiagnosticAdded>
fn function_with_body_direct_function_with_body_callees(
&self,
key0: FunctionWithBodyId
) -> Result<HashSet<FunctionWithBodyId, RandomState>, DiagnosticAdded>
Returns the set of direct callees which are functions with body of a function with a body
(i.e. excluding libfunc callees).
source§fn priv_extern_function_declaration_data(
&self,
key0: ExternFunctionId
) -> Result<FunctionDeclarationData, DiagnosticAdded>
fn priv_extern_function_declaration_data(
&self,
key0: ExternFunctionId
) -> Result<FunctionDeclarationData, DiagnosticAdded>
Private query to compute data about an extern function declaration. An extern function has
no body, and thus only has a declaration.
source§fn extern_function_declaration_diagnostics(
&self,
key0: ExternFunctionId
) -> Diagnostics<SemanticDiagnostic>
fn extern_function_declaration_diagnostics(
&self,
key0: ExternFunctionId
) -> Diagnostics<SemanticDiagnostic>
Returns the semantic diagnostics of an extern function declaration. An extern function has
no body, and thus only has a declaration.
source§fn extern_function_signature(
&self,
key0: ExternFunctionId
) -> Result<Signature, DiagnosticAdded>
fn extern_function_signature(
&self,
key0: ExternFunctionId
) -> Result<Signature, DiagnosticAdded>
Returns the signature of an extern function.
source§fn extern_function_declaration_generic_params(
&self,
key0: ExternFunctionId
) -> Result<Vec<GenericParamId, Global>, DiagnosticAdded>
fn extern_function_declaration_generic_params(
&self,
key0: ExternFunctionId
) -> Result<Vec<GenericParamId, Global>, DiagnosticAdded>
Returns the generic params of an extern function.
source§fn extern_function_declaration_implicits(
&self,
key0: ExternFunctionId
) -> Result<Vec<TypeId, Global>, DiagnosticAdded>
fn extern_function_declaration_implicits(
&self,
key0: ExternFunctionId
) -> Result<Vec<TypeId, Global>, DiagnosticAdded>
Returns the explicit implicits of an extern function declaration.
source§fn extern_function_declaration_refs(
&self,
key0: ExternFunctionId
) -> Result<Vec<Parameter, Global>, DiagnosticAdded>
fn extern_function_declaration_refs(
&self,
key0: ExternFunctionId
) -> Result<Vec<Parameter, Global>, DiagnosticAdded>
Returns the ref parameters of an extern function declaration.
source§fn extern_function_declaration_resolved_lookback(
&self,
key0: ExternFunctionId
) -> Result<Arc<ResolvedLookback>, DiagnosticAdded>
fn extern_function_declaration_resolved_lookback(
&self,
key0: ExternFunctionId
) -> Result<Arc<ResolvedLookback>, DiagnosticAdded>
Returns the resolution lookback of an extern function.
source§fn priv_extern_type_declaration_data(
&self,
key0: ExternTypeId
) -> Result<ExternTypeDeclarationData, DiagnosticAdded>
fn priv_extern_type_declaration_data(
&self,
key0: ExternTypeId
) -> Result<ExternTypeDeclarationData, DiagnosticAdded>
Private query to compute data about an extern type declaration. An extern type has
no body, and thus only has a declaration.
source§fn extern_type_declaration_diagnostics(
&self,
key0: ExternTypeId
) -> Diagnostics<SemanticDiagnostic>
fn extern_type_declaration_diagnostics(
&self,
key0: ExternTypeId
) -> Diagnostics<SemanticDiagnostic>
Returns the semantic diagnostics of an extern type declaration. An extern type has
no body, and thus only has a declaration.
source§fn extern_type_declaration_generic_params(
&self,
key0: ExternTypeId
) -> Result<Vec<GenericParamId, Global>, DiagnosticAdded>
fn extern_type_declaration_generic_params(
&self,
key0: ExternTypeId
) -> Result<Vec<GenericParamId, Global>, DiagnosticAdded>
Returns the generic params of an extern type.
source§fn function_signature_signature(
&self,
key0: FunctionSignatureId
) -> Result<Signature, DiagnosticAdded>
fn function_signature_signature(
&self,
key0: FunctionSignatureId
) -> Result<Signature, DiagnosticAdded>
Returns the signature of the given FunctionSignatureId. This include free functions, extern
functions, etc…
source§fn function_signature_generic_params(
&self,
key0: FunctionSignatureId
) -> Result<Vec<GenericParamId, Global>, DiagnosticAdded>
fn function_signature_generic_params(
&self,
key0: FunctionSignatureId
) -> Result<Vec<GenericParamId, Global>, DiagnosticAdded>
Returns the generic parameters of the given FunctionSignatureId. This include free
functions, extern functions, etc…
source§fn concrete_function_signature(
&self,
key0: FunctionId
) -> Result<Signature, DiagnosticAdded>
fn concrete_function_signature(
&self,
key0: FunctionId
) -> Result<Signature, DiagnosticAdded>
Returns the signature of a concrete function. This include free functions, extern functions,
etc…
source§fn generic_type_generic_params(
&self,
key0: GenericTypeId
) -> Result<Vec<GenericParamId, Global>, DiagnosticAdded>
fn generic_type_generic_params(
&self,
key0: GenericTypeId
) -> Result<Vec<GenericParamId, Global>, DiagnosticAdded>
Returns the generic_type of a generic function. This include free types, extern
types, etc…
source§fn type_info(
&self,
key0: ImplLookupContext,
key1: TypeId
) -> Result<TypeInfo, DiagnosticAdded>
fn type_info(
&self,
key0: ImplLookupContext,
key1: TypeId
) -> Result<TypeInfo, DiagnosticAdded>
Returns the generic_type of a generic function. This include free types, extern
types, etc…
source§fn expr_semantic(&self, key0: FunctionWithBodyId, key1: Id<Expr>) -> Expr
fn expr_semantic(&self, key0: FunctionWithBodyId, key1: Id<Expr>) -> Expr
Assumes function and expression are present.
source§fn statement_semantic(
&self,
key0: FunctionWithBodyId,
key1: Id<Statement>
) -> Statement
fn statement_semantic(
&self,
key0: FunctionWithBodyId,
key1: Id<Statement>
) -> Statement
Assumes function and statement are valid.
fn lookup_resolved_generic_item_by_ptr(
&self,
key0: LookupItemId,
key1: TerminalIdentifierPtr
) -> Option<ResolvedGenericItem>
fn lookup_resolved_concrete_item_by_ptr(
&self,
key0: LookupItemId,
key1: TerminalIdentifierPtr
) -> Option<ResolvedConcreteItem>
source§fn module_semantic_diagnostics(
&self,
key0: ModuleId
) -> Result<Diagnostics<SemanticDiagnostic>, DiagnosticAdded>
fn module_semantic_diagnostics(
&self,
key0: ModuleId
) -> Result<Diagnostics<SemanticDiagnostic>, DiagnosticAdded>
Aggregates module level semantic diagnostics.
source§fn file_semantic_diagnostics(
&self,
key0: FileId
) -> Result<Diagnostics<SemanticDiagnostic>, DiagnosticAdded>
fn file_semantic_diagnostics(
&self,
key0: FileId
) -> Result<Diagnostics<SemanticDiagnostic>, DiagnosticAdded>
Aggregates file level semantic diagnostics.
fn core_module(&self) -> ModuleId
fn core_felt_ty(&self) -> TypeId
fn semantic_plugins(&self) -> Vec<Arc<dyn SemanticPlugin + 'static>, Global> ⓘ
source§fn set_semantic_plugins(
&mut self,
value__: Vec<Arc<dyn SemanticPlugin + 'static>, Global>
)
fn set_semantic_plugins(
&mut self,
value__: Vec<Arc<dyn SemanticPlugin + 'static>, Global>
)
Set the value of the
semantic_plugins
input. Read moresource§fn set_semantic_plugins_with_durability(
&mut self,
value__: Vec<Arc<dyn SemanticPlugin + 'static>, Global>,
durability__: Durability
)
fn set_semantic_plugins_with_durability(
&mut self,
value__: Vec<Arc<dyn SemanticPlugin + 'static>, Global>,
durability__: Durability
)
Set the value of the
semantic_plugins
input and promise
that its value will never change again. Read moresource§impl<T> SemanticGroupEx for Twhere
T: Upcast<dyn SemanticGroup + 'static> + ?Sized,
impl<T> SemanticGroupEx for Twhere
T: Upcast<dyn SemanticGroup + 'static> + ?Sized,
fn get_macro_plugins(&self) -> Vec<Arc<dyn MacroPlugin + 'static>, Global> ⓘ
source§impl<'a, T> SemanticStructEx<'a> for Twhere
T: Upcast<dyn SemanticGroup + 'a> + ?Sized,
impl<'a, T> SemanticStructEx<'a> for Twhere
T: Upcast<dyn SemanticGroup + 'a> + ?Sized,
fn concrete_struct_members(
&self,
concrete_struct_id: ConcreteStructId
) -> Result<OrderedHashMap<SmolStr, Member>, DiagnosticAdded>
source§impl<DB> SierraGenGroup for DBwhere
DB: LoweringGroup + Upcast<dyn LoweringGroup + 'static> + Database + HasQueryGroup<SierraGenDatabase>,
impl<DB> SierraGenGroup for DBwhere
DB: LoweringGroup + Upcast<dyn LoweringGroup + 'static> + Database + HasQueryGroup<SierraGenDatabase>,
fn intern_label_id(&self, key0: LabelLongId) -> LabelId
fn lookup_intern_label_id(&self, key0: LabelId) -> LabelLongId
fn intern_concrete_lib_func(
&self,
key0: ConcreteLibfuncLongId
) -> ConcreteLibfuncId
fn lookup_intern_concrete_lib_func(
&self,
key0: ConcreteLibfuncId
) -> ConcreteLibfuncLongId
fn intern_concrete_type(&self, key0: ConcreteTypeLongId) -> ConcreteTypeId
fn lookup_intern_concrete_type(&self, key0: ConcreteTypeId) -> ConcreteTypeLongId
source§fn intern_sierra_function(&self, key0: FunctionId) -> FunctionId
fn intern_sierra_function(&self, key0: FunctionId) -> FunctionId
Creates a Sierra function id for a function id of the semantic model.
fn lookup_intern_sierra_function(&self, key0: FunctionId) -> FunctionId
source§fn get_concrete_type_id(
&self,
key0: TypeId
) -> Result<ConcreteTypeId, DiagnosticAdded>
fn get_concrete_type_id(
&self,
key0: TypeId
) -> Result<ConcreteTypeId, DiagnosticAdded>
Returns the matching sierra concrete type id for a given semantic type id.
source§fn get_function_signature(
&self,
key0: FunctionId
) -> Result<Arc<FunctionSignature>, DiagnosticAdded>
fn get_function_signature(
&self,
key0: FunctionId
) -> Result<Arc<FunctionSignature>, DiagnosticAdded>
Returns the cairo_lang_sierra::program::FunctionSignature object for the given function
id.
source§fn get_type_info(
&self,
key0: ConcreteTypeId
) -> Result<Arc<TypeInfo>, DiagnosticAdded>
fn get_type_info(
&self,
key0: ConcreteTypeId
) -> Result<Arc<TypeInfo>, DiagnosticAdded>
Returns the cairo_lang_sierra::extensions::types::TypeInfo object for the given type id.
source§fn priv_function_with_body_sierra_data(
&self,
key0: ConcreteFunctionWithBodyId
) -> SierraFreeFunctionData
fn priv_function_with_body_sierra_data(
&self,
key0: ConcreteFunctionWithBodyId
) -> SierraFreeFunctionData
Private query to compute Sierra data about a free function.
source§fn function_with_body_sierra(
&self,
key0: ConcreteFunctionWithBodyId
) -> Result<Arc<Function>, DiagnosticAdded>
fn function_with_body_sierra(
&self,
key0: ConcreteFunctionWithBodyId
) -> Result<Arc<Function>, DiagnosticAdded>
Returns the Sierra code (as pre_sierra::Function) for a given free function.
source§fn contains_cycle(
&self,
key0: ConcreteFunctionWithBodyId
) -> Result<bool, DiagnosticAdded>
fn contains_cycle(
&self,
key0: ConcreteFunctionWithBodyId
) -> Result<bool, DiagnosticAdded>
Returns
true
if the function calls (possibly indirectly) itself, or if it calls (possibly
indirectly) such a function. For example, if f0 calls f1, f1 calls f2, f2 calls f3, and f3
calls f2, then Self::contains_cycle will return true
for all of these functions.source§fn get_ap_change(
&self,
key0: ConcreteFunctionWithBodyId
) -> Result<SierraApChange, DiagnosticAdded>
fn get_ap_change(
&self,
key0: ConcreteFunctionWithBodyId
) -> Result<SierraApChange, DiagnosticAdded>
Returns the ap change of a given function if it is known at compile time or
SierraApChange::Unknown otherwise.
source§fn get_sierra_program_for_functions(
&self,
key0: Vec<ConcreteFunctionWithBodyId, Global>
) -> Result<Arc<Program>, DiagnosticAdded>
fn get_sierra_program_for_functions(
&self,
key0: Vec<ConcreteFunctionWithBodyId, Global>
) -> Result<Arc<Program>, DiagnosticAdded>
Returns the cairo_lang_sierra::program::Program object of the requested functions.
source§fn get_sierra_program(
&self,
key0: Vec<CrateId, Global>
) -> Result<Arc<Program>, DiagnosticAdded>
fn get_sierra_program(
&self,
key0: Vec<CrateId, Global>
) -> Result<Arc<Program>, DiagnosticAdded>
Returns the cairo_lang_sierra::program::Program object of the requested crates.