pub enum CommandOptionChoiceValue {
Integer(i64),
Number(f64),
String(String),
}Expand description
Value of a CommandOptionChoice.
Note that the right variant must be selected based on the
CommandOption’s CommandOptionType.
Variants§
Integer(i64)
Integer choice.
Number(f64)
Number choice.
String(String)
String choice. Must be 100 characters or less.
Trait Implementations§
Source§impl Clone for CommandOptionChoiceValue
impl Clone for CommandOptionChoiceValue
Source§fn clone(&self) -> CommandOptionChoiceValue
fn clone(&self) -> CommandOptionChoiceValue
Returns a duplicate 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 CommandOptionChoiceValue
impl Debug for CommandOptionChoiceValue
Source§impl<'de> Deserialize<'de> for CommandOptionChoiceValue
impl<'de> Deserialize<'de> for CommandOptionChoiceValue
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<String> for CommandOptionChoiceValue
impl From<String> for CommandOptionChoiceValue
Source§impl From<f64> for CommandOptionChoiceValue
impl From<f64> for CommandOptionChoiceValue
Source§impl From<i64> for CommandOptionChoiceValue
impl From<i64> for CommandOptionChoiceValue
Source§impl PartialEq for CommandOptionChoiceValue
impl PartialEq for CommandOptionChoiceValue
Source§impl Serialize for CommandOptionChoiceValue
impl Serialize for CommandOptionChoiceValue
Source§impl TryFrom<CommandOptionChoiceValue> for String
impl TryFrom<CommandOptionChoiceValue> for String
Source§type Error = CommandOptionChoiceValue
type Error = CommandOptionChoiceValue
The type returned in the event of a conversion error.
Source§impl TryFrom<CommandOptionChoiceValue> for f64
impl TryFrom<CommandOptionChoiceValue> for f64
Source§type Error = CommandOptionChoiceValue
type Error = CommandOptionChoiceValue
The type returned in the event of a conversion error.
Source§impl TryFrom<CommandOptionChoiceValue> for i64
impl TryFrom<CommandOptionChoiceValue> for i64
Source§type Error = CommandOptionChoiceValue
type Error = CommandOptionChoiceValue
The type returned in the event of a conversion error.
impl StructuralPartialEq for CommandOptionChoiceValue
Auto Trait Implementations§
impl Freeze for CommandOptionChoiceValue
impl RefUnwindSafe for CommandOptionChoiceValue
impl Send for CommandOptionChoiceValue
impl Sync for CommandOptionChoiceValue
impl Unpin for CommandOptionChoiceValue
impl UnsafeUnpin for CommandOptionChoiceValue
impl UnwindSafe for CommandOptionChoiceValue
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