pub trait FunctionsSemantic<'db>: Database {
// Provided methods
fn function_title_signature(
&'db self,
function_title_id: FunctionTitleId<'db>,
) -> Maybe<&'db Signature<'db>> { ... }
fn function_title_generic_params(
&'db self,
function_title_id: FunctionTitleId<'db>,
) -> Maybe<&'db [GenericParam<'db>]> { ... }
fn concrete_function_signature(
&'db self,
function_id: FunctionId<'db>,
) -> Maybe<&'db Signature<'db>> { ... }
fn concrete_function_closure_params(
&'db self,
function_id: FunctionId<'db>,
) -> Maybe<OrderedHashMap<TypeId<'db>, TypeId<'db>>> { ... }
fn get_closure_params(
&'db self,
generic_function_id: GenericFunctionId<'db>,
) -> Maybe<OrderedHashMap<TypeId<'db>, TypeId<'db>>> { ... }
}Expand description
Trait for functions-related semantic queries.
Provided Methods§
Sourcefn function_title_signature(
&'db self,
function_title_id: FunctionTitleId<'db>,
) -> Maybe<&'db Signature<'db>>
fn function_title_signature( &'db self, function_title_id: FunctionTitleId<'db>, ) -> Maybe<&'db Signature<'db>>
Returns the signature of the given FunctionTitleId. This include free functions, extern functions, etc…
Sourcefn function_title_generic_params(
&'db self,
function_title_id: FunctionTitleId<'db>,
) -> Maybe<&'db [GenericParam<'db>]>
fn function_title_generic_params( &'db self, function_title_id: FunctionTitleId<'db>, ) -> Maybe<&'db [GenericParam<'db>]>
Returns the generic parameters of the given FunctionTitleId. This include free functions, extern functions, etc…
Sourcefn concrete_function_signature(
&'db self,
function_id: FunctionId<'db>,
) -> Maybe<&'db Signature<'db>>
fn concrete_function_signature( &'db self, function_id: FunctionId<'db>, ) -> Maybe<&'db Signature<'db>>
Returns the signature of a concrete function. This include free functions, extern functions, etc…
Sourcefn concrete_function_closure_params(
&'db self,
function_id: FunctionId<'db>,
) -> Maybe<OrderedHashMap<TypeId<'db>, TypeId<'db>>>
fn concrete_function_closure_params( &'db self, function_id: FunctionId<'db>, ) -> Maybe<OrderedHashMap<TypeId<'db>, TypeId<'db>>>
Returns a mapping of closure types to their associated parameter types for a concrete function.
Sourcefn get_closure_params(
&'db self,
generic_function_id: GenericFunctionId<'db>,
) -> Maybe<OrderedHashMap<TypeId<'db>, TypeId<'db>>>
fn get_closure_params( &'db self, generic_function_id: GenericFunctionId<'db>, ) -> Maybe<OrderedHashMap<TypeId<'db>, TypeId<'db>>>
Returns a mapping of closure types to their associated parameter types for a generic function.