Struct inquire::list_option::ListOption
source · pub struct ListOption<T> {
pub index: usize,
pub value: T,
}
Expand description
Represents a selection made by the user when prompted to select one or several options among those presented.
Fields§
§index: usize
Index of the selected option relative to the original (full) list passed to the prompt.
value: T
Value of the selected option.
Implementations§
source§impl<T> ListOption<T>
impl<T> ListOption<T>
Trait Implementations§
source§impl<T: Clone> Clone for ListOption<T>
impl<T: Clone> Clone for ListOption<T>
source§fn clone(&self) -> ListOption<T>
fn clone(&self) -> ListOption<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: Debug> Debug for ListOption<T>
impl<T: Debug> Debug for ListOption<T>
source§impl<T> Display for ListOption<T>where
T: Display,
impl<T> Display for ListOption<T>where
T: Display,
source§impl<T: PartialEq> PartialEq<ListOption<T>> for ListOption<T>
impl<T: PartialEq> PartialEq<ListOption<T>> for ListOption<T>
source§fn eq(&self, other: &ListOption<T>) -> bool
fn eq(&self, other: &ListOption<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.