pub fn encode(value: &impl Serialize) -> Result<Vec<u8>, WireError>
Serialize a record without including serializer diagnostics in errors.