#[repr(C)]pub enum StandardCard {
Clubs(StandardCardFace),
Diamonds(StandardCardFace),
Hearts(StandardCardFace),
Spades(StandardCardFace),
}Expand description
Standard Card
Variants§
Clubs(StandardCardFace)
Clubs
Diamonds(StandardCardFace)
Diamonds
Hearts(StandardCardFace)
Hearts
Spades(StandardCardFace)
Spades
Implementations§
Source§impl StandardCard
impl StandardCard
Sourcepub fn face(self) -> StandardCardFace
pub fn face(self) -> StandardCardFace
Get the Card’s face
Sourcepub fn suite_string(self) -> &'static str
pub fn suite_string(self) -> &'static str
The cards suite as a string
Sourcepub fn face_to_string(self) -> String
pub fn face_to_string(self) -> String
Cards face as a string
Sourcepub fn eq_suite(self, card: StandardCard) -> bool
pub fn eq_suite(self, card: StandardCard) -> bool
Check if the suites of the cards are equal
Trait Implementations§
Source§impl Clone for StandardCard
impl Clone for StandardCard
Source§fn clone(&self) -> StandardCard
fn clone(&self) -> StandardCard
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for StandardCard
Source§impl Debug for StandardCard
impl Debug for StandardCard
Source§impl DefaultCollection for StandardCard
impl DefaultCollection for StandardCard
Source§fn default_collection() -> VecDeque<Self>
fn default_collection() -> VecDeque<Self>
Create a default collection
Source§fn multiple_collections(n: usize) -> VecDeque<Self>
fn multiple_collections(n: usize) -> VecDeque<Self>
Create n default collections
Source§fn create_deck() -> Deck<Self>
fn create_deck() -> Deck<Self>
Create a deck of Card from default collection
Source§impl<'de> Deserialize<'de> for StandardCard
impl<'de> Deserialize<'de> for StandardCard
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for StandardCard
impl Display for StandardCard
impl Eq for StandardCard
Source§impl From<SolitaireCard> for StandardCard
impl From<SolitaireCard> for StandardCard
Source§fn from(val: SolitaireCard) -> Self
fn from(val: SolitaireCard) -> Self
Converts to this type from the input type.
Source§impl From<StandardCard> for StandardCardFace
impl From<StandardCard> for StandardCardFace
Source§fn from(card: StandardCard) -> StandardCardFace
fn from(card: StandardCard) -> StandardCardFace
Converts to this type from the input type.
Source§impl From<StandardCard> for u8
impl From<StandardCard> for u8
Source§fn from(card: StandardCard) -> u8
fn from(card: StandardCard) -> u8
Converts to this type from the input type.
Source§impl From<StandardCard> for SolitaireCard
impl From<StandardCard> for SolitaireCard
Source§fn from(val: StandardCard) -> Self
fn from(val: StandardCard) -> Self
Converts to this type from the input type.
Source§impl FromStr for StandardCard
impl FromStr for StandardCard
Source§impl Hash for StandardCard
impl Hash for StandardCard
Source§impl Ord for StandardCard
impl Ord for StandardCard
Source§fn cmp(&self, other: &StandardCard) -> Ordering
fn cmp(&self, other: &StandardCard) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for StandardCard
impl PartialEq for StandardCard
Source§fn eq(&self, other: &StandardCard) -> bool
fn eq(&self, other: &StandardCard) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for StandardCard
impl PartialOrd for StandardCard
Source§impl Serialize for StandardCard
impl Serialize for StandardCard
impl StructuralPartialEq for StandardCard
Auto Trait Implementations§
impl Freeze for StandardCard
impl RefUnwindSafe for StandardCard
impl Send for StandardCard
impl Sync for StandardCard
impl Unpin for StandardCard
impl UnsafeUnpin for StandardCard
impl UnwindSafe for StandardCard
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more