Skip to main content

Position

Trait Position 

Source
pub trait Position {
    // Required method
    fn position(&self) -> TextPosition;
}
Expand description

Get the position in the document corresponding to the object

This trait is implemented by parsers, lexers and errors.

Required Methods§

Source

fn position(&self) -> TextPosition

Returns the current position or a position corresponding to the object.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl Position for Error

Source§

impl Position for TextPosition

Source§

impl<'a, S: Iterator<Item = &'a u8>> Position for EventReader<'a, S>