Trait failure::ResultExt [] [src]

pub trait ResultExt<T, E> {
    fn compat(self) -> Result<T, Compat<E>>;
fn context<D>(self, context: D) -> Result<T, Context<D>>
    where
        D: Display + Send + Sync + 'static
;
fn with_context<F, D>(self, f: F) -> Result<T, Context<D>>
    where
        F: FnOnce(&E) -> D,
        D: Display + Send + Sync + 'static
; }

Extension methods for Result.

Required Methods

Wraps the error in Compat to make it compatible with older error handling APIs that expect std::error::Error.

Wraps the error type in a context type.

Wraps the error type in a context type generated by looking at the error value.

Implementations on Foreign Types

impl<T, E> ResultExt<T, E> for Result<T, E> where
    E: Fail
[src]

[src]

[src]

[src]

impl<T> ResultExt<T, Error> for Result<T, Error>
[src]

[src]

[src]

[src]

Implementors