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.
Source§impl SmallSet<Card> for Hand
impl SmallSet<Card> for Hand
Source§fn set(&mut self, card: Card, condition: bool)
fn set(&mut self, card: Card, condition: bool)
Conditionally insert/remove a value from the set
Source§fn intersection(self, rhs: Self) -> <Self as BitAnd>::Output
fn intersection(self, rhs: Self) -> <Self as BitAnd>::Output
Intersection of two sets
Source§fn difference(self, rhs: Self) -> <Self as Sub>::Output
fn difference(self, rhs: Self) -> <Self as Sub>::Output
Difference of two sets
Source§fn symmetric_difference(self, rhs: Self) -> <Self as BitXor>::Output
fn symmetric_difference(self, rhs: Self) -> <Self as BitXor>::Output
Symmetric difference of two sets
Source§fn complement(self) -> <Self as Not>::Output
fn complement(self) -> <Self as Not>::Output
Complement of the set
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