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
sourceimpl<T> ListOption<T>
impl<T> ListOption<T>
Trait Implementations
sourceimpl<T: Clone> Clone for ListOption<T>
impl<T: Clone> Clone for ListOption<T>
sourcefn clone(&self) -> ListOption<T>
fn clone(&self) -> ListOption<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<T: Debug> Debug for ListOption<T>
impl<T: Debug> Debug for ListOption<T>
sourceimpl<T> Display for ListOption<T>where
T: Display,
impl<T> Display for ListOption<T>where
T: Display,
sourceimpl<T: PartialEq> PartialEq<ListOption<T>> for ListOption<T>
impl<T: PartialEq> PartialEq<ListOption<T>> for ListOption<T>
sourcefn eq(&self, other: &ListOption<T>) -> bool
fn eq(&self, other: &ListOption<T>) -> bool
impl<T: Eq> Eq for ListOption<T>
impl<T> StructuralEq for ListOption<T>
impl<T> StructuralPartialEq for ListOption<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for ListOption<T>where
T: RefUnwindSafe,
impl<T> Send for ListOption<T>where
T: Send,
impl<T> Sync for ListOption<T>where
T: Sync,
impl<T> Unpin for ListOption<T>where
T: Unpin,
impl<T> UnwindSafe for ListOption<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more