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

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

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

Derived Implementations

impl Debug for Rank

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

impl Copy for Rank

impl Clone for Rank

fn clone(&self) -> Rank

fn clone_from(&mut self, source: &Self)

impl PartialEq for Rank

fn eq(&self, __arg_0: &Rank) -> bool

fn ne(&self, __arg_0: &Rank) -> bool