pub struct Failure {
pub expected: Option<&'static str>,
}Expand description
Why a rule did not match: the token class it expected, when a rule said.
Fields§
§expected: Option<&'static str>The token class expected where the parser stopped.
Trait Implementations§
impl Copy for Failure
impl Eq for Failure
Source§impl<I: Stream> ParserError<I> for Failure
impl<I: Stream> ParserError<I> for Failure
Source§fn from_input(_: &I) -> Self
fn from_input(_: &I) -> Self
Creates an error from the input position
Source§fn into_inner(self) -> Result<Self::Inner, Self>
fn into_inner(self) -> Result<Self::Inner, Self>
Unwrap the mode, returning the underlying error, if present
Source§fn assert(input: &I, _message: &'static str) -> Selfwhere
I: Debug,
fn assert(input: &I, _message: &'static str) -> Selfwhere
I: Debug,
Process a parser assertion
Source§fn incomplete(input: &I, _needed: Needed) -> Self
fn incomplete(input: &I, _needed: Needed) -> Self
There was not enough data to determine the appropriate action Read more
Source§fn append(self, _input: &I, _token_start: &<I as Stream>::Checkpoint) -> Self
fn append(self, _input: &I, _token_start: &<I as Stream>::Checkpoint) -> Self
Like
ParserError::from_input but merges it with the existing error. Read moreSource§fn is_backtrack(&self) -> bool
fn is_backtrack(&self) -> bool
Is backtracking and trying new parse branches allowed?
impl StructuralPartialEq for Failure
Auto Trait Implementations§
impl Freeze for Failure
impl RefUnwindSafe for Failure
impl Send for Failure
impl Sync for Failure
impl Unpin for Failure
impl UnsafeUnpin for Failure
impl UnwindSafe for Failure
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