pub trait FunctionWithBodySemantic<'db>: Database {
// Provided methods
fn function_declaration_diagnostics(
&'db self,
function_id: FunctionWithBodyId<'db>,
) -> Diagnostics<'db, SemanticDiagnostic<'db>> { ... }
fn function_declaration_inline_config(
&'db self,
function_id: FunctionWithBodyId<'db>,
) -> Maybe<InlineConfiguration<'db>> { ... }
fn function_declaration_implicit_precedence(
&'db self,
function_id: FunctionWithBodyId<'db>,
) -> Maybe<&'db ImplicitPrecedence<'db>> { ... }
fn function_with_body_signature(
&'db self,
function_id: FunctionWithBodyId<'db>,
) -> Maybe<&'db Signature<'db>> { ... }
fn function_with_body_generic_params(
&'db self,
function_id: FunctionWithBodyId<'db>,
) -> Maybe<Vec<GenericParam<'db>>> { ... }
fn function_with_body_attributes(
&'db self,
function_id: FunctionWithBodyId<'db>,
) -> Maybe<&'db [Attribute<'db>]> { ... }
fn function_body_diagnostics(
&'db self,
function_id: FunctionWithBodyId<'db>,
) -> Diagnostics<'db, SemanticDiagnostic<'db>> { ... }
fn function_body(
&'db self,
function_id: FunctionWithBodyId<'db>,
) -> Maybe<&'db FunctionBody<'db>> { ... }
fn function_body_expr(
&'db self,
function_id: FunctionWithBodyId<'db>,
) -> Maybe<ExprId> { ... }
fn expr_semantic(
&'db self,
function_id: FunctionWithBodyId<'db>,
id: ExprId,
) -> Expr<'db> { ... }
fn statement_semantic(
&'db self,
function_id: FunctionWithBodyId<'db>,
id: StatementId,
) -> Statement<'db> { ... }
fn pattern_semantic(
&'db self,
function_id: FunctionWithBodyId<'db>,
id: PatternId,
) -> Pattern<'db> { ... }
}Expand description
Trait for function-with-body-related semantic queries.
Provided Methods§
Sourcefn function_declaration_diagnostics(
&'db self,
function_id: FunctionWithBodyId<'db>,
) -> Diagnostics<'db, SemanticDiagnostic<'db>>
fn function_declaration_diagnostics( &'db self, function_id: FunctionWithBodyId<'db>, ) -> Diagnostics<'db, SemanticDiagnostic<'db>>
Returns the semantic diagnostics of a declaration (signature) of a function with a body.
Sourcefn function_declaration_inline_config(
&'db self,
function_id: FunctionWithBodyId<'db>,
) -> Maybe<InlineConfiguration<'db>>
fn function_declaration_inline_config( &'db self, function_id: FunctionWithBodyId<'db>, ) -> Maybe<InlineConfiguration<'db>>
Returns the inline configuration of a declaration (signature) of a function with a body.
Sourcefn function_declaration_implicit_precedence(
&'db self,
function_id: FunctionWithBodyId<'db>,
) -> Maybe<&'db ImplicitPrecedence<'db>>
fn function_declaration_implicit_precedence( &'db self, function_id: FunctionWithBodyId<'db>, ) -> Maybe<&'db ImplicitPrecedence<'db>>
Returns the implicit order of a declaration (signature) of a function with a body.
Sourcefn function_with_body_signature(
&'db self,
function_id: FunctionWithBodyId<'db>,
) -> Maybe<&'db Signature<'db>>
fn function_with_body_signature( &'db self, function_id: FunctionWithBodyId<'db>, ) -> Maybe<&'db Signature<'db>>
Returns the signature of a function with a body.
Sourcefn function_with_body_generic_params(
&'db self,
function_id: FunctionWithBodyId<'db>,
) -> Maybe<Vec<GenericParam<'db>>>
fn function_with_body_generic_params( &'db self, function_id: FunctionWithBodyId<'db>, ) -> Maybe<Vec<GenericParam<'db>>>
Returns all the available generic params inside a function body.
Sourcefn function_with_body_attributes(
&'db self,
function_id: FunctionWithBodyId<'db>,
) -> Maybe<&'db [Attribute<'db>]>
fn function_with_body_attributes( &'db self, function_id: FunctionWithBodyId<'db>, ) -> Maybe<&'db [Attribute<'db>]>
Returns the attributes of a function with a body.
Sourcefn function_body_diagnostics(
&'db self,
function_id: FunctionWithBodyId<'db>,
) -> Diagnostics<'db, SemanticDiagnostic<'db>>
fn function_body_diagnostics( &'db self, function_id: FunctionWithBodyId<'db>, ) -> Diagnostics<'db, SemanticDiagnostic<'db>>
Returns the semantic diagnostics of a body of a function (with a body).
Sourcefn function_body(
&'db self,
function_id: FunctionWithBodyId<'db>,
) -> Maybe<&'db FunctionBody<'db>>
fn function_body( &'db self, function_id: FunctionWithBodyId<'db>, ) -> Maybe<&'db FunctionBody<'db>>
Returns the body of a function (with a body).
Sourcefn function_body_expr(
&'db self,
function_id: FunctionWithBodyId<'db>,
) -> Maybe<ExprId>
fn function_body_expr( &'db self, function_id: FunctionWithBodyId<'db>, ) -> Maybe<ExprId>
Returns the body expr of a function (with a body).
Sourcefn expr_semantic(
&'db self,
function_id: FunctionWithBodyId<'db>,
id: ExprId,
) -> Expr<'db>
fn expr_semantic( &'db self, function_id: FunctionWithBodyId<'db>, id: ExprId, ) -> Expr<'db>
Assumes function and expression are present.
Sourcefn statement_semantic(
&'db self,
function_id: FunctionWithBodyId<'db>,
id: StatementId,
) -> Statement<'db>
fn statement_semantic( &'db self, function_id: FunctionWithBodyId<'db>, id: StatementId, ) -> Statement<'db>
Assumes function and statement are valid.
Sourcefn pattern_semantic(
&'db self,
function_id: FunctionWithBodyId<'db>,
id: PatternId,
) -> Pattern<'db>
fn pattern_semantic( &'db self, function_id: FunctionWithBodyId<'db>, id: PatternId, ) -> Pattern<'db>
Assumes function and pattern are present.