sc_network::service::traits

Trait NotificationSenderReady

Source
pub trait NotificationSenderReady {
    // Required method
    fn send(
        &mut self,
        notification: Vec<u8>,
    ) -> Result<(), NotificationSenderError>;
}
Expand description

Reserved slot in the notifications buffer, ready to accept data.

Required Methods§

Source

fn send(&mut self, notification: Vec<u8>) -> Result<(), NotificationSenderError>

Consumes this slots reservation and actually queues the notification.

NOTE: Traits can’t consume itself, but calling this method second time will return an error.

Implementors§