pub trait PersistedBlockSubscriptions: Send + Sync {
// Required method
fn subscribe_persisted_block(&self) -> PersistedBlockNotifications;
// Provided method
fn persisted_block_stream(&self) -> WatchValueStream<BlockNumHash> { ... }
}Expand description
A trait that allows subscribing to persisted block events.
Required Methods§
Sourcefn subscribe_persisted_block(&self) -> PersistedBlockNotifications
fn subscribe_persisted_block(&self) -> PersistedBlockNotifications
Get notified when a new block is persisted to disk.
Provided Methods§
Sourcefn persisted_block_stream(&self) -> WatchValueStream<BlockNumHash>
fn persisted_block_stream(&self) -> WatchValueStream<BlockNumHash>
Convenience method to get a stream of the persisted blocks.