pub struct TrickCountRow(/* private fields */);Expand description
Tricks that each seat can take as declarer for a strain
Implementations§
Source§impl TrickCountRow
impl TrickCountRow
Sourcepub const fn new(n: u8, e: u8, s: u8, w: u8) -> Self
pub const fn new(n: u8, e: u8, s: u8, w: u8) -> Self
Create a new row from the number of tricks each seat can take
§Panics
When any value is outside 0..=13. In const contexts, this is a
compile-time error.
Sourcepub const fn try_new(
n: u8,
e: u8,
s: u8,
w: u8,
) -> Result<Self, InvalidTrickCount>
pub const fn try_new( n: u8, e: u8, s: u8, w: u8, ) -> Result<Self, InvalidTrickCount>
Try to create a new row from the number of tricks each seat can take
§Errors
When any value is outside 0..=13.
Sourcepub const fn get(self, seat: Seat) -> TrickCount
pub const fn get(self, seat: Seat) -> TrickCount
Get the number of tricks a seat can take as declarer
Sourcepub const fn hex(self, seat: Seat) -> TrickCountRowHex
pub const fn hex(self, seat: Seat) -> TrickCountRowHex
Hexadecimal representation from a seat’s perspective
Trait Implementations§
Source§impl Clone for TrickCountRow
impl Clone for TrickCountRow
Source§fn clone(&self) -> TrickCountRow
fn clone(&self) -> TrickCountRow
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 TrickCountRow
impl Debug for TrickCountRow
Source§impl Hash for TrickCountRow
impl Hash for TrickCountRow
Source§impl PartialEq for TrickCountRow
impl PartialEq for TrickCountRow
impl Copy for TrickCountRow
impl Eq for TrickCountRow
impl StructuralPartialEq for TrickCountRow
Auto Trait Implementations§
impl Freeze for TrickCountRow
impl RefUnwindSafe for TrickCountRow
impl Send for TrickCountRow
impl Sync for TrickCountRow
impl Unpin for TrickCountRow
impl UnsafeUnpin for TrickCountRow
impl UnwindSafe for TrickCountRow
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