pub async fn ready<'a>(&'a self) -> Result<NotificationSenderReady<'a>, NotificationSenderError> {
		Ok(NotificationSenderReady {
			ready: match self.sink.reserve_notification(self.protocol_name.clone()).await {
				Ok(r) => r,
				Err(()) => return Err(NotificationSenderError::Closed),
			},
			peer_id: self.sink.peer_id(),
			notification_size_metric: self.notification_size_metric.clone(),
		})
	}
/// Returns a future that resolves when the `NotificationSender` is ready to send a notification.
Returns a future that resolves when the `NotificationSender` is ready to send a notification.
Returns a future that resolves when the ` NotificationSender ` is ready to send a notification .
pub async fn ready<'a>(&'a self) -> Result<NotificationSenderReady<'a>, NotificationSenderError> {
		Ok(NotificationSenderReady {
			ready: match self.sink.reserve_notification(self.protocol_name.clone()).await {
				Ok(r) => r,
				Err(()) => return Err(NotificationSenderError::Closed),
			},
			peer_id: self.sink.peer_id(),
			notification_size_metric: self.notification_size_metric.clone(),
		})
	}
pub async fn ready < ' a > ( & ' a self ) -> Result < NotificationSenderReady < ' a > , NotificationSenderError > { Ok ( NotificationSenderReady { ready : match self . sink . reserve_notification ( self . protocol_name . clone ( ) ) . await { Ok ( r ) => r , Err ( ( ) ) => return Err ( NotificationSenderError :: Closed ) , } , peer_id : self . sink . peer_id ( ) , notification_size_metric : self . notification_size_metric . clone ( ) , } ) }
Returns a future that resolves when the `NotificationSender` is ready to send a notification.
Returns a future that resolves when the ` NotificationSender ` is ready to send a notification .
&'a self
&'a self