Struct twilight_model::application::component::select_menu::SelectMenu
source · [−]pub struct SelectMenu {
pub custom_id: String,
pub disabled: bool,
pub max_values: Option<u8>,
pub min_values: Option<u8>,
pub options: Vec<SelectMenuOption>,
pub placeholder: Option<String>,
}
Expand description
Dropdown-style interactive components that render on messages.
Refer to Discord Docs/Message Components for additional information.
Fields
custom_id: String
Developer defined identifier.
disabled: bool
Whether the select menu is disabled.
Defaults to false
.
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: Vec<SelectMenuOption>
List of available choices.
placeholder: Option<String>
Custom placeholder text if no option is selected.
Trait Implementations
sourceimpl Clone for SelectMenu
impl Clone for SelectMenu
sourcefn clone(&self) -> SelectMenu
fn clone(&self) -> SelectMenu
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 SelectMenu
impl Debug for SelectMenu
sourceimpl From<SelectMenu> for Component
impl From<SelectMenu> for Component
sourcefn from(select_menu: SelectMenu) -> Self
fn from(select_menu: SelectMenu) -> Self
Converts to this type from the input type.
sourceimpl Hash for SelectMenu
impl Hash for SelectMenu
sourceimpl PartialEq<SelectMenu> for SelectMenu
impl PartialEq<SelectMenu> for SelectMenu
sourcefn eq(&self, other: &SelectMenu) -> bool
fn eq(&self, other: &SelectMenu) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &SelectMenu) -> bool
fn ne(&self, other: &SelectMenu) -> bool
This method tests for !=
.
impl Eq for SelectMenu
impl StructuralEq for SelectMenu
impl StructuralPartialEq for SelectMenu
Auto Trait Implementations
impl RefUnwindSafe for SelectMenu
impl Send for SelectMenu
impl Sync for SelectMenu
impl Unpin for SelectMenu
impl UnwindSafe for SelectMenu
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