Trait ipfs_embed_net::BitswapStore [−][src]
Trait implemented by a block store.
Associated Types
type Params: StoreParams
[src]
The store params.
Required methods
pub fn contains(
&mut self,
cid: &Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>
) -> Result<bool, Error>
[src]
&mut self,
cid: &Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>
) -> Result<bool, Error>
A have query needs to know if the block store contains the block.
pub fn get(
&mut self,
cid: &Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>
) -> Result<Option<Vec<u8, Global>>, Error>
[src]
&mut self,
cid: &Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>
) -> Result<Option<Vec<u8, Global>>, Error>
A block query needs to retrieve the block from the store.
pub fn insert(&mut self, block: &Block<Self::Params>) -> Result<(), Error>
[src]
A block response needs to insert the block into the store.
pub fn missing_blocks(
&mut self,
cid: &Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>
) -> Result<Vec<Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>, Global>, Error>
[src]
&mut self,
cid: &Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>
) -> Result<Vec<Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>, Global>, Error>
A sync query needs a list of missing blocks to make progress.