pub trait Commands: Sized {
// Required methods
fn create_commands() -> Vec<CreateCommand>;
fn from_command_data(data: &CommandData) -> Result<Self>;
}
Expand description
A utility for creating commands and extracting their data from application commands.
Required Methods§
Sourcefn create_commands() -> Vec<CreateCommand>
fn create_commands() -> Vec<CreateCommand>
List of top-level commands.
Sourcefn from_command_data(data: &CommandData) -> Result<Self>
fn from_command_data(data: &CommandData) -> Result<Self>
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.