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§
fn into_error(self, source: Self::Source) -> E
Provided Methods§
fn build(self) -> Ewhere
Self: IntoError<E, Source = NoneSource>,
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.