Skip to main content

TriResultHelper

Trait TriResultHelper 

Source
pub trait TriResultHelper<T, S> {
    // Required methods
    fn on_soft_err<F: FnOnce(S) -> Result<T>>(self, f: F) -> Result<T>;
    fn map_soft_err<F: FnOnce(S) -> U, U>(self, f: F) -> TriResult<T, U>;
    fn elevate_err(self) -> Result<T>;
}

Required Methods§

Source

fn on_soft_err<F: FnOnce(S) -> Result<T>>(self, f: F) -> Result<T>

Source

fn map_soft_err<F: FnOnce(S) -> U, U>(self, f: F) -> TriResult<T, U>

Source

fn elevate_err(self) -> Result<T>

If soft error, make it hard error.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T, S> TriResultHelper<T, S> for TriResult<T, S>