Skip to main content

Result

Type Alias Result 

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

A result of either Ok(T) or an Err(Error).

Aliased Type§

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

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(E)

Contains the error value

Trait Implementations§

Source§

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

Source§

fn context<C>(self, context: C) -> Result<T>
where C: Display + Send + Sync + 'static,

Add additional, already-computed error context to this result. Read more
Source§

fn with_context<C, F>(self, f: F) -> Result<T>
where C: Display + Send + Sync + 'static, F: FnOnce() -> C,

Add additional, lazily-computed error context to this result. Read more
Source§

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

Source§

fn context<C>(self, context: C) -> Result<T, Error>
where C: Display + Send + Sync + 'static,

Add additional, already-computed error context to this result. Read more
Source§

fn with_context<C, F>(self, f: F) -> Result<T, Error>
where C: Display + Send + Sync + 'static, F: FnOnce() -> C,

Add additional, lazily-computed error context to this result. Read more