Trait FromOptions

Source
pub trait FromOptions: Debug + Send
where Self: Sized,
{ // Required method fn from_options( interaction: &CommandInteraction, ) -> Result<Self, ConvertError>; // Provided method fn get_argument_params() -> Result<Vec<ArgumentParam>, BuilderError> { ... } }
Expand description

A trait that allows converting from an application command interaction

Required Methods§

Source

fn from_options(interaction: &CommandInteraction) -> Result<Self, ConvertError>

Make arguments from a CommandInteraction

Provided Methods§

Source

fn get_argument_params() -> Result<Vec<ArgumentParam>, BuilderError>

Get the argument paramss of this object

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.

Implementations on Foreign Types§

Source§

impl FromOptions for ()

Implementors§