pub struct CreateSelectMenu { /* private fields */ }
Expand description
A builder for creating a select menu component in a message
Implementations§
Source§impl CreateSelectMenu
impl CreateSelectMenu
Sourcepub fn new(custom_id: impl Into<String>, kind: CreateSelectMenuKind) -> Self
pub fn new(custom_id: impl Into<String>, kind: CreateSelectMenuKind) -> Self
Creates a builder with given custom id (a developer-defined identifier), and a list of options, leaving all other fields empty.
Sourcepub fn placeholder(self, label: impl Into<String>) -> Self
pub fn placeholder(self, label: impl Into<String>) -> Self
The placeholder of the select menu.
Sourcepub fn custom_id(self, id: impl Into<String>) -> Self
pub fn custom_id(self, id: impl Into<String>) -> Self
Sets the custom id of the select menu, a developer-defined identifier. Replaces the current
value as set in Self::new
.
Sourcepub fn min_values(self, min: u8) -> Self
pub fn min_values(self, min: u8) -> Self
Sets the minimum values for the user to select.
Sourcepub fn max_values(self, max: u8) -> Self
pub fn max_values(self, max: u8) -> Self
Sets the maximum values for the user to select.
Trait Implementations§
Source§impl Clone for CreateSelectMenu
impl Clone for CreateSelectMenu
Source§fn clone(&self) -> CreateSelectMenu
fn clone(&self) -> CreateSelectMenu
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 CreateSelectMenu
impl Debug for CreateSelectMenu
Source§impl PartialEq for CreateSelectMenu
impl PartialEq for CreateSelectMenu
Source§impl Serialize for CreateSelectMenu
impl Serialize for CreateSelectMenu
impl StructuralPartialEq for CreateSelectMenu
Auto Trait Implementations§
impl Freeze for CreateSelectMenu
impl RefUnwindSafe for CreateSelectMenu
impl Send for CreateSelectMenu
impl Sync for CreateSelectMenu
impl Unpin for CreateSelectMenu
impl UnwindSafe for CreateSelectMenu
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