pub struct DiceRolls { /* private fields */ }Expand description
The result of rolling some dice.
Implementations§
Source§impl DiceRolls
impl DiceRolls
Sourcepub fn get_result(&self) -> i32
pub fn get_result(&self) -> i32
Returns an i32 as the result of the formula including any calculational operators.
Sourcepub fn get_sum_of_rolls(&self) -> i32
pub fn get_sum_of_rolls(&self) -> i32
Returns an i32 as the simple sum of all rolls.
Sourcepub fn get_rolls_string(&self) -> String
pub fn get_rolls_string(&self) -> String
Returns a formatted String showing the dice and the rolled results.
Sourcepub fn get_formula_string_as_rpn(&self) -> String
pub fn get_formula_string_as_rpn(&self) -> String
Returns a postfix formatted String showing the formula, with all dice replaced with their rolled values.
Sourcepub fn get_formula_string_as_infix(&self) -> String
pub fn get_formula_string_as_infix(&self) -> String
Returns an infix formatted String showing the formula, with all dice replaced with their rolled values.
Sourcepub fn get_rolls_formula_string_as_rpn(&self) -> String
pub fn get_rolls_formula_string_as_rpn(&self) -> String
Returns a postfix formatted String showing the formula with the original dice notation instead of the rolled result.
Sourcepub fn get_rolls_formula_string_as_infix(&self) -> String
pub fn get_rolls_formula_string_as_infix(&self) -> String
Returns a infix formatted String showing the formula with the original dice notation instead of the rolled result.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DiceRolls
impl RefUnwindSafe for DiceRolls
impl Send for DiceRolls
impl Sync for DiceRolls
impl Unpin for DiceRolls
impl UnwindSafe for DiceRolls
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