pub enum AutocompleteValue<T> {
None,
Focused(String),
Completed(T),
}Expand description
An autocomplete command field.
This type represent a value parsed from an autocomplete field. See “Autocomplete interactions”
in CommandModel documentation for more information.
Variants§
None
The field has not been completed yet.
Focused(String)
The field is focused by the user and being completed.
Completed(T)
The field has been completed by the user.
Trait Implementations§
source§impl<T: Clone> Clone for AutocompleteValue<T>
impl<T: Clone> Clone for AutocompleteValue<T>
source§fn clone(&self) -> AutocompleteValue<T>
fn clone(&self) -> AutocompleteValue<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<T> CommandOption for AutocompleteValue<T>where
T: CommandOption,
impl<T> CommandOption for AutocompleteValue<T>where
T: CommandOption,
source§fn from_option(
value: CommandOptionValue,
data: CommandOptionData,
resolved: Option<&CommandInteractionDataResolved>
) -> Result<Self, ParseOptionErrorType>
fn from_option(
value: CommandOptionValue,
data: CommandOptionData,
resolved: Option<&CommandInteractionDataResolved>
) -> Result<Self, ParseOptionErrorType>
Convert a
CommandOptionValue into this value.source§impl<T: Debug> Debug for AutocompleteValue<T>
impl<T: Debug> Debug for AutocompleteValue<T>
source§impl<T: PartialEq> PartialEq<AutocompleteValue<T>> for AutocompleteValue<T>
impl<T: PartialEq> PartialEq<AutocompleteValue<T>> for AutocompleteValue<T>
source§fn eq(&self, other: &AutocompleteValue<T>) -> bool
fn eq(&self, other: &AutocompleteValue<T>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.