pub struct SingleRollResult { /* private fields */ }Expand description
Carry the result of one roll and an history of the steps taken.
Usually created through super::RollResult::new_single() function.
Implementations§
Source§impl SingleRollResult
impl SingleRollResult
Sourcepub fn get_history(&self) -> &Vec<RollHistory>
pub fn get_history(&self) -> &Vec<RollHistory>
Get the history of the result
Sourcepub fn is_zero(&self) -> bool
pub fn is_zero(&self) -> bool
Says if the used value for math operation is 0
If there’s a constant stored, we’ll use it and if not, total is used instead
Sourcepub fn to_string_history(&self) -> String
pub fn to_string_history(&self) -> String
Turn the vector of RollHistory to a String
Trait Implementations§
Source§impl Add for SingleRollResult
impl Add for SingleRollResult
Source§impl Clone for SingleRollResult
impl Clone for SingleRollResult
Source§fn clone(&self) -> SingleRollResult
fn clone(&self) -> SingleRollResult
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 SingleRollResult
impl Debug for SingleRollResult
Source§impl Display for SingleRollResult
impl Display for SingleRollResult
Source§impl Div for SingleRollResult
impl Div for SingleRollResult
Source§impl Mul for SingleRollResult
impl Mul for SingleRollResult
Auto Trait Implementations§
impl Freeze for SingleRollResult
impl RefUnwindSafe for SingleRollResult
impl Send for SingleRollResult
impl Sync for SingleRollResult
impl Unpin for SingleRollResult
impl UnwindSafe for SingleRollResult
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