pub struct Deck { /* private fields */ }
Expand description

A deck of cards.

Implementations

Returns a full, sorted deck of 32 cards.

Shuffle this deck.

Shuffle this deck with the given random seed.

Result is determined by the seed.

Draw the top card from the deck.

Panics

If self is empty.

Returns true if this deck is empty.

Returns the number of cards left in this deck.

Deal n cards to each hand.

Panics

If self.len() < 4 * n

Trait Implementations

Returns the “default value” for a type. Read more

Converts the given value to a String. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.