pub trait PlatformSerializable {
type Error;
// Required method
fn serialize_to_bytes(&self) -> Result<Vec<u8>, Self::Error>;
// Provided method
fn serialize_consume_to_bytes(self) -> Result<Vec<u8>, Self::Error>
where Self: Sized { ... }
}