pub enum DieRollTerm {
DieRoll {
multiplier: i8,
sides: u8,
},
Modifier(i8),
}
Expand description
Represents an individual term within a die roll expression. Terms can either be numeric
modifiers like +5
or -2
or they can be terms indicating die rolls.
Variants§
DieRoll
Indicates a die roll term to roll multiplier
dice with sides
sides.
Fields
Modifier(i8)
Numeric modifier used in simple left-to-right numeric evaluation of a die roll expression.
Trait Implementations§
Source§impl Clone for DieRollTerm
impl Clone for DieRollTerm
Source§fn clone(&self) -> DieRollTerm
fn clone(&self) -> DieRollTerm
Returns a copy 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 DieRollTerm
impl Debug for DieRollTerm
Source§impl Display for DieRollTerm
Formats an individual die roll term in a human-friendly fashion. For Modifier
terms,
this will force the printing of a + or - sign before the modifier value. For DieRoll
terms, this displays the term in the form 5d10
.
impl Display for DieRollTerm
Formats an individual die roll term in a human-friendly fashion. For Modifier
terms,
this will force the printing of a + or - sign before the modifier value. For DieRoll
terms, this displays the term in the form 5d10
.
Auto Trait Implementations§
impl Freeze for DieRollTerm
impl RefUnwindSafe for DieRollTerm
impl Send for DieRollTerm
impl Sync for DieRollTerm
impl Unpin for DieRollTerm
impl UnwindSafe for DieRollTerm
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