MapGuard

Trait MapGuard 

Source
pub trait MapGuard<'a, G, R1, R2: 'a> {
    // Required methods
    fn map_guard(self, map: impl FnOnce(R1) -> R2) -> MappedGuard<G, R2>;
    fn maybe_map_guard(
        self,
        maybe_map: impl FnOnce(R1) -> Option<R2>,
    ) -> Option<MappedGuard<G, R2>>;
}

Required Methods§

Source

fn map_guard(self, map: impl FnOnce(R1) -> R2) -> MappedGuard<G, R2>

Source

fn maybe_map_guard( self, maybe_map: impl FnOnce(R1) -> Option<R2>, ) -> Option<MappedGuard<G, R2>>

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<'a, G: BoxedMapped + 'a, R: 'a> MapGuard<'a, Box<G>, &'a G, R> for G