Trait tc_transact::fs::File[][src]

pub trait File: Store + Sized {
    type Block: BlockData;
#[must_use]    fn block_exists<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        txn_id: &'life1 TxnId,
        name: &'life2 BlockId
    ) -> Pin<Box<dyn Future<Output = TCResult<bool>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn create_block<'life0, 'async_trait>(
        &'life0 self,
        txn_id: TxnId,
        name: BlockId,
        initial_value: Self::Block
    ) -> Pin<Box<dyn Future<Output = TCResult<BlockOwned<Self>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn get_block<'a, 'async_trait>(
        &'a self,
        txn_id: &'a TxnId,
        name: &'a BlockId
    ) -> Pin<Box<dyn Future<Output = TCResult<Block<'a, Self>>> + Send + 'async_trait>>
    where
        'a: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn get_block_mut<'a, 'async_trait>(
        &'a self,
        txn_id: &'a TxnId,
        name: &'a BlockId
    ) -> Pin<Box<dyn Future<Output = TCResult<BlockMut<'a, Self>>> + Send + 'async_trait>>
    where
        'a: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn get_block_owned<'async_trait>(
        self,
        txn_id: TxnId,
        name: BlockId
    ) -> Pin<Box<dyn Future<Output = TCResult<BlockOwned<Self>>> + Send + 'async_trait>>
    where
        Self: 'async_trait
;
#[must_use] fn get_block_owned_mut<'async_trait>(
        self,
        txn_id: TxnId,
        name: BlockId
    ) -> Pin<Box<dyn Future<Output = TCResult<BlockOwnedMut<Self>>> + Send + 'async_trait>>
    where
        Self: 'async_trait
; }

A transactional file.

Associated Types

type Block: BlockData[src]

The type of block which this file is divided into.

Loading content...

Required methods

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

Return true if this file contains the given BlockId as of the given TxnId.

#[must_use]fn create_block<'life0, 'async_trait>(
    &'life0 self,
    txn_id: TxnId,
    name: BlockId,
    initial_value: Self::Block
) -> Pin<Box<dyn Future<Output = TCResult<BlockOwned<Self>>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Create a new Self::Block.

#[must_use]fn get_block<'a, 'async_trait>(
    &'a self,
    txn_id: &'a TxnId,
    name: &'a BlockId
) -> Pin<Box<dyn Future<Output = TCResult<Block<'a, Self>>> + Send + 'async_trait>> where
    'a: 'async_trait,
    Self: 'async_trait, 
[src]

Get the data in block name as of TxnId.

#[must_use]fn get_block_mut<'a, 'async_trait>(
    &'a self,
    txn_id: &'a TxnId,
    name: &'a BlockId
) -> Pin<Box<dyn Future<Output = TCResult<BlockMut<'a, Self>>> + Send + 'async_trait>> where
    'a: 'async_trait,
    Self: 'async_trait, 
[src]

Get a mutable lock on the data in block name as of TxnId.

#[must_use]fn get_block_owned<'async_trait>(
    self,
    txn_id: TxnId,
    name: BlockId
) -> Pin<Box<dyn Future<Output = TCResult<BlockOwned<Self>>> + Send + 'async_trait>> where
    Self: 'async_trait, 
[src]

Get the data in block name at TxnId without borrowing.

#[must_use]fn get_block_owned_mut<'async_trait>(
    self,
    txn_id: TxnId,
    name: BlockId
) -> Pin<Box<dyn Future<Output = TCResult<BlockOwnedMut<Self>>> + Send + 'async_trait>> where
    Self: 'async_trait, 
[src]

Get a mutable lock on the data in block name at TxnId without borrowing.

Loading content...

Implementors

Loading content...