Struct ndm::Dice[][src]

pub struct Dice { /* fields omitted */ }

Implementations

impl Dice[src]

pub const COUNT_LIMIT: usize[src]

There’s no compelling reason to roll more than 100 dice at a time. I can’t really see why anyone would want to roll more than about 20 at a time, but 100d6 is a sort of obvious thing for people to do.

pub const SIDES_LIMIT: u16[src]

There’s no good reason to want anything bigger than a d1000. Even that is pushing it, but I can think of games that wanted d1000s for no good reason.

pub fn new(n: usize, m: u16) -> Result<Self, DiceParseError>[src]

pub fn new_exploding(
    count: usize,
    sides: u16,
    fuse: u16
) -> Result<Self, DiceParseError>
[src]

pub fn new_keep_n(
    count: usize,
    sides: u16,
    n: isize
) -> Result<Self, DiceParseError>
[src]

pub fn new_extended(
    count: usize,
    sides: u16,
    keep: isize,
    fuse: u16
) -> Result<Self, DiceParseError>
[src]

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

pub fn sides(&self) -> u16[src]

pub fn count(&self) -> usize[src]

pub fn rolls(&self) -> &Vec<u16>[src]

pub fn fuse(&self) -> u16[src]

impl Dice[src]

pub const SIDE_LIMIT: u16[src]

Trait Implementations

impl Clone for Dice[src]

impl Debug for Dice[src]

impl Display for Dice[src]

impl FromStr for Dice[src]

type Err = DiceParseError

The associated error which can be returned from parsing.

impl PartialEq<Dice> for Dice[src]

impl StructuralPartialEq for Dice[src]

impl TryFrom<Captures<'_>> for Dice[src]

type Error = DiceParseError

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for Dice

impl Send for Dice

impl Sync for Dice

impl Unpin for Dice

impl UnwindSafe for Dice

Blanket Implementations

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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<V, T> VZip<V> for T where
    V: MultiLane<T>,