Struct ra_ap_hir::Semantics[][src]

pub struct Semantics<'db, DB> {
    pub db: &'db DB,
    // some fields omitted
}
Expand description

Primary API to get semantic information, like types, from syntax trees.

Fields

db: &'db DB

Implementations

If item has an attribute macro attached to it, expands it.

Find a AstNode by offset inside SyntaxNode, if it is inside Macrofile, search up until it is of the target AstNode type

Find a AstNode by offset inside SyntaxNode, if it is inside MacroCall, descend it and find again

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Cast a value to type U using CastTo.

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.