pub trait HeaderSubscription<Block>{
// Required method
fn next_header<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<<Block as Block>::Header>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: '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 as Block>::Header>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn next_header<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<<Block as Block>::Header>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: '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.