pub struct LineCursor { /* private fields */ }
Expand description
§LineCursor
A line cursor type of a parser that holds the start line and offset from it. The relative offset cursor is used to actually access the source lines’ contents, whereas the sum of relative and absolute cursors is used mainly for debug prints and|or error messages.
Implementations§
Source§impl LineCursor
impl LineCursor
Sourcepub fn relative_offset(&self) -> Line
pub fn relative_offset(&self) -> Line
Retrieves the line relative to the baseline that a (nested) parser is on.
Sourcepub fn relative_offset_mut_ref(&mut self) -> &mut Line
pub fn relative_offset_mut_ref(&mut self) -> &mut Line
Retrieves a mutable reference to the line that the (nested) parser is on.
Sourcepub fn increment_by(&mut self, amount: Line)
pub fn increment_by(&mut self, amount: Line)
Increments relative offset by given amount
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LineCursor
impl RefUnwindSafe for LineCursor
impl Send for LineCursor
impl Sync for LineCursor
impl Unpin for LineCursor
impl UnwindSafe for LineCursor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more