Enum dice::Expression [] [src]

pub enum Expression {
    Binary(BinaryBox<Expression>, Box<Expression>),
    Constant(u32),
    Die(DieOption<Reroll>),
    Dice(DiceOption<Reroll>, Fold),
}

A dice rolling expression.

Variants

A binary expression.

A constant expression.

A die expression.

A dice expression.

Methods

impl Expression
[src]

Returns the smallest possible result of rolling this dice rolling expression.

Returns the largest possible result of rolling this dice rolling expression.

Returns the average result of rolling this dice rolling expression.

Returns all the possible results of rolling this dice rolling expression.

Returns the probabilities of all the possible results of rolling this dice rolling expression.

impl Expression
[src]

Rolls this dice rolling expression and returns the result.

This method returns None if any of the binary operations fail (e.g., integer overflow).

Trait Implementations

impl Clone for Expression
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Expression
[src]

Formats the value using the given formatter.

impl PartialEq for Expression
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Expression
[src]