1 2 3 4 5 6 7 8 9 10 11 12 13 14
use bytes::{ Bytes, BytesMut, }; pub trait Serializer { fn serialize(&self) -> Bytes; } // TODO(@siennathesane): it should be: // `fn deserialize<D>(payload: Bytes) -> Result<Self, CesiumError>` pub trait Deserializer { fn deserialize(payload: Bytes) -> Self; }