Skip to main content

OrElseHelper

Trait OrElseHelper 

Source
pub trait OrElseHelper<'db>: Sized {
    // Required method
    fn map_because(
        self,
        f: impl 'db + Clone + Fn(Because<'db>) -> Because<'db>,
    ) -> impl OrElse<'db>;
}

Required Methods§

Source

fn map_because( self, f: impl 'db + Clone + Fn(Because<'db>) -> Because<'db>, ) -> impl OrElse<'db>

Create a new OrElse that just maps the Because value and propagates to an underlying or-else. This is used when an operating like subtyping delegates to sub-operations: the suboperation will provide a Because value and then the subtyping can provide additional context, but the high-level ‘or-else’ is left unchanged.

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.

Implementors§

Source§

impl<'db> OrElseHelper<'db> for &dyn OrElse<'db>