pub struct PartialDeal(/* private fields */);Expand description
A validated subset of a bridge deal
Invariants: each hand holds at most 13 cards, and the four hands are
pairwise disjoint. Construct via Builder::build_partial,
TryFrom<Builder>, the infallible widening from a FullDeal, or by
parsing a PBN-ish string.
PartialDeal is read-only: it exposes Index<Seat> but not
IndexMut. To mutate, widen back to a Builder.
Parses the PBN deal format with relaxed per-hand size —
<dealer>:<hand> <hand> <hand> <hand> — where each hand is four
dot-separated holdings ordered spades, hearts, diamonds, clubs. Holdings
may be empty or contain x spot cards for unknown ranks. Hands are
listed clockwise starting from the dealer.
Implementations§
Source§impl PartialDeal
impl PartialDeal
Trait Implementations§
Source§impl Clone for PartialDeal
impl Clone for PartialDeal
Source§fn clone(&self) -> PartialDeal
fn clone(&self) -> PartialDeal
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PartialDeal
impl Debug for PartialDeal
Source§impl Display for PartialDeal
impl Display for PartialDeal
Source§impl From<FullDeal> for PartialDeal
impl From<FullDeal> for PartialDeal
Source§impl From<PartialDeal> for Builder
impl From<PartialDeal> for Builder
Source§fn from(subset: PartialDeal) -> Self
fn from(subset: PartialDeal) -> Self
Converts to this type from the input type.
Source§impl From<PartialDeal> for ddTableDeal
impl From<PartialDeal> for ddTableDeal
Source§fn from(subset: PartialDeal) -> Self
fn from(subset: PartialDeal) -> Self
Converts to this type from the input type.
Source§impl FromStr for PartialDeal
impl FromStr for PartialDeal
Source§impl Hash for PartialDeal
impl Hash for PartialDeal
Source§impl Index<Seat> for PartialDeal
impl Index<Seat> for PartialDeal
Source§impl PartialEq for PartialDeal
impl PartialEq for PartialDeal
Source§impl TryFrom<Builder> for PartialDeal
impl TryFrom<Builder> for PartialDeal
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 PartialDeal
impl Eq for PartialDeal
impl StructuralPartialEq for PartialDeal
Auto Trait Implementations§
impl Freeze for PartialDeal
impl RefUnwindSafe for PartialDeal
impl Send for PartialDeal
impl Sync for PartialDeal
impl Unpin for PartialDeal
impl UnsafeUnpin for PartialDeal
impl UnwindSafe for PartialDeal
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