Trait twilight_interactions::command::CommandOption [−][src]
pub trait CommandOption: Sized {
fn from_option(
value: CommandOptionValue,
resolved: Option<&CommandInteractionDataResolved>
) -> Result<Self, ParseErrorType>;
}Expand description
Convert a CommandOptionValue into a concrete type.
This trait is used by the implementation of CommandData generated
by the derive macro.
Required methods
fn from_option(
value: CommandOptionValue,
resolved: Option<&CommandInteractionDataResolved>
) -> Result<Self, ParseErrorType>
fn from_option(
value: CommandOptionValue,
resolved: Option<&CommandInteractionDataResolved>
) -> Result<Self, ParseErrorType>
Convert a CommandOptionValue into this value.