pub trait FromOptions: Debug + Sendwhere
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§
Sourcefn from_options(interaction: &CommandInteraction) -> Result<Self, ConvertError>
fn from_options(interaction: &CommandInteraction) -> Result<Self, ConvertError>
Make arguments from a CommandInteraction
Provided Methods§
Sourcefn get_argument_params() -> Result<Vec<ArgumentParam>, BuilderError>
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.