Struct libcoinche::cards::Hand
source · [−]pub struct Hand(_);
Expand description
Represents an unordered set of cards.
Implementations
sourceimpl Hand
impl Hand
sourcepub fn add(&mut self, card: Card) -> &mut Hand
pub fn add(&mut self, card: Card) -> &mut Hand
Add card
to self
.
No effect if self
already contains card
.
sourcepub fn remove(&mut self, card: Card)
pub fn remove(&mut self, card: Card)
Removes card
from self
.
No effect if self
does not contains card
.
sourcepub fn has_any(self, suit: Suit) -> bool
pub fn has_any(self, suit: Suit) -> bool
Returns true
if the hand contains any card of the given suit.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Hand
impl<'de> Deserialize<'de> for Hand
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for Hand
impl Eq for Hand
impl StructuralEq for Hand
impl StructuralPartialEq for Hand
Auto Trait Implementations
impl RefUnwindSafe for Hand
impl Send for Hand
impl Sync for Hand
impl Unpin for Hand
impl UnwindSafe for Hand
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more