pub trait WithSharedInner<T> {
// Required methods
fn with_inner<F, R>(&self, func: F) -> Option<R>
where F: FnOnce(&mut T) -> R;
fn try_with_inner<F, R>(&self, func: F) -> Option<R>
where F: FnOnce(&mut T) -> R;
}Required Methods§
Sourcefn with_inner<F, R>(&self, func: F) -> Option<R>
fn with_inner<F, R>(&self, func: F) -> Option<R>
Waits for the lock to become available and then calls the closure
Sourcefn try_with_inner<F, R>(&self, func: F) -> Option<R>
fn try_with_inner<F, R>(&self, func: F) -> Option<R>
Immediately locks the mutex and calls the closure
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".