[][src]Trait libipld::store::Store

pub trait Store: ReadonlyStore {
    fn insert<'a>(
        &'a self,
        cid: &'a Cid,
        data: Box<[u8]>,
        visibility: Visibility
    ) -> StoreResult<'a, ()>;
fn flush(&self) -> StoreResult<()>;
fn unpin<'a>(&'a self, cid: &'a Cid) -> StoreResult<'a, ()>; }

Implementable by ipld storage backends.

Required methods

fn insert<'a>(
    &'a self,
    cid: &'a Cid,
    data: Box<[u8]>,
    visibility: Visibility
) -> StoreResult<'a, ()>

Inserts and pins a block into the store and announces the block if it is visible.

fn flush(&self) -> StoreResult<()>

Flushes the write buffer.

fn unpin<'a>(&'a self, cid: &'a Cid) -> StoreResult<'a, ()>

Marks a block ready for garbage collection.

Loading content...

Implementors

impl Store for MemStore[src]

Loading content...