pub struct Then<A, B, O> { /* private fields */ }Expand description
Wrapper for chaining prompts.
See the Promptable::then() method for more information.
Trait Implementations§
Source§impl<A, B, O> Flattenable for Then<A, B, O>where
A: Promptable,
B: Promptable,
impl<A, B, O> Flattenable for Then<A, B, O>where
A: Promptable,
B: Promptable,
Source§type RawOutput = (<A as Promptable>::Output, <B as Promptable>::Output)
type RawOutput = (<A as Promptable>::Output, <B as Promptable>::Output)
The raw output type (e.g.
(((A, B), C), D)).Source§impl<A, B, O> Promptable for Then<A, B, O>
impl<A, B, O> Promptable for Then<A, B, O>
Source§type FmtRules = ThenFmtRules<<A as Promptable>::FmtRules, <B as Promptable>::FmtRules>
type FmtRules = ThenFmtRules<<A as Promptable>::FmtRules, <B as Promptable>::FmtRules>
The type of styling rules the promptable supports.
Source§fn prompt_once<R, W>(
&mut self,
read: R,
write: W,
fmt: &Self::FmtRules,
) -> Result<ControlFlow<O>>
fn prompt_once<R, W>( &mut self, read: R, write: W, fmt: &Self::FmtRules, ) -> Result<ControlFlow<O>>
Prompts the user for an input. Read more
Source§fn prompt_with<R, W>(&mut self, read: R, write: W) -> Result<Self::Output>
fn prompt_with<R, W>(&mut self, read: R, write: W) -> Result<Self::Output>
Prompts the user for an input until it’s valid.
Source§fn prompt(&mut self) -> Result<Self::Output>
fn prompt(&mut self) -> Result<Self::Output>
Prompts the user for an input until it’s valid, using the standard input and output.
Source§fn max_tries(self, max: usize) -> MaxTries<Self> ⓘwhere
Self: Sized,
fn max_tries(self, max: usize) -> MaxTries<Self> ⓘwhere
Self: Sized,
Limits the amount of tries for the prompt to succeed. Read more
Source§fn until<F>(self, until: F) -> Until<Self, F> ⓘ
fn until<F>(self, until: F) -> Until<Self, F> ⓘ
Adds a filter to the user input, before validating it. Read more
Auto Trait Implementations§
impl<A, B, O> Freeze for Then<A, B, O>
impl<A, B, O> RefUnwindSafe for Then<A, B, O>
impl<A, B, O> Send for Then<A, B, O>
impl<A, B, O> Sync for Then<A, B, O>
impl<A, B, O> Unpin for Then<A, B, O>
impl<A, B, O> UnwindSafe for Then<A, B, O>
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
Source§impl<T> FromOutput<T> for T
impl<T> FromOutput<T> for T
Source§fn from_output(output: T) -> T
fn from_output(output: T) -> T
Converts the raw output into this type.