referrerpolicy=no-referrer-when-downgrade

Trait substrate_rpc_client::HeaderSubscription

source ·
pub trait HeaderSubscription<Block: BlockT>
where Block::Header: HeaderT,
{ // 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§

source

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.

Implementors§

source§

impl<Block: BlockT> HeaderSubscription<Block> for Subscription<Block::Header>
where Block::Header: DeserializeOwned,