ChiselResultExt

Trait ChiselResultExt 

Source
pub trait ChiselResultExt<T, E, S> {
    // Required method
    fn map_into<O: From<E>>(self) -> Result<T, ChiselError<O, S>>;
}
Expand description

Extension trait for ChiselResult

Required Methods§

Source

fn map_into<O: From<E>>(self) -> Result<T, ChiselError<O, S>>

Converts a ChiselResult<T, E, S> into a ChiselResult<T, O, S>, where O : From<E>.

This is a shorthand for self.map_err(|x| x.map_into())

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.

Implementations on Foreign Types§

Source§

impl<T, E, S> ChiselResultExt<T, E, S> for Result<T, ChiselError<E, S>>

Source§

fn map_into<O: From<E>>(self) -> Result<T, ChiselError<O, S>>

Implementors§