pub trait LockValue<T> {
// Required method
fn with_value<F, R>(&self, f: F) -> Option<R>
where F: FnOnce(&T) -> R;
}Expand description
Helper trait for lock-aware value extraction.
This trait enables querying locked data without cloning.
Required Methods§
Sourcefn with_value<F, R>(&self, f: F) -> Option<R>
fn with_value<F, R>(&self, f: F) -> Option<R>
Execute a function with access to the inner value.
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.