Skip to main content

ErrorMapping

Trait ErrorMapping 

Source
pub trait ErrorMapping<T, E, U> {
    // Required method
    fn into_error(self) -> Result<T, Error<U>>;
}
Expand description

Helper trait for converting a value into a unified error-aware result type.

Required Methods§

Source

fn into_error(self) -> Result<T, Error<U>>

Converts the value into a Result, wrapping it in a structured error type if needed.

Implementations on Foreign Types§

Source§

impl<T, E, U> ErrorMapping<T, E, U> for Result<T, Error<E>>
where U: From<E>, E: Clone,

Source§

fn into_error(self) -> Result<T, Error<U>>

Source§

impl<T, E, U> ErrorMapping<T, E, U> for Result<T, E>
where U: From<E>,

Source§

fn into_error(self) -> Result<T, Error<U>>

Implementors§