pub trait OrFail<C: ErrorCode>: Sized {
    type Value;
    type Error;

    fn or_fail(self) -> Result<Self::Value, C>;
}
Expand description

This trait allows for converting a value into Result<_, Failure>.

Required Associated Types

Success value type (used for the Ok(_) variant).

Error value type (used for the Err(_) variant).

Required Methods

Returns Err(Failure<C>) if self is a failure value.

If Err(_) is returned, this method should add the current caller location to the backtrace of the resulting Failure<C>.

Implementations on Foreign Types

Implementors