pub fn encode_to<T: Serialize, W: Write>( value: &T, writer: W, format: Format, ) -> Result<()>
Serialize a value into a writer in the specified format.