Skip to main content

EitherErrExt

Trait EitherErrExt 

pub trait EitherErrExt: Error {
    // Provided methods
    fn into_left<R>(self) -> EitherErr<Self, R>
       where R: Error,
             Self: Sized { ... }
    fn into_right<L>(self) -> EitherErr<L, Self>
       where L: Error,
             Self: Sized { ... }
}
Expand description

Extension trait for converting an error into an EitherErr.

Provided Methods§

fn into_left<R>(self) -> EitherErr<Self, R>
where R: Error, Self: Sized,

Converts this error into EitherErr::Left.

fn into_right<L>(self) -> EitherErr<L, Self>
where L: Error, Self: Sized,

Converts this error into EitherErr::Right.

Implementors§

§

impl<T> EitherErrExt for T
where T: Error + ?Sized,