Enum libcoinche::cards::Rank
[−]
[src]
#[repr(u32)]pub enum Rank { Rank7, Rank8, Rank9, RankJ, RankQ, RankK, RankX, RankA, }
Rank of a card in a suit.
Variants
Rank7
7
Rank8
8
Rank9
9
RankJ
Jack
RankQ
Queen
RankK
King
RankX
10
RankA
Ace
Methods
impl Rank
[src]
fn from_n(n: u32) -> Self
Returns the rank corresponding to the given number:
0
-> 71
-> 82
-> 93
-> Jack4
-> Queen5
-> King6
-> 107
-> Ace
Panics
If n >= 8
.
fn to_string(self) -> String
Returns a character representing the given rank.
Trait Implementations
impl PartialEq for Rank
[src]
fn eq(&self, __arg_0: &Rank) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl Clone for Rank
[src]
fn clone(&self) -> Rank
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more