Trait rune::compile::Located

source ·
pub trait Located {
    // Required methods
    fn location(&self) -> Location;
    fn as_spanned(&self) -> &dyn Spanned;
}
Expand description

Trait for things that have a Location.

Required Methods§

source

fn location(&self) -> Location

Get the assocaited location.

source

fn as_spanned(&self) -> &dyn Spanned

Get located item as spanned.

Trait Implementations§

source§

impl Spanned for dyn Located

source§

fn span(&self) -> Span

Get the span of the type.

Implementors§