pub type Result<T> = Result<T, Error>;
Expand description

Convenient wrapper around std::Result.

Aliased Type§

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

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(Error)

Contains the error value

Trait Implementations§

source§

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

source§

fn chain_err<F, EK>(self, callback: F) -> Result<T, Error>where F: FnOnce() -> EK, EK: Into<ErrorKind>,

If the Result is an Err then chain_err evaluates the closure, which returns some type that can be converted to ErrorKind, boxes the original error to store as the cause, then returns a new error containing the original error.