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 try_ext_as_virtual(&self, external_id: InternId) -> Option<VirtualFile>

Returns the virtual file matching the external id if found.
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_global_use(&self, id: GlobalUseLongId) -> GlobalUseId

Source§

fn lookup_intern_global_use(&self, key: GlobalUseId) -> GlobalUseLongId

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_global_uses( &self, module_id: ModuleId, ) -> Result<Arc<OrderedHashMap<GlobalUseId, UsePathStar>>, 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_global_use_by_id( &self, global_use_id: GlobalUseId, ) -> Result<Option<UsePathStar>, 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§

fn module_plugin_diagnostics_notes( &self, module_id: ModuleId, ) -> Result<Arc<OrderedHashMap<FileId, DiagnosticNote>>, DiagnosticAdded>

Diagnostic notes for diagnostics originating in the plugin generated files identified by FileId.
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_global_use_semantic_data( &self, global_use_id: GlobalUseId, ) -> Result<UseGlobalData, DiagnosticAdded>

Private query to compute data about a global use.
Source§

fn priv_global_use_imported_module( &self, global_use_id: GlobalUseId, ) -> Result<ModuleId, DiagnosticAdded>

Private query to compute the imported module, given a global use.
Source§

fn global_use_semantic_diagnostics( &self, global_use_id: GlobalUseId, ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of a global use.
Source§

fn priv_module_use_star_modules( &self, module_id: ModuleId, ) -> Arc<ImportedModules>

Private query to compute the imported modules of a module, using global uses.
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: ModuleFileId, ) -> 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_file_id: ModuleFileId, include_parent: bool, ) -> Arc<[(TraitId, String)]>

Returns all visible traits in a module, alongside a visible use path to the trait. user_module_file_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_file_id: ModuleFileId, ) -> Arc<[(TraitId, String)]>

Returns all visible traits in a crate, alongside a visible use path to the trait. user_module_file_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