pub struct Recovery {
pub label: String,
pub start: usize,
pub end: usize,
pub position: usize,
pub expected: Vec<String>,
}Expand description
A labeled error that a parse in recovering mode recovered from: the error item that stands in the tree in place of what failed.
Fields§
§label: StringThe name of the label.
start: usizeThe byte offset where the label failed, where the item starts.
end: usizeThe byte offset where the recovery ended, start for a missing token.
position: usizeWhere the parse had got furthest when the label first failed at start: the farthest
byte offset at or after start where a failure had been recorded by then under the floor
the label failed with, or start where none had.
expected: Vec<String>What the grammar had expected at position by then, sorted.
Implementations§
Trait Implementations§
impl Eq for Recovery
impl StructuralPartialEq for Recovery
Auto Trait Implementations§
impl Forget for Recovery
impl Freeze for Recovery
impl Move for Recovery
impl RefUnwindSafe for Recovery
impl Send for Recovery
impl Sync for Recovery
impl Unpin for Recovery
impl UnsafeUnpin for Recovery
impl UnwindSafe for Recovery
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