#[non_exhaustive]pub enum DealError {
WrongHandSize,
WrongStockSize,
RepeatedCard,
}Expand description
Error returned when constructing a Round from an invalid deal
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.
WrongHandSize
Each player is dealt exactly 10 cards
WrongStockSize
The stock holds the remaining 31 cards
RepeatedCard
A card appears twice across the hands, upcard, and stock
Trait Implementations§
impl Copy for DealError
impl Eq for DealError
Source§impl Error for DealError
impl Error for DealError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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()
impl StructuralPartialEq for DealError
Auto Trait Implementations§
impl Freeze for DealError
impl RefUnwindSafe for DealError
impl Send for DealError
impl Sync for DealError
impl Unpin for DealError
impl UnsafeUnpin for DealError
impl UnwindSafe for DealError
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