kona_derive_alloy::prelude

Trait DataAvailabilityProvider

Source
pub trait DataAvailabilityProvider {
    type Item: Send + Sync + Debug + Into<Bytes>;

    // Required methods
    fn next<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        block_ref: &'life1 BlockInfo,
    ) -> Pin<Box<dyn Future<Output = Result<Self::Item, PipelineErrorKind>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn clear(&mut self);
}
Expand description

Describes the functionality of a data source that can provide data availability information.

Required Associated Types§

Source

type Item: Send + Sync + Debug + Into<Bytes>

The item type of the data iterator.

Required Methods§

Source

fn next<'life0, 'life1, 'async_trait>( &'life0 mut self, block_ref: &'life1 BlockInfo, ) -> Pin<Box<dyn Future<Output = Result<Self::Item, PipelineErrorKind>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Returns the next data for the given BlockInfo. Returns a PipelineError::Eof if there is no more data for the given block ref.

Source

fn clear(&mut self)

Clears the data source for the next block ref.

Implementors§