Skip to main content

Result

Type Alias Result 

Source
pub type Result<T> = Result<T, PromptError>;
Expand description

Result alias for prompt operations.

Aliased Type§

pub enum Result<T> {
    Ok(T),
    Err(PromptError),
}

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(PromptError)

Contains the error value

Trait Implementations§

Source§

impl<T> OnCancel<T> for Result<T>

Source§

fn or_cancel(self, message: &str) -> T

Exit cleanly on cancellation with the given message.
Source§

fn or_cancel_default(self) -> T

Exit cleanly on cancellation using the global default message from super::settings.