pub struct MessageDice { /* private fields */ }
Expand description
A dice message. The dice value is randomly generated by the server
Implementations§
Source§impl MessageDice
impl MessageDice
pub fn from_json<S: AsRef<str>>(json: S) -> Result<Self>
pub fn builder() -> MessageDiceBuilder
pub fn initial_state(&self) -> &Option<DiceStickers>
pub fn final_state(&self) -> &Option<DiceStickers>
pub fn emoji(&self) -> &String
pub fn value(&self) -> i32
pub fn success_animation_frame_number(&self) -> i32
Trait Implementations§
Source§impl AsRef<MessageDice> for MessageDice
impl AsRef<MessageDice> for MessageDice
Source§fn as_ref(&self) -> &MessageDice
fn as_ref(&self) -> &MessageDice
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for MessageDice
impl Clone for MessageDice
Source§fn clone(&self) -> MessageDice
fn clone(&self) -> MessageDice
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for MessageDice
impl Debug for MessageDice
Source§impl Default for MessageDice
impl Default for MessageDice
Source§fn default() -> MessageDice
fn default() -> MessageDice
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MessageDice
impl<'de> Deserialize<'de> for MessageDice
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 Serialize for MessageDice
impl Serialize for MessageDice
impl TDMessageContent for MessageDice
Auto Trait Implementations§
impl Freeze for MessageDice
impl RefUnwindSafe for MessageDice
impl Send for MessageDice
impl Sync for MessageDice
impl Unpin for MessageDice
impl UnwindSafe for MessageDice
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