Guard

Trait Guard 

Source
pub trait Guard<K>: Debug
where K: Eq + PartialEq + Hash + Clone + Debug,
{ // Required method fn key(&self) -> &K; }
Expand description

A RAII implementation of a scoped lock for locks from a [LockPool]. When this instance is dropped (falls out of scope), the lock will be unlocked.

Required Methods§

Source

fn key(&self) -> &K

Returns the key locked by this guard

Implementors§