pub trait BaoMapEntry<D: BaoMap>: Clone + Send + Sync + 'static {
    // Required methods
    fn hash(&self) -> Hash;
    fn outboard(&self) -> BoxFuture<'_, Result<D::Outboard>>;
    fn data_reader(&self) -> BoxFuture<'_, Result<D::DataReader>>;
}
Expand description

An entry for one hash in a bao collection

The entry has the ability to provide you with an (outboard, data) reader pair. Creating the reader is async and may fail. The futures that create the readers must be Send, but the readers themselves don’t have to be.

Required Methods§

source

fn hash(&self) -> Hash

The hash of the entry

source

fn outboard(&self) -> BoxFuture<'_, Result<D::Outboard>>

A future that resolves to a reader that can be used to read the outboard

source

fn data_reader(&self) -> BoxFuture<'_, Result<D::DataReader>>

A future that resolves to a reader that can be used to read the data

Implementors§