pub struct Suit4(/* private fields */);Expand description
Implementations§
Source§impl Suit4
impl Suit4
Sourcepub const fn is_empty(self) -> bool
pub const fn is_empty(self) -> bool
Checks whether all suit masks are unset
§Examples
use open_pql::{Suit, Suit4};
let empty: Suit4 = Suit4::empty();
let not_empty: Suit4 = Suit4::from(Suit::D);
assert!(empty.is_empty());
assert!(!not_empty.is_empty());Sourcepub const fn contains_suit(self, s: Suit) -> bool
pub const fn contains_suit(self, s: Suit) -> bool
Sourcepub const fn count(&self) -> PQLCardCount
pub const fn count(&self) -> PQLCardCount
Returns the number of marked suits
§Examples
use open_pql::{Suit, Suit4};
let mut suits: Suit4 = Suit4::from(Suit::D);
assert_eq!(suits.count(), 1);Sourcepub const fn is_empty_alt(self) -> bool
pub const fn is_empty_alt(self) -> bool
Checks if the collection is empty
Trait Implementations§
impl Copy for Suit4
impl Eq for Suit4
impl StructuralPartialEq for Suit4
Auto Trait Implementations§
impl Freeze for Suit4
impl RefUnwindSafe for Suit4
impl Send for Suit4
impl Sync for Suit4
impl Unpin for Suit4
impl UnwindSafe for Suit4
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more