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> { ... }
}