Skip to main content

Result

Type Alias Result 

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

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> ContextExt<T> for Result<T>

Source§

fn context<C: Into<String>>(self, context: C) -> Result<T>

Source§

fn with_context<C: Into<String>, F: FnOnce() -> C>(self, f: F) -> Result<T>

Source§

impl<T, E: StdError + Send + Sync + 'static> StdContextExt<T, E> for Result<T, E>

Source§

fn context<C: Into<String>>(self, context: C) -> Result<T>

Source§

fn with_context<C: Into<String>, F: FnOnce() -> C>(self, f: F) -> Result<T>