Enum libcoinche::cards::Suit
[−]
[src]
#[repr(u32)]pub enum Suit { Heart, Spade, Diamond, Club, }
One of the four Suits: Heart, Spade, Diamond, Club.
Variants
Heart
The suit of hearts.
Spade
The suit of spades.
Diamond
The suit of diamonds.
Club
The suit of clubs.
Methods
impl Suit
[src]
fn from_n(n: u32) -> Self
Returns the suit corresponding to the number:
0
-> Heart1
-> Spade2
-> Diamond3
-> Club
Panics
If n >= 4
.
fn to_string(self) -> String
Returns a UTF-8 character representing the suit (♥, ♠, ♦ or ♣).
Trait Implementations
impl PartialEq for Suit
[src]
fn eq(&self, __arg_0: &Suit) -> 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 Suit
[src]
fn clone(&self) -> Suit
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