pub async fn reserve_notification<'a>(&'a self, protocol_name: Cow<'static, str>) -> Result<Ready<'a>, ()> {
		let mut lock = self.inner.async_channel.lock().await;

		let poll_ready = future::poll_fn(|cx| lock.poll_ready(cx)).await;
		if poll_ready.is_ok() {
			Ok(Ready { protocol_name: protocol_name, lock })
		} else {
			Err(())
		}
	}
/// Wait until the remote is ready to accept a notification.
///
/// Returns an error in the case where the connection is closed.
///
/// The protocol name is expected to be checked ahead of calling this method. It is a logic
/// error to send a notification using an unknown protocol.
Wait until the remote is ready to accept a notification.
Returns an error in the case where the connection is closed.

The protocol name is expected to be checked ahead of calling this method. It is a logic
error to send a notification using an unknown protocol.
Wait until the remote is ready to accept a notification . Returns an error in the case where the connection is closed . The protocol name is expected to be checked ahead of calling this method . It is a logic error to send a notification using an unknown protocol .
pub async fn reserve_notification<'a>(&'a self, protocol_name: Cow<'static, str>) -> Result<Ready<'a>, ()> {
		let mut lock = self.inner.async_channel.lock().await;
		let poll_ready = future::poll_fn(|cx| lock.poll_ready(cx)).await;
		if poll_ready.is_ok() {
			Ok(Ready { protocol_name: protocol_name, lock })
		} else {
			Err(())
		}
	}
pub async fn reserve_notification < ' a > ( & ' a self , protocol_name : Cow < ' static , str > ) -> Result < Ready < ' a > , ( ) > { let mut lock = self . inner . async_channel . lock ( ) . await ; let poll_ready = future :: poll_fn ( | cx | lock . poll_ready ( cx ) ) . await ; if poll_ready . is_ok ( ) { Ok ( Ready { protocol_name : protocol_name , lock } ) } else { Err ( ( ) ) } }
Wait until the remote is ready to accept a notification.
Wait until the remote is ready to accept a notification .
&'a self
protocol_name
Cow<'static, str>
&'a self
protocol_name
Cow<'static, str>