pub trait BlockStreamer: Sync + Send {
    // Required method
    fn poll_next<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = StdResult<Option<Vec<ScannedBlock>>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn poll_all<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = StdResult<Vec<ScannedBlock>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

Trait that define how blocks are streamed from a Cardano database

Required Methods§

source

fn poll_next<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = StdResult<Option<Vec<ScannedBlock>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Stream the next available blocks

Provided Methods§

source

fn poll_all<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = StdResult<Vec<ScannedBlock>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Stream all the available blocks, may be very memory intensive

Implementors§