Struct backgammon_simd::types::dice::Dice
source · pub struct Dice(pub Die, pub Die);
Tuple Fields§
§0: Die
§1: Die
Implementations§
source§impl Dice
impl Dice
pub fn iter_all_possible() -> impl Iterator<Item = Dice>
pub fn dice(&self) -> Vec<Die>
pub fn roll(rng: &mut impl Rng) -> Dice
pub fn as_u8(&self) -> u8
pub fn from_u8(u: u8) -> Dice
pub fn as_alnum(&self) -> char
pub fn from_alnum(c: char) -> Self
pub fn is_double(&self) -> bool
Trait Implementations§
source§impl<'de> Deserialize<'de> for Dice
impl<'de> Deserialize<'de> for Dice
source§fn 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
source§impl Distribution<Dice> for Standard
impl Distribution<Dice> for Standard
source§fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Dice
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Dice
Generate a random value of
T
, using rng
as the source of randomness.source§impl PartialEq for Dice
impl PartialEq for Dice
impl Copy for Dice
impl Eq for Dice
impl StructuralEq for Dice
impl StructuralPartialEq for Dice
Auto Trait Implementations§
impl RefUnwindSafe for Dice
impl Send for Dice
impl Sync for Dice
impl Unpin for Dice
impl UnwindSafe for Dice
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more