pub fn to_bytes<T>(value: &T) -> Result<Vec<u8>, Error>
where T: ?Sized + Serialize,