Struct twilight_interactions::command::CommandOptionData [−][src]
pub struct CommandOptionData {
pub name: String,
pub description: String,
pub required: bool,
pub channel_types: Vec<ChannelType>,
}Expand description
Data of a command option.
This type is used in the CreateOption trait.
Fields
name: StringName of the option. It must be 32 characters or less.
description: StringDescription of the option. It must be 100 characters or less.
required: boolWhether the option is required to be completed by a user.
channel_types: Vec<ChannelType>Restricts the channel choice to specific types. Only for CHANNEL option type.
Implementations
Conversion into a BaseCommandOptionData
Conversion into a ChannelCommandOptionData
Conversion into a ChoiceCommandOptionData
Conversion into a OptionsCommandOptionData
Trait Implementations
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for CommandOptionData
impl Send for CommandOptionData
impl Sync for CommandOptionData
impl Unpin for CommandOptionData
impl UnwindSafe for CommandOptionData
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.
pub fn vzip(self) -> V
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more