PersistentStore

Trait PersistentStore 

Source
pub trait PersistentStore: Blockstore {
    // Required method
    fn put_keyed_persistent(&self, k: &Cid, block: &[u8]) -> Result<()>;
}
Expand description

A trait that allows for storing data that is not garbage collected.

Required Methods§

Source

fn put_keyed_persistent(&self, k: &Cid, block: &[u8]) -> Result<()>

Puts a keyed block with pre-computed CID into the database.

§Arguments
  • k - The key to be stored.
  • block - The block to be stored.

Implementations on Foreign Types§

Source§

impl PersistentStore for MemoryBlockstore

Source§

fn put_keyed_persistent(&self, k: &Cid, block: &[u8]) -> Result<()>

Source§

impl<T: PersistentStore> PersistentStore for &Arc<T>

Source§

fn put_keyed_persistent(&self, k: &Cid, block: &[u8]) -> Result<()>

Source§

impl<T: PersistentStore> PersistentStore for Arc<T>

Source§

fn put_keyed_persistent(&self, k: &Cid, block: &[u8]) -> Result<()>

Implementors§