pub async fn try_async_recv<M: ChannelMessage>(&mut self) -> Result<M, TryAsyncMessageError> {
        let channels = self.channels.get_mut::<M>()?;

        if self.disconnected {
            Err(MessageChannelsDisconnected.into())
        } else if let Some(message) = channels.incoming_receiver.next().await {
            Ok(message)
        } else {
            self.disconnected = true;
            Err(MessageChannelsDisconnected.into())
        }
    }
/// Like `MessageChannels::async_recv` but errors instead of panicking when the message type is
/// unregistered.
Like `MessageChannels::async_recv` but errors instead of panicking when the message type is
unregistered.
Like ` MessageChannels :: async_recv ` but errors instead of panicking when the message type is unregistered .
pub async fn try_async_recv<M: ChannelMessage>(&mut self) -> Result<M, TryAsyncMessageError> {
        let channels = self.channels.get_mut::<M>()?;
        if self.disconnected {
            Err(MessageChannelsDisconnected.into())
        } else if let Some(message) = channels.incoming_receiver.next().await {
            Ok(message)
        } else {
            self.disconnected = true;
            Err(MessageChannelsDisconnected.into())
        }
    }
pub async fn try_async_recv < M : ChannelMessage > ( & mut self ) -> Result < M , TryAsyncMessageError > { let channels = self . channels . get_mut :: < M > ( ) ? ; if self . disconnected { Err ( MessageChannelsDisconnected . into ( ) ) } else if let Some ( message ) = channels . incoming_receiver . next ( ) . await { Ok ( message ) } else { self . disconnected = true ; Err ( MessageChannelsDisconnected . into ( ) ) } }
Like `MessageChannels::async_recv` but errors instead of panicking when the message type is
unregistered.
Like ` MessageChannels :: async_recv ` but errors instead of panicking when the message type is unregistered .
&mut self
&mut self