Trait tinychain::chain::ChainInstance[][src]

pub trait ChainInstance {
#[must_use]    fn append<'life0, 'async_trait>(
        &'life0 self,
        txn_id: TxnId,
        path: TCPathBuf,
        key: Value,
        value: Scalar
    ) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn last_commit<'life0, 'life1, 'async_trait>(
        &'life0 self,
        txn_id: &'life1 TxnId
    ) -> Pin<Box<dyn Future<Output = TCResult<Option<TxnId>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn subject(&self) -> &Subject;
#[must_use] fn replicate<'life0, 'life1, 'async_trait>(
        &'life0 self,
        txn: &'life1 Txn,
        source: Link
    ) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; }

Trait defining methods common to any instance of a Chain, such as a SyncChain.

Required methods

#[must_use]fn append<'life0, 'async_trait>(
    &'life0 self,
    txn_id: TxnId,
    path: TCPathBuf,
    key: Value,
    value: Scalar
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Append the given PUT op to the latest block in this Chain.

#[must_use]fn last_commit<'life0, 'life1, 'async_trait>(
    &'life0 self,
    txn_id: &'life1 TxnId
) -> Pin<Box<dyn Future<Output = TCResult<Option<TxnId>>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

fn subject(&self) -> &Subject[src]

Borrow the Subject of this Chain immutably.

#[must_use]fn replicate<'life0, 'life1, 'async_trait>(
    &'life0 self,
    txn: &'life1 Txn,
    source: Link
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Replicate this Chain from the Chain at the given Link.

Loading content...

Implementors

impl ChainInstance for Chain[src]

impl ChainInstance for BlockChain[src]

impl ChainInstance for SyncChain[src]

Loading content...