Struct pairlock::UpdateGuard[][src]

pub struct UpdateGuard<'a, T: 'a> { /* fields omitted */ }

A RAII guard providing mutable access to the inactive value of a PairLock, The values becomes active when the guard is dropped.

Methods

impl<'a, T> UpdateGuard<'a, T>
[src]

Returns a shared reference to the active value of the PairLock.

It can not be mutate it while the PairLock is locked, and is therefore safe to read.

Returns references to both the inactive (mutable) and active value of the PairLock.

Aborts the update by releasing the lock without making the mutable value active.

Any changes made to the inactive value will however be visible to the next .update() or .replace().

Trait Implementations

impl<'a, T> Drop for UpdateGuard<'a, T>
[src]

Makes the value active and releases the update lock

impl<'a, T> Deref for UpdateGuard<'a, T>
[src]

The resulting type after dereferencing.

Dereferences the value.

impl<'a, T> DerefMut for UpdateGuard<'a, T>
[src]

Mutably dereferences the value.

impl<'a, T: Debug> Debug for UpdateGuard<'a, T>
[src]

Formats the value using the given formatter. Read more

impl<'a, T> PartialEq for UpdateGuard<'a, T>
[src]

Convenience impl for comparing Results containing this type.

Only compares equal against itself (ptr::eq(self, other)).

This method tests for !=.

Auto Trait Implementations

impl<'a, T> !Send for UpdateGuard<'a, T>

impl<'a, T> Sync for UpdateGuard<'a, T> where
    T: Send + Sync