pub struct ParseTrace { /* private fields */ }Expand description
Tracks which tokens were consumed by each parser rule.
Implementations§
Source§impl ParseTrace
impl ParseTrace
pub fn new(max_events: usize) -> Self
pub fn enter(&mut self, rule: impl Into<String>, pos: usize) -> usize
pub fn exit(&mut self, idx: usize, end_pos: usize, success: bool)
pub fn success_count(&self) -> usize
pub fn fail_count(&self) -> usize
pub fn total(&self) -> usize
pub fn most_failing_rule(&self) -> Option<&str>
Auto Trait Implementations§
impl Freeze for ParseTrace
impl RefUnwindSafe for ParseTrace
impl Send for ParseTrace
impl Sync for ParseTrace
impl Unpin for ParseTrace
impl UnsafeUnpin for ParseTrace
impl UnwindSafe for ParseTrace
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