pub fn try_recv<M: ChannelMessage>(&mut self) -> Result<Option<M>, MessageTypeUnregistered> {
        let channels = self.channels.get_mut::<M>()?;

        Ok(if self.disconnected {
            None
        } else {
            match channels.incoming_receiver.try_next() {
                Ok(None) => {
                    self.disconnected = true;
                    None
                }
                Ok(Some(msg)) => Some(msg),
                Err(_) => None,
            }
        })
    }
/// Like `MessageChannels::recv` but errors instead of panicking when the message type is
/// unregistered.
Like `MessageChannels::recv` but errors instead of panicking when the message type is
unregistered.
Like ` MessageChannels :: recv ` but errors instead of panicking when the message type is unregistered .
pub fn try_recv<M: ChannelMessage>(&mut self) -> Result<Option<M>, MessageTypeUnregistered> {
        let channels = self.channels.get_mut::<M>()?;
        Ok(if self.disconnected {
            None
        } else {
            match channels.incoming_receiver.try_next() {
                Ok(None) => {
                    self.disconnected = true;
                    None
                }
                Ok(Some(msg)) => Some(msg),
                Err(_) => None,
            }
        })
    }
pub fn try_recv < M : ChannelMessage > ( & mut self ) -> Result < Option < M > , MessageTypeUnregistered > { let channels = self . channels . get_mut :: < M > ( ) ? ; Ok ( if self . disconnected { None } else { match channels . incoming_receiver . try_next ( ) { Ok ( None ) => { self . disconnected = true ; None } Ok ( Some ( msg ) ) => Some ( msg ) , Err ( _ ) => None , } } ) }
Like `MessageChannels::recv` but errors instead of panicking when the message type is
unregistered.
Like ` MessageChannels :: recv ` but errors instead of panicking when the message type is unregistered .
&mut self
&mut self