pub trait EventStream<P> {
    // Required method
    fn next_event<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Option<Event<P>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

source

fn next_event<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Option<Event<P>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves next event from the stream or returns None if the stream is closed. This method’s implementation must be cancellation safe.

Implementors§

source§

impl<B: Block, H: ExHashT> EventStream<PeerId> for NetworkEventStream<B, H>