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 duplicate 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<&InteractionDataResolved>,
) -> Result<Self, ParseOptionErrorType>
fn from_option( value: CommandOptionValue, data: CommandOptionData, resolved: Option<&InteractionDataResolved>, ) -> 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 for AutocompleteValue<T>
impl<T: PartialEq> PartialEq for AutocompleteValue<T>
impl<T: Eq> Eq for AutocompleteValue<T>
impl<T> StructuralPartialEq for AutocompleteValue<T>
Auto Trait Implementations§
impl<T> Freeze for AutocompleteValue<T>where
T: Freeze,
impl<T> RefUnwindSafe for AutocompleteValue<T>where
T: RefUnwindSafe,
impl<T> Send for AutocompleteValue<T>where
T: Send,
impl<T> Sync for AutocompleteValue<T>where
T: Sync,
impl<T> Unpin for AutocompleteValue<T>where
T: Unpin,
impl<T> UnwindSafe for AutocompleteValue<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more