pub struct PrefixedCommandGroupBuilder<State>where
State: StateBound,{ /* private fields */ }Expand description
A command group builder that allows setting optional fields.
Implementations§
Source§impl<State> PrefixedCommandGroupBuilder<State>where
State: StateBound,
impl<State> PrefixedCommandGroupBuilder<State>where
State: StateBound,
Sourcepub fn summary(self, summary: impl Into<String>) -> Self
pub fn summary(self, summary: impl Into<String>) -> Self
Sets the group’s summary, which is ideally a short one-line description of the group.
Arguments:
summary- The group’s summary.
Returns:
PrefixedCommandGroupBuilder - The command group builder with the set summary.
Sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
Sets the group’s description, which is ideally a more detailed description of the group.
Arguments:
description- The group’s description.
Returns:
PrefixedCommandGroupBuilder - The command group builder with the set description.
Sourcepub fn command(self, command: PrefixedCommandBuilder<State>) -> Self
pub fn command(self, command: PrefixedCommandBuilder<State>) -> Self
Adds a command as a child of this group.
Arguments:
command- The command to add as a child of this group.
Returns:
PrefixedCommandGroupBuilder - The command group builder with the added command.
Sourcepub fn nest(self, group: PrefixedCommandGroupBuilder<State>) -> Self
pub fn nest(self, group: PrefixedCommandGroupBuilder<State>) -> Self
Adds a subgroup as a child of this group.
Arguments:
group- The subgroup to add as a child of this group.
Returns:
PrefixedCommandGroupBuilder - The command group builder with the added subgroup.
Sourcepub fn on_error<F, Dummy, Error>(self, handler: F) -> Self
pub fn on_error<F, Dummy, Error>(self, handler: F) -> Self
Sets an error handler for all of this group’s children.
Arguments:
handler- The error handler to set.
Returns:
PrefixedCommandGroupBuilder - The current command group builder with the error handler
added to the error handlers list.
Trait Implementations§
Source§impl<State> CommandGroupIntoCommandNode<State> for PrefixedCommandGroupBuilder<State>where
State: StateBound,
impl<State> CommandGroupIntoCommandNode<State> for PrefixedCommandGroupBuilder<State>where
State: StateBound,
Source§fn into_command_node(self) -> CommandNode<State>
fn into_command_node(self) -> CommandNode<State>
CommandNode. Read more