Trait mindus::Serializable

source ·
pub trait Serializable
where Self: Sized,
{ type ReadError; type WriteError; // Required methods fn deserialize(buff: &mut DataRead<'_>) -> Result<Self, Self::ReadError>; fn serialize( &self, buff: &mut DataWrite<'_> ) -> Result<(), Self::WriteError>; }
Expand description

basic serialization/deserialization functions

Required Associated Types§

Required Methods§

source

fn deserialize(buff: &mut DataRead<'_>) -> Result<Self, Self::ReadError>

deserialize self from a binary buffer

source

fn serialize(&self, buff: &mut DataWrite<'_>) -> Result<(), Self::WriteError>

transform self into a binary buffer

Object Safety§

This trait is not object safe.

Implementors§