pub enum Rank {
Show 13 variants
R2 = 0,
R3 = 1,
R4 = 2,
R5 = 3,
R6 = 4,
R7 = 5,
R8 = 6,
R9 = 7,
RT = 8,
RJ = 9,
RQ = 10,
RK = 11,
RA = 12,
}Expand description
Enum for Ranks
Represents the rank (value) of a playing card from 2 to Ace. Ranks are ordered from lowest (2) to highest (Ace) for poker hand evaluation. Each rank has a unique numeric value (0-12) and character representation.
§Examples
use open_pql::{Rank, Rank::*};
let rank = RA; // Ace
assert_eq!(rank.to_string(), "A");
assert_eq!(rank as u8, 12);
let parsed: Rank = "K".parse().unwrap();
assert_eq!(parsed, RK);Variants§
R2 = 0
Duece
R3 = 1
Three
R4 = 2
Four
R5 = 3
Five
R6 = 4
Six
R7 = 5
Seven
R8 = 6
Eight
R9 = 7
Nine
RT = 8
Ten
RJ = 9
Jack
RQ = 10
Queen
RK = 11
King
RA = 12
Ace
Implementations§
Trait Implementations§
Source§impl From<Rank> for VmStackValue
impl From<Rank> for VmStackValue
Source§impl Ord for Rank
impl Ord for Rank
Source§impl PartialOrd for Rank
impl PartialOrd for Rank
impl 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: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more