pub async fn receive<R: DeserializeOwned>(&mut self) -> Result<Option<R>, TransportError> {
        // Use underlying codec to receive data (may decrypt, validate, etc.)
        if let Some(data) = self.0.next().await {
            let data = data?;

            // Deserialize byte stream into our expected type
            let data = deserialize_from_slice(&data)?;
            Ok(Some(data))
        } else {
            Ok(None)
        }
    }
/// Receives some data from out on the wire, waiting until it's available,
/// returning none if the transport is now closed
Receives some data from out on the wire, waiting until it's available,
returning none if the transport is now closed
Receives some data from out on the wire waiting until it ' s available returning none if the transport is now closed
pub async fn receive<R: DeserializeOwned>(&mut self) -> Result<Option<R>, TransportError> {
        // Use underlying codec to receive data (may decrypt, validate, etc.)
        if let Some(data) = self.0.next().await {
            let data = data?;
            // Deserialize byte stream into our expected type
            let data = deserialize_from_slice(&data)?;
            Ok(Some(data))
        } else {
            Ok(None)
        }
    }
pub async fn receive < R : DeserializeOwned > ( & mut self ) -> Result < Option < R > , TransportError > { // Use underlying codec to receive data (may decrypt, validate, etc.) if let Some ( data ) = self . 0 . next ( ) . await { let data = data ? ; // Deserialize byte stream into our expected type let data = deserialize_from_slice ( & data ) ? ; Ok ( Some ( data ) ) } else { Ok ( None ) } }
Receives some data from out on the wire, waiting until it's available,
returning none if the transport is now closed
Receives some data from out on the wire waiting until it ' s available returning none if the transport is now closed
&mut self