pub trait EasyAccessMutex<T> {
// Required methods
fn get(&self) -> MutexGuard<'_, T>;
fn with<F, R>(&self, f: F) -> R
where F: FnOnce(&mut T) -> R;
}
Required Methods§
Sourcefn get(&self) -> MutexGuard<'_, T>
fn get(&self) -> MutexGuard<'_, T>
Get a reference to the value inside the mutex.
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.