pub trait BitswapStore<P>:
Send
+ Sync
+ 'staticwhere
P: StoreParams,{
// Required methods
fn contains(
&self,
cid: &Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>,
) -> bool;
fn get(
&self,
cid: &Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>,
) -> Option<Vec<u8>>;
fn insert(
&self,
cid: Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>,
data: Vec<u8>,
);
}
Expand description
Bitswap store abstraction.
Required Methods§
Sourcefn contains(
&self,
cid: &Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>,
) -> bool
fn contains( &self, cid: &Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>, ) -> bool
Does the store contain a cid. Used for replying to have requests.