Enum dice::Binary
[−]
[src]
pub enum Binary { Add, Divide, Multiply, Subtract, }
An operation used to combine the results of two dice rolling expressions.
Variants
Add
Add the results.
Divide
Divide the results.
Multiply
Multiply the results.
Subtract
Subtract the results.
Methods
impl Binary
[src]
fn combine(&self, left: i32, right: i32) -> Option<i32>
Combines the supplied results using this binary operation.
This method returns None
if the binary operation fails (e.g., integer overflow).
Trait Implementations
impl Copy for Binary
[src]
impl Clone for Binary
[src]
fn clone(&self) -> Binary
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Debug for Binary
[src]
impl PartialEq for Binary
[src]
fn eq(&self, __arg_0: &Binary) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.