pub struct SelectPrompt<'l, T: Display> { /* private fields */ }Expand description
Prompt the user for a selection from a dynamic list.
Implementations§
Source§impl<'l, T: Display> SelectPrompt<'l, T>
impl<'l, T: Display> SelectPrompt<'l, T>
Sourcepub fn with_items(self, items: impl IntoIterator<Item = T>) -> Self
pub fn with_items(self, items: impl IntoIterator<Item = T>) -> Self
Sourcepub fn run_cancellable(self) -> Result<Option<T>, AskError>
pub fn run_cancellable(self) -> Result<Option<T>, AskError>
Run the prompt and allow cancellation via the escape key.
Auto Trait Implementations§
impl<'l, T> Freeze for SelectPrompt<'l, T>
impl<'l, T> RefUnwindSafe for SelectPrompt<'l, T>where
T: RefUnwindSafe,
impl<'l, T> Send for SelectPrompt<'l, T>where
T: Send,
impl<'l, T> Sync for SelectPrompt<'l, T>where
T: Sync,
impl<'l, T> Unpin for SelectPrompt<'l, T>where
T: Unpin,
impl<'l, T> UnwindSafe for SelectPrompt<'l, 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