Trait AutocompleteCommand

Source
pub trait AutocompleteCommand: Sized {
    // Required method
    fn from_options(options: &[CommandDataOption]) -> Result<Self>;
}
Expand description

A top-level command for use with AutocompleteCommands.

Required Methods§

Source

fn from_options(options: &[CommandDataOption]) -> Result<Self>

Extract data from a list of CommandDataOptions.

§Errors

Returns an error if the implementation fails.

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§