pub struct Command {
pub name: String,
pub description: String,
pub usage: String,
pub handler: Box<dyn CommandHandler>,
}Expand description
A registered slash command.
Fields§
§name: StringCommand name without the leading slash.
description: StringShort human-readable description shown in command listings.
usage: StringUsage string showing accepted arguments.
handler: Box<dyn CommandHandler>Handler invoked when the command is executed.
Auto Trait Implementations§
impl !RefUnwindSafe for Command
impl !UnwindSafe for Command
impl Freeze for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
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