Enum libcoinche::cards::Suit
[−]
[src]
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
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 ♣).