[−][src]Trait prompts::Prompt
Base prompt trait
You must use
this when using any of the prompts in this crate
Required methods
fn run<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Option<T>, ErrorKind>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Option<T>, ErrorKind>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn display(&mut self) -> Result<()>
fn handle_key_event(&mut self, event: KeyEvent)
Implementors
impl Prompt<bool> for ConfirmPrompt
[src]
fn run<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Option<bool>, ErrorKind>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Option<bool>, ErrorKind>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Runs the prompt
Stops either when the user selects an option, an error occurs, or the prompt is aborted by the user using CTRL+c, CTRL+z or ESC.
fn display(&mut self) -> Result<()>
[src]
fn handle_key_event(&mut self, event: KeyEvent)
[src]
impl Prompt<String> for TextPrompt
[src]
fn run<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Option<String>, ErrorKind>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Option<String>, ErrorKind>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn display(&mut self) -> Result<()>
[src]
fn handle_key_event(&mut self, event: KeyEvent)
[src]
impl<T: Clone + Send + Display> Prompt<T> for AutocompletePrompt<T>
[src]
fn run<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Option<T>, ErrorKind>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Option<T>, ErrorKind>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Runs the prompt
Stops either when the user selects an option, an error occurs, or the prompt is aborted by the user using CTRL+c, CTRL+z or ESC.
fn display(&mut self) -> Result<()>
[src]
fn handle_key_event(&mut self, event: KeyEvent)
[src]
impl<T: Clone + Send + Display> Prompt<T> for SelectPrompt<T>
[src]
fn run<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Option<T>, ErrorKind>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Option<T>, ErrorKind>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Runs the prompt
Stops either when the user selects an option, an error occurs, or the prompt is aborted by the user using CTRL+c, CTRL+z or ESC.