pub struct BooleanBuilder(/* private fields */);
Available on crate feature
builder
only.Expand description
Create a boolean option with a builder.
Implementations§
Source§impl BooleanBuilder
impl BooleanBuilder
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 BooleanBuilder
.
Sourcepub fn build(self) -> CommandOption
pub fn build(self) -> CommandOption
Consume the builder, returning the built command option.
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 BooleanBuilder
impl Clone for BooleanBuilder
Source§fn clone(&self) -> BooleanBuilder
fn clone(&self) -> BooleanBuilder
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 BooleanBuilder
impl Debug for BooleanBuilder
Source§impl From<BooleanBuilder> for CommandOption
impl From<BooleanBuilder> for CommandOption
Source§fn from(builder: BooleanBuilder) -> CommandOption
fn from(builder: BooleanBuilder) -> CommandOption
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for BooleanBuilder
impl RefUnwindSafe for BooleanBuilder
impl Send for BooleanBuilder
impl Sync for BooleanBuilder
impl Unpin for BooleanBuilder
impl UnwindSafe for BooleanBuilder
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