1
2
3
4
5
pub trait ByteMessage
{
    fn serialize(&self) -> Vec<u8>;
    fn deserialize(data: &Vec<u8>) -> anyhow::Result<Self> where Self: Sized;
}