pub struct Board {
pub flop: Option<Flop>,
pub turn: Option<Card>,
pub river: Option<Card>,
}Expand description
Represents a poker board (flop, turn, river)
Fields§
§flop: Option<Flop>§turn: Option<Card>§river: Option<Card>Implementations§
Source§impl Board
impl Board
Sourcepub fn from_slice(cards: &[Card]) -> Self
pub fn from_slice(cards: &[Card]) -> Self
Creates a board from a slice of cards
Sourcepub fn iter(&self) -> impl Iterator<Item = Card> + '_
pub fn iter(&self) -> impl Iterator<Item = Card> + '_
Returns an iterator over all cards on the board
pub fn contains_card(&self, card: Card) -> bool
pub const fn swap_turn(&self, card: Card) -> Self
pub const fn swap_river(&self, card: Card) -> Self
Source§impl Board
impl Board
pub fn new_iso_with_mapping(cards: &[Card], mapping: &mut SuitMapping) -> Self
Trait Implementations§
impl Copy for Board
impl Eq for Board
impl StructuralPartialEq for Board
Auto Trait Implementations§
impl Freeze for Board
impl RefUnwindSafe for Board
impl Send for Board
impl Sync for Board
impl Unpin for Board
impl UnwindSafe for Board
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more