pub trait Picker: Send + Sync {
// Required methods
fn pick<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
input: &'life1 str,
candidates: &'life2 [Candidate],
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn confirm<'life0, 'life1, 'async_trait>(
&'life0 self,
question: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Asks the user to choose.
Required Methods§
Sourcefn pick<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
input: &'life1 str,
candidates: &'life2 [Candidate],
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn pick<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
input: &'life1 str,
candidates: &'life2 [Candidate],
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
The index of the chosen candidate.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".