n0_snafu

Type Alias Result

Source
pub type Result<A = (), E = Error> = Result<A, E>;

Aliased Type§

enum Result<A = (), E = Error> {
    Ok(A),
    Err(E),
}

Variants§

§1.0.0

Ok(A)

Contains the success value

§1.0.0

Err(E)

Contains the error value

Trait Implementations§

Source§

impl<T, E> ResultExt<T> for Result<T, E>
where E: Error + Sync + Send + 'static,

Source§

fn context<C>(self, context: C) -> Result<T, Error>
where C: AsRef<str>,

Source§

fn e(self) -> Result<T, Error>

Quickly convert a std error into a Error, without having to write a context message.
Source§

fn with_context<F>(self, context: F) -> Result<T, Error>
where F: FnOnce() -> String,

Source§

impl<T> ResultExt<T> for Result<T, Error>

Source§

fn context<C>(self, context: C) -> Result<T, Error>
where C: AsRef<str>,

Source§

fn e(self) -> Result<T, Error>

Quickly convert a std error into a Error, without having to write a context message.
Source§

fn with_context<F>(self, context: F) -> Result<T, Error>
where F: FnOnce() -> String,