Struct libcoinche::cards::Card
[−]
[src]
pub struct Card(_);
Represents a single card.
Methods
impl Card
[src]
fn id(self) -> u32
Returns the card id (from 0 to 31).
fn from_id(id: u32) -> Self
fn rank(self) -> Rank
Returns the card's rank.
fn suit(self) -> Suit
Returns the card's suit.
fn to_string(self) -> String
Returns a string representation of the card (ex: "7♦").
fn new(suit: Suit, rank: Rank) -> Self
Creates a card from the given suit and rank.
Trait Implementations
impl PartialEq for Card
[src]
fn eq(&self, __arg_0: &Card) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Card) -> bool
This method tests for !=
.
impl Clone for Card
[src]
fn clone(&self) -> Card
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