Trait tc_transact::Transaction
source · pub trait Transaction<FE>: Clone + Sized + Send + Sync + 'static {
// Required methods
fn id(&self) -> &TxnId;
fn context(&self) -> &DirLock<FE>;
fn subcontext<'life0, 'async_trait>(
&'life0 self,
id: Id
) -> Pin<Box<dyn Future<Output = TCResult<Self>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn subcontext_unique<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = TCResult<Self>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Common transaction context properties.
Required Methods§
sourcefn context(&self) -> &DirLock<FE>
fn context(&self) -> &DirLock<FE>
Allows locking the filesystem directory of this transaction context, e.g. to cache un-committed state or to compute an intermediate result.
Object Safety§
This trait is not object safe.