Enum soliterm_model::card::Rank
source · [−]#[repr(u8)]
pub enum Rank {
Show 13 variants
Ace,
Two,
Three,
Four,
Five,
Six,
Seven,
Eight,
Nine,
Ten,
Jack,
Queen,
King,
}
Expand description
Enum representing the valid ranks for a card. The values for cards are a fixed set, so we use
an enum rather than a dumb wrapper around u8
.
Variants
Ace
Two
Three
Four
Five
Six
Seven
Eight
Nine
Ten
Jack
Queen
King
Trait Implementations
sourceimpl Enum for Rank
impl Enum for Rank
sourcefn from_usize(value: usize) -> Self
fn from_usize(value: usize) -> Self
Takes an usize, and returns an element matching
into_usize
function.sourcefn into_usize(self) -> usize
fn into_usize(self) -> usize
Returns an unique identifier for a value within range of
0..Array::LENGTH
.impl Copy for Rank
impl Eq for Rank
impl StructuralEq for Rank
impl StructuralPartialEq for Rank
Auto Trait Implementations
impl RefUnwindSafe for Rank
impl Send for Rank
impl Sync for Rank
impl Unpin for Rank
impl UnwindSafe for Rank
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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