[][src]Trait status::ResultStatusExt

pub trait ResultStatusExt<C, F> where
    C: Context,
    F: Fn(C) -> C, 
{ fn context_with(self, replacements: F) -> Self; }

Modify the Status inline for error handling.

Required methods

fn context_with(self, replacements: F) -> Self

Replace fields in the Context with those populated in replacements.

    let content = read_file(Path::new("Cargo.toml")).context_with(|c| {
       c.insert("Expected value", 5)
    })?;
Loading content...

Implementations on Foreign Types

impl<T, K, C, F> ResultStatusExt<C, F> for Result<T, Status<K, C>> where
    K: Kind,
    C: Context,
    F: Fn(C) -> C, 
[src]

Loading content...

Implementors

Loading content...