pub trait DataType: Sized {
    fn serialize(self, view: &mut DataView<impl AsMut<[u8]>>);
fn deserialize(view: &mut DataView<impl AsRef<[u8]>>) -> Result<Self>; }
Expand description

A trait for serialize and deserialize data for binary format.

All primitive types implement this trait.

And For collection types, Vec and String are supported. They are encoded with their length u32 value first, Following by each entry of the collection.

Required methods

Implementations on Foreign Types

Implementors