Skip to main content

ResultExt

Trait ResultExt 

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

Required Methods§

Source

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

Source

fn with_context<C: Display, 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".

Implementations on Foreign Types§

Source§

impl<T, E> ResultExt<T> for Result<T, E>
where E: Into<ClmError>,

Source§

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

Source§

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

Implementors§