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>.
pub trait OrFail<C: ErrorCode>: Sized {
type Value;
type Error;
fn or_fail(self) -> Result<Self::Value, C>;
}This trait allows for converting a value into Result<_, Failure>.