pub enum Rank {
Show 16 variants
None = 0,
LowAce = 1,
Deuce = 2,
Trey = 3,
Four = 4,
Five = 5,
Six = 6,
Seven = 7,
Eight = 8,
Nine = 9,
Ten = 10,
Jack = 11,
Knight = 12,
Queen = 13,
King = 14,
Ace = 15,
}
Expand description
wiki | Enum for card ranks. Simple integer enum. Specific numbers do matter: I do a lot of math with them to optimize things, and the same numbers are used in the other languages in the project.
Note that there are two slots for aces and a slot for knight/cavalier. See Ace and Knight @ wiki for details.
Variants§
None = 0
LowAce = 1
Deuce = 2
Trey = 3
Four = 4
Five = 5
Six = 6
Seven = 7
Eight = 8
Nine = 9
Ten = 10
Jack = 11
Knight = 12
Queen = 13
King = 14
Ace = 15
Implementations§
Trait Implementations§
source§impl Ord for Rank
impl Ord for Rank
source§impl PartialEq for Rank
impl PartialEq for Rank
source§impl PartialOrd for Rank
impl PartialOrd for Rank
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Rank
impl Eq for Rank
impl StructuralPartialEq for Rank
Auto Trait Implementations§
impl Freeze for Rank
impl RefUnwindSafe for Rank
impl Send for Rank
impl Sync for Rank
impl Unpin for Rank
impl UnwindSafe for Rank
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
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)