#[repr(u8)]pub enum Strain {
Clubs = 0,
Diamonds = 1,
Hearts = 2,
Spades = 3,
Notrump = 4,
}Expand description
Denomination, a suit or notrump
We choose this representation over Option<Suit> because we are not sure if
the latter can be optimized to a single byte.
The order of the suits deviates from dds, but this order provides
natural ordering by deriving PartialOrd and Ord.
Variants§
Clubs = 0
♣
Diamonds = 1
♦
Hearts = 2
♥
Spades = 3
♠
Notrump = 4
NT, the strain not proposing a trump suit
Implementations§
Source§impl Strain
impl Strain
Sourcepub const SYS: [Self; 5]
pub const SYS: [Self; 5]
Strains in the order in dds_bridge_sys
Sourcepub const fn is_notrump(self) -> bool
pub const fn is_notrump(self) -> bool
Whether this strain is notrump
Trait Implementations§
Source§impl Index<Strain> for TricksTable
impl Index<Strain> for TricksTable
Source§impl Ord for Strain
impl Ord for Strain
Source§impl PartialOrd for Strain
impl PartialOrd for Strain
impl Copy for Strain
impl Eq for Strain
impl StructuralPartialEq for Strain
Auto Trait Implementations§
impl Freeze for Strain
impl RefUnwindSafe for Strain
impl Send for Strain
impl Sync for Strain
impl Unpin for Strain
impl UnwindSafe for Strain
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