Enum conciliator::input::AbortRetryContinue
source · pub enum AbortRetryContinue {
Abort,
Retry,
Continue,
}
Expand description
Ask whether to “Abort, Retry, or Continue”
Whichever variant is used with Claw::input
is the default (returned if the user presses enter without making an explicit selection).
There’s no “behavior” inherent to the variants, it’s up to you how to implement that.
For example:
use conciliator::{Conciliator, input::AbortRetryContinue};
let con = conciliator::init();
loop {
match con.input(AbortRetryContinue::Retry) {
AbortRetryContinue::Abort => break Err("Aborted!"),
AbortRetryContinue::Retry => break Ok("Retry"),
AbortRetryContinue::Continue => continue
};
};
Asks:
Abort, Retry, or Continue? [a/R/c]:
Variants§
Trait Implementations§
source§impl Clone for AbortRetryContinue
impl Clone for AbortRetryContinue
source§fn clone(&self) -> AbortRetryContinue
fn clone(&self) -> AbortRetryContinue
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Input for AbortRetryContinue
impl Input for AbortRetryContinue
impl Copy for AbortRetryContinue
Auto Trait Implementations§
impl RefUnwindSafe for AbortRetryContinue
impl Send for AbortRetryContinue
impl Sync for AbortRetryContinue
impl Unpin for AbortRetryContinue
impl UnwindSafe for AbortRetryContinue
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