InfalliableFormatResultExt

Trait InfalliableFormatResultExt 

Source
pub trait InfalliableFormatResultExt<T, S> {
    // Required method
    fn forward<F>(self) -> Result<T, ChiselError<F, S>>;
}
Expand description

Extension trait for InfallibleFormatResult.

Required Methods§

Source

fn forward<F>(self) -> Result<T, ChiselError<F, S>>

Converts an InfallibleFormatResult into an arbitrary-format ChiselResult.

This is basically a small hack to allow easy error propagation, as ChiselError<F, S> cannot implement From<ChiselError<Infallible, S>>.

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, S> InfalliableFormatResultExt<T, S> for Result<T, ChiselError<Infallible, S>>

Source§

fn forward<F>(self) -> Result<T, ChiselError<F, S>>

Implementors§