Trait MapImmutable

Source
pub trait MapImmutable<'a, R: RawMutex, T: ?Sized> {
    // Required method
    fn map_immutable<U: ?Sized, F>(
        s: Self,
        f: F,
    ) -> ImmutableMappedMutexGuard<'a, R, U>
       where F: FnOnce(&T) -> &U;
}

Required Methods§

Source

fn map_immutable<U: ?Sized, F>( s: Self, f: F, ) -> ImmutableMappedMutexGuard<'a, R, U>
where F: FnOnce(&T) -> &U,

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<'a, R: RawMutex, T: ?Sized> MapImmutable<'a, R, T> for MutexGuard<'a, R, T>

Source§

fn map_immutable<U: ?Sized, F>( s: Self, f: F, ) -> ImmutableMappedMutexGuard<'a, R, U>
where F: FnOnce(&T) -> &U,

Implementors§