ImplSemantic

Trait ImplSemantic 

Source
pub trait ImplSemantic<'db>: Database {
Show 38 methods // Provided methods fn impl_semantic_declaration_diagnostics( &'db self, impl_def_id: ImplDefId<'db>, ) -> Diagnostics<'db, SemanticDiagnostic<'db>> { ... } fn impl_def_generic_params( &'db self, impl_def_id: ImplDefId<'db>, ) -> Maybe<&'db [GenericParam<'db>]> { ... } fn impl_def_resolver_data( &'db self, impl_def_id: ImplDefId<'db>, ) -> Maybe<Arc<ResolverData<'db>>> { ... } fn impl_def_concrete_trait( &'db self, impl_def_id: ImplDefId<'db>, ) -> Maybe<ConcreteTraitId<'db>> { ... } fn impl_def_attributes( &'db self, impl_def_id: ImplDefId<'db>, ) -> Maybe<&'db [Attribute<'db>]> { ... } fn impl_concrete_trait( &'db self, impl_id: ImplId<'db>, ) -> Maybe<ConcreteTraitId<'db>> { ... } fn impl_def_trait( &'db self, impl_def_id: ImplDefId<'db>, ) -> Maybe<TraitId<'db>> { ... } fn impl_semantic_definition_diagnostics( &'db self, impl_def_id: ImplDefId<'db>, ) -> Diagnostics<'db, SemanticDiagnostic<'db>> { ... } fn impl_item_info_by_name( &'db self, impl_def_id: ImplDefId<'db>, name: SmolStrId<'db>, ) -> Maybe<Option<ImplItemInfo<'db>>> { ... } fn impl_all_used_uses( &'db self, impl_def_id: ImplDefId<'db>, ) -> Maybe<&'db OrderedHashSet<UseId<'db>>> { ... } fn impl_types( &'db self, impl_def_id: ImplDefId<'db>, ) -> Maybe<&'db OrderedHashMap<ImplTypeDefId<'db>, ItemTypeAlias<'db>>> { ... } fn impl_type_by_trait_type( &'db self, impl_def_id: ImplDefId<'db>, trait_type_id: TraitTypeId<'db>, ) -> Maybe<ImplTypeDefId<'db>> { ... } fn impl_constants( &'db self, impl_def_id: ImplDefId<'db>, ) -> Maybe<&'db OrderedHashMap<ImplConstantDefId<'db>, ItemConstant<'db>>> { ... } fn impl_functions( &'db self, impl_def_id: ImplDefId<'db>, ) -> Maybe<&'db OrderedHashMap<SmolStrId<'db>, ImplFunctionId<'db>>> { ... } fn impl_type_def_resolved_type( &'db self, id: ImplTypeDefId<'db>, ) -> Maybe<TypeId<'db>> { ... } fn impl_type_def_generic_params( &'db self, id: ImplTypeDefId<'db>, ) -> Maybe<Vec<GenericParam<'db>>> { ... } fn impl_type_def_attributes( &'db self, id: ImplTypeDefId<'db>, ) -> Maybe<&'db [Attribute<'db>]> { ... } fn impl_type_def_resolver_data( &'db self, id: ImplTypeDefId<'db>, ) -> Maybe<Arc<ResolverData<'db>>> { ... } fn deref_chain( &'db self, ty: TypeId<'db>, crate_id: CrateId<'db>, try_deref_mut: bool, ) -> Maybe<&'db DerefChain<'db>> { ... } fn impl_type_concrete_implized( &'db self, impl_type_def_id: ImplTypeId<'db>, ) -> Maybe<TypeId<'db>> { ... } fn impl_constant_def_value( &'db self, id: ImplConstantDefId<'db>, ) -> Maybe<ConstValueId<'db>> { ... } fn impl_constant_def_resolver_data( &'db self, id: ImplConstantDefId<'db>, ) -> Maybe<Arc<ResolverData<'db>>> { ... } fn impl_constant_concrete_implized_value( &'db self, impl_constant_id: ImplConstantId<'db>, ) -> Maybe<ConstValueId<'db>> { ... } fn impl_constant_concrete_implized_type( &'db self, impl_constant_id: ImplConstantId<'db>, ) -> Maybe<TypeId<'db>> { ... } fn impl_impl_def_resolver_data( &'db self, id: ImplImplDefId<'db>, ) -> Maybe<Arc<ResolverData<'db>>> { ... } fn impl_impl_concrete_implized( &'db self, impl_impl_id: ImplImplId<'db>, ) -> Maybe<ImplId<'db>> { ... } fn impl_function_declaration_diagnostics( &'db self, id: ImplFunctionId<'db>, ) -> Diagnostics<'db, SemanticDiagnostic<'db>> { ... } fn impl_function_signature( &'db self, id: ImplFunctionId<'db>, ) -> Maybe<&'db Signature<'db>> { ... } fn impl_function_generic_params( &'db self, id: ImplFunctionId<'db>, ) -> Maybe<&'db [GenericParam<'db>]> { ... } fn impl_function_attributes( &'db self, id: ImplFunctionId<'db>, ) -> Maybe<&'db [Attribute<'db>]> { ... } fn impl_function_resolver_data( &'db self, id: ImplFunctionId<'db>, ) -> Maybe<Arc<ResolverData<'db>>> { ... } fn impl_function_declaration_inline_config( &'db self, id: ImplFunctionId<'db>, ) -> Maybe<InlineConfiguration<'db>> { ... } fn impl_function_declaration_implicit_precedence( &'db self, id: ImplFunctionId<'db>, ) -> Maybe<&'db ImplicitPrecedence<'db>> { ... } fn impl_function_trait_function( &'db self, id: ImplFunctionId<'db>, ) -> Maybe<TraitFunctionId<'db>> { ... } fn impl_function_body_diagnostics( &'db self, impl_function_id: ImplFunctionId<'db>, ) -> Diagnostics<'db, SemanticDiagnostic<'db>> { ... } fn impl_function_body( &'db self, impl_function_id: ImplFunctionId<'db>, ) -> Maybe<&'db FunctionBody<'db>> { ... } fn impl_function_body_resolver_data( &'db self, impl_function_id: ImplFunctionId<'db>, ) -> Maybe<Arc<ResolverData<'db>>> { ... } fn priv_impl_function_body_data( &'db self, impl_function_id: ImplFunctionId<'db>, ) -> Maybe<&'db FunctionBodyData<'db>> { ... }
}
Expand description

