pub enum Nonce {
Integer(i64),
String(CompactString),
}Expand description
The nonce a sender attached to a message: an integer or a string (up to 25 characters).
Integers outside the i64 range are kept as their decimal text in Nonce::String.
discord.js counterpart: the nonce of APIMessage (discord-api-types), a string or a number.
Variants§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Nonce
impl<'de> Deserialize<'de> for Nonce
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Nonce
impl StructuralPartialEq for Nonce
Auto Trait Implementations§
impl Forget for Nonce
impl Freeze for Nonce
impl Move for Nonce
impl RefUnwindSafe for Nonce
impl Send for Nonce
impl Sync for Nonce
impl Unpin for Nonce
impl UnsafeUnpin for Nonce
impl UnwindSafe for Nonce
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