[−][src]Trait ipfs_embed::ReadonlyStore
Implementable by ipld storage providers.
Required methods
fn get(
&'a self,
cid: &'a CidGeneric<Codec, Code>
) -> Pin<Box<dyn Future<Output = Result<Box<[u8]>, StoreError>> + 'a + Send>>
&'a self,
cid: &'a CidGeneric<Codec, Code>
) -> Pin<Box<dyn Future<Output = Result<Box<[u8]>, StoreError>> + 'a + Send>>
Returns a block from the store. If the block is not in the store it fetches it from the network and pins the block. This future should be wrapped in a timeout. Dropping the future cancels the request.
Implementations on Foreign Types
impl ReadonlyStore for MemStore
[src]
fn get(
&'a self,
cid: &'a CidGeneric<Codec, Code>
) -> Pin<Box<dyn Future<Output = Result<Box<[u8]>, StoreError>> + 'a + Send>>
[src]
&'a self,
cid: &'a CidGeneric<Codec, Code>
) -> Pin<Box<dyn Future<Output = Result<Box<[u8]>, StoreError>> + 'a + Send>>