[][src]Trait strerror::ResultChainErrExt

pub trait ResultChainErrExt<T> {
    fn chain_err<F, S>(self, context_fn: F) -> Result<T, StrError>
    where
        F: FnOnce() -> S,
        S: Into<String>
; }

Trait providing chain_err for mapping the Err variant value within a Result to a StrError.

See crate level documentation for usage examples.

Required methods

fn chain_err<F, S>(self, context_fn: F) -> Result<T, StrError> where
    F: FnOnce() -> S,
    S: Into<String>, 

Map the Err variant value within a Result to a StrError, adding context.

Loading content...

Implementations on Foreign Types

impl<T, E> ResultChainErrExt<T> for Result<T, E> where
    E: Into<Box<dyn Error + Send + Sync>>, 
[src]

Loading content...

Implementors

Loading content...