pub trait AwaitNewBlock {
// Required method
async fn await_new_block(&mut self) -> Option<()>;
}
Expand description
Types that may be provided to subscribe_blocks
to asynchronously await
the availability of a new block.
Required Methods§
sourceasync fn await_new_block(&mut self) -> Option<()>
async fn await_new_block(&mut self) -> Option<()>
Wait for a new block to become available.
Returns a future that resolves to Some
when a new block is ready, or
None
when the notification source is no longer available.
Object Safety§
This trait is not object safe.