pub trait Symbol<'db>: Copy {
type Output;
// Required method
fn symbol(self, db: &'db dyn Db) -> Self::Output;
}Expand description
Return the symbol corresponding to the AST node. Implementations are memoized so that this can be called many times and will always yield the same symbol.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl<'db> Symbol<'db> for AstFunctionInput<'db>
impl<'db> Symbol<'db> for AstFunctionInput<'db>
type Output = SymVariable<'db>
fn symbol(self, db: &'db dyn Db) -> SymVariable<'db>
Source§impl<'db> Symbol<'db> for AstGenericKind<'db>
Convert to SymGenericKind
impl<'db> Symbol<'db> for AstGenericKind<'db>
Convert to SymGenericKind
Source§impl<'db> Symbol<'db> for AstSelfArg<'db>
impl<'db> Symbol<'db> for AstSelfArg<'db>
type Output = SymVariable<'db>
fn symbol(self: AstSelfArg<'db>, db: &'db dyn Db) -> SymVariable<'db>
Source§impl<'db> Symbol<'db> for VariableDecl<'db>
impl<'db> Symbol<'db> for VariableDecl<'db>
type Output = SymVariable<'db>
fn symbol(self: VariableDecl<'db>, db: &'db dyn Db) -> SymVariable<'db>
Source§impl<'db> Symbol<'db> for AstGenericDecl<'db>
Create the symbol for an explicictly declared generic parameter.
This is tracked so that we do it at most once.
impl<'db> Symbol<'db> for AstGenericDecl<'db>
Create the symbol for an explicictly declared generic parameter. This is tracked so that we do it at most once.