Skip to main content

ExtendedBlockStorage

Trait ExtendedBlockStorage 

Source
pub trait ExtendedBlockStorage: BlockStorage {
    // Required methods
    fn set_extended<'life0, 'async_trait>(
        &'life0 self,
        block: ExtendedBlock,
    ) -> Pin<Box<dyn Future<Output = Result<Cid, StorageError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn exists<'life0, 'life1, 'async_trait>(
        &'life0 self,
        cid: &'life1 Cid,
    ) -> Pin<Box<dyn Future<Output = Result<bool, StorageError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn clear<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn set_extended<'life0, 'async_trait>( &'life0 self, block: ExtendedBlock, ) -> Pin<Box<dyn Future<Output = Result<Cid, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Inserts a block into storage.

Source

fn exists<'life0, 'life1, 'async_trait>( &'life0 self, cid: &'life1 Cid, ) -> Pin<Box<dyn Future<Output = Result<bool, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Test if a Cid exists.

Note: This is an local operation and will not fetch from network.

Source

fn clear<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Clear the storage by removing all entries.

Implementors§