pub trait HeaderSubscription<Block: BlockT>{
// Required method
fn next_header<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<Block::Header>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Abstraction over RPC subscription for finalized headers.
Required Methods§
sourcefn next_header<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<Block::Header>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn next_header<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<Block::Header>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Await for the next finalized header from the subscription.
Returns None
if either the subscription has been closed or there was an error when reading
an object from the client.