[−][src]Trait libipld::store::Store
Implementable by ipld storage backends.
Required methods
fn insert<'a>(
&'a self,
cid: &'a Cid,
data: Box<[u8]>,
visibility: Visibility
) -> StoreResult<'a, ()>
&'a self,
cid: &'a Cid,
data: Box<[u8]>,
visibility: Visibility
) -> StoreResult<'a, ()>
Inserts and pins block into the store and announces it if it is visible.
fn insert_batch<'a>(
&'a self,
batch: Vec<Block>,
visibility: Visibility
) -> StoreResult<'a, Cid>
&'a self,
batch: Vec<Block>,
visibility: Visibility
) -> StoreResult<'a, Cid>
Inserts a batch of blocks atomically into the store and announces them block if it is visible. The last block is pinned.
fn flush(&self) -> StoreResult<()>
Flushes the write buffer.
fn unpin<'a>(&'a self, cid: &'a Cid) -> StoreResult<'a, ()>
Decreases the ref count on a cid.
Implementors
impl Store for MemStore
[src]
fn insert<'a>(
&'a self,
cid: &'a Cid,
data: Box<[u8]>,
_visibility: Visibility
) -> StoreResult<'a, ()>
[src]
&'a self,
cid: &'a Cid,
data: Box<[u8]>,
_visibility: Visibility
) -> StoreResult<'a, ()>
fn insert_batch<'a>(
&'a self,
batch: Vec<Block>,
_visibility: Visibility
) -> StoreResult<'a, Cid>
[src]
&'a self,
batch: Vec<Block>,
_visibility: Visibility
) -> StoreResult<'a, Cid>