pub enum TryParseFailure {
SkipToken,
DoNothing,
}
Expand description
The possible results of a try_parse_* function failing to parse.
Variants§
SkipToken
The parsing failed, and no token was consumed, the current token is the token which caused the failure and thus should be skipped by the caller.
DoNothing
The parsing failed, some tokens were consumed, and the current token is yet to be processed. Should be used when the failure cannot be determined by the first token alone, and thus the tokens until the token which determines the failure should be consumed.
Trait Implementations§
source§impl PartialEq for TryParseFailure
impl PartialEq for TryParseFailure
impl StructuralPartialEq for TryParseFailure
Auto Trait Implementations§
impl Freeze for TryParseFailure
impl RefUnwindSafe for TryParseFailure
impl Send for TryParseFailure
impl Sync for TryParseFailure
impl Unpin for TryParseFailure
impl UnwindSafe for TryParseFailure
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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