pub struct SubCommandGroupBuilder(/* private fields */);
Available on crate feature
builder
only.Expand description
Create a subcommand group option with a builder.
Implementations§
Source§impl SubCommandGroupBuilder
impl SubCommandGroupBuilder
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 SubCommandGroupBuilder
.
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
.
Sourcepub fn subcommands(
self,
subcommands: impl IntoIterator<Item = SubCommandBuilder>,
) -> Self
pub fn subcommands( self, subcommands: impl IntoIterator<Item = SubCommandBuilder>, ) -> Self
Set the list of sub commands to the group.
Defaults to no subcommands.
Trait Implementations§
Source§impl Clone for SubCommandGroupBuilder
impl Clone for SubCommandGroupBuilder
Source§fn clone(&self) -> SubCommandGroupBuilder
fn clone(&self) -> SubCommandGroupBuilder
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 SubCommandGroupBuilder
impl Debug for SubCommandGroupBuilder
Source§impl From<SubCommandGroupBuilder> for CommandOption
impl From<SubCommandGroupBuilder> for CommandOption
Source§fn from(builder: SubCommandGroupBuilder) -> CommandOption
fn from(builder: SubCommandGroupBuilder) -> CommandOption
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SubCommandGroupBuilder
impl RefUnwindSafe for SubCommandGroupBuilder
impl Send for SubCommandGroupBuilder
impl Sync for SubCommandGroupBuilder
impl Unpin for SubCommandGroupBuilder
impl UnwindSafe for SubCommandGroupBuilder
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