pub struct HttpBlocks { /* private fields */ }Implementations§
Source§impl HttpBlocks
impl HttpBlocks
pub fn new(config: GatewayConfig) -> Self
Trait Implementations§
Source§impl Blocks for HttpBlocks
impl Blocks for HttpBlocks
Source§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<'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
Source§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_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
Source§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 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
Source§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<'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
Source§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 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
Source§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<'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
Source§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 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
Source§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,
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
Auto Trait Implementations§
impl Freeze for HttpBlocks
impl !RefUnwindSafe for HttpBlocks
impl Send for HttpBlocks
impl Sync for HttpBlocks
impl Unpin for HttpBlocks
impl !UnwindSafe for HttpBlocks
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more