#[non_exhaustive]pub struct ChannelSelect {
pub id: Option<i32>,
pub custom_id: CompactString,
pub channel_types: Vec<ChannelType>,
pub placeholder: Option<CompactString>,
pub default_values: Vec<SelectDefaultValue>,
pub min_values: Option<u8>,
pub max_values: Option<u8>,
pub required: bool,
pub disabled: bool,
}Expand description
A channel select: a menu of channels that Discord fills in.
discord.js counterpart: ChannelSelectMenuComponent / ChannelSelectMenuBuilder.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: Option<i32>The component’s numeric identifier (generated by Discord when not set).
custom_id: CompactStringThe developer-defined identifier (1-100 characters).
channel_types: Vec<ChannelType>The channel types to offer (all when empty).
placeholder: Option<CompactString>The text shown when nothing is selected (max 150 characters).
default_values: Vec<SelectDefaultValue>The channels selected by default.
min_values: Option<u8>The minimum number of channels to choose (Discord’s default: 1; 0-25).
max_values: Option<u8>The maximum number of channels to choose (Discord’s default: 1; max 25).
required: boolWhether an answer is required in a modal (default true; ignored in messages).
disabled: boolWhether the menu is disabled (messages only; modals reject it).
Implementations§
Trait Implementations§
Source§impl Clone for ChannelSelect
impl Clone for ChannelSelect
Source§impl Debug for ChannelSelect
impl Debug for ChannelSelect
impl Eq for ChannelSelect
Source§impl From<ChannelSelect> for Component
impl From<ChannelSelect> for Component
Source§fn from(component: ChannelSelect) -> Self
fn from(component: ChannelSelect) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ChannelSelect
impl PartialEq for ChannelSelect
Source§impl Serialize for ChannelSelect
impl Serialize for ChannelSelect
impl StructuralPartialEq for ChannelSelect
Auto Trait Implementations§
impl Freeze for ChannelSelect
impl RefUnwindSafe for ChannelSelect
impl Send for ChannelSelect
impl Sync for ChannelSelect
impl Unpin for ChannelSelect
impl UnsafeUnpin for ChannelSelect
impl UnwindSafe for ChannelSelect
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