Trait BlockStorage

Source
pub trait BlockStorage<const BS: usize> {
    // Required methods
    fn store<'life0, 'life1, 'async_trait>(
        &'life0 self,
        block: &'life1 Block<BS>,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn fetch<'life0, 'life1, 'async_trait>(
        &'life0 self,
        reference: &'life1 BlockReference,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Block<BS>>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

Source

fn store<'life0, 'life1, 'async_trait>( &'life0 self, block: &'life1 Block<BS>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn fetch<'life0, 'life1, 'async_trait>( &'life0 self, reference: &'life1 BlockReference, ) -> Pin<Box<dyn Future<Output = Result<Option<Block<BS>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§

Source§

impl<const BS: usize> BlockStorage<BS> for MemoryStorage