pub struct ChannelCommandOptionData {
pub channel_types: Vec<ChannelType>,
pub description: String,
pub description_localizations: Option<HashMap<String, String>>,
pub name: String,
pub name_localizations: Option<HashMap<String, String>>,
pub required: bool,
}Expand description
Data supplied to a CommandOption of type Channel.
Fields
channel_types: Vec<ChannelType>Restricts the channel choice to specific types.
If no types are selected, all channel types can be sent.
description: StringDescription of the option. It must be 100 characters or less.
description_localizations: Option<HashMap<String, String>>Localization dictionary for the description field.
name: StringName of the option. It must be 32 characters or less.
name_localizations: Option<HashMap<String, String>>Localization dictionary for the name field.
Keys should be valid locales. See Discord Docs/Locales, Discord Docs/Localization.
required: boolWhether or not the option is required to be completed by a user.
Trait Implementations
sourceimpl Clone for ChannelCommandOptionData
impl Clone for ChannelCommandOptionData
sourcefn clone(&self) -> ChannelCommandOptionData
fn clone(&self) -> ChannelCommandOptionData
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for ChannelCommandOptionData
impl Debug for ChannelCommandOptionData
sourceimpl Default for ChannelCommandOptionData
impl Default for ChannelCommandOptionData
sourcefn default() -> ChannelCommandOptionData
fn default() -> ChannelCommandOptionData
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for ChannelCommandOptionData
impl<'de> Deserialize<'de> for ChannelCommandOptionData
sourcefn 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
sourceimpl PartialEq<ChannelCommandOptionData> for ChannelCommandOptionData
impl PartialEq<ChannelCommandOptionData> for ChannelCommandOptionData
sourcefn eq(&self, other: &ChannelCommandOptionData) -> bool
fn eq(&self, other: &ChannelCommandOptionData) -> bool
sourceimpl Serialize for ChannelCommandOptionData
impl Serialize for ChannelCommandOptionData
impl Eq for ChannelCommandOptionData
impl StructuralEq for ChannelCommandOptionData
impl StructuralPartialEq for ChannelCommandOptionData
Auto Trait Implementations
impl RefUnwindSafe for ChannelCommandOptionData
impl Send for ChannelCommandOptionData
impl Sync for ChannelCommandOptionData
impl Unpin for ChannelCommandOptionData
impl UnwindSafe for ChannelCommandOptionData
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more