Enum parser_compose::Reason
source · #[non_exhaustive]pub enum Reason {
PredicateFailed,
NotFailed,
NotEndOfInput,
EndOfInput,
Mismatch(String),
Error(String),
Label(&'static str),
}
Expand description
The reason parsing failed
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
PredicateFailed
A predicate evaluated to false
NotFailed
The not
combinator failed
NotEndOfInput
Expected to see the end of input, but didn’t
EndOfInput
Expected more input, but saw the end of input
Mismatch(String)
The Debug
representation of what we expected to find in the input.
Error(String)
The description of an operation that failed while parsing. Only
.and_then()
uses this reason
Label(&'static str)
A user-provided label describing the item we tried and failed to parse. Only
.label()
uses this reason
Trait Implementations§
source§impl Ord for Reason
impl Ord for Reason
source§impl PartialEq for Reason
impl PartialEq for Reason
source§impl PartialOrd for Reason
impl PartialOrd for Reason
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 Reason
impl StructuralEq for Reason
impl StructuralPartialEq for Reason
Auto Trait Implementations§
impl RefUnwindSafe for Reason
impl Send for Reason
impl Sync for Reason
impl Unpin for Reason
impl UnwindSafe for Reason
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