pub struct SlashCommand {
pub name: String,
pub description: String,
pub handler: CommandHandler,
}Expand description
A slash command with metadata and handler
Fields§
§name: StringUnique command name (e.g., “help”, “status”, “deploy”)
description: StringHuman-readable description
handler: CommandHandlerAsync handler function
Implementations§
Trait Implementations§
Source§impl Clone for SlashCommand
impl Clone for SlashCommand
Source§fn clone(&self) -> SlashCommand
fn clone(&self) -> SlashCommand
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SlashCommand
impl !RefUnwindSafe for SlashCommand
impl Send for SlashCommand
impl Sync for SlashCommand
impl Unpin for SlashCommand
impl !UnwindSafe for SlashCommand
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