pub fn encode<T: Encode>(value: &T, writer: &mut impl Write) -> Result<usize>
Encodes value into writer using the type’s Encode implementation.
value
writer
Encode
Returns the number of bytes written on success.