pub struct Dice {
pub emoji: String,
pub value: i64,
}Expand description
This object represents an animated emoji that displays a random value.
Fields§
§emoji: StringEmoji on which the dice throw animation is based
value: i64Value of the dice, 1-6 for “🎲”, “🎯” and “🎳” base emoji, 1-5 for “🏀” and “⚽” base emoji, 1-64 for “🎰” base emoji
Implementations§
Source§impl Dice
impl Dice
pub fn new(emoji: String, value: i64) -> Self
Sourcepub fn set_emoji<'a>(&'a mut self, emoji: String) -> &'a mut Self
pub fn set_emoji<'a>(&'a mut self, emoji: String) -> &'a mut Self
Emoji on which the dice throw animation is based
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Dice
impl<'de> Deserialize<'de> for Dice
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
Source§impl From<NoSkipDice> for Dice
impl From<NoSkipDice> for Dice
Source§fn from(t: NoSkipDice) -> Self
fn from(t: NoSkipDice) -> Self
Converts to this type from the input type.
Source§impl Into<NoSkipDice> for Dice
impl Into<NoSkipDice> for Dice
Source§fn into(self) -> NoSkipDice
fn into(self) -> NoSkipDice
Converts this type into the (usually inferred) input type.
Source§impl Ord for Dice
impl Ord for Dice
Source§impl PartialOrd for Dice
impl PartialOrd for Dice
impl Eq for Dice
impl StructuralPartialEq for Dice
Auto Trait Implementations§
impl Freeze for Dice
impl RefUnwindSafe for Dice
impl Send for Dice
impl Sync for Dice
impl Unpin for Dice
impl UnsafeUnpin for Dice
impl UnwindSafe for Dice
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.