Trait iroh_bytes::provider::BaoMapEntry
source · 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§
sourcefn outboard(&self) -> BoxFuture<'_, Result<D::Outboard>>
fn outboard(&self) -> BoxFuture<'_, Result<D::Outboard>>
A future that resolves to a reader that can be used to read the outboard
sourcefn data_reader(&self) -> BoxFuture<'_, Result<D::DataReader>>
fn data_reader(&self) -> BoxFuture<'_, Result<D::DataReader>>
A future that resolves to a reader that can be used to read the data