Trait tc_transact::fs::File [−][src]
pub trait File<B: BlockData>: Store + Sized + 'static { type Block: Block<B, Self>; #[must_use] fn block_ids<'life0, 'life1, 'async_trait>(
&'life0 self,
txn_id: &'life1 TxnId
) -> Pin<Box<dyn Future<Output = TCResult<HashSet<BlockId>>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait; #[must_use] fn unique_id<'life0, 'life1, 'async_trait>(
&'life0 self,
txn_id: &'life1 TxnId
) -> Pin<Box<dyn Future<Output = TCResult<BlockId>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait; #[must_use] fn contains_block<'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 copy_from<'life0, 'life1, 'async_trait>(
&'life0 self,
other: &'life1 Self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait; #[must_use] fn create_block<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId,
name: BlockId,
initial_value: B
) -> Pin<Box<dyn Future<Output = TCResult<Self::Block>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait; #[must_use] fn delete_block<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId,
name: BlockId
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait; #[must_use] fn get_block<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId,
name: BlockId
) -> Pin<Box<dyn Future<Output = TCResult<Self::Block>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait; #[must_use] fn read_block<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId,
name: BlockId
) -> Pin<Box<dyn Future<Output = TCResult<<Self::Block as Block<B, Self>>::ReadLock>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait; #[must_use] fn read_block_owned<'async_trait>(
self,
txn_id: TxnId,
name: BlockId
) -> Pin<Box<dyn Future<Output = TCResult<<Self::Block as Block<B, Self>>::ReadLock>> + Send + 'async_trait>>
where
Self: 'async_trait; #[must_use] fn write_block<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId,
name: BlockId
) -> Pin<Box<dyn Future<Output = TCResult<<Self::Block as Block<B, Self>>::WriteLock>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait; #[must_use] fn truncate<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait; }
Expand description
A transactional file.
Associated Types
Required methods
#[must_use]fn block_ids<'life0, 'life1, 'async_trait>(
&'life0 self,
txn_id: &'life1 TxnId
) -> Pin<Box<dyn Future<Output = TCResult<HashSet<BlockId>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]fn block_ids<'life0, 'life1, 'async_trait>(
&'life0 self,
txn_id: &'life1 TxnId
) -> Pin<Box<dyn Future<Output = TCResult<HashSet<BlockId>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]Return the IDs of all this `File``’s blocks.
#[must_use]fn unique_id<'life0, 'life1, 'async_trait>(
&'life0 self,
txn_id: &'life1 TxnId
) -> Pin<Box<dyn Future<Output = TCResult<BlockId>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]fn unique_id<'life0, 'life1, 'async_trait>(
&'life0 self,
txn_id: &'life1 TxnId
) -> Pin<Box<dyn Future<Output = TCResult<BlockId>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]Return a new BlockId
which is not used within this File
.
#[must_use]fn contains_block<'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]
#[must_use]fn contains_block<'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]#[must_use]fn copy_from<'life0, 'life1, 'async_trait>(
&'life0 self,
other: &'life1 Self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]fn copy_from<'life0, 'life1, 'async_trait>(
&'life0 self,
other: &'life1 Self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]Copy all blocks from the source File
into this File
.
#[must_use]fn create_block<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId,
name: BlockId,
initial_value: B
) -> Pin<Box<dyn Future<Output = TCResult<Self::Block>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]fn create_block<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId,
name: BlockId,
initial_value: B
) -> Pin<Box<dyn Future<Output = TCResult<Self::Block>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]Create a new Self::Block
.
#[must_use]fn delete_block<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId,
name: BlockId
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]fn delete_block<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId,
name: BlockId
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]Delete the block with the given ID.
#[must_use]fn get_block<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId,
name: BlockId
) -> Pin<Box<dyn Future<Output = TCResult<Self::Block>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]fn get_block<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId,
name: BlockId
) -> Pin<Box<dyn Future<Output = TCResult<Self::Block>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]Return a lockable owned reference to the block at name
.
#[must_use]fn read_block<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId,
name: BlockId
) -> Pin<Box<dyn Future<Output = TCResult<<Self::Block as Block<B, Self>>::ReadLock>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]fn read_block<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId,
name: BlockId
) -> Pin<Box<dyn Future<Output = TCResult<<Self::Block as Block<B, Self>>::ReadLock>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]Get a read lock on the block at name
.
#[must_use]fn read_block_owned<'async_trait>(
self,
txn_id: TxnId,
name: BlockId
) -> Pin<Box<dyn Future<Output = TCResult<<Self::Block as Block<B, Self>>::ReadLock>> + Send + 'async_trait>> where
Self: 'async_trait,
[src]
#[must_use]fn read_block_owned<'async_trait>(
self,
txn_id: TxnId,
name: BlockId
) -> Pin<Box<dyn Future<Output = TCResult<<Self::Block as Block<B, Self>>::ReadLock>> + Send + 'async_trait>> where
Self: 'async_trait,
[src]Get a read lock on the block at name
, without borrowing.
#[must_use]fn write_block<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId,
name: BlockId
) -> Pin<Box<dyn Future<Output = TCResult<<Self::Block as Block<B, Self>>::WriteLock>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]fn write_block<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId,
name: BlockId
) -> Pin<Box<dyn Future<Output = TCResult<<Self::Block as Block<B, Self>>::WriteLock>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]Get a read lock on the block at name
as of TxnId
.