Struct namedlock::LockSpaceGuard [] [src]

pub struct LockSpaceGuard<'a, K: 'a + Eq + Hash + Clone, V: 'a> {
    // some fields omitted
}

An RAII implementation of a "scoped lock" of a a LockSpace value. When this structure is dropped (falls out of scope), the lock will be unlocked, and the reference count to the key will be decreased by 1.

The actual value can be accessed through this guard via its Deref and DerefMut implementations.

Trait Implementations

impl<'a, K: Eq + Hash + Clone, V: 'a> Deref for LockSpaceGuard<'a, K, V>

type Target = V

fn deref<'b>(&'b self) -> &'b V

impl<'a, K: Eq + Hash + Clone, V: 'a> DerefMut for LockSpaceGuard<'a, K, V>

fn deref_mut<'b>(&'b mut self) -> &'b mut V

impl<'a, K: Eq + Hash + Clone, V: 'a> Drop for LockSpaceGuard<'a, K, V>

fn drop(&mut self)