Type Alias MemoryStorage

Source
pub type MemoryStorage = RwLock<HashMap<BlockReference, Vec<u8>>>;

Aliased Type§

pub struct MemoryStorage { /* private fields */ }

Trait Implementations§

Source§

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

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,