FunctionsSemantic

Trait FunctionsSemantic 

Source
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§

Source

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…

Source

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…

Source

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…

Source

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.

Source

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.

Implementors§

Source§

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