hir_def::src

Trait HasSource

Source
pub trait HasSource {
    type Value: AstNode;

    // Required method
    fn ast_ptr(&self, db: &dyn DefDatabase) -> InFile<AstPtr<Self::Value>>;

    // Provided method
    fn source(&self, db: &dyn DefDatabase) -> InFile<Self::Value> { ... }
}

Required Associated Types§

Source

type Value: AstNode

Required Methods§

Source

fn ast_ptr(&self, db: &dyn DefDatabase) -> InFile<AstPtr<Self::Value>>

Provided Methods§

Source

fn source(&self, db: &dyn DefDatabase) -> InFile<Self::Value>

Implementors§