pub trait LockMap<T: ?Sized> {
fn map<F, R>(&mut self, f: F) -> R
where
F: FnOnce(&mut Self) -> R,
{ ... }
}Expand description
A simple trait to map the return value of a Mutex in a nice little closure
pub trait LockMap<T: ?Sized> {
fn map<F, R>(&mut self, f: F) -> R
where
F: FnOnce(&mut Self) -> R,
{ ... }
}A simple trait to map the return value of a Mutex in a nice little closure