pub trait Blocks: Send + Sync {
// Required methods
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
cid: &'life1 Cid,
options: Option<GetBlockOptions>,
) -> Pin<Box<dyn Future<Output = Result<Bytes, HeliaError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_many_cids<'life0, 'async_trait>(
&'life0 self,
cids: Vec<Cid>,
options: Option<GetManyOptions>,
) -> Pin<Box<dyn Future<Output = Result<AwaitIterable<Result<Pair, HeliaError>>, HeliaError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_all<'life0, 'async_trait>(
&'life0 self,
options: Option<GetAllOptions>,
) -> Pin<Box<dyn Future<Output = Result<AwaitIterable<Pair>, HeliaError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn put<'life0, 'life1, 'async_trait>(
&'life0 self,
cid: &'life1 Cid,
block: Bytes,
options: Option<PutBlockOptions>,
) -> Pin<Box<dyn Future<Output = Result<Cid, HeliaError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn put_many_blocks<'life0, 'async_trait>(
&'life0 self,
blocks: Vec<InputPair>,
options: Option<PutManyOptions>,
) -> Pin<Box<dyn Future<Output = Result<AwaitIterable<Cid>, HeliaError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn has<'life0, 'life1, 'async_trait>(
&'life0 self,
cid: &'life1 Cid,
options: Option<HasOptions>,
) -> Pin<Box<dyn Future<Output = Result<bool, HeliaError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn has_many_cids<'life0, 'async_trait>(
&'life0 self,
cids: Vec<Cid>,
options: Option<HasOptions>,
) -> Pin<Box<dyn Future<Output = Result<AwaitIterable<bool>, HeliaError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete_many_cids<'life0, 'async_trait>(
&'life0 self,
cids: Vec<Cid>,
options: Option<DeleteManyOptions>,
) -> Pin<Box<dyn Future<Output = Result<AwaitIterable<Cid>, HeliaError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Block storage interface
Required Methods§
Sourcefn get<'life0, 'life1, 'async_trait>(
&'life0 self,
cid: &'life1 Cid,
options: Option<GetBlockOptions>,
) -> Pin<Box<dyn Future<Output = Result<Bytes, HeliaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
cid: &'life1 Cid,
options: Option<GetBlockOptions>,
) -> Pin<Box<dyn Future<Output = Result<Bytes, HeliaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Retrieve a block from the blockstore
Sourcefn get_many_cids<'life0, 'async_trait>(
&'life0 self,
cids: Vec<Cid>,
options: Option<GetManyOptions>,
) -> Pin<Box<dyn Future<Output = Result<AwaitIterable<Result<Pair, HeliaError>>, HeliaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_many_cids<'life0, 'async_trait>(
&'life0 self,
cids: Vec<Cid>,
options: Option<GetManyOptions>,
) -> Pin<Box<dyn Future<Output = Result<AwaitIterable<Result<Pair, HeliaError>>, HeliaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieve multiple blocks from the blockstore
Sourcefn get_all<'life0, 'async_trait>(
&'life0 self,
options: Option<GetAllOptions>,
) -> Pin<Box<dyn Future<Output = Result<AwaitIterable<Pair>, HeliaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_all<'life0, 'async_trait>(
&'life0 self,
options: Option<GetAllOptions>,
) -> Pin<Box<dyn Future<Output = Result<AwaitIterable<Pair>, HeliaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieve all blocks from the blockstore
Sourcefn put<'life0, 'life1, 'async_trait>(
&'life0 self,
cid: &'life1 Cid,
block: Bytes,
options: Option<PutBlockOptions>,
) -> Pin<Box<dyn Future<Output = Result<Cid, HeliaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn put<'life0, 'life1, 'async_trait>(
&'life0 self,
cid: &'life1 Cid,
block: Bytes,
options: Option<PutBlockOptions>,
) -> Pin<Box<dyn Future<Output = Result<Cid, HeliaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Store a block in the blockstore
Sourcefn put_many_blocks<'life0, 'async_trait>(
&'life0 self,
blocks: Vec<InputPair>,
options: Option<PutManyOptions>,
) -> Pin<Box<dyn Future<Output = Result<AwaitIterable<Cid>, HeliaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn put_many_blocks<'life0, 'async_trait>(
&'life0 self,
blocks: Vec<InputPair>,
options: Option<PutManyOptions>,
) -> Pin<Box<dyn Future<Output = Result<AwaitIterable<Cid>, HeliaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Store multiple blocks in the blockstore
Sourcefn has<'life0, 'life1, 'async_trait>(
&'life0 self,
cid: &'life1 Cid,
options: Option<HasOptions>,
) -> Pin<Box<dyn Future<Output = Result<bool, HeliaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn has<'life0, 'life1, 'async_trait>(
&'life0 self,
cid: &'life1 Cid,
options: Option<HasOptions>,
) -> Pin<Box<dyn Future<Output = Result<bool, HeliaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check if blocks exist in the blockstore
Sourcefn has_many_cids<'life0, 'async_trait>(
&'life0 self,
cids: Vec<Cid>,
options: Option<HasOptions>,
) -> Pin<Box<dyn Future<Output = Result<AwaitIterable<bool>, HeliaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn has_many_cids<'life0, 'async_trait>(
&'life0 self,
cids: Vec<Cid>,
options: Option<HasOptions>,
) -> Pin<Box<dyn Future<Output = Result<AwaitIterable<bool>, HeliaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Check if multiple blocks exist in the blockstore
Sourcefn delete_many_cids<'life0, 'async_trait>(
&'life0 self,
cids: Vec<Cid>,
options: Option<DeleteManyOptions>,
) -> Pin<Box<dyn Future<Output = Result<AwaitIterable<Cid>, HeliaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_many_cids<'life0, 'async_trait>(
&'life0 self,
cids: Vec<Cid>,
options: Option<DeleteManyOptions>,
) -> Pin<Box<dyn Future<Output = Result<AwaitIterable<Cid>, HeliaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Delete multiple blocks from the blockstore