ErrorExt

Trait ErrorExt 

Source
pub trait ErrorExt:
    Error
    + Send
    + Sync
    + 'static {
    // Provided methods
    fn raise(self) -> Exn<Self>
       where Self: Sized { ... }
    fn raise_erased(self) -> Exn
       where Self: Sized { ... }
    fn raise_all<T, I>(self, sources: I) -> Exn<Self>
       where Self: Sized,
             T: Error + Send + Sync + 'static,
             I: IntoIterator,
             I::Item: Into<Exn<T>> { ... }
}
Expand description

A trait bound of the supported error type of Exn.

Provided Methods§

Source

fn raise(self) -> Exn<Self>
where Self: Sized,

Raise this error as a new exception.

Source

fn raise_erased(self) -> Exn
where Self: Sized,

Raise this error as a new exception, with type erasure.

Source

fn raise_all<T, I>(self, sources: I) -> Exn<Self>
where Self: Sized, T: Error + Send + Sync + 'static, I: IntoIterator, I::Item: Into<Exn<T>>,

Raise this error as a new exception, with sources as causes.

Implementors§

Source§

impl<T> ErrorExt for T
where T: Error + Send + Sync + 'static,