Trait for impl-related semantic queries.

Provided Methods§

Source

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

Returns the semantic declaration diagnostics of an impl.

Source

fn impl_def_generic_params( &'db self, impl_def_id: ImplDefId<'db>, ) -> Maybe<&'db [GenericParam<'db>]>

Returns the generic parameters of an impl.

Source

fn impl_def_resolver_data( &'db self, impl_def_id: ImplDefId<'db>, ) -> Maybe<Arc<ResolverData<'db>>>

Returns the resolution resolved_items of an impl.

Source

fn impl_def_concrete_trait( &'db self, impl_def_id: ImplDefId<'db>, ) -> Maybe<ConcreteTraitId<'db>>

Returns the concrete trait that is implemented by the impl.

Source

fn impl_def_attributes( &'db self, impl_def_id: ImplDefId<'db>, ) -> Maybe<&'db [Attribute<'db>]>

Returns the attributes attached to the impl.

Source

fn impl_concrete_trait( &'db self, impl_id: ImplId<'db>, ) -> Maybe<ConcreteTraitId<'db>>

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

Source

fn impl_def_trait(&'db self, impl_def_id: ImplDefId<'db>) -> Maybe<TraitId<'db>>

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

Source

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

Returns the semantic definition diagnostics of an impl.

Source

