pub enum CommandOptionValueKind {
Optional(Box<CommandOptionValueKind>),
Multiple(Box<CommandOptionValueKind>),
String,
Integer,
Double,
}Expand description
The kind of value option can take
Variants§
Optional(Box<CommandOptionValueKind>)
A kind of value that can appear or not
Multiple(Box<CommandOptionValueKind>)
A kind of value that can appear or not
String
String value
Integer
Integer value
Double
Double precision floating point value
Implementations§
Source§impl CommandOptionValueKind
impl CommandOptionValueKind
Sourcepub fn is_optional(&self) -> bool
pub fn is_optional(&self) -> bool
Whether the option value can be optional
Sourcepub fn as_primitive(&self) -> CommandOptionValueKind
pub fn as_primitive(&self) -> CommandOptionValueKind
Make the option value kind as primitive as possible
Trait Implementations§
Source§impl Clone for CommandOptionValueKind
impl Clone for CommandOptionValueKind
Source§fn clone(&self) -> CommandOptionValueKind
fn clone(&self) -> CommandOptionValueKind
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 CommandOptionValueKind
impl Debug for CommandOptionValueKind
Source§impl From<CommandOptionValueKind> for TransformHintPart
impl From<CommandOptionValueKind> for TransformHintPart
Source§fn from(kind: CommandOptionValueKind) -> Self
fn from(kind: CommandOptionValueKind) -> Self
Converts to this type from the input type.
Source§impl PartialEq for CommandOptionValueKind
impl PartialEq for CommandOptionValueKind
impl StructuralPartialEq for CommandOptionValueKind
Auto Trait Implementations§
impl Freeze for CommandOptionValueKind
impl RefUnwindSafe for CommandOptionValueKind
impl Send for CommandOptionValueKind
impl Sync for CommandOptionValueKind
impl Unpin for CommandOptionValueKind
impl UnwindSafe for CommandOptionValueKind
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