Enum libcoinche::cards::Rank [] [src]

pub enum Rank {
    Rank7,
    Rank8,
    Rank9,
    RankJ,
    RankQ,
    RankK,
    RankX,
    RankA,
}

Rank of a card in a suit.

Variants

Rank7Rank8Rank9RankJRankQRankKRankXRankA

Methods

impl Rank
[src]

fn from_n(n: u32) -> Self

Returns the rank corresponding to the given number:

  • 0: 7
  • 1: 8
  • 2: 9
  • 3: Jack
  • 4: Queen
  • 5: King
  • 6: 10
  • 7: Ace

Panics

If n >= 8.

fn to_string(self) -> String

Returns a character representing the given rank.

Trait Implementations

impl Debug for Rank
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Copy for Rank
[src]

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

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 !=.