pub struct MessageCommandGroupBuilder<State>where
State: StateBound,{ /* private fields */ }Expand description
A message command group builder, which allows setting extra metadata.
Implementations§
Source§impl<State> MessageCommandGroupBuilder<State>where
State: StateBound,
impl<State> MessageCommandGroupBuilder<State>where
State: StateBound,
Sourcepub fn command(self, command: impl Into<MessageCommand<State>>) -> Self
pub fn command(self, command: impl Into<MessageCommand<State>>) -> Self
Adds a command to the group.
Arguments:
command- The command to add to the command group.
Returns:
MessageCommandGroupBuilder - The current builder, with the command set.
Sourcepub fn nest(self, group: impl Into<MessageCommandGroup<State>>) -> Self
pub fn nest(self, group: impl Into<MessageCommandGroup<State>>) -> Self
Nests a group into this group.
Arguments:
group- The group to nest.
Returns:
MessageCommandGroupBuilder - The current builder with the nested group.
Sourcepub fn on_error<Error>(
self,
handler: impl ErrorHandler<State, Error> + 'static,
) -> Self
pub fn on_error<Error>( self, handler: impl ErrorHandler<State, Error> + 'static, ) -> Self
Adds an error handler scoped to this message command group.
Arguments:
handler- The error handler function.
Returns:
MessageCommandGroupBuilder - The current builder with the error handler added.
Trait Implementations§
Source§impl<State> Clone for MessageCommandGroupBuilder<State>where
State: StateBound + Clone,
impl<State> Clone for MessageCommandGroupBuilder<State>where
State: StateBound + Clone,
Source§fn clone(&self) -> MessageCommandGroupBuilder<State>
fn clone(&self) -> MessageCommandGroupBuilder<State>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<State> CommandGroupIntoCommandNode<State> for MessageCommandGroupBuilder<State>where
State: StateBound,
impl<State> CommandGroupIntoCommandNode<State> for MessageCommandGroupBuilder<State>where
State: StateBound,
Source§fn into_command_node(self) -> CommandNode<State>
fn into_command_node(self) -> CommandNode<State>
Converts the current type into a
CommandNode. Read moreAuto Trait Implementations§
impl<State> Freeze for MessageCommandGroupBuilder<State>
impl<State> !RefUnwindSafe for MessageCommandGroupBuilder<State>
impl<State> Send for MessageCommandGroupBuilder<State>
impl<State> Sync for MessageCommandGroupBuilder<State>
impl<State> Unpin for MessageCommandGroupBuilder<State>
impl<State> UnsafeUnpin for MessageCommandGroupBuilder<State>
impl<State> !UnwindSafe for MessageCommandGroupBuilder<State>
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