pub enum Error {
Show 17 variants
NotImplemented(String),
TestFailure(String),
Internal(String),
IO(String),
NotRank(String),
NotSuit(String),
NotCard(String),
ParseEmpty(String),
ParseOther(String),
InvalidCard(Card, String),
DuplicateCard(Card),
EmptyDeck(usize, usize),
EmptyHand(usize, usize),
CardNotFound(Card),
HashDomain(String),
BadHand(String),
BadDescription(String),
}
Expand description
wiki | Library-related error type
Variants§
NotImplemented(String)
Function not implemented
TestFailure(String)
Test failure
Internal(String)
Internal
IO(String)
IO error
NotRank(String)
Number or text is not a valid card rank.
NotSuit(String)
Number or text is not a valid card suit.
NotCard(String)
Number or text is not a valid card ordinal.
ParseEmpty(String)
Empty input where a value was expected.
ParseOther(String)
Some other parsing error.
InvalidCard(Card, String)
Card is not valid for the deck type.
DuplicateCard(Card)
Duplicate card in deck or hand not allowing them.
EmptyDeck(usize, usize)
Deck is empty when it should not be.
EmptyHand(usize, usize)
Hand is empty when it should not be.
CardNotFound(Card)
Card not found in deck or hand.
HashDomain(String)
Hash function doesn’t apply to this hand.
BadHand(String)
Badly formed poker hand
BadDescription(String)
Badly formed description
Trait Implementations§
source§impl Error for Error
impl Error for Error
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin 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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)