referrerpolicy=no-referrer-when-downgrade

Trait sc_network::service::traits::NotificationSender

source ·
pub trait NotificationSender: Send + Sync + 'static {
    // Required method
    fn ready<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Box<dyn NotificationSenderReady + '_>, NotificationSenderError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

A NotificationSender allows for sending notifications to a peer with a chosen protocol.

Required Methods§

source

fn ready<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Box<dyn NotificationSenderReady + '_>, NotificationSenderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns a future that resolves when the NotificationSender is ready to send a notification.

Implementors§