[][src]Struct rfyl::DiceRolls

pub struct DiceRolls { /* fields omitted */ }

The result of rolling some dice.

Methods

impl DiceRolls[src]

pub fn get_result(&self) -> i32[src]

Returns an i32 as the result of the formula including any calculational operators.

pub fn get_sum_of_rolls(&self) -> i32[src]

Returns an i32 as the simple sum of all rolls.

pub fn get_rolls_string(&self) -> String[src]

Returns a formatted String showing the dice and the rolled results.

pub fn get_formula_string_as_rpn(&self) -> String[src]

Returns a postfix formatted String showing the formula, with all dice replaced with their rolled values.

pub fn get_formula_string_as_infix(&self) -> String[src]

Returns an infix formatted String showing the formula, with all dice replaced with their rolled values.

pub fn get_rolls_formula_string_as_rpn(&self) -> String[src]

Returns a postfix formatted String showing the formula with the original dice notation instead of the rolled result.

pub fn get_rolls_formula_string_as_infix(&self) -> String[src]

Returns a infix formatted String showing the formula with the original dice notation instead of the rolled result.

Trait Implementations

impl Clone for DiceRolls[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for DiceRolls

impl Sync for DiceRolls

Blanket Implementations

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]