Trait hir_def::src::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§