Trait ReadonlyCache

Source
pub trait ReadonlyCache<C, T>
where C: Decoder + Clone + Send + Sync, T: Decode<<C as Decoder>::Codec> + Clone + Send + Sync,
{ // Required method fn get<'life0, 'life1, 'async_trait>( &'life0 self, cid: &'life1 Cid, ) -> Pin<Box<dyn Future<Output = Result<T>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; }
Expand description

Readonly cache trait.

Required Methods§

Source

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

Returns a decoded block.

Implementors§

Source§

impl<S: ReadonlyStore + Send + Sync, C, T> ReadonlyCache<C, T> for IpldCache<S, C, T>
where C: Decoder + Clone + Send + Sync, T: Decode<<C as Decoder>::Codec> + Clone + Send + Sync,