LockAware

Trait LockAware 

Source
pub trait LockAware {
    // Required methods
    fn with_read_lock<F, R>(&self, timeout_secs: u64, operation: F) -> Result<R>
       where F: FnOnce() -> Result<R>;
    fn with_write_lock<F, R>(
        &self,
        timeout_secs: u64,
        operation: F,
    ) -> Result<R>
       where F: FnOnce() -> Result<R>;
}
Expand description

Helper trait for lock-aware operations

Required Methods§

Source

fn with_read_lock<F, R>(&self, timeout_secs: u64, operation: F) -> Result<R>
where F: FnOnce() -> Result<R>,

Source

fn with_write_lock<F, R>(&self, timeout_secs: u64, operation: F) -> Result<R>
where F: FnOnce() -> Result<R>,

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.

Implementors§