pub struct Hand { /* private fields */ }Implementations§
Source§impl Hand
impl Hand
pub fn new() -> Self
pub fn add_card(&mut self, card: Card)
pub fn cards(&self) -> &[Card]
pub fn clear(&mut self)
Sourcepub fn evaluate(&self, community_cards: &[Card]) -> HandRank
pub fn evaluate(&self, community_cards: &[Card]) -> HandRank
Evaluate the best 5-card poker hand from available cards For Texas Hold’em: 2 hole cards + 5 community cards = 7 total
Sourcepub fn evaluate_with_cards(&self, community_cards: &[Card]) -> HandEvaluation
pub fn evaluate_with_cards(&self, community_cards: &[Card]) -> HandEvaluation
Evaluate and return both the rank and the specific 5 cards used
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Hand
impl<'de> Deserialize<'de> for Hand
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
Auto Trait Implementations§
impl Freeze for Hand
impl RefUnwindSafe for Hand
impl Send for Hand
impl Sync for Hand
impl Unpin for Hand
impl UnwindSafe for Hand
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