pub async fn write_length_delimited<S: AsyncWrite + Unpin>(
    stream: &mut S,
    message: &[u8]
) -> AnyhowResult<()>
Expand description

A helper function to write a length-delimited message to a stream.

§Errors

  • If we fail to write to the stream