Trait carapax::CommandExt

source ·
pub trait CommandExt<I>: Sized {
    // Provided method
    fn with_command<S: Into<String>>(
        self,
        name: S
    ) -> Predicate<CommandPredicate, Command, Self, I> { ... }
}
Expand description

Provides a shortcut for wrapping a Handler by a CommandPredicate.

Provided Methods§

source

fn with_command<S: Into<String>>( self, name: S ) -> Predicate<CommandPredicate, Command, Self, I>

Shortcut to create a command handler.

Example: handler.command("/name").

§Arguments
  • name - A name of a command with leading /.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<H, I> CommandExt<I> for H
where H: Handler<I>, I: TryFromInput,