pub enum RollMethod {
PreparedRoll(PreparedRoll),
GaussianRoll(u16),
SimpleRoll,
}Expand description
Enum used to know how to determine the result of a random pick in a list of possible results.
Variants§
PreparedRoll(PreparedRoll)
Uses a prepared roll (“dice D die_type + modifier”).
GaussianRoll(u16)
Uses the given number of dice in order to pick a random result, with increasingly higher chances to get one from the middle of the list as the value is high.
SimpleRoll
Simply rolls against the number of possible results to get a random one.
Trait Implementations§
Source§impl Clone for RollMethod
impl Clone for RollMethod
Source§fn clone(&self) -> RollMethod
fn clone(&self) -> RollMethod
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 RollMethod
impl Debug for RollMethod
Source§impl<'de> Deserialize<'de> for RollMethod
impl<'de> Deserialize<'de> for RollMethod
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 Display for RollMethod
impl Display for RollMethod
Source§impl Hash for RollMethod
impl Hash for RollMethod
Source§impl Ord for RollMethod
impl Ord for RollMethod
Source§fn cmp(&self, other: &RollMethod) -> Ordering
fn cmp(&self, other: &RollMethod) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for RollMethod
impl PartialEq for RollMethod
Source§impl PartialOrd for RollMethod
impl PartialOrd for RollMethod
Source§impl Serialize for RollMethod
impl Serialize for RollMethod
impl Copy for RollMethod
impl Eq for RollMethod
impl StructuralPartialEq for RollMethod
Auto Trait Implementations§
impl Freeze for RollMethod
impl RefUnwindSafe for RollMethod
impl Send for RollMethod
impl Sync for RollMethod
impl Unpin for RollMethod
impl UnwindSafe for RollMethod
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