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§
sourcefn with_command<S: Into<String>>(
self,
name: S
) -> Predicate<CommandPredicate, Command, Self, I>
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.