pub struct FullDeal(/* private fields */);Expand description
A full bridge deal — exactly 13 cards per hand, 52 total
Invariants: each of the four hands contains exactly 13 cards, and the
hands partition the full 52-card deck. Construct via
Builder::build_full, TryFrom<Builder>, TryFrom<PartialDeal>, or by
parsing a PBN string.
FullDeal is read-only. Parses the PBN deal format:
<dealer>:<hand> <hand> <hand> <hand>, where each hand is four
dot-separated holdings ordered spades, hearts, diamonds, clubs. Hands
are listed clockwise starting from the dealer.
§Examples
use dds_bridge::{FullDeal, Rank, Seat, Suit};
let deal: FullDeal = "N:.63.AKQ987.A9732 A8654.KQ5.T.QJT6 \
J973.J98742.3.K4 KQT2.AT.J6542.85".parse()?;
assert!(deal[Seat::East][Suit::Spades].contains(Rank::A));Implementations§
Trait Implementations§
Source§impl From<FullDeal> for PartialDeal
impl From<FullDeal> for PartialDeal
Source§impl From<FullDeal> for ddTableDeal
impl From<FullDeal> for ddTableDeal
Source§impl IntoIterator for FullDeal
impl IntoIterator for FullDeal
Source§impl TryFrom<PartialDeal> for FullDeal
impl TryFrom<PartialDeal> for FullDeal
Source§type Error = PartialDeal
type Error = PartialDeal
The type returned in the event of a conversion error.
impl Copy for FullDeal
impl Eq for FullDeal
impl StructuralPartialEq for FullDeal
Auto Trait Implementations§
impl Freeze for FullDeal
impl RefUnwindSafe for FullDeal
impl Send for FullDeal
impl Sync for FullDeal
impl Unpin for FullDeal
impl UnsafeUnpin for FullDeal
impl UnwindSafe for FullDeal
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