[−][src]Struct ghetto_lock::Guard
Lock guard returned after successfully acquiring a lock.
The lock is automatically released when the Guard
is dropped.
Note: The PartialEq
impl only exists to make error handling simple.
Guard
s should never be compared. It always returns false
.
Methods
impl<'a, 'b> Guard<'a, 'b>
[src]
pub unsafe fn try_release(self) -> Result<bool, LockError>
[src]
Releases the lock by deleting the key in memcache. This function is NOT safe as of now because the operations used are not atomic. The CAS command required to safely release the lock is not implemented by the memcache library yet.
Returns Ok(true)
when the lock is successfully released.
Trait Implementations
impl<'l, 'b> Debug for Guard<'l, 'b>
[src]
impl<'a, 'b> Drop for Guard<'a, 'b>
[src]
impl<'l, 'b> PartialEq<Guard<'l, 'b>> for Guard<'l, 'b>
[src]
Auto Trait Implementations
impl<'l, 'b> RefUnwindSafe for Guard<'l, 'b>
impl<'l, 'b> Send for Guard<'l, 'b>
impl<'l, 'b> Sync for Guard<'l, 'b>
impl<'l, 'b> Unpin for Guard<'l, 'b> where
'b: 'l,
'b: 'l,
impl<'l, 'b> !UnwindSafe for Guard<'l, 'b>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,