pub trait GenericParamSemantic<'db>: Database {
// Provided methods
fn generic_param_semantic(
&'db self,
generic_param: GenericParamId<'db>,
) -> Maybe<GenericParam<'db>> { ... }
fn generic_param_diagnostics(
&'db self,
generic_param: GenericParamId<'db>,
) -> Diagnostics<'db, SemanticDiagnostic<'db>> { ... }
fn generic_param_resolver_data(
&'db self,
generic_param: GenericParamId<'db>,
) -> Maybe<Arc<ResolverData<'db>>> { ... }
fn generic_impl_param_trait(
&'db self,
generic_param_id: GenericParamId<'db>,
) -> Maybe<TraitId<'db>> { ... }
fn generic_impl_param_shallow_trait_generic_args(
&'db self,
generic_param: GenericParamId<'db>,
) -> Maybe<&'db [(GenericParamId<'db>, ShallowGenericArg<'db>)]> { ... }
fn generic_params_type_constraints(
&'db self,
generic_params: Vec<GenericParamId<'db>>,
) -> &'db [(TypeId<'db>, TypeId<'db>)] { ... }
}Expand description
Trait for generic param-related semantic queries.
Provided Methods§
Sourcefn generic_param_semantic(
&'db self,
generic_param: GenericParamId<'db>,
) -> Maybe<GenericParam<'db>>
fn generic_param_semantic( &'db self, generic_param: GenericParamId<'db>, ) -> Maybe<GenericParam<'db>>
Returns the semantic data of a generic param.
Sourcefn generic_param_diagnostics(
&'db self,
generic_param: GenericParamId<'db>,
) -> Diagnostics<'db, SemanticDiagnostic<'db>>
fn generic_param_diagnostics( &'db self, generic_param: GenericParamId<'db>, ) -> Diagnostics<'db, SemanticDiagnostic<'db>>
Returns the semantic diagnostics of a generic param.
Sourcefn generic_param_resolver_data(
&'db self,
generic_param: GenericParamId<'db>,
) -> Maybe<Arc<ResolverData<'db>>>
fn generic_param_resolver_data( &'db self, generic_param: GenericParamId<'db>, ) -> Maybe<Arc<ResolverData<'db>>>
Returns the resolver data of a generic param.
Sourcefn generic_impl_param_trait(
&'db self,
generic_param_id: GenericParamId<'db>,
) -> Maybe<TraitId<'db>>
fn generic_impl_param_trait( &'db self, generic_param_id: GenericParamId<'db>, ) -> Maybe<TraitId<'db>>
Returns the trait a generic param impl should implement. Panics if the generic param is not an impl generic param.
Sourcefn generic_impl_param_shallow_trait_generic_args(
&'db self,
generic_param: GenericParamId<'db>,
) -> Maybe<&'db [(GenericParamId<'db>, ShallowGenericArg<'db>)]>
fn generic_impl_param_shallow_trait_generic_args( &'db self, generic_param: GenericParamId<'db>, ) -> Maybe<&'db [(GenericParamId<'db>, ShallowGenericArg<'db>)]>
Returns the shallow generic args of a generic impl param.
Sourcefn generic_params_type_constraints(
&'db self,
generic_params: Vec<GenericParamId<'db>>,
) -> &'db [(TypeId<'db>, TypeId<'db>)]
fn generic_params_type_constraints( &'db self, generic_params: Vec<GenericParamId<'db>>, ) -> &'db [(TypeId<'db>, TypeId<'db>)]
Returns the type constraints introduced by the generic params.