Skip to main content

StdContextExt

Trait StdContextExt 

Source
pub trait StdContextExt<T, E> {
    // Required methods
    fn context<C: Into<String>>(self, context: C) -> Result<T>;
    fn with_context<C: Into<String>, F: FnOnce() -> C>(self, f: F) -> Result<T>;
}

Required Methods§

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>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

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