pub enum Error {
InvalidToken(LocInfo),
UnrecognizedEof(LocInfo, Vec<String>),
UnrecognizedToken(LocInfo, Vec<String>),
ExtraToken(LocInfo),
TooManyCardsInRange(LocInfo),
NumberOfRanksMismatchInSpan(LocInfo),
RankDistanceMismatchInSpan(LocInfo),
SuitMismatchInSpan(LocInfo),
InvalidSpan(LocInfo),
InvalidList(LocInfo),
InvalidRank(LocInfo),
InvalidSuit(LocInfo),
}Expand description
Parse failure produced while parsing a range expression.
Variants§
InvalidToken(LocInfo)
Token is not recognized by the lexer.
UnrecognizedEof(LocInfo, Vec<String>)
Input ended before the parser expected.
UnrecognizedToken(LocInfo, Vec<String>)
Token is not valid in this position.
ExtraToken(LocInfo)
Trailing token after a complete parse.
TooManyCardsInRange(LocInfo)
Range lists more cards than allowed.
NumberOfRanksMismatchInSpan(LocInfo)
Span endpoints disagree on rank count.
RankDistanceMismatchInSpan(LocInfo)
Span endpoints disagree on rank distance.
SuitMismatchInSpan(LocInfo)
Span endpoints disagree on suit.
InvalidSpan(LocInfo)
Span is otherwise invalid.
InvalidList(LocInfo)
List is otherwise invalid.
InvalidRank(LocInfo)
Rank is out of range for the deck.
InvalidSuit(LocInfo)
Suit is invalid.
Trait Implementations§
impl Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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