pub enum FailReason<I> {
Unexpected(Span),
Unclosed {
found_span: Span,
unclosed_span: Span,
delimiter: I,
},
Custom(Span, String),
MultiReason(Vec<FailReason<I>>),
}
Expand description
The cause of a parse failure
Variants§
Unexpected(Span)
An unexpected token at a span
Unclosed
An unclosed delimiter was encountered
Fields
§
delimiter: I
The expected ending delimiter
Custom(Span, String)
A custom message and span
MultiReason(Vec<FailReason<I>>)
Multiple reasons merged together
Trait Implementations§
Source§impl<I: Debug> Debug for FailReason<I>
impl<I: Debug> Debug for FailReason<I>
Source§impl<I: PartialEq> PartialEq for FailReason<I>
impl<I: PartialEq> PartialEq for FailReason<I>
impl<I> StructuralPartialEq for FailReason<I>
Auto Trait Implementations§
impl<I> Freeze for FailReason<I>where
I: Freeze,
impl<I> RefUnwindSafe for FailReason<I>where
I: RefUnwindSafe,
impl<I> Send for FailReason<I>where
I: Send,
impl<I> Sync for FailReason<I>where
I: Sync,
impl<I> Unpin for FailReason<I>where
I: Unpin,
impl<I> UnwindSafe for FailReason<I>where
I: UnwindSafe,
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more