pub struct Group { /* private fields */ }Expand description
Builder for a command group (a subcommand containing subcommands).
Implementations§
Source§impl Group
impl Group
Sourcepub fn command<S, F>(self, name: S, about: S, body: F) -> Self
pub fn command<S, F>(self, name: S, about: S, body: F) -> Self
Add a leaf command to this group.
Sourcepub fn command_with<S, C, F>(
self,
name: S,
about: S,
configure: C,
body: F,
) -> Selfwhere
S: Into<String>,
C: FnOnce(CommandBuilder) -> CommandBuilder,
F: Fn(&Ctx) -> Result<()> + 'static,
pub fn command_with<S, C, F>(
self,
name: S,
about: S,
configure: C,
body: F,
) -> Selfwhere
S: Into<String>,
C: FnOnce(CommandBuilder) -> CommandBuilder,
F: Fn(&Ctx) -> Result<()> + 'static,
Add a leaf command with args/flags to this group.
Auto Trait Implementations§
impl !RefUnwindSafe for Group
impl !Send for Group
impl !Sync for Group
impl !UnwindSafe for Group
impl Forget for Group
impl Freeze for Group
impl Move for Group
impl Unpin for Group
impl UnsafeUnpin for Group
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