Skip to main content

LogSource

Trait LogSource 

Source
pub trait LogSource {
    // Required method
    fn next_block(
        &mut self,
    ) -> impl Future<Output = Option<(u64, Vec<Log>, ReorgSignal)>> + Send;
}
Expand description

An async source of blocks of logs for drive.

This is the thin async convenience layer (§7.5): a production WS / subscribe_logs adapter implements it; the offline example feeds a vec-backed source. The synchronous EventPipeline core is the tested contract.

Required Methods§

Source

fn next_block( &mut self, ) -> impl Future<Output = Option<(u64, Vec<Log>, ReorgSignal)>> + Send

Yield the next block: its number, its logs, and an optional reorg signal. None ends the stream.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§