pub trait Spannable {
    // Required method
    fn span(&self) -> Span;

    // Provided method
    fn set_span(&mut self, _span: Span) { ... }
}
Expand description

Trait for objects that provide Span information. Used for error messaging.

Required Methods§

source

fn span(&self) -> Span

Get the Span of the object

Provided Methods§

source

fn set_span(&mut self, _span: Span)

Set the Span of the object. Possibly does nothing as implementation is optional.

Implementors§