pub struct Die {
pub name: String,
pub faces: Vec<FaceValue>,
pub kind: DieKind,
}Expand description
A die with a stable name and ordered set of faces.
Fields§
§name: StringCanonical die name.
Built-in dice are named D4, D6, D8, D10, D12, D20, and
D100. Custom dice are stored with CUSTOM_PREFIX.
faces: Vec<FaceValue>Ordered set of faces that may be rolled.
kind: DieKindWhether this die is built-in or custom.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Die
impl<'de> Deserialize<'de> for Die
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Die
impl RefUnwindSafe for Die
impl Send for Die
impl Sync for Die
impl Unpin for Die
impl UnsafeUnpin for Die
impl UnwindSafe for Die
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more