Skip to main content

IntoErr

Trait IntoErr 

Source
pub trait IntoErr<T> {
    // Required method
    fn into_err(self) -> Result<T>;
}
Expand description

Converts foreign error results into the crate’s structured Result type.

Required Methods§

Source

fn into_err(self) -> Result<T>

Convert the error into Error, preserving the original error as the source so callers can still downcast to the concrete type.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T, E> IntoErr<T> for Result<T, E>
where E: Error + Send + Sync + 'static,

Source§

fn into_err(self) -> Result<T>

Implementors§