pub trait HasSpan {
// Required method
fn span(&self) -> Span;
// Provided methods
fn start_position(&self) -> Position { ... }
fn end_position(&self) -> Position { ... }
}Expand description
A trait for types that cover a span of source code.
Required Methods§
Provided Methods§
Sourcefn start_position(&self) -> Position
fn start_position(&self) -> Position
A convenience method to get the starting position of the span.
Sourcefn end_position(&self) -> Position
fn end_position(&self) -> Position
A convenience method to get the ending position of the span.