Struct ndm::Dice [−][src]
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]
count: usize,
sides: u16,
fuse: u16
) -> Result<Self, DiceParseError>
pub fn new_keep_n(
count: usize,
sides: u16,
n: isize
) -> Result<Self, DiceParseError>
[src]
count: usize,
sides: u16,
n: isize
) -> Result<Self, DiceParseError>
pub fn new_extended(
count: usize,
sides: u16,
keep: isize,
fuse: u16
) -> Result<Self, DiceParseError>
[src]
count: usize,
sides: u16,
keep: isize,
fuse: u16
) -> Result<Self, DiceParseError>
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.
fn from_str(line: &str) -> Result<Self, Self::Err>
[src]
impl PartialEq<Dice> for Dice
[src]
impl StructuralPartialEq for Dice
[src]
impl TryFrom<Captures<'_>> for Dice
[src]
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,