cairo_lang_compiler::db

Struct RootDatabase

source
pub struct RootDatabase { /* private fields */ }

Implementations§

source§

impl RootDatabase

source

pub fn empty() -> Self

source

pub fn builder() -> RootDatabaseBuilder

source

pub fn snapshot(&self) -> RootDatabase

Snapshots the db for read only.

Trait Implementations§

source§

impl AsFilesGroupMut for RootDatabase

source§

fn as_files_group_mut(&mut self) -> &mut (dyn FilesGroup + 'static)

source§

impl Database for RootDatabase

source§

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 unwind_if_cancelled(&self)

Starts unwinding the stack if the current revision is cancelled. Read more
source§

fn salsa_runtime(&self) -> &Runtime

Gives access to the underlying salsa runtime. Read more
source§

fn salsa_runtime_mut(&mut self) -> &mut Runtime

Gives access to the underlying salsa runtime. Read more
source§

impl DatabaseOps for RootDatabase

source§

fn ops_database(&self) -> &dyn Database

Upcast this type to a dyn Database.
source§

fn ops_salsa_runtime(&self) -> &Runtime

Gives access to the underlying salsa runtime.
source§

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

Formats a database key index in a human readable fashion.
source§

fn maybe_changed_after( &self, input: DatabaseKeyIndex, revision: Revision, ) -> bool

True if the computed value for input may have changed since revision.
source§

fn cycle_recovery_strategy( &self, input: DatabaseKeyIndex, ) -> CycleRecoveryStrategy

Find the CycleRecoveryStrategy for a given input.
source§

fn for_each_query(&self, op: &mut dyn FnMut(&dyn QueryStorageMassOps))

Executes the callback for each kind of query.
source§

impl DatabaseStorageTypes for RootDatabase

source§

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

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl ExternalFiles for RootDatabase

source§

fn ext_as_virtual(&self, external_id: InternId) -> VirtualFile

Returns the virtual file matching the external id.
source§

impl HasQueryGroup<DefsDatabase> for RootDatabase

source§

fn group_storage(&self) -> &<DefsDatabase as QueryGroup>::GroupStorage

Access the group storage struct from the database.
source§

fn group_storage_mut( &mut self, ) -> (&<DefsDatabase as QueryGroup>::GroupStorage, &mut Runtime)

Access the group storage struct from the database. Also returns a ref to the Runtime, since otherwise the database is borrowed and one cannot get access to it.
source§

impl HasQueryGroup<FilesDatabase> for RootDatabase

source§

fn group_storage(&self) -> &<FilesDatabase as QueryGroup>::GroupStorage

Access the group storage struct from the database.
source§

fn group_storage_mut( &mut self, ) -> (&<FilesDatabase as QueryGroup>::GroupStorage, &mut Runtime)

Access the group storage struct from the database. Also returns a ref to the Runtime, since otherwise the database is borrowed and one cannot get access to it.
source§

impl HasQueryGroup<LoweringDatabase> for RootDatabase

source§

fn group_storage(&self) -> &<LoweringDatabase as QueryGroup>::GroupStorage

Access the group storage struct from the database.
source§

fn group_storage_mut( &mut self, ) -> (&<LoweringDatabase as QueryGroup>::GroupStorage, &mut Runtime)

Access the group storage struct from the database. Also returns a ref to the Runtime, since otherwise the database is borrowed and one cannot get access to it.
source§

impl HasQueryGroup<ParserDatabase> for RootDatabase

source§

fn group_storage(&self) -> &<ParserDatabase as QueryGroup>::GroupStorage

Access the group storage struct from the database.
source§

fn group_storage_mut( &mut self, ) -> (&<ParserDatabase as QueryGroup>::GroupStorage, &mut Runtime)

Access the group storage struct from the database. Also returns a ref to the Runtime, since otherwise the database is borrowed and one cannot get access to it.
source§

impl HasQueryGroup<SemanticDatabase> for RootDatabase

source§

fn group_storage(&self) -> &<SemanticDatabase as QueryGroup>::GroupStorage

Access the group storage struct from the database.
source§

fn group_storage_mut( &mut self, ) -> (&<SemanticDatabase as QueryGroup>::GroupStorage, &mut Runtime)

Access the group storage struct from the database. Also returns a ref to the Runtime, since otherwise the database is borrowed and one cannot get access to it.
source§

impl HasQueryGroup<SierraGenDatabase> for RootDatabase

source§

fn group_storage(&self) -> &<SierraGenDatabase as QueryGroup>::GroupStorage

Access the group storage struct from the database.
source§

fn group_storage_mut( &mut self, ) -> (&<SierraGenDatabase as QueryGroup>::GroupStorage, &mut Runtime)

Access the group storage struct from the database. Also returns a ref to the Runtime, since otherwise the database is borrowed and one cannot get access to it.
source§

impl HasQueryGroup<SyntaxDatabase> for RootDatabase

source§

fn group_storage(&self) -> &<SyntaxDatabase as QueryGroup>::GroupStorage

Access the group storage struct from the database.
source§

fn group_storage_mut( &mut self, ) -> (&<SyntaxDatabase as QueryGroup>::GroupStorage, &mut Runtime)

Access the group storage struct from the database. Also returns a ref to the Runtime, since otherwise the database is borrowed and one cannot get access to it.
source§

impl ParallelDatabase for RootDatabase

source§

fn snapshot(&self) -> Snapshot<RootDatabase>

Creates a second handle to the database that holds the database fixed at a particular revision. So long as this “frozen” handle exists, any attempt to set an input will block. Read more
source§

impl Upcast<dyn DefsGroup> for RootDatabase

source§

fn upcast(&self) -> &(dyn DefsGroup + 'static)

source§

impl Upcast<dyn FilesGroup> for RootDatabase

source§

fn upcast(&self) -> &(dyn FilesGroup + 'static)

source§

impl Upcast<dyn LoweringGroup> for RootDatabase

source§

fn upcast(&self) -> &(dyn LoweringGroup + 'static)

source§

impl Upcast<dyn ParserGroup> for RootDatabase

source§

fn upcast(&self) -> &(dyn ParserGroup + 'static)

source§

impl Upcast<dyn SemanticGroup> for RootDatabase

source§

fn upcast(&self) -> &(dyn SemanticGroup + 'static)

source§

impl Upcast<dyn SyntaxGroup> for RootDatabase

source§

fn upcast(&self) -> &(dyn SyntaxGroup + 'static)

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<DB> DefsGroup for DB

source§

fn intern_constant(&self, id: ConstantLongId) -> ConstantId

source§

fn lookup_intern_constant(&self, key: ConstantId) -> ConstantLongId

source§

fn intern_submodule(&self, id: SubmoduleLongId) -> SubmoduleId

source§

fn lookup_intern_submodule(&self, key: SubmoduleId) -> SubmoduleLongId

source§

fn intern_use(&self, id: UseLongId) -> UseId

source§

fn lookup_intern_use(&self, key: UseId) -> UseLongId

source§

fn intern_free_function(&self, id: FreeFunctionLongId) -> FreeFunctionId

source§

fn lookup_intern_free_function(&self, key: FreeFunctionId) -> FreeFunctionLongId

source§

fn intern_impl_type_def(&self, id: ImplTypeDefLongId) -> ImplTypeDefId

source§

fn lookup_intern_impl_type_def(&self, key: ImplTypeDefId) -> ImplTypeDefLongId

source§

fn intern_impl_constant_def( &self, id: ImplConstantDefLongId, ) -> ImplConstantDefId

source§

fn lookup_intern_impl_constant_def( &self, key: ImplConstantDefId, ) -> ImplConstantDefLongId

source§

fn intern_impl_impl_def(&self, id: ImplImplDefLongId) -> ImplImplDefId

source§

fn lookup_intern_impl_impl_def(&self, key: ImplImplDefId) -> ImplImplDefLongId

source§

fn intern_impl_function(&self, id: ImplFunctionLongId) -> ImplFunctionId

source§

fn lookup_intern_impl_function(&self, key: ImplFunctionId) -> ImplFunctionLongId

source§

fn intern_struct(&self, id: StructLongId) -> StructId

source§

fn lookup_intern_struct(&self, key: StructId) -> StructLongId

source§

fn intern_enum(&self, id: EnumLongId) -> EnumId

source§

fn lookup_intern_enum(&self, key: EnumId) -> EnumLongId

source§

fn intern_module_type_alias( &self, id: ModuleTypeAliasLongId, ) -> ModuleTypeAliasId

source§

fn lookup_intern_module_type_alias( &self, key: ModuleTypeAliasId, ) -> ModuleTypeAliasLongId

source§

fn intern_impl_alias(&self, id: ImplAliasLongId) -> ImplAliasId

source§

fn lookup_intern_impl_alias(&self, key: ImplAliasId) -> ImplAliasLongId

source§

fn intern_member(&self, id: MemberLongId) -> MemberId

source§

fn lookup_intern_member(&self, key: MemberId) -> MemberLongId

source§

fn intern_variant(&self, id: VariantLongId) -> VariantId

source§

fn lookup_intern_variant(&self, key: VariantId) -> VariantLongId

source§

fn intern_trait(&self, id: TraitLongId) -> TraitId

source§

fn lookup_intern_trait(&self, key: TraitId) -> TraitLongId

source§

fn intern_trait_type(&self, id: TraitTypeLongId) -> TraitTypeId

source§

fn lookup_intern_trait_type(&self, key: TraitTypeId) -> TraitTypeLongId

source§

fn intern_trait_constant(&self, id: TraitConstantLongId) -> TraitConstantId

source§

fn lookup_intern_trait_constant( &self, key: TraitConstantId, ) -> TraitConstantLongId

source§

fn intern_trait_impl(&self, id: TraitImplLongId) -> TraitImplId

source§

fn lookup_intern_trait_impl(&self, key: TraitImplId) -> TraitImplLongId

source§

fn intern_trait_function(&self, id: TraitFunctionLongId) -> TraitFunctionId

source§

fn lookup_intern_trait_function( &self, key: TraitFunctionId, ) -> TraitFunctionLongId

source§

fn intern_impl_def(&self, id: ImplDefLongId) -> ImplDefId

source§

fn lookup_intern_impl_def(&self, key: ImplDefId) -> ImplDefLongId

source§

fn intern_extern_type(&self, id: ExternTypeLongId) -> ExternTypeId

source§

fn lookup_intern_extern_type(&self, key: ExternTypeId) -> ExternTypeLongId

source§

fn intern_extern_function(&self, id: ExternFunctionLongId) -> ExternFunctionId

source§

fn lookup_intern_extern_function( &self, key: ExternFunctionId, ) -> ExternFunctionLongId

source§

fn intern_param(&self, id: ParamLongId) -> ParamId

source§

fn lookup_intern_param(&self, key: ParamId) -> ParamLongId

source§

fn intern_generic_param(&self, id: GenericParamLongId) -> GenericParamId

source§

fn lookup_intern_generic_param(&self, key: GenericParamId) -> GenericParamLongId

source§

fn intern_local_var(&self, id: LocalVarLongId) -> LocalVarId

source§

fn lookup_intern_local_var(&self, key: LocalVarId) -> LocalVarLongId

source§

fn intern_statement_const(&self, id: StatementConstLongId) -> StatementConstId

source§

fn lookup_intern_statement_const( &self, key: StatementConstId, ) -> StatementConstLongId

source§

fn intern_statement_use(&self, id: StatementUseLongId) -> StatementUseId

source§

fn lookup_intern_statement_use(&self, key: StatementUseId) -> StatementUseLongId

source§

fn intern_plugin_generated_file( &self, id: PluginGeneratedFileLongId, ) -> PluginGeneratedFileId

source§

fn lookup_intern_plugin_generated_file( &self, key: PluginGeneratedFileId, ) -> PluginGeneratedFileLongId

source§

fn macro_plugins(&self) -> Vec<Arc<dyn MacroPlugin>>

source§

fn set_macro_plugins(&mut self, value__: Vec<Arc<dyn MacroPlugin>>)

Set the value of the macro_plugins input. Read more
source§

fn set_macro_plugins_with_durability( &mut self, value__: Vec<Arc<dyn MacroPlugin>>, durability__: Durability, )

Set the value of the macro_plugins input with a specific durability instead of the default of Durability::LOW. You can use Durability::MAX to promise that its value will never change again. Read more
source§

fn inline_macro_plugins( &self, ) -> Arc<OrderedHashMap<String, Arc<dyn InlineMacroExprPlugin>>>

source§

fn set_inline_macro_plugins( &mut self, value__: Arc<OrderedHashMap<String, Arc<dyn InlineMacroExprPlugin>>>, )

Set the value of the inline_macro_plugins input. Read more
source§

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 with a specific durability instead of the default of Durability::LOW. You can use Durability::MAX to promise that its value will never change again. Read more
source§

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.
source§

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.
source§

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.
source§

fn declared_phantom_type_attributes(&self) -> Arc<OrderedHashSet<String>>

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( &self, submodule_id: SubmoduleId, ) -> Result<bool, DiagnosticAdded>

Checks whether the submodule is defined as inline.
source§

fn module_main_file( &self, module_id: 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, module_id: ModuleId, ) -> Result<Arc<[FileId]>, DiagnosticAdded>

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

fn module_file( &self, module_id: ModuleFileId, ) -> Result<FileId, DiagnosticAdded>

Gets a file from a module and a FileIndex (i.e. ModuleFileId).
source§

fn module_dir(&self, module_id: ModuleId) -> Result<Directory, DiagnosticAdded>

Gets the directory of a module.
source§

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

source§

fn priv_file_to_module_mapping( &self, ) -> Arc<OrderedHashMap<FileId, Vec<ModuleId>>>

source§

fn file_modules( &self, file_id: FileId, ) -> Result<Arc<[ModuleId]>, DiagnosticAdded>

source§

fn priv_module_data( &self, module_id: ModuleId, ) -> Result<ModuleData, DiagnosticAdded>

source§

fn priv_module_sub_files( &self, module_id: ModuleId, file_id: FileId, ) -> Result<Arc<PrivModuleSubFiles>, DiagnosticAdded>

source§

fn module_submodules( &self, module_id: ModuleId, ) -> Result<Arc<OrderedHashMap<SubmoduleId, ItemModule>>, DiagnosticAdded>

source§

fn module_submodules_ids( &self, module_id: ModuleId, ) -> Result<Arc<[SubmoduleId]>, DiagnosticAdded>

source§

fn module_constants( &self, module_id: ModuleId, ) -> Result<Arc<OrderedHashMap<ConstantId, ItemConstant>>, DiagnosticAdded>

source§

fn module_constants_ids( &self, module_id: ModuleId, ) -> Result<Arc<[ConstantId]>, DiagnosticAdded>

source§

fn module_constant_by_id( &self, constant_id: ConstantId, ) -> Result<Option<ItemConstant>, DiagnosticAdded>

source§

fn module_free_functions( &self, module_id: ModuleId, ) -> Result<Arc<OrderedHashMap<FreeFunctionId, FunctionWithBody>>, DiagnosticAdded>

source§

fn module_free_functions_ids( &self, module_id: ModuleId, ) -> Result<Arc<[FreeFunctionId]>, DiagnosticAdded>

source§

fn module_free_function_by_id( &self, free_function_id: FreeFunctionId, ) -> Result<Option<FunctionWithBody>, DiagnosticAdded>

source§

fn module_items( &self, module_id: ModuleId, ) -> Result<Arc<[ModuleItemId]>, DiagnosticAdded>

source§

fn module_item_name_stable_ptr( &self, module_id: ModuleId, item_id: ModuleItemId, ) -> Result<SyntaxStablePtrId, DiagnosticAdded>

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

fn module_uses( &self, module_id: ModuleId, ) -> Result<Arc<OrderedHashMap<UseId, UsePathLeaf>>, DiagnosticAdded>

source§

fn module_uses_ids( &self, module_id: ModuleId, ) -> Result<Arc<[UseId]>, DiagnosticAdded>

source§

fn module_use_by_id( &self, use_id: UseId, ) -> Result<Option<UsePathLeaf>, DiagnosticAdded>

source§

fn module_structs( &self, module_id: ModuleId, ) -> Result<Arc<OrderedHashMap<StructId, ItemStruct>>, DiagnosticAdded>

source§

fn module_structs_ids( &self, module_id: ModuleId, ) -> Result<Arc<[StructId]>, DiagnosticAdded>

source§

fn module_struct_by_id( &self, struct_id: StructId, ) -> Result<Option<ItemStruct>, DiagnosticAdded>

source§

fn module_enums( &self, module_id: ModuleId, ) -> Result<Arc<OrderedHashMap<EnumId, ItemEnum>>, DiagnosticAdded>

source§

fn module_enums_ids( &self, module_id: ModuleId, ) -> Result<Arc<[EnumId]>, DiagnosticAdded>

source§

fn module_enum_by_id( &self, enum_id: EnumId, ) -> Result<Option<ItemEnum>, DiagnosticAdded>

source§

fn module_type_aliases( &self, module_id: ModuleId, ) -> Result<Arc<OrderedHashMap<ModuleTypeAliasId, ItemTypeAlias>>, DiagnosticAdded>

source§

fn module_type_aliases_ids( &self, module_id: ModuleId, ) -> Result<Arc<[ModuleTypeAliasId]>, DiagnosticAdded>

source§

fn module_type_alias_by_id( &self, module_type_alias_id: ModuleTypeAliasId, ) -> Result<Option<ItemTypeAlias>, DiagnosticAdded>

source§

fn module_impl_aliases( &self, module_id: ModuleId, ) -> Result<Arc<OrderedHashMap<ImplAliasId, ItemImplAlias>>, DiagnosticAdded>

source§

fn module_impl_aliases_ids( &self, module_id: ModuleId, ) -> Result<Arc<[ImplAliasId]>, DiagnosticAdded>

source§

fn module_impl_alias_by_id( &self, impl_alias_id: ImplAliasId, ) -> Result<Option<ItemImplAlias>, DiagnosticAdded>

source§

fn module_traits( &self, module_id: ModuleId, ) -> Result<Arc<OrderedHashMap<TraitId, ItemTrait>>, DiagnosticAdded>

source§

fn module_traits_ids( &self, module_id: ModuleId, ) -> Result<Arc<[TraitId]>, DiagnosticAdded>

source§

fn module_trait_by_id( &self, trait_id: TraitId, ) -> Result<Option<ItemTrait>, DiagnosticAdded>

source§

fn module_impls( &self, module_id: ModuleId, ) -> Result<Arc<OrderedHashMap<ImplDefId, ItemImpl>>, DiagnosticAdded>

source§

fn module_impls_ids( &self, module_id: ModuleId, ) -> Result<Arc<[ImplDefId]>, DiagnosticAdded>

source§

fn module_impl_by_id( &self, impl_id: ImplDefId, ) -> Result<Option<ItemImpl>, DiagnosticAdded>

source§

fn module_extern_types( &self, module_id: ModuleId, ) -> Result<Arc<OrderedHashMap<ExternTypeId, ItemExternType>>, DiagnosticAdded>

source§

fn module_extern_types_ids( &self, module_id: ModuleId, ) -> Result<Arc<[ExternTypeId]>, DiagnosticAdded>

source§

fn module_extern_type_by_id( &self, extern_type_id: ExternTypeId, ) -> Result<Option<ItemExternType>, DiagnosticAdded>

source§

fn module_extern_functions( &self, module_id: ModuleId, ) -> Result<Arc<OrderedHashMap<ExternFunctionId, ItemExternFunction>>, DiagnosticAdded>

source§

fn module_extern_functions_ids( &self, module_id: ModuleId, ) -> Result<Arc<[ExternFunctionId]>, DiagnosticAdded>

source§

fn module_extern_function_by_id( &self, extern_function_id: ExternFunctionId, ) -> Result<Option<ItemExternFunction>, DiagnosticAdded>

source§

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

source§

fn module_generated_file_aux_data( &self, module_id: ModuleId, ) -> Result<Arc<[Option<DynGeneratedFileAuxData>]>, DiagnosticAdded>

source§

fn module_plugin_diagnostics( &self, module_id: ModuleId, ) -> Result<Arc<[(ModuleFileId, PluginDiagnostic)]>, DiagnosticAdded>

source§

impl<T> Elongate for T
where T: Upcast<dyn SemanticGroup>,

source§

fn elongate(&self) -> &(dyn SemanticGroup + 'static)

source§

impl<DB> FilesGroup for DB
where DB: ExternalFiles + Database + HasQueryGroup<FilesDatabase>,

source§

fn intern_crate(&self, crt: CrateLongId) -> CrateId

source§

fn lookup_intern_crate(&self, key: CrateId) -> CrateLongId

source§

fn intern_file(&self, file: FileLongId) -> FileId

source§

fn lookup_intern_file(&self, key: FileId) -> FileLongId

source§

fn intern_flag(&self, flag: FlagLongId) -> FlagId

source§

fn lookup_intern_flag(&self, key: FlagId) -> FlagLongId

source§

fn crate_configs(&self) -> Arc<OrderedHashMap<CrateId, CrateConfiguration>>

Main input of the project. Lists all the crates configurations.
source§

fn set_crate_configs( &mut self, value__: Arc<OrderedHashMap<CrateId, CrateConfiguration>>, )

Set the value of the crate_configs input. Read more
source§

fn set_crate_configs_with_durability( &mut self, value__: Arc<OrderedHashMap<CrateId, CrateConfiguration>>, durability__: Durability, )

Set the value of the crate_configs input with a specific durability instead of the default of Durability::LOW. You can use Durability::MAX to promise that its value will never change again. Read more
source§

fn file_overrides(&self) -> Arc<OrderedHashMap<FileId, Arc<str>>>

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<OrderedHashMap<FileId, Arc<str>>>)

Set the value of the file_overrides input. Read more
source§

fn set_file_overrides_with_durability( &mut self, value__: Arc<OrderedHashMap<FileId, Arc<str>>>, durability__: Durability, )

Set the value of the file_overrides input with a specific durability instead of the default of Durability::LOW. You can use Durability::MAX to promise that its value will never change again. Read more
source§

fn flags(&self) -> Arc<OrderedHashMap<FlagId, Arc<Flag>>>

The compilation flags.
source§

fn set_flags(&mut self, value__: Arc<OrderedHashMap<FlagId, Arc<Flag>>>)

Set the value of the flags input. Read more
source§

fn set_flags_with_durability( &mut self, value__: Arc<OrderedHashMap<FlagId, Arc<Flag>>>, durability__: Durability, )

Set the value of the flags input with a specific durability instead of the default of Durability::LOW. You can use Durability::MAX to promise that its value will never change again. Read more
source§

fn cfg_set(&self) -> Arc<CfgSet>

The #[cfg(...)] options.
source§

fn set_cfg_set(&mut self, value__: Arc<CfgSet>)

Set the value of the cfg_set input. Read more
source§

fn set_cfg_set_with_durability( &mut self, value__: Arc<CfgSet>, durability__: Durability, )

Set the value of the cfg_set input with a specific durability instead of the default of Durability::LOW. You can use Durability::MAX to promise that its value will never change again. Read more
source§

fn crates(&self) -> Vec<CrateId>

List of crates in the project.
source§

fn crate_config(&self, crate_id: CrateId) -> Option<CrateConfiguration>

Configuration of the crate.
source§

fn priv_raw_file_content(&self, file_id: FileId) -> Option<Arc<str>>

Query for raw file contents. Private.
source§

fn file_content(&self, file_id: FileId) -> Option<Arc<str>>

Query for the file contents. This takes overrides into consideration.
source§

fn file_summary(&self, file_id: FileId) -> Option<Arc<FileSummary>>

source§

fn get_flag(&self, id: FlagId) -> Option<Arc<Flag>>

Query to get a compilation flag by its ID.
source§

impl<T> FilesGroupEx for T

source§

fn override_file_content(&mut self, file: FileId, content: Option<Arc<str>>)

Overrides file content. None value removes the override.
source§

fn set_crate_config(&mut self, crt: CrateId, root: Option<CrateConfiguration>)

Sets the root directory of the crate. None value removes the crate.
source§

fn set_flag(&mut self, id: FlagId, value: Option<Arc<Flag>>)

Sets the given flag value. None value removes the flag.
source§

fn use_cfg(&mut self, cfg_set: &CfgSet)

Merges specified CfgSet into one already stored in this db.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<'a, T> FunctionImplicitsTrait<'a> for T
where T: Upcast<dyn LoweringGroup + 'a> + ?Sized,

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<DB> LoweringGroup for DB
where DB: SemanticGroup + Upcast<dyn SemanticGroup> + Database + HasQueryGroup<LoweringDatabase>,

source§

fn intern_lowering_function(&self, id: FunctionLongId) -> FunctionId

source§

fn lookup_intern_lowering_function(&self, key: FunctionId) -> FunctionLongId

source§

fn intern_lowering_concrete_function_with_body( &self, id: ConcreteFunctionWithBodyLongId, ) -> ConcreteFunctionWithBodyId

source§

fn lookup_intern_lowering_concrete_function_with_body( &self, key: ConcreteFunctionWithBodyId, ) -> ConcreteFunctionWithBodyLongId

source§

fn intern_lowering_function_with_body( &self, id: FunctionWithBodyLongId, ) -> FunctionWithBodyId

source§

fn lookup_intern_lowering_function_with_body( &self, key: FunctionWithBodyId, ) -> FunctionWithBodyLongId

source§

fn intern_location(&self, id: Location) -> LocationId

source§

fn lookup_intern_location(&self, key: LocationId) -> Location

source§

fn intern_strategy(&self, id: OptimizationStrategy) -> OptimizationStrategyId

source§

fn lookup_intern_strategy( &self, key: OptimizationStrategyId, ) -> OptimizationStrategy

source§

fn priv_function_with_body_multi_lowering( &self, function_id: FunctionWithBodyId, ) -> Result<Arc<MultiLowering>, DiagnosticAdded>

Computes the lowered representation of a function with a body, along with all it generated functions (e.g. closures, lambdas, loops, …).
source§

fn priv_function_with_body_lowering( &self, function_id: FunctionWithBodyId, ) -> Result<Arc<FlatLowered>, DiagnosticAdded>

Computes the lowered representation of a function with a body before borrow checking.
source§

fn function_with_body_lowering_with_borrow_check( &self, function_id: FunctionWithBodyId, ) -> Result<(Arc<FlatLowered>, Arc<UnorderedHashMap<BlockId, Vec<FunctionId>>>), DiagnosticAdded>

Computes the lowered representation of a function with a body. Additionally applies borrow checking testing, and returns the possible calls per block.
source§

fn function_with_body_lowering( &self, function_id: 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, function_id: ConcreteFunctionWithBodyId, ) -> Result<Arc<FlatLowered>, DiagnosticAdded>

A concrete version of priv_function_with_body_multi_lowering
source§

fn concrete_function_with_body_postpanic_lowered( &self, function_id: ConcreteFunctionWithBodyId, ) -> Result<Arc<FlatLowered>, DiagnosticAdded>

Computes the lowered representation after the panic phase.
source§

fn optimized_concrete_function_with_body_lowered( &self, function: ConcreteFunctionWithBodyId, optimization_strategy: OptimizationStrategyId, ) -> Result<Arc<FlatLowered>, DiagnosticAdded>

Applies optimizations to the post_panic lowering.
source§

fn inlined_function_with_body_lowered( &self, function_id: ConcreteFunctionWithBodyId, ) -> Result<Arc<FlatLowered>, DiagnosticAdded>

Computes the lowered representation of a function to be considered for inlining.
source§

fn final_concrete_function_with_body_lowered( &self, function_id: ConcreteFunctionWithBodyId, ) -> Result<Arc<FlatLowered>, DiagnosticAdded>

Computes the final lowered representation (after all the internal transformations).
source§

fn concrete_function_with_body_direct_callees( &self, function_id: ConcreteFunctionWithBodyId, dependency_type: DependencyType, ) -> Result<Vec<FunctionId>, DiagnosticAdded>

Returns the set of direct callees of a concrete function with a body after the inline phase.
source§

fn concrete_function_with_body_postpanic_direct_callees( &self, function_id: ConcreteFunctionWithBodyId, dependency_type: DependencyType, ) -> Result<Vec<FunctionId>, DiagnosticAdded>

Returns the set of direct callees of a concrete function with a body after the panic phase.
source§

fn concrete_function_with_body_direct_callees_with_body( &self, function_id: ConcreteFunctionWithBodyId, dependency_type: DependencyType, ) -> Result<Vec<ConcreteFunctionWithBodyId>, DiagnosticAdded>

Returns the set of direct callees which are functions with body of a concrete function with a body (i.e. excluding libfunc callees), after the inline phase.
source§

fn concrete_function_with_body_postpanic_direct_callees_with_body( &self, function_id: ConcreteFunctionWithBodyId, dependency_type: DependencyType, ) -> Result<Vec<ConcreteFunctionWithBodyId>, DiagnosticAdded>

Returns the set of direct callees which are functions with body of a concrete function with a body (i.e. excluding libfunc callees), after the panic phase.
source§

fn final_concrete_function_with_body_lowered_direct_callees( &self, function_id: ConcreteFunctionWithBodyId, dependency_type: DependencyType, ) -> Result<Vec<ConcreteFunctionWithBodyId>, DiagnosticAdded>

Returns the set of direct callees which are functions with body of a concrete function with a body (i.e. excluding libfunc callees), after all optimization phases.
source§

fn function_with_body_lowering_diagnostics( &self, function_id: FunctionWithBodyId, ) -> Result<Diagnostics<LoweringDiagnostic>, DiagnosticAdded>

Aggregates function level lowering diagnostics.
source§

fn semantic_function_with_body_lowering_diagnostics( &self, function_id: FunctionWithBodyId, ) -> Result<Diagnostics<LoweringDiagnostic>, DiagnosticAdded>

Aggregates semantic function level lowering diagnostics - along with all its generated function.
source§

fn module_lowering_diagnostics( &self, module_id: ModuleId, ) -> Result<Diagnostics<LoweringDiagnostic>, DiagnosticAdded>

Aggregates module level lowering diagnostics.
source§

fn file_lowering_diagnostics( &self, file_id: FileId, ) -> Result<Diagnostics<LoweringDiagnostic>, DiagnosticAdded>

Aggregates file level lowering diagnostics.
source§

fn function_implicits( &self, function: FunctionId, ) -> Result<Vec<TypeId>, 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 scc_implicits( &self, function: ConcreteSCCRepresentative, ) -> Result<Vec<TypeId>, DiagnosticAdded>

Returns all the implicits used by a strongly connected component of functions.
source§

fn function_may_panic( &self, function: FunctionId, ) -> Result<bool, DiagnosticAdded>

Returns whether the function may panic.
source§

fn scc_may_panic( &self, scc: ConcreteSCCRepresentative, ) -> Result<bool, DiagnosticAdded>

Returns whether any function in the strongly connected component may panic.
source§

fn has_direct_panic( &self, function_id: ConcreteFunctionWithBodyId, ) -> Result<bool, DiagnosticAdded>

Checks if the function has a block that ends with panic.
source§

fn function_with_body_direct_callees( &self, function_id: FunctionWithBodyId, dependency_type: DependencyType, ) -> Result<OrderedHashSet<FunctionId>, DiagnosticAdded>

Returns the set of direct callees of a function with a body.
source§

fn function_with_body_direct_function_with_body_callees( &self, function_id: FunctionWithBodyId, dependency_type: DependencyType, ) -> Result<OrderedHashSet<FunctionWithBodyId>, 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 final_contains_call_cycle( &self, function_id: ConcreteFunctionWithBodyId, ) -> Result<bool, DiagnosticAdded>

Returns true if the function (in its final lowering representation) 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::final_contains_call_cycle will return true for all of these functions.
source§

fn in_cycle( &self, function_id: FunctionWithBodyId, dependency_type: DependencyType, ) -> Result<bool, DiagnosticAdded>

Returns true if the function calls (possibly indirectly) itself. For example, if f0 calls f1, f1 calls f2, f2 calls f3, and f3 calls f2, then Self::in_cycle will return true for f2 and f3, but false for f0 and f1.
source§

fn concrete_function_with_body_scc_representative( &self, function: ConcreteFunctionWithBodyId, dependency_type: DependencyType, ) -> ConcreteSCCRepresentative

Returns the representative of the concrete function’s strongly connected component. The representative is consistently chosen for all the concrete functions in the same SCC.
source§

fn concrete_function_with_body_scc( &self, function_id: ConcreteFunctionWithBodyId, dependency_type: DependencyType, ) -> Vec<ConcreteFunctionWithBodyId>

Returns all the concrete functions in the same strongly connected component as the given concrete function.
source§

fn concrete_function_with_body_scc_postpanic_representative( &self, function: ConcreteFunctionWithBodyId, dependency_type: DependencyType, ) -> ConcreteSCCRepresentative

Returns the representative of the concrete function’s strongly connected component. The representative is consistently chosen for all the concrete functions in the same SCC. This is using the representation after the panic phase.
source§

fn concrete_function_with_body_postpanic_scc( &self, function_id: ConcreteFunctionWithBodyId, dependency_type: DependencyType, ) -> Vec<ConcreteFunctionWithBodyId>

Returns all the concrete functions in the same strongly connected component as the given concrete function. This is using the representation after the panic phase.
source§

fn function_with_body_scc( &self, function_id: FunctionWithBodyId, dependency_type: DependencyType, ) -> Vec<FunctionWithBodyId>

Returns all the functions in the same strongly connected component as the given function.
source§

fn function_with_body_feedback_set( &self, function: ConcreteFunctionWithBodyId, ) -> Result<OrderedHashSet<ConcreteFunctionWithBodyId>, DiagnosticAdded>

Returns the feedback-vertex-set of the given concrete function. A feedback-vertex-set is the set of vertices whose removal leaves a graph without cycles.
source§

fn needs_withdraw_gas( &self, function: ConcreteFunctionWithBodyId, ) -> Result<bool, DiagnosticAdded>

Returns whether the given function needs an additional withdraw_gas call.
source§

fn priv_function_with_body_feedback_set_of_representative( &self, function: ConcreteSCCRepresentative, ) -> Result<OrderedHashSet<ConcreteFunctionWithBodyId>, DiagnosticAdded>

Returns the feedback-vertex-set of the given concrete-function SCC-representative. A feedback-vertex-set is the set of vertices whose removal leaves a graph without cycles.
source§

fn priv_movable_function_ids(&self) -> Arc<UnorderedHashSet<FunctionId>>

Internal query for reorder_statements to cache the function ids that can be moved.
source§

fn priv_const_folding_info(&self) -> Arc<ConstFoldingLibfuncInfo>

Internal query for the libfuncs information required for const folding.
source§

fn priv_should_inline( &self, function_id: ConcreteFunctionWithBodyId, ) -> Result<bool, DiagnosticAdded>

source§

fn optimization_config(&self) -> Arc<OptimizationConfig>

Returns the configuration struct that controls the behavior of the optimization passes.
source§

fn set_optimization_config(&mut self, value__: Arc<OptimizationConfig>)

Set the value of the optimization_config input. Read more
source§

fn set_optimization_config_with_durability( &mut self, value__: Arc<OptimizationConfig>, durability__: Durability, )

Set the value of the optimization_config input with a specific durability instead of the default of Durability::LOW. You can use Durability::MAX to promise that its value will never change again. Read more
source§

fn final_optimization_strategy(&self) -> OptimizationStrategyId

Returns the final optimization strategy that is applied on top of inlined_function_optimization_strategy.
source§

fn baseline_optimization_strategy(&self) -> OptimizationStrategyId

Returns the baseline optimization strategy. This strategy is used for inlining decistion and as a starting point for the final lowering.
source§

fn type_size(&self, ty: TypeId) -> usize

Returns the expected size of a type.
source§

impl<'a, T> MayPanicTrait<'a> for T
where T: Upcast<dyn LoweringGroup + 'a> + ?Sized,

source§

impl<T> Paint for T
where T: ?Sized,

source§

fn fg(&self, value: Color) -> Painted<&T>

Returns a styled value derived from self with the foreground set to value.

This method should be used rarely. Instead, prefer to use color-specific builder methods like red() and green(), which have the same functionality but are pithier.

§Example

Set foreground color to white using fg():

use yansi::{Paint, Color};

painted.fg(Color::White);

Set foreground color to white using white().

use yansi::Paint;

painted.white();
source§

fn primary(&self) -> Painted<&T>

Returns self with the fg() set to Color::Primary.

§Example
println!("{}", value.primary());
source§

fn fixed(&self, color: u8) -> Painted<&T>

Returns self with the fg() set to Color::Fixed.

§Example
println!("{}", value.fixed(color));
source§

fn rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the fg() set to Color::Rgb.

§Example
println!("{}", value.rgb(r, g, b));
source§

fn black(&self) -> Painted<&T>

Returns self with the fg() set to Color::Black.

§Example
println!("{}", value.black());
source§

fn red(&self) -> Painted<&T>

Returns self with the fg() set to Color::Red.

§Example
println!("{}", value.red());
source§

fn green(&self) -> Painted<&T>

Returns self with the fg() set to Color::Green.

§Example
println!("{}", value.green());
source§

fn yellow(&self) -> Painted<&T>

Returns self with the fg() set to Color::Yellow.

§Example
println!("{}", value.yellow());
source§

fn blue(&self) -> Painted<&T>

Returns self with the fg() set to Color::Blue.

§Example
println!("{}", value.blue());
source§

fn magenta(&self) -> Painted<&T>

Returns self with the fg() set to Color::Magenta.

§Example
println!("{}", value.magenta());
source§

fn cyan(&self) -> Painted<&T>

Returns self with the fg() set to Color::Cyan.

§Example
println!("{}", value.cyan());
source§

fn white(&self) -> Painted<&T>

Returns self with the fg() set to Color::White.

§Example
println!("{}", value.white());
source§

fn bright_black(&self) -> Painted<&T>

Returns self with the fg() set to Color::BrightBlack.

§Example
println!("{}", value.bright_black());
source§

fn bright_red(&self) -> Painted<&T>

Returns self with the fg() set to Color::BrightRed.

§Example
println!("{}", value.bright_red());
source§

fn bright_green(&self) -> Painted<&T>

Returns self with the fg() set to Color::BrightGreen.

§Example
println!("{}", value.bright_green());
source§

fn bright_yellow(&self) -> Painted<&T>

Returns self with the fg() set to Color::BrightYellow.

§Example
println!("{}", value.bright_yellow());
source§

fn bright_blue(&self) -> Painted<&T>

Returns self with the fg() set to Color::BrightBlue.

§Example
println!("{}", value.bright_blue());
source§

fn bright_magenta(&self) -> Painted<&T>

Returns self with the fg() set to Color::BrightMagenta.

§Example
println!("{}", value.bright_magenta());
source§

fn bright_cyan(&self) -> Painted<&T>

Returns self with the fg() set to Color::BrightCyan.

§Example
println!("{}", value.bright_cyan());
source§

fn bright_white(&self) -> Painted<&T>

Returns self with the fg() set to Color::BrightWhite.

§Example
println!("{}", value.bright_white());
source§

fn bg(&self, value: Color) -> Painted<&T>

Returns a styled value derived from self with the background set to value.

This method should be used rarely. Instead, prefer to use color-specific builder methods like on_red() and on_green(), which have the same functionality but are pithier.

§Example

Set background color to red using fg():

use yansi::{Paint, Color};

painted.bg(Color::Red);

Set background color to red using on_red().

use yansi::Paint;

painted.on_red();
source§

fn on_primary(&self) -> Painted<&T>

Returns self with the bg() set to Color::Primary.

§Example
println!("{}", value.on_primary());
source§

fn on_fixed(&self, color: u8) -> Painted<&T>

Returns self with the bg() set to Color::Fixed.

§Example
println!("{}", value.on_fixed(color));
source§

fn on_rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the bg() set to Color::Rgb.

§Example
println!("{}", value.on_rgb(r, g, b));
source§

fn on_black(&self) -> Painted<&T>

Returns self with the bg() set to Color::Black.

§Example
println!("{}", value.on_black());
source§

fn on_red(&self) -> Painted<&T>

Returns self with the bg() set to Color::Red.

§Example
println!("{}", value.on_red());
source§

fn on_green(&self) -> Painted<&T>

Returns self with the bg() set to Color::Green.

§Example
println!("{}", value.on_green());
source§

fn on_yellow(&self) -> Painted<&T>

Returns self with the bg() set to Color::Yellow.

§Example
println!("{}", value.on_yellow());
source§

fn on_blue(&self) -> Painted<&T>

Returns self with the bg() set to Color::Blue.

§Example
println!("{}", value.on_blue());
source§

fn on_magenta(&self) -> Painted<&T>

Returns self with the bg() set to Color::Magenta.

§Example
println!("{}", value.on_magenta());
source§

fn on_cyan(&self) -> Painted<&T>

Returns self with the bg() set to Color::Cyan.

§Example
println!("{}", value.on_cyan());
source§

fn on_white(&self) -> Painted<&T>

Returns self with the bg() set to Color::White.

§Example
println!("{}", value.on_white());
source§

fn on_bright_black(&self) -> Painted<&T>

Returns self with the bg() set to Color::BrightBlack.

§Example
println!("{}", value.on_bright_black());
source§

fn on_bright_red(&self) -> Painted<&T>

Returns self with the bg() set to Color::BrightRed.

§Example
println!("{}", value.on_bright_red());
source§

fn on_bright_green(&self) -> Painted<&T>

Returns self with the bg() set to Color::BrightGreen.

§Example
println!("{}", value.on_bright_green());
source§

fn on_bright_yellow(&self) -> Painted<&T>

Returns self with the bg() set to Color::BrightYellow.

§Example
println!("{}", value.on_bright_yellow());
source§

fn on_bright_blue(&self) -> Painted<&T>

Returns self with the bg() set to Color::BrightBlue.

§Example
println!("{}", value.on_bright_blue());
source§

fn on_bright_magenta(&self) -> Painted<&T>

Returns self with the bg() set to Color::BrightMagenta.

§Example
println!("{}", value.on_bright_magenta());
source§

fn on_bright_cyan(&self) -> Painted<&T>

Returns self with the bg() set to Color::BrightCyan.

§Example
println!("{}", value.on_bright_cyan());
source§

fn on_bright_white(&self) -> Painted<&T>

Returns self with the bg() set to Color::BrightWhite.

§Example
println!("{}", value.on_bright_white());
source§

fn attr(&self, value: Attribute) -> Painted<&T>

Enables the styling Attribute value.

This method should be used rarely. Instead, prefer to use attribute-specific builder methods like bold() and underline(), which have the same functionality but are pithier.

§Example

Make text bold using attr():

use yansi::{Paint, Attribute};

painted.attr(Attribute::Bold);

Make text bold using using bold().

use yansi::Paint;

painted.bold();
source§

fn bold(&self) -> Painted<&T>

Returns self with the attr() set to Attribute::Bold.

§Example
println!("{}", value.bold());
source§

fn dim(&self) -> Painted<&T>

Returns self with the attr() set to Attribute::Dim.

§Example
println!("{}", value.dim());
source§

fn italic(&self) -> Painted<&T>

Returns self with the attr() set to Attribute::Italic.

§Example
println!("{}", value.italic());
source§

fn underline(&self) -> Painted<&T>

Returns self with the attr() set to Attribute::Underline.

§Example
println!("{}", value.underline());

Returns self with the attr() set to Attribute::Blink.

§Example
println!("{}", value.blink());

Returns self with the attr() set to Attribute::RapidBlink.

§Example
println!("{}", value.rapid_blink());
source§

fn invert(&self) -> Painted<&T>

Returns self with the attr() set to Attribute::Invert.

§Example
println!("{}", value.invert());
source§

fn conceal(&self) -> Painted<&T>

Returns self with the attr() set to Attribute::Conceal.

§Example
println!("{}", value.conceal());
source§

fn strike(&self) -> Painted<&T>

Returns self with the attr() set to Attribute::Strike.

§Example
println!("{}", value.strike());
source§

fn quirk(&self, value: Quirk) -> Painted<&T>

Enables the yansi Quirk value.

This method should be used rarely. Instead, prefer to use quirk-specific builder methods like mask() and wrap(), which have the same functionality but are pithier.

§Example

Enable wrapping using .quirk():

use yansi::{Paint, Quirk};

painted.quirk(Quirk::Wrap);

Enable wrapping using wrap().

use yansi::Paint;

painted.wrap();
source§

fn mask(&self) -> Painted<&T>

Returns self with the quirk() set to Quirk::Mask.

§Example
println!("{}", value.mask());
source§

fn wrap(&self) -> Painted<&T>

Returns self with the quirk() set to Quirk::Wrap.

§Example
println!("{}", value.wrap());
source§

fn linger(&self) -> Painted<&T>

Returns self with the quirk() set to Quirk::Linger.

§Example
println!("{}", value.linger());
source§

fn clear(&self) -> Painted<&T>

👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear(). The clear() method will be removed in a future release.

Returns self with the quirk() set to Quirk::Clear.

§Example
println!("{}", value.clear());
source§

fn resetting(&self) -> Painted<&T>

Returns self with the quirk() set to Quirk::Resetting.

§Example
println!("{}", value.resetting());
source§

fn bright(&self) -> Painted<&T>

Returns self with the quirk() set to Quirk::Bright.

§Example
println!("{}", value.bright());
source§

fn on_bright(&self) -> Painted<&T>

Returns self with the quirk() set to Quirk::OnBright.

§Example
println!("{}", value.on_bright());
source§

fn whenever(&self, value: Condition) -> Painted<&T>

Conditionally enable styling based on whether the Condition value applies. Replaces any previous condition.

See the crate level docs for more details.

§Example

Enable styling painted only when both stdout and stderr are TTYs:

use yansi::{Paint, Condition};

painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);
source§

fn new(self) -> Painted<Self>
where Self: Sized,

Create a new Painted with a default Style. Read more
source§

fn paint<S>(&self, style: S) -> Painted<&Self>
where S: Into<Style>,

Apply a style wholesale to self. Any previous style is replaced. Read more
source§

impl<DB> ParserGroup for DB
where DB: SyntaxGroup + Upcast<dyn SyntaxGroup> + FilesGroup + Database + HasQueryGroup<ParserDatabase>,

source§

fn priv_file_syntax_data(&self, file_id: FileId) -> SyntaxData

Should only be used internally. Parses a file and returns the result and the generated ParserDiagnostic.
source§

fn file_syntax(&self, file_id: FileId) -> Result<SyntaxNode, DiagnosticAdded>

Parses a file and returns its SyntaxNode.
source§

fn file_module_syntax( &self, file_id: FileId, ) -> Result<SyntaxFile, DiagnosticAdded>

Parses a file and returns its AST as a root SyntaxFile.
source§

fn file_expr_syntax(&self, file_id: FileId) -> Result<Expr, DiagnosticAdded>

Parses a file and returns its AST as an expression.
source§

fn file_syntax_diagnostics( &self, file_id: FileId, ) -> Diagnostics<ParserDiagnostic>

Returns the parser diagnostics for this file.
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
source§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

source§

type Output = T

Should always be Self
source§

impl<'a, T> SemanticEnumEx<'a> for T
where T: Upcast<dyn SemanticGroup + 'a> + ?Sized,

source§

impl<'a, T> SemanticExprLookup<'a> for T
where T: Upcast<dyn SemanticGroup + 'a> + ?Sized,

source§

impl<DB> SemanticGroup for DB

source§

fn intern_function(&self, id: FunctionLongId) -> FunctionId

source§

fn lookup_intern_function(&self, key: FunctionId) -> FunctionLongId

source§

fn intern_concrete_function_with_body( &self, id: ConcreteFunctionWithBody, ) -> ConcreteFunctionWithBodyId

source§

fn lookup_intern_concrete_function_with_body( &self, key: ConcreteFunctionWithBodyId, ) -> ConcreteFunctionWithBody

source§

fn intern_concrete_struct(&self, id: ConcreteStructLongId) -> ConcreteStructId

source§

fn lookup_intern_concrete_struct( &self, key: ConcreteStructId, ) -> ConcreteStructLongId

source§

fn intern_concrete_enum(&self, id: ConcreteEnumLongId) -> ConcreteEnumId

source§

fn lookup_intern_concrete_enum(&self, key: ConcreteEnumId) -> ConcreteEnumLongId

source§

fn intern_concrete_extern_type( &self, id: ConcreteExternTypeLongId, ) -> ConcreteExternTypeId

source§

fn lookup_intern_concrete_extern_type( &self, key: ConcreteExternTypeId, ) -> ConcreteExternTypeLongId

source§

fn intern_concrete_trait(&self, id: ConcreteTraitLongId) -> ConcreteTraitId

source§

fn lookup_intern_concrete_trait( &self, key: ConcreteTraitId, ) -> ConcreteTraitLongId

source§

fn intern_concrete_trait_function( &self, id: ConcreteTraitGenericFunctionLongId, ) -> ConcreteTraitGenericFunctionId

source§

fn lookup_intern_concrete_trait_function( &self, key: ConcreteTraitGenericFunctionId, ) -> ConcreteTraitGenericFunctionLongId

source§

fn intern_concrete_trait_type( &self, id: ConcreteTraitTypeLongId, ) -> ConcreteTraitTypeId

source§

fn lookup_intern_concrete_trait_type( &self, key: ConcreteTraitTypeId, ) -> ConcreteTraitTypeLongId

source§

fn intern_concrete_trait_constant( &self, id: ConcreteTraitConstantLongId, ) -> ConcreteTraitConstantId

source§

fn lookup_intern_concrete_trait_constant( &self, key: ConcreteTraitConstantId, ) -> ConcreteTraitConstantLongId

source§

fn intern_concrete_impl(&self, id: ConcreteImplLongId) -> ConcreteImplId

source§

fn lookup_intern_concrete_impl(&self, key: ConcreteImplId) -> ConcreteImplLongId

source§

fn intern_concrete_trait_impl( &self, id: ConcreteTraitImplLongId, ) -> ConcreteTraitImplId

source§

fn lookup_intern_concrete_trait_impl( &self, key: ConcreteTraitImplId, ) -> ConcreteTraitImplLongId

source§

fn intern_type(&self, id: TypeLongId) -> TypeId

source§

fn lookup_intern_type(&self, key: TypeId) -> TypeLongId

source§

fn intern_const_value(&self, id: ConstValue) -> ConstValueId

source§

fn lookup_intern_const_value(&self, key: ConstValueId) -> ConstValue

source§

fn intern_impl(&self, id: ImplLongId) -> ImplId

source§

fn lookup_intern_impl(&self, key: ImplId) -> ImplLongId

source§

fn intern_impl_var(&self, id: ImplVar) -> ImplVarId

source§

fn lookup_intern_impl_var(&self, key: ImplVarId) -> ImplVar

source§

fn intern_generated_impl(&self, id: GeneratedImplLongId) -> GeneratedImplId

source§

fn lookup_intern_generated_impl( &self, key: GeneratedImplId, ) -> GeneratedImplLongId

source§

fn intern_uninferred_generated_impl( &self, id: UninferredGeneratedImplLongId, ) -> UninferredGeneratedImplId

source§

fn lookup_intern_uninferred_generated_impl( &self, key: UninferredGeneratedImplId, ) -> UninferredGeneratedImplLongId

source§

fn priv_constant_semantic_data( &self, const_id: ConstantId, in_cycle: bool, ) -> Result<ConstantData, DiagnosticAdded>

Private query to compute data about a constant definition.
source§

fn constant_semantic_diagnostics( &self, const_id: ConstantId, ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of a constant definition.
source§

fn constant_semantic_data( &self, use_id: ConstantId, ) -> Result<Constant, DiagnosticAdded>

Returns the semantic data of a constant definition.
source§

fn constant_resolver_data( &self, use_id: ConstantId, ) -> Result<Arc<ResolverData>, DiagnosticAdded>

source§

fn constant_const_value( &self, const_id: ConstantId, ) -> Result<ConstValueId, DiagnosticAdded>

source§

fn constant_const_type( &self, const_id: ConstantId, ) -> Result<TypeId, DiagnosticAdded>

source§

fn priv_use_semantic_data( &self, use_id: UseId, ) -> Result<UseData, DiagnosticAdded>

Private query to compute data about a use.
source§

fn use_semantic_diagnostics( &self, use_id: UseId, ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of a use.
source§

fn use_resolver_data( &self, use_id: UseId, ) -> Result<Arc<ResolverData>, DiagnosticAdded>

source§

fn priv_module_semantic_data( &self, module_id: ModuleId, ) -> Result<Arc<ModuleSemanticData>, DiagnosticAdded>

Private query to compute data about the module.
source§

fn module_item_by_name( &self, module_id: ModuleId, name: 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_item_info_by_name( &self, module_id: ModuleId, name: SmolStr, ) -> Result<Option<ModuleItemInfo>, 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_all_used_items( &self, module_id: ModuleId, ) -> Result<Arc<OrderedHashSet<LookupItemId>>, DiagnosticAdded>

Returns all the items used within the module.
source§

fn module_attributes( &self, module_id: ModuleId, ) -> Result<Vec<Attribute>, DiagnosticAdded>

Returns the attributes of a module.
source§

fn module_usable_trait_ids( &self, module_id: ModuleId, ) -> Result<Arc<OrderedHashMap<TraitId, LookupItemId>>, DiagnosticAdded>

Finds all the trait ids usable in the module.
source§

fn priv_struct_declaration_data( &self, struct_id: StructId, ) -> Result<StructDeclarationData, DiagnosticAdded>

Private query to compute data about a struct declaration.
source§

fn struct_declaration_diagnostics( &self, struct_id: StructId, ) -> Diagnostics<SemanticDiagnostic>

Returns the declaration diagnostics of a struct.
source§

fn struct_attributes( &self, struct_id: StructId, ) -> Result<Vec<Attribute>, DiagnosticAdded>

Returns the attributes of a struct.
source§

fn struct_generic_params( &self, struct_id: StructId, ) -> Result<Vec<GenericParam>, DiagnosticAdded>

Returns the generic parameters of an enum.
source§

fn struct_generic_params_data( &self, struct_id: StructId, ) -> Result<GenericParamsData, DiagnosticAdded>

Returns the generic parameters data of an enum.
source§

fn struct_declaration_resolver_data( &self, structure_id: StructId, ) -> Result<Arc<ResolverData>, DiagnosticAdded>

Returns the resolution resolved_items of a struct declaration.
source§

fn priv_struct_definition_data( &self, struct_id: StructId, ) -> Result<StructDefinitionData, DiagnosticAdded>

Private query to compute data about a struct definition.
source§

fn struct_definition_diagnostics( &self, struct_id: StructId, ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of a struct definition.
source§

fn struct_members( &self, struct_id: StructId, ) -> Result<Arc<OrderedHashMap<SmolStr, Member>>, DiagnosticAdded>

Returns the members of a struct.
source§

fn struct_definition_resolver_data( &self, structure_id: StructId, ) -> Result<Arc<ResolverData>, DiagnosticAdded>

Returns the resolution resolved_items of a struct definition.
source§

fn concrete_struct_members( &self, concrete_struct_id: ConcreteStructId, ) -> Result<Arc<OrderedHashMap<SmolStr, Member>>, DiagnosticAdded>

Returns the concrete members of a struct.
source§

fn priv_enum_declaration_data( &self, enum_id: EnumId, ) -> Result<EnumDeclarationData, DiagnosticAdded>

Private query to compute data about an enum declaration.
source§

fn enum_declaration_diagnostics( &self, enum_id: EnumId, ) -> Diagnostics<SemanticDiagnostic>

Returns the diagnostics of an enum declaration.
source§

fn enum_generic_params( &self, enum_id: EnumId, ) -> Result<Vec<GenericParam>, DiagnosticAdded>

Returns the generic parameters of an enum.
source§

fn enum_generic_params_data( &self, enum_id: EnumId, ) -> Result<GenericParamsData, DiagnosticAdded>

Returns the generic parameters data of an enum.
source§

fn enum_attributes( &self, enum_id: EnumId, ) -> Result<Vec<Attribute>, DiagnosticAdded>

Returns the attributes attached to an enum.
source§

fn enum_declaration_resolver_data( &self, enum_id: EnumId, ) -> Result<Arc<ResolverData>, DiagnosticAdded>

Returns the resolution resolved_items of an enum declaration.
source§

fn priv_enum_definition_data( &self, enum_id: EnumId, ) -> Result<EnumDefinitionData, DiagnosticAdded>

Private query to compute data about an enum definition.
source§

fn enum_definition_diagnostics( &self, enum_id: EnumId, ) -> Diagnostics<SemanticDiagnostic>

Returns the definition diagnostics of an enum definition.
source§

fn enum_variants( &self, enum_id: EnumId, ) -> Result<OrderedHashMap<SmolStr, VariantId>, DiagnosticAdded>

Returns the members of an enum.
source§

fn variant_semantic( &self, enum_id: EnumId, variant_id: VariantId, ) -> Result<Variant, DiagnosticAdded>

Returns the semantic model of a variant.
source§

fn enum_definition_resolver_data( &self, enum_id: EnumId, ) -> Result<Arc<ResolverData>, DiagnosticAdded>

Returns the resolution resolved_items of an enum definition.
source§

fn module_type_alias_semantic_diagnostics( &self, module_type_alias_id: ModuleTypeAliasId, ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of a type alias.
source§

fn module_type_alias_resolved_type( &self, module_type_alias_id: ModuleTypeAliasId, ) -> Result<TypeId, DiagnosticAdded>

Returns the resolved type of a type alias.
source§

fn module_type_alias_generic_params( &self, enum_id: ModuleTypeAliasId, ) -> Result<Vec<GenericParam>, DiagnosticAdded>

Returns the generic parameters of a type alias.
source§

fn module_type_alias_resolver_data( &self, module_type_alias_id: ModuleTypeAliasId, ) -> Result<Arc<ResolverData>, DiagnosticAdded>

Returns the resolution resolved_items of a type alias.
source§

fn priv_module_type_alias_generic_params_data( &self, enum_id: ModuleTypeAliasId, ) -> Result<GenericParamsData, DiagnosticAdded>

Private query to compute the generic parameters data of a type alias.
source§

fn priv_module_type_alias_semantic_data( &self, module_type_alias_id: ModuleTypeAliasId, in_cycle: bool, ) -> Result<ModuleTypeAliasData, DiagnosticAdded>

Private query to compute data about a type alias.
source§

fn impl_alias_impl_def( &self, impl_alias_id: ImplAliasId, ) -> Result<ImplDefId, DiagnosticAdded>

Returns the impl definition pointed to by the impl alias, or an error if it points to something else.
source§

fn priv_impl_alias_semantic_data( &self, impl_alias_id: ImplAliasId, in_cycle: bool, ) -> Result<ImplAliasData, DiagnosticAdded>

Private query to compute data about a type alias.
source§

fn impl_alias_semantic_diagnostics( &self, impl_alias_id: ImplAliasId, ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of a type alias.
source§

fn impl_alias_resolved_impl( &self, impl_alias_id: ImplAliasId, ) -> Result<ImplId, DiagnosticAdded>

Returns the resolved type of a type alias.
source§

fn impl_alias_generic_params( &self, impl_alias_id: ImplAliasId, ) -> Result<Vec<GenericParam>, DiagnosticAdded>

Returns the generic parameters of a type alias.
source§

fn impl_alias_generic_params_data( &self, impl_alias_id: ImplAliasId, ) -> Result<GenericParamsData, DiagnosticAdded>

Returns the generic parameters data of a type alias.
source§

fn impl_alias_resolver_data( &self, impl_alias_id: ImplAliasId, ) -> Result<Arc<ResolverData>, DiagnosticAdded>

Returns the resolution resolved_items of a type alias.
source§

fn impl_alias_attributes( &self, impl_def_id: ImplAliasId, ) -> Result<Vec<Attribute>, DiagnosticAdded>

Returns the attributes attached to the impl alias.
source§

fn trait_semantic_declaration_diagnostics( &self, trait_id: TraitId, ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic declaration diagnostics of a trait.
source§

fn trait_generic_params( &self, trait_id: TraitId, ) -> Result<Vec<GenericParam>, DiagnosticAdded>

Returns the generic parameters of a trait.
source§

fn trait_generic_params_data( &self, trait_id: TraitId, in_cycle: bool, ) -> Result<GenericParamsData, DiagnosticAdded>

Returns the generic parameters data of a trait.
source§

fn trait_attributes( &self, trait_id: TraitId, ) -> Result<Vec<Attribute>, DiagnosticAdded>

Returns the attributes of a trait.
source§

fn trait_resolver_data( &self, trait_id: TraitId, ) -> Result<Arc<ResolverData>, DiagnosticAdded>

Returns the resolution resolved_items of a trait.
source§

fn priv_trait_declaration_data( &self, trait_id: TraitId, ) -> Result<TraitDeclarationData, DiagnosticAdded>

Private query to compute declaration data about a trait.
source§

fn trait_semantic_definition_diagnostics( &self, trait_id: TraitId, ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic definition diagnostics of a trait.
source§

fn trait_required_item_names( &self, trait_id: TraitId, ) -> Result<OrderedHashSet<SmolStr>, DiagnosticAdded>

Returns the names of all the non default implemented items of a trait.
source§

fn trait_item_by_name( &self, trait_id: TraitId, name: SmolStr, ) -> Result<Option<TraitItemId>, DiagnosticAdded>

Returns the item of the trait, by the given name, if exists.
source§

fn trait_all_used_items( &self, trait_id: TraitId, ) -> Result<Arc<OrderedHashSet<LookupItemId>>, DiagnosticAdded>

Returns all the items used within the trait.
source§

fn trait_functions( &self, trait_id: TraitId, ) -> Result<OrderedHashMap<SmolStr, TraitFunctionId>, DiagnosticAdded>

Returns the functions of a trait.
source§

fn trait_function_by_name( &self, trait_id: TraitId, name: SmolStr, ) -> Result<Option<TraitFunctionId>, DiagnosticAdded>

Returns the function with the given name of the given trait, if exists.
source§

fn trait_types( &self, trait_id: TraitId, ) -> Result<OrderedHashMap<SmolStr, TraitTypeId>, DiagnosticAdded>

Returns the types of a trait.
source§

fn trait_type_by_name( &self, trait_id: TraitId, name: SmolStr, ) -> Result<Option<TraitTypeId>, DiagnosticAdded>

Returns the item type with the given name of the given trait, if exists.
source§

fn trait_constants( &self, trait_id: TraitId, ) -> Result<OrderedHashMap<SmolStr, TraitConstantId>, DiagnosticAdded>

Returns the constants of a trait.
source§

fn trait_constant_by_name( &self, trait_id: TraitId, name: SmolStr, ) -> Result<Option<TraitConstantId>, DiagnosticAdded>

Returns the item constants with the given name of the given trait, if exists.
source§

fn trait_impls( &self, trait_id: TraitId, ) -> Result<OrderedHashMap<SmolStr, TraitImplId>, DiagnosticAdded>

Returns the constants of a trait.
source§

fn trait_impl_by_name( &self, trait_id: TraitId, name: SmolStr, ) -> Result<Option<TraitImplId>, DiagnosticAdded>

Returns the item impls with the given name of the given trait, if exists.
source§

fn priv_trait_definition_data( &self, trait_id: TraitId, ) -> Result<TraitDefinitionData, DiagnosticAdded>

Private query to compute definition data about a trait.
source§

fn trait_type_diagnostics( &self, trait_type_id: TraitTypeId, ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of a trait type.
source§

fn trait_type_generic_params( &self, trait_type_id: TraitTypeId, ) -> Result<Vec<GenericParam>, DiagnosticAdded>

Returns the generic params of a trait type.
source§

fn trait_type_attributes( &self, trait_type_id: TraitTypeId, ) -> Result<Vec<Attribute>, DiagnosticAdded>

Returns the attributes of a trait type.
source§

fn trait_type_resolver_data( &self, trait_type_id: TraitTypeId, ) -> Result<Arc<ResolverData>, DiagnosticAdded>

Returns the resolution resolved_items of a trait type.
source§

fn priv_trait_type_generic_params_data( &self, trait_type_id: TraitTypeId, ) -> Result<GenericParamsData, DiagnosticAdded>

Private query to compute the generic params data of a trait type.
source§

fn priv_trait_type_data( &self, type_id: TraitTypeId, ) -> Result<TraitItemTypeData, DiagnosticAdded>

Private query to compute data about a trait type.
source§

fn trait_constant_diagnostics( &self, trait_constant: TraitConstantId, ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of a trait type.
source§

fn trait_constant_attributes( &self, trait_constant: TraitConstantId, ) -> Result<Vec<Attribute>, DiagnosticAdded>

Returns the attributes of a trait constants.
source§

fn trait_constant_type( &self, trait_type_id: TraitConstantId, ) -> Result<TypeId, DiagnosticAdded>

Returns the type of a trait constant.
source§

fn trait_constant_resolver_data( &self, trait_constant: TraitConstantId, ) -> Result<Arc<ResolverData>, DiagnosticAdded>

Returns the resolution resolved_items of a trait constants.
source§

fn priv_trait_constant_data( &self, trait_constant: TraitConstantId, ) -> Result<TraitItemConstantData, DiagnosticAdded>

Private query to compute data about a trait constant.
source§

fn concrete_trait_constant_type( &self, concrete_trait_constant_id: ConcreteTraitConstantId, ) -> Result<TypeId, DiagnosticAdded>

Returns the type of a trait constant.
source§

fn trait_impl_diagnostics( &self, trait_impl: TraitImplId, ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of a trait impls.
source§

fn trait_impl_attributes( &self, trait_impl: TraitImplId, ) -> Result<Vec<Attribute>, DiagnosticAdded>

Returns the attributes of a trait impls.
source§

fn trait_impl_concrete_trait( &self, trait_impl_id: TraitImplId, ) -> Result<ConcreteTraitId, DiagnosticAdded>

Returns the concrete trait of a trait impl.
source§

fn trait_impl_resolver_data( &self, trait_impl: TraitImplId, ) -> Result<Arc<ResolverData>, DiagnosticAdded>

Returns the resolution resolved_items of a trait impls.
source§

fn priv_trait_impl_data( &self, trait_impl: TraitImplId, ) -> Result<TraitItemImplData, DiagnosticAdded>

Private query to compute data about a trait impl.
source§

fn concrete_trait_impl_concrete_trait( &self, concrete_trait_impl_id: ConcreteTraitImplId, ) -> Result<ConcreteTraitId, DiagnosticAdded>

Returns the concrete trait of a concrete trait impl.
source§

fn trait_function_declaration_diagnostics( &self, trait_function_id: TraitFunctionId, ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of a trait function.
source§

fn trait_function_signature( &self, trait_function_id: TraitFunctionId, ) -> Result<Signature, DiagnosticAdded>

Returns the signature of a trait function.
source§

fn trait_function_generic_params( &self, trait_function_id: TraitFunctionId, ) -> Result<Vec<GenericParam>, DiagnosticAdded>

Returns the generic params of a trait function.
source§

fn priv_trait_function_generic_params_data( &self, trait_function_id: TraitFunctionId, ) -> Result<GenericParamsData, DiagnosticAdded>

Returns the generic params data of a trait function.
source§

fn trait_function_attributes( &self, trait_function_id: TraitFunctionId, ) -> Result<Vec<Attribute>, DiagnosticAdded>

Returns the attributes of a trait function.
source§

fn trait_function_resolver_data( &self, trait_function_id: TraitFunctionId, ) -> Result<Arc<ResolverData>, DiagnosticAdded>

Returns the resolution resolved_items of a trait function.
source§

fn trait_function_declaration_inline_config( &self, trait_function_id: TraitFunctionId, ) -> Result<InlineConfiguration, DiagnosticAdded>

Returns the inline configuration of a trait function’s declaration.
source§

fn trait_function_declaration_implicit_precedence( &self, trait_function_id: TraitFunctionId, ) -> Result<ImplicitPrecedence, DiagnosticAdded>

Returns the implicits precedence of a trait function.
source§

fn trait_function_declaration_implicits( &self, trait_function_id: TraitFunctionId, ) -> Result<Vec<TypeId>, DiagnosticAdded>

Returns the explicit implicits of a signature of a trait function.
source§

fn priv_trait_function_declaration_data( &self, function_id: TraitFunctionId, ) -> Result<FunctionDeclarationData, DiagnosticAdded>

Private query to compute data about a trait function declaration.
source§

fn trait_function_body_diagnostics( &self, trait_function_id: TraitFunctionId, ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of a trait function definition (declaration + body).
source§

fn trait_function_body( &self, trait_function_id: TraitFunctionId, ) -> Result<Option<Arc<FunctionBody>>, DiagnosticAdded>

Returns the body of a trait function, if any.
source§

fn priv_trait_function_body_data( &self, trait_function_id: TraitFunctionId, ) -> Result<Option<FunctionBodyData>, DiagnosticAdded>

Private query to compute data about a trait function definition (declaration + body)
source§

fn concrete_trait_function_generic_params( &self, concrete_trait_function_id: ConcreteTraitGenericFunctionId, ) -> Result<Vec<GenericParam>, DiagnosticAdded>

Returns the generic params of a concrete trait function.
source§

fn concrete_trait_function_signature( &self, concrete_trait_function_id: ConcreteTraitGenericFunctionId, ) -> Result<Signature, DiagnosticAdded>

Returns the signature of a concrete trait function.
source§

fn module_impl_ids_for_trait_filter( &self, module_id: ModuleId, trait_lookup_constraint: TraitFilter, ) -> Result<Vec<UninferredImpl>, DiagnosticAdded>

Returns candidate ImplDefIds for a specific trait lookup constraint.
source§

fn impl_impl_ids_for_trait_filter( &self, impl_id: ImplId, trait_lookup_constraint: TraitFilter, ) -> Result<Vec<UninferredImpl>, DiagnosticAdded>

source§

fn canonic_trait_solutions( &self, canonical_trait: CanonicalTrait, lookup_context: ImplLookupContext, ) -> Result<SolutionSet<CanonicalImpl>, InferenceError>

source§

fn impl_semantic_declaration_diagnostics( &self, impl_def_id: ImplDefId, ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic declaration diagnostics of an impl.
source§

fn impl_def_generic_params_data( &self, impl_def_id: ImplDefId, ) -> Result<GenericParamsData, DiagnosticAdded>

Returns the generic parameters data of an impl.
source§

fn impl_def_generic_params( &self, impl_def_id: ImplDefId, ) -> Result<Vec<GenericParam>, DiagnosticAdded>

Returns the generic parameters of an impl.
source§

fn impl_def_resolver_data( &self, impl_def_id: ImplDefId, ) -> Result<Arc<ResolverData>, DiagnosticAdded>

Returns the resolution resolved_items of an impl.
source§

fn impl_def_concrete_trait( &self, impl_def_id: ImplDefId, ) -> Result<ConcreteTraitId, DiagnosticAdded>

Returns the concrete trait that is implemented by the impl.
source§

fn impl_def_substitution( &self, impl_def_id: ImplDefId, ) -> Result<Arc<GenericSubstitution>, DiagnosticAdded>

Returns the substitution for generics for the impl.
source§

fn impl_def_attributes( &self, impl_def_id: ImplDefId, ) -> Result<Vec<Attribute>, DiagnosticAdded>

Returns the attributes attached to the impl.
source§

fn impl_concrete_trait( &self, impl_id: ImplId, ) -> Result<ConcreteTraitId, DiagnosticAdded>

Returns the concrete trait that is implemented by the concrete impl.
source§

fn impl_def_trait( &self, impl_def_id: ImplDefId, ) -> Result<TraitId, DiagnosticAdded>

Returns the trait that is implemented by the impl, or an error if the RHS of the of is not a trait.
source§

fn priv_impl_declaration_data( &self, impl_def_id: ImplDefId, ) -> Result<ImplDeclarationData, DiagnosticAdded>

Private query to compute declaration data about an impl.
source§

fn impl_semantic_definition_diagnostics( &self, impl_def_id: ImplDefId, ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic definition diagnostics of an impl.
source§

fn impl_item_by_name( &self, impl_def_id: ImplDefId, name: SmolStr, ) -> Result<Option<ImplItemId>, DiagnosticAdded>

Returns the item of the impl, by the given name, if exists.
source§

fn impl_implicit_impl_by_name( &self, impl_def_id: ImplDefId, name: SmolStr, ) -> Result<Option<TraitImplId>, DiagnosticAdded>

Returns the trait impl of an implicit impl if name exists in trait and not in the impl.
source§

fn impl_all_used_items( &self, impl_def_id: ImplDefId, ) -> Result<Arc<OrderedHashSet<LookupItemId>>, DiagnosticAdded>

Returns all the items used within the impl.
source§

fn impl_types( &self, impl_def_id: ImplDefId, ) -> Result<Arc<OrderedHashMap<ImplTypeDefId, ItemTypeAlias>>, DiagnosticAdded>

Returns the type items in the impl.
source§

fn impl_type_ids( &self, impl_def_id: ImplDefId, ) -> Result<Arc<[ImplTypeDefId]>, DiagnosticAdded>

Returns the ids of the type items in the impl.
source§

fn impl_type_by_id( &self, impl_type_id: ImplTypeDefId, ) -> Result<Option<ItemTypeAlias>, DiagnosticAdded>

Returns the impl AST of the impl type that matches the given id, if exists.
source§

fn impl_type_by_trait_type( &self, impl_def_id: ImplDefId, trait_type_id: TraitTypeId, ) -> Result<ImplTypeDefId, DiagnosticAdded>

Returns the impl type item that matches the given trait type item, if exists.
source§

fn impl_constants( &self, impl_def_id: ImplDefId, ) -> Result<Arc<OrderedHashMap<ImplConstantDefId, ItemConstant>>, DiagnosticAdded>

Returns the constant items in the impl.
source§

fn impl_impls( &self, impl_def_id: ImplDefId, ) -> Result<Arc<OrderedHashMap<ImplImplDefId, ItemImplAlias>>, DiagnosticAdded>

Returns the impls items in the impl.
source§

fn impl_impl_ids( &self, impl_def_id: ImplDefId, ) -> Result<Arc<[ImplImplDefId]>, DiagnosticAdded>

Returns the ids of the impl items in the impl.
source§

fn impl_impl_by_id( &self, impl_impl_id: ImplImplDefId, ) -> Result<Option<ItemImplAlias>, DiagnosticAdded>

Returns the impl AST of the impl impl that matches the given id, if exists.
source§

fn impl_impl_by_trait_impl( &self, impl_def_id: ImplDefId, trait_impl_id: TraitImplId, ) -> Result<ImplImplDefId, DiagnosticAdded>

Returns the impl impl item that matches the given trait impl item, if exists.
source§

fn is_implicit_impl_impl( &self, impl_def_id: ImplDefId, trait_impl_id: TraitImplId, ) -> Result<bool, DiagnosticAdded>

Returns whether trait_impl_id is an implicit impl in impl_def_id.
source§

fn impl_constant_by_trait_constant( &self, impl_def_id: ImplDefId, trait_constant_id: TraitConstantId, ) -> Result<ImplConstantDefId, DiagnosticAdded>

Returns the impl constant item that matches the given trait constant item, if exists.
source§

fn impl_functions( &self, impl_def_id: ImplDefId, ) -> Result<OrderedHashMap<SmolStr, ImplFunctionId>, DiagnosticAdded>

Returns the functions in the impl.
source§

fn impl_function_by_trait_function( &self, impl_def_id: ImplDefId, trait_function_id: 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 priv_impl_definition_data( &self, impl_def_id: ImplDefId, ) -> Result<ImplDefinitionData, DiagnosticAdded>

Private query to compute definition data about an impl.
source§

fn priv_impl_is_fully_concrete(&self, impl_id: ImplId) -> bool

Private query to check if an impl is fully concrete.
source§

fn priv_impl_is_var_free(&self, impl_id: ImplId) -> bool

Private query to check if an impl contains no variables.
source§

fn impl_type_def_semantic_diagnostics( &self, impl_type_def_id: ImplTypeDefId, ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of an impl item type.
source§

fn impl_type_def_resolved_type( &self, impl_type_def_id: ImplTypeDefId, ) -> Result<TypeId, DiagnosticAdded>

Returns the resolved type of an impl item type.
source§

fn impl_type_def_generic_params( &self, impl_type_def_id: ImplTypeDefId, ) -> Result<Vec<GenericParam>, DiagnosticAdded>

Returns the generic parameters of an impl item type.
source§

fn impl_type_def_attributes( &self, impl_type_def_id: ImplTypeDefId, ) -> Result<Vec<Attribute>, DiagnosticAdded>

Returns the attributes of an impl type.
source§

fn impl_type_def_resolver_data( &self, impl_type_def_id: ImplTypeDefId, ) -> Result<Arc<ResolverData>, DiagnosticAdded>

Returns the resolution resolved_items of an impl item type.
source§

fn impl_type_def_trait_type( &self, impl_type_def_id: ImplTypeDefId, ) -> Result<TraitTypeId, DiagnosticAdded>

Returns the trait type of an impl type.
source§

fn priv_impl_type_semantic_data( &self, impl_type_def_id: ImplTypeDefId, in_cycle: bool, ) -> Result<ImplItemTypeData, DiagnosticAdded>

Private query to compute data about an impl item type.
source§

fn priv_impl_type_def_generic_params_data( &self, impl_type_def_id: ImplTypeDefId, ) -> Result<GenericParamsData, DiagnosticAdded>

Private query to compute data about the generic parameters of an impl item type.
source§

fn impl_type_concrete_implized( &self, impl_type_def_id: ImplTypeId, ) -> Result<TypeId, DiagnosticAdded>

Returns the implized impl type if the impl is concrete. Returns a TypeId that’s not an impl type with a concrete impl.
source§

fn impl_constant_def_semantic_diagnostics( &self, impl_constant_def_id: ImplConstantDefId, ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of an impl item constant.
source§

fn impl_constant_def_value( &self, impl_constant_def_id: ImplConstantDefId, ) -> Result<ConstValueId, DiagnosticAdded>

Returns the resolved constant value of an impl item constant.
source§

fn impl_constant_def_resolver_data( &self, impl_constant_def_id: ImplConstantDefId, ) -> Result<Arc<ResolverData>, DiagnosticAdded>

Returns the resolution resolved_items of an impl item constant.
source§

fn impl_constant_def_trait_constant( &self, impl_constant_def_id: ImplConstantDefId, ) -> Result<TraitConstantId, DiagnosticAdded>

Returns the type of an impl item constant.
source§

fn priv_impl_constant_semantic_data( &self, impl_constant_def_id: ImplConstantDefId, in_cycle: bool, ) -> Result<ImplItemConstantData, DiagnosticAdded>

Private query to compute data about an impl item constant.
source§

fn impl_constant_implized_by_context( &self, impl_constant_id: ImplConstantId, impl_def_id: ImplDefId, ) -> Result<ConstValueId, DiagnosticAdded>

Returns the given impl constant, implized by the given impl context.
source§

fn impl_constant_concrete_implized_value( &self, impl_constant_id: ImplConstantId, ) -> Result<ConstValueId, DiagnosticAdded>

Returns the implized impl constant value if the impl is concrete.
source§

fn impl_constant_concrete_implized_type( &self, impl_constant_id: ImplConstantId, ) -> Result<TypeId, DiagnosticAdded>

Returns the implized impl constant type if the impl is concrete.
source§

fn impl_impl_def_semantic_diagnostics( &self, impl_impl_def_id: ImplImplDefId, ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of an impl item impl.
source§

fn impl_impl_def_resolver_data( &self, impl_impl_def_id: ImplImplDefId, ) -> Result<Arc<ResolverData>, DiagnosticAdded>

Returns the resolution resolved_items of an impl item impl.
source§

fn impl_impl_def_trait_impl( &self, impl_impl_def_id: ImplImplDefId, ) -> Result<TraitImplId, DiagnosticAdded>

Returns the type of an impl item impl.
source§

fn impl_impl_def_impl( &self, impl_impl_def_id: ImplImplDefId, in_cycle: bool, ) -> Result<ImplId, DiagnosticAdded>

Returns the resolved impl of an impl item impl.
source§

fn priv_impl_impl_semantic_data( &self, impl_impl_def_id: ImplImplDefId, in_cycle: bool, ) -> Result<ImplItemImplData, DiagnosticAdded>

Private query to compute data about an impl item impl.
source§

fn priv_impl_impl_def_generic_params_data( &self, impl_impl_def_id: ImplImplDefId, ) -> Result<GenericParamsData, DiagnosticAdded>

Private query to compute data about the generic parameters of an impl item impl.
source§

fn implicit_impl_impl_semantic_diagnostics( &self, impl_def_id: ImplDefId, trait_impl_id: TraitImplId, ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of an implicit impl.
source§

fn implicit_impl_impl_impl( &self, impl_def_id: ImplDefId, trait_impl_id: TraitImplId, in_cycle: bool, ) -> Result<ImplId, DiagnosticAdded>

Returns the resolved impl of an implicit impl.
source§

fn priv_implicit_impl_impl_semantic_data( &self, impl_def_id: ImplDefId, trait_impl_id: TraitImplId, in_cycle: bool, ) -> Result<ImplicitImplImplData, DiagnosticAdded>

source§

fn impl_impl_implized_by_context( &self, impl_impl_id: ImplImplId, impl_def_id: ImplDefId, in_cycle: bool, ) -> Result<ImplId, DiagnosticAdded>

Returns the implized impl impl if the impl is concrete.
source§

fn impl_impl_concrete_implized( &self, impl_impl_id: ImplImplId, ) -> Result<ImplId, DiagnosticAdded>

Returns the implized impl impl value if the impl is concrete.
source§

fn impl_impl_concrete_trait( &self, impl_impl_id: ImplImplId, ) -> Result<ConcreteTraitId, DiagnosticAdded>

Returns the concrete trait of an impl impl.
source§

fn impl_function_declaration_diagnostics( &self, impl_function_id: ImplFunctionId, ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of an impl function’s declaration (signature).
source§

fn impl_function_signature( &self, impl_function_id: ImplFunctionId, ) -> Result<Signature, DiagnosticAdded>

Returns the signature of an impl function.
source§

fn impl_function_generic_params( &self, impl_function_id: ImplFunctionId, ) -> Result<Vec<GenericParam>, DiagnosticAdded>

Returns the generic params of an impl function.
source§

fn priv_impl_function_generic_params_data( &self, impl_function_id: ImplFunctionId, ) -> Result<GenericParamsData, DiagnosticAdded>

Returns the generic params data of an impl function.
source§

fn impl_function_attributes( &self, impl_function_id: ImplFunctionId, ) -> Result<Vec<Attribute>, DiagnosticAdded>

Returns the attributes of an impl function.
source§

fn impl_function_resolver_data( &self, impl_function_id: ImplFunctionId, ) -> Result<Arc<ResolverData>, DiagnosticAdded>

Returns the resolution resolved_items of an impl function’s declaration.
source§

fn impl_function_declaration_inline_config( &self, impl_function_id: ImplFunctionId, ) -> Result<InlineConfiguration, DiagnosticAdded>

Returns the inline configuration of an impl function’s declaration.
source§

fn impl_function_declaration_implicit_precedence( &self, impl_function_id: ImplFunctionId, ) -> Result<ImplicitPrecedence, DiagnosticAdded>

Returns the implicits precedence of an impl function.
source§

fn impl_function_declaration_implicits( &self, impl_function_id: ImplFunctionId, ) -> Result<Vec<TypeId>, DiagnosticAdded>

Returns the explicit implicits of a signature of an impl function.
source§

fn impl_function_trait_function( &self, impl_function_id: ImplFunctionId, ) -> Result<TraitFunctionId, DiagnosticAdded>

Returns the trait function of an impl function.
source§

fn priv_impl_function_declaration_data( &self, impl_function_id: ImplFunctionId, ) -> Result<ImplFunctionDeclarationData, DiagnosticAdded>

Private query to compute data about an impl function declaration.
source§

fn impl_function_body_diagnostics( &self, impl_function_id: ImplFunctionId, ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of an impl function definition (declaration + body).
source§

fn impl_function_body( &self, impl_function_id: ImplFunctionId, ) -> Result<Arc<FunctionBody>, DiagnosticAdded>

Returns the definition of an impl function.
source§

fn impl_function_body_resolver_data( &self, impl_function_id: ImplFunctionId, ) -> Result<Arc<ResolverData>, DiagnosticAdded>

Returns the resolution resolved_items of an impl function’s definition.
source§

fn priv_impl_function_body_data( &self, impl_function_id: ImplFunctionId, ) -> Result<FunctionBodyData, DiagnosticAdded>

Private query to compute data about an impl function definition (declaration + body)
source§

fn trait_type_implized_by_context( &self, trait_type_def_id: TraitTypeId, impl_def_id: ImplDefId, ) -> Result<TypeId, DiagnosticAdded>

Returns the impl type for the given trait type, by implization by the given impl context, if the impl matches the trait of the trait type.
source§

fn free_function_declaration_diagnostics( &self, free_function_id: FreeFunctionId, ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of a free function’s declaration (signature).
source§

fn free_function_signature( &self, free_function_id: FreeFunctionId, ) -> Result<Signature, DiagnosticAdded>

Returns the signature of a free function.
source§

fn free_function_declaration_implicits( &self, free_function_id: FreeFunctionId, ) -> Result<Vec<TypeId>, DiagnosticAdded>

Returns the explicit implicits of a signature of a free function.
source§

fn free_function_declaration_implicit_precedence( &self, free_function_id: FreeFunctionId, ) -> Result<ImplicitPrecedence, DiagnosticAdded>

Returns the implicits precedence of a free function.
source§

fn free_function_generic_params( &self, free_function_id: FreeFunctionId, ) -> Result<Vec<GenericParam>, DiagnosticAdded>

Returns the generic params of a free function.
source§

fn free_function_generic_params_data( &self, free_function_id: FreeFunctionId, ) -> Result<GenericParamsData, DiagnosticAdded>

Returns the generic params data of a free function.
source§

fn free_function_declaration_resolver_data( &self, free_function_id: FreeFunctionId, ) -> Result<Arc<ResolverData>, DiagnosticAdded>

Returns the resolution resolved_items of a free function’s declaration.
source§

fn free_function_declaration_inline_config( &self, free_function_id: FreeFunctionId, ) -> Result<InlineConfiguration, DiagnosticAdded>

Returns the inline configuration of a free function’s declaration.
source§

fn priv_free_function_declaration_data( &self, function_id: 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, free_function_id: FreeFunctionId, ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of a free function’s body.
source§

fn free_function_body_resolver_data( &self, free_function_id: FreeFunctionId, ) -> Result<Arc<ResolverData>, DiagnosticAdded>

Returns the resolution resolved_items of a free function’s body.
source§

fn priv_free_function_body_data( &self, free_function_id: FreeFunctionId, ) -> Result<FunctionBodyData, DiagnosticAdded>

Private query to compute data about a free function’s body.
source§

fn function_declaration_diagnostics( &self, function_id: FunctionWithBodyId, ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of a declaration (signature) of a function with a body.
source§

fn function_declaration_inline_config( &self, function_id: FunctionWithBodyId, ) -> Result<InlineConfiguration, DiagnosticAdded>

Returns the inline configuration of a declaration (signature) of a function with a body.
source§

fn function_declaration_implicit_precedence( &self, function_id: FunctionWithBodyId, ) -> Result<ImplicitPrecedence, DiagnosticAdded>

Returns the implicit order of a declaration (signature) of a function with a body.
source§

fn function_with_body_signature( &self, function_id: FunctionWithBodyId, ) -> Result<Signature, DiagnosticAdded>

Returns the signature of a function with a body.
source§

fn function_with_body_generic_params( &self, function_id: FunctionWithBodyId, ) -> Result<Vec<GenericParam>, DiagnosticAdded>

Returns all the available generic params inside a function body.
source§

fn function_with_body_attributes( &self, function_id: FunctionWithBodyId, ) -> Result<Vec<Attribute>, DiagnosticAdded>

Returns the attributes of a function with a body.
source§

fn function_body_diagnostics( &self, function_id: FunctionWithBodyId, ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of a body of a function (with a body).
source§

fn function_body_expr( &self, function_id: FunctionWithBodyId, ) -> Result<Id<Expr>, DiagnosticAdded>

Returns the body expr of a function (with a body).
source§

fn function_body( &self, function_id: FunctionWithBodyId, ) -> Result<Arc<FunctionBody>, DiagnosticAdded>

Returns the body of a function (with a body).
source§

fn priv_extern_function_declaration_data( &self, function_id: 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_inline_config( &self, extern_function_id: ExternFunctionId, ) -> Result<InlineConfiguration, DiagnosticAdded>

Returns the inline configuration of an extern function’s declaration.
source§

fn extern_function_declaration_diagnostics( &self, extern_function_id: 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, extern_function_id: ExternFunctionId, ) -> Result<Signature, DiagnosticAdded>

Returns the signature of an extern function.
source§

fn extern_function_declaration_generic_params( &self, extern_function_id: ExternFunctionId, ) -> Result<Vec<GenericParam>, DiagnosticAdded>

Returns the generic params of an extern function.
source§

fn extern_function_declaration_generic_params_data( &self, extern_function_id: ExternFunctionId, ) -> Result<GenericParamsData, DiagnosticAdded>

Returns the generic params data of an extern function.
source§

fn extern_function_declaration_implicits( &self, extern_function_id: ExternFunctionId, ) -> Result<Vec<TypeId>, DiagnosticAdded>

Returns the explicit implicits of an extern function declaration.
source§

fn extern_function_declaration_refs( &self, extern_function_id: ExternFunctionId, ) -> Result<Vec<Parameter>, DiagnosticAdded>

Returns the ref parameters of an extern function declaration.
source§

fn extern_function_declaration_resolver_data( &self, extern_function_id: ExternFunctionId, ) -> Result<Arc<ResolverData>, DiagnosticAdded>

Returns the resolution resolved_items of an extern function.
source§

fn priv_extern_type_declaration_data( &self, type_id: 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, extern_type_id: 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, extern_type_id: ExternTypeId, ) -> Result<Vec<GenericParam>, DiagnosticAdded>

Returns the generic params of an extern type.
source§

fn extern_type_declaration_generic_params_data( &self, extern_type_id: ExternTypeId, ) -> Result<GenericParamsData, DiagnosticAdded>

Returns the generic params data of an extern type.
source§

fn extern_type_attributes( &self, extern_type_id: ExternTypeId, ) -> Result<Vec<Attribute>, DiagnosticAdded>

Returns the attributes of an extern type.
source§

fn function_title_signature( &self, function_title_id: FunctionTitleId, ) -> Result<Signature, DiagnosticAdded>

Returns the signature of the given FunctionTitleId. This include free functions, extern functions, etc…
source§

fn function_title_generic_params( &self, function_title_id: FunctionTitleId, ) -> Result<Vec<GenericParam>, DiagnosticAdded>

Returns the generic parameters of the given FunctionTitleId. This include free functions, extern functions, etc…
source§

fn concrete_function_signature( &self, function_id: 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, generic_type: GenericTypeId, ) -> Result<Vec<GenericParam>, DiagnosticAdded>

Returns the generic params of a generic type.
source§

fn generic_param_semantic( &self, generic_param: GenericParamId, ) -> Result<GenericParam, DiagnosticAdded>

Returns the semantic data of a generic param.
source§

fn generic_param_diagnostics( &self, generic_param: GenericParamId, ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of a generic param.
source§

fn generic_param_resolver_data( &self, generic_param: GenericParamId, ) -> Result<Arc<ResolverData>, DiagnosticAdded>

Returns the resolver data of a generic param.
source§

fn generic_impl_param_trait( &self, generic_param_id: GenericParamId, ) -> Result<TraitId, DiagnosticAdded>

Returns the trait a generic param impl should implement. Panics if the generic param is not an impl generic param.
source§

fn priv_generic_param_data( &self, generic_param: GenericParamId, in_cycle: bool, ) -> Result<GenericParamData, DiagnosticAdded>

Private query to compute data about a generic param.
source§

fn single_value_type(&self, ty: TypeId) -> Result<bool, DiagnosticAdded>

Returns true if there is only one value for the given type and hence the values of the given type are all interchangeable. Examples include the unit type tuple of a unit type and empty structs. Always returns false for extern types.
source§

fn type_size_info( &self, ty: TypeId, ) -> Result<TypeSizeInformation, DiagnosticAdded>

Returns the type size information for the given type.
source§

fn type_info( &self, lookup_context: ImplLookupContext, ty: TypeId, ) -> Result<TypeInfo, DiagnosticAdded>

Returns the generic_type of a generic function. This include free types, extern types, etc…
source§

fn priv_type_is_fully_concrete(&self, ty: TypeId) -> bool

Private query to check if a type is fully concrete.
source§

fn priv_type_is_var_free(&self, ty: TypeId) -> bool

Private query to check if a type contains no variables.
source§

fn expr_semantic(&self, function_id: FunctionWithBodyId, id: Id<Expr>) -> Expr

Assumes function and expression are present.
source§

fn pattern_semantic( &self, function_id: FunctionWithBodyId, id: Id<Pattern>, ) -> Pattern

Assumes function and pattern are present.
source§

fn statement_semantic( &self, function_id: FunctionWithBodyId, id: Id<Statement>, ) -> Statement

Assumes function and statement are valid.
source§

fn lookup_resolved_generic_item_by_ptr( &self, id: LookupItemId, ptr: TerminalIdentifierPtr, ) -> Option<ResolvedGenericItem>

source§

fn lookup_resolved_concrete_item_by_ptr( &self, id: LookupItemId, ptr: TerminalIdentifierPtr, ) -> Option<ResolvedConcreteItem>

source§

fn module_semantic_diagnostics( &self, module_id: ModuleId, ) -> Result<Diagnostics<SemanticDiagnostic>, DiagnosticAdded>

Aggregates module level semantic diagnostics.
source§

fn file_semantic_diagnostics( &self, file_id: FileId, ) -> Result<Diagnostics<SemanticDiagnostic>, DiagnosticAdded>

Aggregates file level semantic diagnostics.
source§

fn core_crate(&self) -> CrateId

source§

fn core_module(&self) -> ModuleId

source§

fn core_felt252_ty(&self) -> TypeId

source§

fn analyzer_plugins(&self) -> Vec<Arc<dyn AnalyzerPlugin>>

source§

fn set_analyzer_plugins(&mut self, value__: Vec<Arc<dyn AnalyzerPlugin>>)

Set the value of the analyzer_plugins input. Read more
source§

fn set_analyzer_plugins_with_durability( &mut self, value__: Vec<Arc<dyn AnalyzerPlugin>>, durability__: Durability, )

Set the value of the analyzer_plugins input with a specific durability instead of the default of Durability::LOW. You can use Durability::MAX to promise that its value will never change again. Read more
source§

fn declared_allows(&self) -> Arc<OrderedHashSet<String>>

Returns the set of allow that were declared as by a plugin. An allow that is not in this set will be handled as an unknown allow.
source§

fn methods_in_module( &self, module_id: ModuleId, type_filter: TypeFilter, ) -> Arc<[TraitFunctionId]>

Returns all methods in a module that match the given type filter.
source§

fn methods_in_crate( &self, crate_id: CrateId, type_filter: TypeFilter, ) -> Arc<[TraitFunctionId]>

Returns all methods in a crate that match the given type filter.
source§

fn visible_traits_from_module( &self, module_id: ModuleId, ) -> Option<Arc<OrderedHashMap<TraitId, String>>>

Returns all the traits visible from a module, alongside a visible use path to the trait.
source§

fn visible_traits_in_module( &self, module_id: ModuleId, user_module_id: ModuleId, include_parent: bool, ) -> Arc<[(TraitId, String)]>

Returns all visible traits in a module, alongside a visible use path to the trait. user_module_id is the module from which the traits are should be visible. If include_parent is true, the parent module of module_id is also considered.
source§

fn visible_traits_in_crate( &self, crate_id: CrateId, user_module_id: ModuleId, ) -> Arc<[(TraitId, String)]>

Returns all visible traits in a crate, alongside a visible use path to the trait. user_module_id is the module from which the traits are should be visible.
source§

impl<T0, T1, E, TRewriter> SemanticRewriter<(T0, T1), E> for TRewriter
where TRewriter: SemanticRewriter<T0, E> + SemanticRewriter<T1, E>,

source§

fn internal_rewrite(&mut self, value: &mut (T0, T1)) -> Result<RewriteResult, E>

source§

fn rewrite(&mut self, value: T) -> Result<T, Error>

source§

impl<T, E, TRewriter> SemanticRewriter<Box<T>, E> for TRewriter
where TRewriter: SemanticRewriter<T, E>,

source§

fn internal_rewrite(&mut self, value: &mut Box<T>) -> Result<RewriteResult, E>

source§

fn rewrite(&mut self, value: T) -> Result<T, Error>

source§

impl<T, E, TRewriter> SemanticRewriter<Option<T>, E> for TRewriter
where TRewriter: SemanticRewriter<T, E>,

source§

fn internal_rewrite( &mut self, value: &mut Option<T>, ) -> Result<RewriteResult, E>

source§

fn rewrite(&mut self, value: T) -> Result<T, Error>

source§

impl<T, V, E, TRewriter> SemanticRewriter<OrderedHashMap<T, V>, E> for TRewriter
where T: Clone, V: Clone, TRewriter: SemanticRewriter<V, E>,

source§

fn internal_rewrite( &mut self, value: &mut OrderedHashMap<T, V>, ) -> Result<RewriteResult, E>

source§

fn rewrite(&mut self, value: T) -> Result<T, Error>

source§

impl<T, E, TRewriter, E2> SemanticRewriter<Result<T, E2>, E> for TRewriter
where TRewriter: SemanticRewriter<T, E>,

source§

fn internal_rewrite( &mut self, value: &mut Result<T, E2>, ) -> Result<RewriteResult, E>

source§

fn rewrite(&mut self, value: T) -> Result<T, Error>

source§

impl<T, E, TRewriter> SemanticRewriter<Vec<T>, E> for TRewriter
where T: Clone, TRewriter: SemanticRewriter<T, E>,

source§

fn internal_rewrite(&mut self, value: &mut Vec<T>) -> Result<RewriteResult, E>

source§

fn rewrite(&mut self, value: T) -> Result<T, Error>

source§

impl<T, E, TRewriter> SemanticRewriter<VecDeque<T>, E> for TRewriter
where TRewriter: SemanticRewriter<T, E>,

source§

fn internal_rewrite( &mut self, value: &mut VecDeque<T>, ) -> Result<RewriteResult, E>

source§

fn rewrite(&mut self, value: T) -> Result<T, Error>

source§

impl<'a, T> SemanticUseEx<'a> for T
where T: Upcast<dyn SemanticGroup + 'a> + ?Sized,

source§

fn use_resolved_item( &self, use_id: UseId, ) -> Result<ResolvedGenericItem, DiagnosticAdded>

Returns the resolved item or an error if it can’t be resolved. Read more
source§

impl<DB> SierraGenGroup for DB
where DB: LoweringGroup + Upcast<dyn LoweringGroup> + Database + HasQueryGroup<SierraGenDatabase>,

source§

fn intern_label_id(&self, id: LabelLongId) -> LabelId

source§

fn lookup_intern_label_id(&self, key: LabelId) -> LabelLongId

source§

fn intern_concrete_lib_func( &self, id: ConcreteLibfuncLongId, ) -> ConcreteLibfuncId

source§

fn lookup_intern_concrete_lib_func( &self, key: ConcreteLibfuncId, ) -> ConcreteLibfuncLongId

source§

fn intern_concrete_type(&self, id: SierraGeneratorTypeLongId) -> ConcreteTypeId

source§

fn lookup_intern_concrete_type( &self, key: ConcreteTypeId, ) -> SierraGeneratorTypeLongId

source§

fn intern_sierra_function(&self, id: FunctionId) -> FunctionId

Creates a Sierra function id for a function id of the semantic model.
source§

fn lookup_intern_sierra_function(&self, key: FunctionId) -> FunctionId

source§

fn get_concrete_type_id( &self, type_id: TypeId, ) -> Result<ConcreteTypeId, DiagnosticAdded>

Returns the matching sierra concrete type id for a given semantic type id.
source§

fn get_index_enum_type_id( &self, index_count: usize, ) -> Result<ConcreteTypeId, DiagnosticAdded>

Returns the ConcreteTypeId of the index enum type with the given index count.
source§

fn get_concrete_long_type_id( &self, type_id: TypeId, ) -> Result<Arc<ConcreteTypeLongId>, DiagnosticAdded>

Returns the matching sierra concrete type long id for a given semantic type id.
source§

fn is_self_referential(&self, type_id: TypeId) -> Result<bool, DiagnosticAdded>

Returns if the semantic id has a circular definition.
source§

fn type_dependencies( &self, type_id: TypeId, ) -> Result<Arc<[TypeId]>, DiagnosticAdded>

Returns the semantic type ids the type is directly dependent on. Read more
source§

fn has_in_deps( &self, type_id: TypeId, needle: TypeId, ) -> Result<bool, DiagnosticAdded>

source§

fn get_function_signature( &self, function_id: FunctionId, ) -> Result<Arc<FunctionSignature>, DiagnosticAdded>

Returns the cairo_lang_sierra::program::FunctionSignature object for the given function id.
source§

fn get_type_info( &self, concrete_type_id: 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, function_id: ConcreteFunctionWithBodyId, ) -> SierraFunctionWithBodyData

Private query to compute Sierra data about a function with body.
source§

fn function_with_body_sierra( &self, function_id: ConcreteFunctionWithBodyId, ) -> Result<Arc<Function>, DiagnosticAdded>

Returns the Sierra code (as pre_sierra::Function) for a given function with body.
source§

fn get_ap_change( &self, function_id: 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, requested_function_ids: Vec<ConcreteFunctionWithBodyId>, ) -> Result<Arc<SierraProgramWithDebug>, DiagnosticAdded>

Returns the SierraProgramWithDebug object of the requested functions.
source§

fn get_sierra_program( &self, requested_crate_ids: Vec<CrateId>, ) -> Result<Arc<SierraProgramWithDebug>, DiagnosticAdded>

Returns the SierraProgramWithDebug object of the requested crates.
source§

impl<DB> SyntaxGroup for DB
where DB: FilesGroup + Upcast<dyn FilesGroup> + Database + HasQueryGroup<SyntaxDatabase>,

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> Upcast<T> for T
where T: ?Sized,

source§

fn upcast(&self) -> &T

source§

impl<T> UpcastMut<T> for T
where T: ?Sized,

source§

fn upcast_mut(&mut self) -> &mut T

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more