pub fn to_bytes<T>(encoder: &mut Encoder, value: &T) -> Result<BytesMut>where T: ?Sized + Serialize,
Encode single message into bytes::BufMut.
bytes::BufMut