pub fn encode<T: Serialize>(value: &T) -> Result<Vec<u8>, CodecError>
Encode a value the way a real driver would: once, at the boundary, with no intermediate representation.