[−][src]Trait ipld_block_builder::Cache
Cache trait.
Required methods
fn create_batch(&self) -> CacheBatch<C, T>
Creates a typed batch.
fn create_batch_with_capacity(&self, capacity: usize) -> CacheBatch<C, T>
Creates a typed batch.
#[must_use]fn insert_batch<'life0, 'async_trait>(
&'life0 self,
batch: CacheBatch<C, T>
) -> Pin<Box<dyn Future<Output = Result<Cid>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
&'life0 self,
batch: CacheBatch<C, T>
) -> Pin<Box<dyn Future<Output = Result<Cid>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Inserts a batch into the store.
#[must_use]fn insert<'life0, 'async_trait>(
&'life0 self,
value: T
) -> Pin<Box<dyn Future<Output = Result<Cid>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
&'life0 self,
value: T
) -> Pin<Box<dyn Future<Output = Result<Cid>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Encodes and inserts a block.
#[must_use]fn flush<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Flushes all buffers.
#[must_use]fn unpin<'life0, 'life1, 'async_trait>(
&'life0 self,
cid: &'life1 Cid
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
&'life0 self,
cid: &'life1 Cid
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Unpins a block.
Implementors
impl<S: Store + Send + Sync, C, T> Cache<C, T> for IpldCache<S, C, T> where
C: Decoder + Encoder + Clone + Send + Sync,
T: Decode<<C as Decoder>::Codec> + Encode<<C as Encoder>::Codec> + Clone + Send + Sync,
[src]
C: Decoder + Encoder + Clone + Send + Sync,
T: Decode<<C as Decoder>::Codec> + Encode<<C as Encoder>::Codec> + Clone + Send + Sync,
fn create_batch(&self) -> CacheBatch<C, T>
[src]
fn create_batch_with_capacity(&self, capacity: usize) -> CacheBatch<C, T>
[src]
fn insert_batch<'life0, 'async_trait>(
&'life0 self,
batch: CacheBatch<C, T>
) -> Pin<Box<dyn Future<Output = Result<Cid>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
batch: CacheBatch<C, T>
) -> Pin<Box<dyn Future<Output = Result<Cid>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn insert<'life0, 'async_trait>(
&'life0 self,
value: T
) -> Pin<Box<dyn Future<Output = Result<Cid>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
value: T
) -> Pin<Box<dyn Future<Output = Result<Cid>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn flush<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn unpin<'life0, 'life1, 'async_trait>(
&'life0 self,
cid: &'life1 Cid
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
cid: &'life1 Cid
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,