#[non_exhaustive]pub enum ParseDealError {
InvalidDealer,
Hand(ParseHandError),
NotFourHands,
InvalidPartialDeal,
NotFullDeal,
}Expand description
An error which can be returned when parsing a PartialDeal or FullDeal
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.
InvalidDealer
Invalid dealer tag
Hand(ParseHandError)
Error in a hand
NotFourHands
The deal does not contain 4 hands
InvalidPartialDeal
The deal is not a valid PartialDeal: some hand has more than 13 cards or
two hands share a card
NotFullDeal
The deal is not a FullDeal: some hand does not have exactly 13 cards
Trait Implementations§
Source§impl Clone for ParseDealError
impl Clone for ParseDealError
Source§fn clone(&self) -> ParseDealError
fn clone(&self) -> ParseDealError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ParseDealError
impl Debug for ParseDealError
Source§impl Display for ParseDealError
impl Display for ParseDealError
Source§impl Error for ParseDealError
impl Error for ParseDealError
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()
Source§impl From<ParseHandError> for ParseDealError
impl From<ParseHandError> for ParseDealError
Source§fn from(source: ParseHandError) -> Self
fn from(source: ParseHandError) -> Self
Converts to this type from the input type.
Source§impl Hash for ParseDealError
impl Hash for ParseDealError
Source§impl PartialEq for ParseDealError
impl PartialEq for ParseDealError
impl Copy for ParseDealError
impl Eq for ParseDealError
impl StructuralPartialEq for ParseDealError
Auto Trait Implementations§
impl Freeze for ParseDealError
impl RefUnwindSafe for ParseDealError
impl Send for ParseDealError
impl Sync for ParseDealError
impl Unpin for ParseDealError
impl UnsafeUnpin for ParseDealError
impl UnwindSafe for ParseDealError
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