A lock-guard.
struct LockGuard<'a> {
/* private fields */
}| Receiver | Name | Description |
|---|---|---|
&self | as_lock | Returns the lock guarded by this guard. |
self | unlock | Unlocks the lock and returns a reference to the lock. |
| Name | Description |
|---|---|
| Drop | Objects with a destructor. |
This guard automatically unlocks the lock when it goes out of scope.