pub struct SelectMenu {
pub channel_types: Option<Vec<ChannelType>>,
pub custom_id: String,
pub default_values: Option<Vec<SelectDefaultValue>>,
pub disabled: bool,
pub kind: SelectMenuType,
pub max_values: Option<u8>,
pub min_values: Option<u8>,
pub options: Option<Vec<SelectMenuOption>>,
pub placeholder: Option<String>,
}
Expand description
Dropdown-style Component
that renders below messages.
Fields§
§channel_types: Option<Vec<ChannelType>>
An optional list of channel types.
This is only applicable to channel select menus.
custom_id: String
Developer defined identifier.
default_values: Option<Vec<SelectDefaultValue>>
List of default values for auto-populated select menus.
disabled: bool
Whether the select menu is disabled.
Defaults to false
.
kind: SelectMenuType
This select menu’s type.
max_values: Option<u8>
Maximum number of options that may be chosen.
min_values: Option<u8>
Minimum number of options that must be chosen.
options: Option<Vec<SelectMenuOption>>
A list of available options.
This is required by text select menus.
placeholder: Option<String>
Custom placeholder text if no option is selected.
Trait Implementations§
Source§impl Clone for SelectMenu
impl Clone for SelectMenu
Source§fn clone(&self) -> SelectMenu
fn clone(&self) -> SelectMenu
Returns a copy 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 SelectMenu
impl Debug for SelectMenu
Source§impl From<SelectMenu> for Component
impl From<SelectMenu> for Component
Source§fn from(select_menu: SelectMenu) -> Self
fn from(select_menu: SelectMenu) -> Self
Converts to this type from the input type.
Source§impl Hash for SelectMenu
impl Hash for SelectMenu
Source§impl PartialEq for SelectMenu
impl PartialEq for SelectMenu
impl Eq for SelectMenu
impl StructuralPartialEq for SelectMenu
Auto Trait Implementations§
impl Freeze for SelectMenu
impl RefUnwindSafe for SelectMenu
impl Send for SelectMenu
impl Sync for SelectMenu
impl Unpin for SelectMenu
impl UnwindSafe for SelectMenu
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