Expand description
wiki | Commonly used imports
This module re-exports all the functions, types, and macros that most users of the library will need.
Re-exports§
pub use crate::error::Error as OjError;
pub use crate::error::Result as OjResult;
pub use crate::cards::suit::Suit;
pub use crate::cards::rank::Rank;
pub use crate::cards::card::Card;
pub use crate::cards::card::WHITE_JOKER;
pub use crate::cards::card::BLACK_JOKER;
pub use crate::cards::card::JOKER;
pub use crate::cards::card::LOW_ACE_OF_CLUBS;
pub use crate::cards::card::LOW_ACE_OF_DIAMONDS;
pub use crate::cards::card::LOW_ACE_OF_HEARTS;
pub use crate::cards::card::LOW_ACE_OF_SPADES;
pub use crate::cards::card::DEUCE_OF_CLUBS;
pub use crate::cards::card::DEUCE_OF_DIAMONDS;
pub use crate::cards::card::DEUCE_OF_HEARTS;
pub use crate::cards::card::DEUCE_OF_SPADES;
pub use crate::cards::card::TREY_OF_CLUBS;
pub use crate::cards::card::TREY_OF_DIAMONDS;
pub use crate::cards::card::TREY_OF_HEARTS;
pub use crate::cards::card::TREY_OF_SPADES;
pub use crate::cards::card::FOUR_OF_CLUBS;
pub use crate::cards::card::FOUR_OF_DIAMONDS;
pub use crate::cards::card::FOUR_OF_HEARTS;
pub use crate::cards::card::FOUR_OF_SPADES;
pub use crate::cards::card::FIVE_OF_CLUBS;
pub use crate::cards::card::FIVE_OF_DIAMONDS;
pub use crate::cards::card::FIVE_OF_HEARTS;
pub use crate::cards::card::FIVE_OF_SPADES;
pub use crate::cards::card::SIX_OF_CLUBS;
pub use crate::cards::card::SIX_OF_DIAMONDS;
pub use crate::cards::card::SIX_OF_HEARTS;
pub use crate::cards::card::SIX_OF_SPADES;
pub use crate::cards::card::SEVEN_OF_CLUBS;
pub use crate::cards::card::SEVEN_OF_DIAMONDS;
pub use crate::cards::card::SEVEN_OF_HEARTS;
pub use crate::cards::card::SEVEN_OF_SPADES;
pub use crate::cards::card::EIGHT_OF_CLUBS;
pub use crate::cards::card::EIGHT_OF_DIAMONDS;
pub use crate::cards::card::EIGHT_OF_HEARTS;
pub use crate::cards::card::EIGHT_OF_SPADES;
pub use crate::cards::card::NINE_OF_CLUBS;
pub use crate::cards::card::NINE_OF_DIAMONDS;
pub use crate::cards::card::NINE_OF_HEARTS;
pub use crate::cards::card::NINE_OF_SPADES;
pub use crate::cards::card::TEN_OF_CLUBS;
pub use crate::cards::card::TEN_OF_DIAMONDS;
pub use crate::cards::card::TEN_OF_HEARTS;
pub use crate::cards::card::TEN_OF_SPADES;
pub use crate::cards::card::JACK_OF_CLUBS;
pub use crate::cards::card::JACK_OF_DIAMONDS;
pub use crate::cards::card::JACK_OF_HEARTS;
pub use crate::cards::card::JACK_OF_SPADES;
pub use crate::cards::card::KNIGHT_OF_CLUBS;
pub use crate::cards::card::KNIGHT_OF_DIAMONDS;
pub use crate::cards::card::KNIGHT_OF_HEARTS;
pub use crate::cards::card::KNIGHT_OF_SPADES;
pub use crate::cards::card::QUEEN_OF_CLUBS;
pub use crate::cards::card::QUEEN_OF_DIAMONDS;
pub use crate::cards::card::QUEEN_OF_HEARTS;
pub use crate::cards::card::QUEEN_OF_SPADES;
pub use crate::cards::card::KING_OF_CLUBS;
pub use crate::cards::card::KING_OF_DIAMONDS;
pub use crate::cards::card::KING_OF_HEARTS;
pub use crate::cards::card::KING_OF_SPADES;
pub use crate::cards::card::ACE_OF_CLUBS;
pub use crate::cards::card::ACE_OF_DIAMONDS;
pub use crate::cards::card::ACE_OF_HEARTS;
pub use crate::cards::card::ACE_OF_SPADES;
pub use crate::cards::card_parse::card_parse;
pub use crate::cards::deck_type::DeckType;
pub use crate::cards::deck::Deck;
pub use crate::cards::hand::Hand;
pub use crate::poker::hand_scale::Scale;
pub use crate::poker::hand_value::HandLevel;
pub use crate::poker::hand_value::HandValue;
pub use crate::poker::hand_value::HandDescription;
Macros§
- Make const Card object from string. For example,
card!("Ac")
is equivalent to the constantACE_OF_CLUBS
. - Make const array of Card objects from string literals. For example,
hand!("Ac", "2d", "3h")
is equivalent to[ACE_OF_CLUBS, DEUCE_OF_DIAMONDS, TREY_OF_HEARTS]
.