pub struct ParseFailure {
pub offset: usize,
pub expected: Vec<&'static str>,
pub kind: Option<ErrorKind>,
}Expand description
Where the parser stopped, and what it could have accepted there.
Fields§
§offset: usizeByte offset into the document the parser stopped at.
expected: Vec<&'static str>What could have continued the document at offset, in the wording used
by the error message. Empty when the failure came from a place that
names no expectation.
kind: Option<ErrorKind>The nom error kind. An internal detail of this parser: it says which
combinator gave up, not what is wrong with the document, so it is kept
out of the error message and reachable only through Debug.
Trait Implementations§
Source§impl Clone for ParseFailure
impl Clone for ParseFailure
Source§fn clone(&self) -> ParseFailure
fn clone(&self) -> ParseFailure
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ParseFailure
impl Debug for ParseFailure
impl Eq for ParseFailure
Source§impl PartialEq for ParseFailure
impl PartialEq for ParseFailure
impl StructuralPartialEq for ParseFailure
Auto Trait Implementations§
impl Freeze for ParseFailure
impl RefUnwindSafe for ParseFailure
impl Send for ParseFailure
impl Sync for ParseFailure
impl Unpin for ParseFailure
impl UnsafeUnpin for ParseFailure
impl UnwindSafe for ParseFailure
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