Struct tc_transact::lock::TxnLock [−][src]
pub struct TxnLock<T: Mutate> { /* fields omitted */ }
Expand description
A lock which provides transaction-specific versions of the locked state.
Implementations
impl<T: Mutate> TxnLock<T>
[src]
impl<T: Mutate> TxnLock<T>
[src]pub fn try_read(&self, txn_id: &TxnId) -> TCResult<Option<TxnLockReadGuard<T>>>
[src]
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]
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]
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]
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
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> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T, F> CastInto<F> for T where
F: CastFrom<T>,
impl<T, F> CastInto<F> for T where
F: CastFrom<T>,
pub fn cast_into(self) -> F
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<F, T> TryCastFrom<F> for T where
T: CastFrom<F>,
impl<F, T> TryCastFrom<F> for T where
T: CastFrom<F>,
pub fn can_cast_from(&F) -> bool
pub fn can_cast_from(&F) -> bool
Test if value
can be cast into Self
.
pub fn opt_cast_from(f: F) -> Option<T>
pub fn opt_cast_from(f: F) -> Option<T>
Returns Some(Self)
if the source value can be cast into Self
, otherwise None
.
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
impl<F, T> TryCastInto<T> for F where
T: TryCastFrom<F>,
impl<F, T> TryCastInto<T> for F where
T: TryCastFrom<F>,
pub fn can_cast_into(&self) -> bool
pub fn can_cast_into(&self) -> bool
Test if self
can be cast into T
.
pub fn opt_cast_into(self) -> Option<T>
pub fn opt_cast_into(self) -> Option<T>
Returns Some(T)
if self
can be cast into T
, otherwise None
.
fn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err> where
OnErr: FnOnce(&Self) -> Err,
fn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err> where
OnErr: FnOnce(&Self) -> Err,
Returns Ok(T)
if self
can be cast into T
, otherwise calls on_err
.
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,