ReadLockMethod

Trait ReadLockMethod 

Source
pub trait ReadLockMethod {
    // Required method
    fn read<'a, V>(
        &self,
        rwlock: &'a RwLock<RawRwLock, V>,
    ) -> Option<RwLockReadGuard<'a, RawRwLock, V>>;
}
Expand description

Trait for implementing read flavors on RwLocks.

Required Methods§

Source

fn read<'a, V>( &self, rwlock: &'a RwLock<RawRwLock, V>, ) -> Option<RwLockReadGuard<'a, RawRwLock, V>>

Obtain a read lock. Blocking locks are infallible and always return a ‘Some()’ variant.

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§