pub struct Par {
pub score: i32,
pub contracts: Vec<ParContract>,
}Expand description
Par score and contracts
Fields§
§score: i32The par score
contracts: Vec<ParContract>The contracts that achieve the par score
Implementations§
Source§impl Par
impl Par
Sourcepub fn equivalent(&self, other: &Self) -> bool
pub fn equivalent(&self, other: &Self) -> bool
Check if two pars are equivalent
Two pars are equivalent if they have the same par score and the same set of (strain, declarer) pairs. Overtricks and duplicate entries are ignored.
This is intentionally looser than PartialEq, which compares every
field exactly. equivalent exists because DDS may report the same
par result with different overtrick counts or orderings depending on
the code path (e.g. DealerParBin vs SidesParBin). Use == when
you need exact structural equality; use equivalent when you only
care about the strategic meaning of the par result.
Trait Implementations§
Source§impl From<parResultsMaster> for Par
impl From<parResultsMaster> for Par
Source§fn from(par: parResultsMaster) -> Self
fn from(par: parResultsMaster) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Par
impl RefUnwindSafe for Par
impl Send for Par
impl Sync for Par
impl Unpin for Par
impl UnsafeUnpin for Par
impl UnwindSafe for Par
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