Struct tc_transact::lock::TxnLock[][src]

pub struct TxnLock<T: Mutate> { /* fields omitted */ }

A lock which provides transaction-specific versions of the locked state.

Implementations

impl<T: Mutate> TxnLock<T>[src]

pub fn new<I: Display>(name: I, value: T) -> TxnLock<T>[src]

Create a new lock.

pub fn try_read(&self, txn_id: &TxnId) -> TCResult<Option<TxnLockReadGuard<T>>>[src]

Try to acquire a read lock synchronously.

pub fn read<'a>(&self, txn_id: &'a TxnId) -> TxnLockReadFuture<'a, T>

Notable traits for TxnLockReadFuture<'a, T>

impl<'a, T: Mutate> Future for TxnLockReadFuture<'a, T> type Output = TCResult<TxnLockReadGuard<T>>;
[src]

Lock this state for reading at the given TxnId.

pub fn try_write(
    &self,
    txn_id: &TxnId
) -> TCResult<Option<TxnLockWriteGuard<T>>>
[src]

Try to acquire a write lock, synchronously.

pub fn write(&self, txn_id: TxnId) -> TxnLockWriteFuture<T>

Notable traits for TxnLockWriteFuture<T>

impl<T: Mutate> Future for TxnLockWriteFuture<T> type Output = TCResult<TxnLockWriteGuard<T>>;
[src]

Lock this state for writing at the given TxnId.

Trait Implementations

impl<T: Mutate> Clone for TxnLock<T>[src]

impl<T: Mutate> Transact for TxnLock<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for TxnLock<T>

impl<T> Send for TxnLock<T>

impl<T> Sync for TxnLock<T>

impl<T> Unpin for TxnLock<T>

impl<T> UnwindSafe for TxnLock<T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<F, T> CastFrom<F> for T where
    T: From<F>, 

impl<T, F> CastInto<F> for T where
    F: CastFrom<T>, 

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<F> Match for F

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<F, T> TryCastFrom<F> for T where
    T: CastFrom<F>, 

impl<F, T> TryCastInto<T> for F where
    T: TryCastFrom<F>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,