Trait mutex_trait::Mutex
source · pub trait Mutex {
type Data;
// Required method
fn lock<R>(&mut self, f: impl FnOnce(&mut Self::Data) -> R) -> R;
}
Expand description
Any object implementing this trait guarantees exclusive access to the data contained within the mutex for the duration of the lock.
Required Associated Types§
Required Methods§
Object Safety§
This trait is not object safe.