[][src]Struct bridge_deck::Card

pub struct Card { /* fields omitted */ }

A single card

Implementations

impl Card[src]

This module defines card constants

pub const fn new(suit: Suit, rank: u8) -> Card[src]

Create a new card with given rank and suit.

pub const fn suit(self) -> Suit[src]

What is the Suit?

pub const fn rank(self) -> u8[src]

What is my rank?

pub const C2: Card[src]

2 of Clubs

pub const C3: Card[src]

3 of Clubs

pub const C4: Card[src]

4 of Clubs

pub const C5: Card[src]

5 of Clubs

pub const C6: Card[src]

6 of Clubs

pub const C7: Card[src]

7 of Clubs

pub const C8: Card[src]

8 of Clubs

pub const C9: Card[src]

9 of Clubs

pub const C10: Card[src]

10 of Clubs

pub const CJ: Card[src]

Jack of Clubs

pub const CQ: Card[src]

Queen of Clubs

pub const CK: Card[src]

King of Clubs

pub const CA: Card[src]

Ace of Clubs

pub const D2: Card[src]

2 of Diamonds

pub const D3: Card[src]

3 of Diamonds

pub const D4: Card[src]

4 of Diamonds

pub const D5: Card[src]

5 of Diamonds

pub const D6: Card[src]

6 of Diamonds

pub const D7: Card[src]

7 of Diamonds

pub const D8: Card[src]

8 of Diamonds

pub const D9: Card[src]

9 of Diamonds

pub const D10: Card[src]

10 of Diamonds

pub const DJ: Card[src]

Jack of Diamonds

pub const DQ: Card[src]

Queen of Diamonds

pub const DK: Card[src]

King of Diamonds

pub const DA: Card[src]

Ace of Diamonds

pub const H2: Card[src]

2 of Hearts

pub const H3: Card[src]

3 of Hearts

pub const H4: Card[src]

4 of Hearts

pub const H5: Card[src]

5 of Hearts

pub const H6: Card[src]

6 of Hearts

pub const H7: Card[src]

7 of Hearts

pub const H8: Card[src]

8 of Hearts

pub const H9: Card[src]

9 of Hearts

pub const H10: Card[src]

10 of Hearts

pub const HJ: Card[src]

Jack of Hearts

pub const HQ: Card[src]

Queen of Hearts

pub const HK: Card[src]

King of Hearts

pub const HA: Card[src]

Ace of Hearts

pub const S2: Card[src]

2 of Spades

pub const S3: Card[src]

3 of Spades

pub const S4: Card[src]

4 of Spades

pub const S5: Card[src]

5 of Spades

pub const S6: Card[src]

6 of Spades

pub const S7: Card[src]

7 of Spades

pub const S8: Card[src]

8 of Spades

pub const S9: Card[src]

9 of Spades

pub const S10: Card[src]

10 of Spades

pub const SJ: Card[src]

Jack of Spades

pub const SQ: Card[src]

Queen of Spades

pub const SK: Card[src]

King of Spades

pub const SA: Card[src]

Ace of Spades

Trait Implementations

impl Clone for Card[src]

impl Copy for Card[src]

impl Debug for Card[src]

impl Eq for Card[src]

impl PartialEq<Card> for Card[src]

impl StructuralEq for Card[src]

impl StructuralPartialEq for Card[src]

Auto Trait Implementations

impl RefUnwindSafe for Card

impl Send for Card

impl Sync for Card

impl Unpin for Card

impl UnwindSafe for Card

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,