pub trait HasSource {
type Ast;
fn source(&self, db: &dyn DefDatabase) -> InFile<Self::Ast>;
}
Expand description
A trait implemented for items that can be related back to their source. The
HasSource::source
method returns the source location of its instance.
Required Associated Types§
Required Methods§
sourcefn source(&self, db: &dyn DefDatabase) -> InFile<Self::Ast>
fn source(&self, db: &dyn DefDatabase) -> InFile<Self::Ast>
Returns the source location of this instance.