Skip to main content

BlockstoreReadCache

Trait BlockstoreReadCache 

Source
pub trait BlockstoreReadCache {
    // Required methods
    fn get(&self, k: &Cid) -> Option<Vec<u8>>;
    fn put(&self, k: Cid, block: Vec<u8>);
}

Required Methods§

Source

fn get(&self, k: &Cid) -> Option<Vec<u8>>

Source

fn put(&self, k: Cid, block: Vec<u8>)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'a, T: 'a + BlockstoreReadCache + ?Sized> BlockstoreReadCache for &'a T

Source§

fn get(&self, k: &Cid) -> Option<Vec<u8>>

Source§

fn put(&self, k: Cid, block: Vec<u8>)

Implementors§