pub struct SelectMenuBuilder(/* private fields */);
Available on crate feature
builder
only.Expand description
Create a select menu with a builder.
Implementations§
Source§impl SelectMenuBuilder
impl SelectMenuBuilder
Sourcepub fn new(custom_id: impl Into<String>, kind: SelectMenuType) -> Self
pub fn new(custom_id: impl Into<String>, kind: SelectMenuType) -> Self
Create a new select menu builder.
Sourcepub fn max_values(self, max_values: u8) -> Self
pub fn max_values(self, max_values: u8) -> Self
Set the max values of this select menu.
Sourcepub fn min_values(self, min_values: u8) -> Self
pub fn min_values(self, min_values: u8) -> Self
Set the min values of this select menu.
Sourcepub fn option(self, option: impl Into<SelectMenuOption>) -> Self
pub fn option(self, option: impl Into<SelectMenuOption>) -> Self
Add an option to this select menu.
Sourcepub fn placeholder(self, placeholder: impl Into<String>) -> Self
pub fn placeholder(self, placeholder: impl Into<String>) -> Self
Set the placeholder for this select menu.
Sourcepub fn channel_types(self, channel_types: Vec<ChannelType>) -> Self
pub fn channel_types(self, channel_types: Vec<ChannelType>) -> Self
Set the channel types of this select menu.
Sourcepub fn default_values(self, default_values: Vec<SelectDefaultValue>) -> Self
pub fn default_values(self, default_values: Vec<SelectDefaultValue>) -> Self
Set the default values of this select menu.
Trait Implementations§
Source§impl Clone for SelectMenuBuilder
impl Clone for SelectMenuBuilder
Source§fn clone(&self) -> SelectMenuBuilder
fn clone(&self) -> SelectMenuBuilder
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 Debug for SelectMenuBuilder
impl Debug for SelectMenuBuilder
Source§impl From<SelectMenuBuilder> for SelectMenu
impl From<SelectMenuBuilder> for SelectMenu
Source§fn from(builder: SelectMenuBuilder) -> Self
fn from(builder: SelectMenuBuilder) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SelectMenuBuilder
impl PartialEq for SelectMenuBuilder
impl Eq for SelectMenuBuilder
impl StructuralPartialEq for SelectMenuBuilder
Auto Trait Implementations§
impl Freeze for SelectMenuBuilder
impl RefUnwindSafe for SelectMenuBuilder
impl Send for SelectMenuBuilder
impl Sync for SelectMenuBuilder
impl Unpin for SelectMenuBuilder
impl UnwindSafe for SelectMenuBuilder
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