pub trait Span {
// Required methods
fn start_position(&self) -> Position;
fn end_position(&self) -> Position;
// Provided methods
fn is_empty(&self) -> bool { ... }
fn len(&self) -> usize { ... }
fn text<'a>(&self, text: &'a str) -> &'a str { ... }
}
Expand description
This trait allows for representing a parsed item that has start and end positions in a text.
Required Methods§
Sourcefn start_position(&self) -> Position
fn start_position(&self) -> Position
Returns the start position of this item.
Sourcefn end_position(&self) -> Position
fn end_position(&self) -> Position
Returns the end position of this item.