pub struct ParseCheckpoint {
pub position: usize,
pub depth: usize,
pub error_count: usize,
}Expand description
A checkpoint for parser backtracking.
Fields§
§position: usize§depth: usize§error_count: usizeImplementations§
Source§impl ParseCheckpoint
impl ParseCheckpoint
pub fn save(cursor: &TokenCursor, errors: usize) -> Self
pub fn restore(&self, cursor: &mut TokenCursor)
Trait Implementations§
Source§impl Clone for ParseCheckpoint
impl Clone for ParseCheckpoint
Source§fn clone(&self) -> ParseCheckpoint
fn clone(&self) -> ParseCheckpoint
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ParseCheckpoint
impl RefUnwindSafe for ParseCheckpoint
impl Send for ParseCheckpoint
impl Sync for ParseCheckpoint
impl Unpin for ParseCheckpoint
impl UnsafeUnpin for ParseCheckpoint
impl UnwindSafe for ParseCheckpoint
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