Trait IntoError

Source
pub trait IntoError<E>: Sized {
    type Source;

    // Required method
    fn into_error(self, source: Self::Source) -> E;

    // Provided methods
    fn build(self) -> E
       where Self: IntoError<E, Source = NoneSource> { ... }
    fn fail<T>(self) -> Result<T, E>
       where Self: IntoError<E, Source = NoneSource> { ... }
}

Required Associated Types§

Required Methods§

Source

fn into_error(self, source: Self::Source) -> E

Provided Methods§

Source

fn build(self) -> E
where Self: IntoError<E, Source = NoneSource>,

Source

fn fail<T>(self) -> Result<T, E>
where Self: IntoError<E, Source = NoneSource>,

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§