pub trait Guard<'a, T>: Deref<Target = T>where
T: ?Sized,{
type Mapped<U: 'a + ?Sized>;
// Required method
fn guard_map<U, F>(self, f: F) -> Self::Mapped<U>
where F: FnOnce(&T) -> &U,
U: 'a + ?Sized;
}Required Associated Types§
Required Methods§
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, T> Guard<'a, T> for MappedRwLockReadGuard<'a, T>
Available on crate feature std only.
impl<'a, T> Guard<'a, T> for MappedRwLockReadGuard<'a, T>
Available on crate feature
std only.Source§impl<'a, T> Guard<'a, T> for RwLockReadGuard<'a, T>where
T: ?Sized,
Available on crate feature std only.
impl<'a, T> Guard<'a, T> for RwLockReadGuard<'a, T>where
T: ?Sized,
Available on crate feature
std only.Source§impl<'a, T> Guard<'a, T> for RwLockWriteGuard<'a, T>where
T: ?Sized,
Available on crate feature std only.
impl<'a, T> Guard<'a, T> for RwLockWriteGuard<'a, T>where
T: ?Sized,
Available on crate feature
std only.