Struct biome_parser::ParserProgress
source · pub struct ParserProgress(/* private fields */);Expand description
Captures the progress of the parser and allows to test if the parsing is still making progress
Implementations§
source§impl ParserProgress
impl ParserProgress
sourcepub fn has_progressed<P>(&self, p: &P) -> boolwhere
P: Parser,
pub fn has_progressed<P>(&self, p: &P) -> boolwhere P: Parser,
Returns true if the current parser position is passed this position
sourcepub fn assert_progressing<P>(&mut self, p: &P)where
P: Parser,
pub fn assert_progressing<P>(&mut self, p: &P)where P: Parser,
Asserts that the parsing is still making progress.
Panics
Panics if the parser is still at this position
Trait Implementations§
source§impl Debug for ParserProgress
impl Debug for ParserProgress
source§impl Default for ParserProgress
impl Default for ParserProgress
source§fn default() -> ParserProgress
fn default() -> ParserProgress
Returns the “default value” for a type. Read more
source§impl Hash for ParserProgress
impl Hash for ParserProgress
source§impl Ord for ParserProgress
impl Ord for ParserProgress
source§fn cmp(&self, other: &ParserProgress) -> Ordering
fn cmp(&self, other: &ParserProgress) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for ParserProgress
impl PartialEq for ParserProgress
source§fn eq(&self, other: &ParserProgress) -> bool
fn eq(&self, other: &ParserProgress) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd for ParserProgress
impl PartialOrd for ParserProgress
source§fn partial_cmp(&self, other: &ParserProgress) -> Option<Ordering>
fn partial_cmp(&self, other: &ParserProgress) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Eq for ParserProgress
impl StructuralEq for ParserProgress
impl StructuralPartialEq for ParserProgress
Auto Trait Implementations§
impl RefUnwindSafe for ParserProgress
impl Send for ParserProgress
impl Sync for ParserProgress
impl Unpin for ParserProgress
impl UnwindSafe for ParserProgress
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