pub trait AsCommandArgumentValue {
// Required methods
fn value_type() -> CommandArgumentValueType;
fn from_returned_argument<'life0, 'async_trait>(
ctx: &'life0 Context,
arg: Option<CommandArgumentValue>,
) -> Pin<Box<dyn Future<Output = Result<Self, ArgumentError>> + Send + 'async_trait>>
where Self: Sized + 'async_trait,
'life0: 'async_trait;
}Expand description
Represents a value that can be passed to a command, like a string, integer, or file
Note: This is not made for wrappers like Vec
Required Methods§
fn value_type() -> CommandArgumentValueType
fn from_returned_argument<'life0, 'async_trait>(
ctx: &'life0 Context,
arg: Option<CommandArgumentValue>,
) -> Pin<Box<dyn Future<Output = Result<Self, ArgumentError>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".