Skip to main content

BatchStoreExt

Trait BatchStoreExt 

Source
pub trait BatchStoreExt: BatchStore {
    // Provided method
    fn get_usable(
        &self,
        id: &BatchId,
        confirmation_threshold: u64,
    ) -> Result<Batch, BatchStoreError<Self::Error>> { ... }
}
Available on crate feature std only.
Expand description

Extension methods for BatchStore.

This is a plain synchronous extension trait; it carries no Sync bound, because the methods are no longer async and therefore never need their futures to be Send (which previously forced Self: Sync).

Provided Methods§

Source

fn get_usable( &self, id: &BatchId, confirmation_threshold: u64, ) -> Result<Batch, BatchStoreError<Self::Error>>

Gets a batch and verifies it’s usable.

Returns an error if the batch doesn’t exist, isn’t usable yet, or has expired.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§