pub struct Hand(pub [Holding; 4]);Expand description
A hand of playing cards
Tuple Fields§
§0: [Holding; 4]Implementations§
Source§impl Hand
impl Hand
Sourcepub const fn from_bits_retain(bits: u64) -> Self
pub const fn from_bits_retain(bits: u64) -> Self
Create a hand from a bitset of cards, retaining invalid cards
Sourcepub const fn contains_unknown_bits(self) -> bool
pub const fn contains_unknown_bits(self) -> bool
Whether the hand contains an invalid card
Sourcepub const fn from_bits(bits: u64) -> Option<Self>
pub const fn from_bits(bits: u64) -> Option<Self>
Create a hand from a bitset of cards, checking for invalid cards
Sourcepub const fn from_bits_truncate(bits: u64) -> Self
pub const fn from_bits_truncate(bits: u64) -> Self
Create a hand from a bitset of cards, removing invalid cards
Trait Implementations§
Source§impl Display for Hand
PBN-compatible display of a hand
impl Display for Hand
PBN-compatible display of a hand
This implementation ignores formatting flags for simplicity and speed.
impl Copy for Hand
impl Eq for Hand
impl StructuralPartialEq for Hand
Auto Trait Implementations§
impl Freeze for Hand
impl RefUnwindSafe for Hand
impl Send for Hand
impl Sync for Hand
impl Unpin for Hand
impl UnwindSafe for Hand
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