fn impl_item_info_by_name( &'db self, impl_def_id: ImplDefId<'db>, name: SmolStrId<'db>, ) -> Maybe<Option<ImplItemInfo<'db>>>

Returns the metadata for an impl item, by the given name, if exists.

Source

fn impl_all_used_uses( &'db self, impl_def_id: ImplDefId<'db>, ) -> Maybe<&'db OrderedHashSet<UseId<'db>>>

Returns all the items used within the impl.

Source

fn impl_types( &'db self, impl_def_id: ImplDefId<'db>, ) -> Maybe<&'db OrderedHashMap<ImplTypeDefId<'db>, ItemTypeAlias<'db>>>

Returns the type items in the impl.

Source

fn impl_type_by_trait_type( &'db self, impl_def_id: ImplDefId<'db>, trait_type_id: TraitTypeId<'db>, ) -> Maybe<ImplTypeDefId<'db>>

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

Source

fn impl_constants( &'db self, impl_def_id: ImplDefId<'db>, ) -> Maybe<&'db OrderedHashMap<ImplConstantDefId<'db>, ItemConstant<'db>>>

Returns the constant items in the impl.

Source

fn impl_functions( &'db self, impl_def_id: ImplDefId<'db>, ) -> Maybe<&'db OrderedHashMap<SmolStrId<'db>, ImplFunctionId<'db>>>

Returns the functions in the impl.

Source

fn impl_type_def_resolved_type( &'db self, id: ImplTypeDefId<'db>, ) -> Maybe<TypeId<'db>>

Returns the resolved type of an impl item type.

Source

fn impl_type_def_generic_params( &'db self, id: ImplTypeDefId<'db>, ) -> Maybe<Vec<GenericParam<'db>>>

Returns the generic parameters of an impl item type.

Source

fn impl_type_def_attributes( &'db self, id: ImplTypeDefId<'db>, ) -> Maybe<&'db [Attribute<'db>]>

Returns the attributes of an impl type.

Source

fn impl_type_def_resolver_data( &'db self, id: ImplTypeDefId<'db>, ) -> Maybe<Arc<ResolverData<'db>>>

Returns the resolution resolved_items of an impl item type.

Source

fn deref_chain( &'db self, ty: TypeId<'db>, crate_id: CrateId<'db>, try_deref_mut: bool, ) -> Maybe<&'db DerefChain<'db>>

Returns the deref chain and diagnostics for a given type.

Source

fn impl_type_concrete_implized( &'db self, impl_type_def_id: ImplTypeId<'db>, ) -> Maybe<TypeId<'db>>

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_value( &'db self, id: ImplConstantDefId<'db>, ) -> Maybe<ConstValueId<'db>>

Returns the resolved constant value of an impl item constant.

Source

fn impl_constant_def_resolver_data( &'db self, id: ImplConstantDefId<'db>, ) -> Maybe<Arc<ResolverData<'db>>>

Returns the resolution resolved_items of an impl item constant.

Source

fn impl_constant_concrete_implized_value( &'db self, impl_constant_id: ImplConstantId<'db>, ) -> Maybe<ConstValueId<'db>>

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

Source

fn impl_constant_concrete_implized_type( &'db self, impl_constant_id: ImplConstantId<'db>, ) -> Maybe<TypeId<'db>>

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

Source

fn impl_impl_def_resolver_data( &'db self, id: ImplImplDefId<'db>, ) -> Maybe<Arc<ResolverData<'db>>>

Returns the resolution resolved_items of an impl item impl.

Source

fn impl_impl_concrete_implized( &'db self, impl_impl_id: ImplImplId<'db>, ) -> Maybe<ImplId<'db>>

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

Source

fn impl_function_declaration_diagnostics( &'db self, id: ImplFunctionId<'db>, ) -> Diagnostics<'db, SemanticDiagnostic<'db>>

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

Source

fn impl_function_signature( &'db self, id: ImplFunctionId<'db>, ) -> Maybe<&'db Signature<'db>>

Returns the signature of an impl function.

Source

fn impl_function_generic_params( &'db self, id: ImplFunctionId<'db>, ) -> Maybe<&'db [GenericParam<'db>]>

Returns the generic params of an impl function.

Source

fn impl_function_attributes( &'db self, id: ImplFunctionId<'db>, ) -> Maybe<&'db [Attribute<'db>]>

Returns the attributes of an impl function.

Source

fn impl_function_resolver_data( &'db self, id: ImplFunctionId<'db>, ) -> Maybe<Arc<ResolverData<'db>>>

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

Source

fn impl_function_declaration_inline_config( &'db self, id: ImplFunctionId<'db>, ) -> Maybe<InlineConfiguration<'db>>

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

Source

fn impl_function_declaration_implicit_precedence( &'db self, id: ImplFunctionId<'db>, ) -> Maybe<&'db ImplicitPrecedence<'db>>

Returns the implicits precedence of an impl function.

Source

fn impl_function_trait_function( &'db self, id: ImplFunctionId<'db>, ) -> Maybe<TraitFunctionId<'db>>

Returns the trait function of an impl function.

Source

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

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

Source

fn impl_function_body( &'db self, impl_function_id: ImplFunctionId<'db>, ) -> Maybe<&'db FunctionBody<'db>>

Returns the definition of an impl function.

Source

fn impl_function_body_resolver_data( &'db self, impl_function_id: ImplFunctionId<'db>, ) -> Maybe<Arc<ResolverData<'db>>>

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

Source

fn priv_impl_function_body_data( &'db self, impl_function_id: ImplFunctionId<'db>, ) -> Maybe<&'db FunctionBodyData<'db>>

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

Implementors§

Source§

impl<'db, T: Database + ?Sized> ImplSemantic<'db> for T