[−][src]Struct caith::RollResult
A RollResult
contains either a single roll result, or if the roll is repeated, a list of the
same roll different results. And a reason if needed.
Implementations
impl RollResult
[src]
pub fn new_single(r: SingleRollResult) -> Self
[src]
Create a RollResult
with only one single roll
pub fn new_repeated(v: Vec<SingleRollResult>, total: Option<i64>) -> Self
[src]
Create a RollResult
with a repeated roll results
pub fn add_reason(&mut self, reason: String)
[src]
Add a comment to the result
pub fn get_reason(&self) -> Option<&String>
[src]
Get the comment, if any
pub fn get_result(&self) -> &RollResultType
[src]
Return the result
pub fn as_single(&self) -> Option<&SingleRollResult>
[src]
If the result is a single roll, it will return it
pub fn as_repeated(&self) -> Option<&RepeatedRollResult>
[src]
If the result is a repeated roll, it will return it
Trait Implementations
impl Clone for RollResult
[src]
fn clone(&self) -> RollResult
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for RollResult
[src]
impl Display for RollResult
[src]
Auto Trait Implementations
impl RefUnwindSafe for RollResult
impl Send for RollResult
impl Sync for RollResult
impl Unpin for RollResult
impl UnwindSafe for RollResult
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,
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.
fn to_owned(&self) -> T
[src]
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.
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.
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>,