naga::span

Trait MapErrWithSpan

Source
pub(crate) trait MapErrWithSpan<E, E2>: Sized {
    type Output: Sized;

    // Required method
    fn map_err_inner<F, E3>(self, func: F) -> Self::Output
       where F: FnOnce(E) -> WithSpan<E3>,
             E2: From<E3>;
}
Expand description

Convenience trait for Result, adding a MapErrWithSpan::map_err_inner mapping to WithSpan::and_then.

Required Associated Types§

Source

type Output: Sized

The returned output type.

Required Methods§

Source

fn map_err_inner<F, E3>(self, func: F) -> Self::Output
where F: FnOnce(E) -> WithSpan<E3>, E2: From<E3>,

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, E2> MapErrWithSpan<E, E2> for Result<T, WithSpan<E>>

Source§

type Output = Result<T, WithSpan<E2>>

Source§

fn map_err_inner<F, E3>(self, func: F) -> Result<T, WithSpan<E2>>
where F: FnOnce(E) -> WithSpan<E3>, E2: From<E3>,

Implementors§