pub enum Action<I>{
Submit,
Cancel,
Interrupt,
Inner(I),
}
Expand description
Top-level type to describe the directives a prompt receives.
Each prompt should implement its own custom InnerAction type which is parsed and stored in the Inner variant, if applicable, on the normal execution flow of a prompt.
Variants§
Submit
Submits the current prompt answer, finishing the prompt if valid.
Cancel
Cancels the prompt execution with a graceful shutdown.
Interrupt
Interrupts the prompt execution without a graceful shutdown.
Inner(I)
Specialized actions according to the prompt type.
Implementations§
Trait Implementations§
source§impl<I> PartialEq for Action<I>
impl<I> PartialEq for Action<I>
impl<I> Copy for Action<I>
impl<I> Eq for Action<I>
impl<I> StructuralPartialEq for Action<I>
Auto Trait Implementations§
impl<I> Freeze for Action<I>where
I: Freeze,
impl<I> RefUnwindSafe for Action<I>where
I: RefUnwindSafe,
impl<I> Send for Action<I>where
I: Send,
impl<I> Sync for Action<I>where
I: Sync,
impl<I> Unpin for Action<I>where
I: Unpin,
impl<I> UnwindSafe for Action<I>where
I: 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