[][src]Trait embedded_error_chain::ResultChainError

pub trait ResultChainError<T, O: ErrorCategory, Tag> {
    pub fn chain_err(self, error_code: O) -> Result<T, Error<O>>;
}

A trait that allows chaining if a Result contains an Error value.

Required methods

pub fn chain_err(self, error_code: O) -> Result<T, Error<O>>

If the results contains an Err value, chain it with the supplied error_code and return Err with the result, otherwise forward the Ok value.

Panics

If this Result is an Err value and the error category O is not linked with the ErrorCategory of the most recent error code in the error, this function will panic.

Loading content...

Implementations on Foreign Types

impl<OK, ERR, O, TAG> ResultChainError<OK, O, TAG> for Result<OK, ERR> where
    O: ErrorCategory,
    ERR: ChainError<O, TAG>, 
[src]

Loading content...

Implementors

Loading content...