pub struct Rank16(/* private fields */);Expand description
Bitset representation of rank collections.
A 16-bit bitset for efficient rank set operations. Each bit represents a specific rank, enabling fast membership tests and set operations.
§Memory Layout
[15, 0]: xxxAKQJT 98765432 // x: unusedImplementations§
Source§impl Rank16
impl Rank16
pub const STRAIGHT_A6789: Self
pub const STRAIGHT_A2345: Self
pub const STRAIGHT_23456: Self
pub const STRAIGHT_34567: Self
pub const STRAIGHT_45678: Self
pub const STRAIGHT_56789: Self
pub const STRAIGHT_6789T: Self
pub const STRAIGHT_789TJ: Self
pub const STRAIGHT_89TJQ: Self
pub const STRAIGHT_9TJQK: Self
pub const STRAIGHT_TJQKA: Self
pub const fn all<const SD: bool>() -> Self
pub const fn all_straights<const SD: bool>() -> &'static [Self]
Sourcepub const fn contains_rank(self, r: Rank) -> bool
pub const fn contains_rank(self, r: Rank) -> bool
Returns true if this set contains the specified rank.
Sourcepub const fn min_rank(self) -> Option<Rank>
pub const fn min_rank(self) -> Option<Rank>
Returns the lowest rank in this set, or None if empty.
Trait Implementations§
Source§impl BitAndAssign for Rank16
impl BitAndAssign for Rank16
Source§fn bitand_assign(&mut self, rhs: Rank16)
fn bitand_assign(&mut self, rhs: Rank16)
Performs the
&= operation. Read moreSource§impl BitOrAssign<Rank> for Rank16
impl BitOrAssign<Rank> for Rank16
Source§fn bitor_assign(&mut self, rhs: Rank)
fn bitor_assign(&mut self, rhs: Rank)
Performs the
|= operation. Read moreSource§impl BitOrAssign for Rank16
impl BitOrAssign for Rank16
Source§fn bitor_assign(&mut self, rhs: Rank16)
fn bitor_assign(&mut self, rhs: Rank16)
Performs the
|= operation. Read moreSource§impl FromIterator<Rank> for Rank16
impl FromIterator<Rank> for Rank16
Source§impl Ord for Rank16
impl Ord for Rank16
Source§impl PartialOrd for Rank16
impl PartialOrd for Rank16
impl Copy for Rank16
impl Eq for Rank16
impl StructuralPartialEq for Rank16
Auto Trait Implementations§
impl Freeze for Rank16
impl RefUnwindSafe for Rank16
impl Send for Rank16
impl Sync for Rank16
impl Unpin for Rank16
impl UnwindSafe for Rank16
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