Trait phron_finality::sync::ChainStatusNotifier
source · pub trait ChainStatusNotifier<H: Header> {
type Error: Debug + Display;
// Required method
fn next<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<ChainStatusNotification<H>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
A stream of notifications about the chain status in the database changing. We assume that this will return all the events, otherwise we will end up with a broken state.
Required Associated Types§
Required Methods§
sourcefn next<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<ChainStatusNotification<H>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn next<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<ChainStatusNotification<H>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns a chain status notification when it is available. This method’s implementation must be cancellation safe.