pub trait FileWrite<B: BlockData>: FileRead<B> {
    fn downgrade(self) -> <Self::File as File<B>>::ReadExclusive;
    fn create_block<'life0, 'async_trait>(
        &'life0 mut self,
        name: BlockId,
        initial_value: B,
        size_hint: usize
    ) -> Pin<Box<dyn Future<Output = TCResult<<Self::File as File<B>>::BlockWrite>> + Send + 'async_trait>>
   where
        'life0: 'async_trait,
        Self: 'async_trait
; fn create_block_unique<'life0, 'async_trait>(
        &'life0 mut self,
        initial_value: B,
        size_hint: usize
    ) -> Pin<Box<dyn Future<Output = TCResult<(BlockId, <Self::File as File<B>>::BlockWrite)>> + Send + 'async_trait>>
   where
        'life0: 'async_trait,
        Self: 'async_trait
; fn delete_block<'life0, 'async_trait>(
        &'life0 mut self,
        name: BlockId
    ) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>>
   where
        'life0: 'async_trait,
        Self: 'async_trait
; fn copy_from<'life0, 'life1, 'async_trait, O>(
        &'life0 mut self,
        other: &'life1 O,
        truncate: bool
    ) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>>
   where
        O: 'async_trait + FileRead<B>,
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; fn truncate<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>>
   where
        'life0: 'async_trait,
        Self: 'async_trait
; }
Expand description

A write lock on a File

Required Methods

Downgrade this write lock to an exclusive read lock.

Create a new block.

Create a new block.

Delete the block with the given ID.

Delete all of this File’s blocks.

Delete all of this File’s blocks.

Implementors