Trait 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 /.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

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