pub struct SelectMenu<'a> {
pub component_type: ComponentType,
pub custom_id: TitanString<'a>,
pub options: Vec<SelectOption<'a>>,
pub placeholder: Option<TitanString<'a>>,
pub min_values: Option<u8>,
pub max_values: Option<u8>,
pub disabled: bool,
}Expand description
A menu for selecting items.
Fields§
§component_type: ComponentTypeType (3, 5, 6, 7, 8).
custom_id: TitanString<'a>Custom ID to identify the menu.
options: Vec<SelectOption<'a>>Options (only for StringSelect).
placeholder: Option<TitanString<'a>>Placeholder text.
min_values: Option<u8>Minimum values to append.
max_values: Option<u8>Maximum values to append.
disabled: boolWhether the menu is disabled.
Implementations§
Source§impl<'a> SelectMenu<'a>
impl<'a> SelectMenu<'a>
Sourcepub fn builder(custom_id: impl Into<TitanString<'a>>) -> SelectMenuBuilder<'a>
pub fn builder(custom_id: impl Into<TitanString<'a>>) -> SelectMenuBuilder<'a>
Create a builder for a SelectMenu.
Trait Implementations§
Source§impl<'a> Clone for SelectMenu<'a>
impl<'a> Clone for SelectMenu<'a>
Source§fn clone(&self) -> SelectMenu<'a>
fn clone(&self) -> SelectMenu<'a>
Returns a duplicate 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<'a> Debug for SelectMenu<'a>
impl<'a> Debug for SelectMenu<'a>
Source§impl<'de, 'a> Deserialize<'de> for SelectMenu<'a>
impl<'de, 'a> Deserialize<'de> for SelectMenu<'a>
Source§fn 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
Auto Trait Implementations§
impl<'a> Freeze for SelectMenu<'a>
impl<'a> RefUnwindSafe for SelectMenu<'a>
impl<'a> Send for SelectMenu<'a>
impl<'a> Sync for SelectMenu<'a>
impl<'a> Unpin for SelectMenu<'a>
impl<'a> UnwindSafe for SelectMenu<'a>
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