pub struct MentionableBuilder(/* private fields */);
Available on crate feature
builder
only.Expand description
Create a mentionable option with a builder.
Implementations§
Source§impl MentionableBuilder
impl MentionableBuilder
Sourcepub fn new(name: impl Into<String>, description: impl Into<String>) -> Self
pub fn new(name: impl Into<String>, description: impl Into<String>) -> Self
Create a new default MentionableBuilder
.
Sourcepub fn description_localizations<K: Into<String>, V: Into<String>>(
self,
localizations: impl IntoIterator<Item = (K, V)>,
) -> Self
pub fn description_localizations<K: Into<String>, V: Into<String>>( self, localizations: impl IntoIterator<Item = (K, V)>, ) -> Self
Set the localization dictionary for the option description.
Defaults to None
.
Sourcepub fn name_localizations<K: Into<String>, V: Into<String>>(
self,
localizations: impl IntoIterator<Item = (K, V)>,
) -> Self
pub fn name_localizations<K: Into<String>, V: Into<String>>( self, localizations: impl IntoIterator<Item = (K, V)>, ) -> Self
Set the localization dictionary for the option name.
Defaults to None
.
Trait Implementations§
Source§impl Clone for MentionableBuilder
impl Clone for MentionableBuilder
Source§fn clone(&self) -> MentionableBuilder
fn clone(&self) -> MentionableBuilder
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 MentionableBuilder
impl Debug for MentionableBuilder
Source§impl From<MentionableBuilder> for CommandOption
impl From<MentionableBuilder> for CommandOption
Source§fn from(builder: MentionableBuilder) -> CommandOption
fn from(builder: MentionableBuilder) -> CommandOption
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for MentionableBuilder
impl RefUnwindSafe for MentionableBuilder
impl Send for MentionableBuilder
impl Sync for MentionableBuilder
impl Unpin for MentionableBuilder
impl UnwindSafe for MentionableBuilder
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