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 more
sourceimpl 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
This method tests for self and other values to be equal, and is used
by ==. Read more
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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more