pub fn to_stream<T>( encoder: &mut Encoder, wrt: &mut dyn Write, value: &T, ) -> Result<()>where T: ?Sized + Serialize,
Encode single message into object that implements std::io::Write trait.
std::io::Write