pub async fn read_message<R: AsyncRead + Unpin, T: DeserializeOwned>(
reader: &mut R,
) -> Result<T, ChannelError>Expand description
Receives one message.
§Errors
Returns ChannelError::Closed at the end of the stream, ChannelError::TooLarge,
ChannelError::Invalid for a message that doesn’t parse, or an I/O error.