[][src]Trait sfwtools::error::SfwRes

pub trait SfwRes<T, E: Display> {
    pub fn unwrap_or_else<F: FnOnce(E) -> T>(self, op: F) -> T;

    pub fn user_err(self, fstr: &str) -> T
    where
        Self: Sized
, { ... } }

Required methods

pub fn unwrap_or_else<F: FnOnce(E) -> T>(self, op: F) -> T[src]

Loading content...

Provided methods

pub fn user_err(self, fstr: &str) -> T where
    Self: Sized
[src]

Intended for use late in execution (e.g. in binaries), so that the program immediately exits with a user-friendly error message.

Loading content...

Implementations on Foreign Types

impl<T, E: Display> SfwRes<T, E> for Result<T, E>[src]

impl<T> SfwRes<T, NoneErrorRich> for Option<T>[src]

Loading content...

Implementors

Loading content...