pub enum Step<T> {
Continue,
Submit(T),
Cancel,
Reject(String),
}Expand description
The transition a prompt requests after handling one key.
Variants§
Continue
State changed but we’re not finished — keep reading keys.
Submit(T)
Done; deliver T to the caller.
Cancel
User asked to abort (Esc, Ctrl-C, …). Runner converts this into
PromptError::Interrupted.
Reject(String)
Block submission and display msg under the input line in the
runner’s error style. The next non-Enter key clears the error.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Step<T>where
T: Freeze,
impl<T> RefUnwindSafe for Step<T>where
T: RefUnwindSafe,
impl<T> Send for Step<T>where
T: Send,
impl<T> Sync for Step<T>where
T: Sync,
impl<T> Unpin for Step<T>where
T: Unpin,
impl<T> UnsafeUnpin for Step<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Step<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