pub trait Serializablewhere
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§
type ReadError
type WriteError
Required Methods§
Sourcefn deserialize(buff: &mut DataRead<'_>) -> Result<Self, Self::ReadError>
fn deserialize(buff: &mut DataRead<'_>) -> Result<Self, Self::ReadError>
deserialize self from a binary buffer
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
Source§impl Serializable for DynData
impl Serializable for DynData
type ReadError = ReadError
type WriteError = WriteError
Source§impl Serializable for Map
serde map
impl Serializable for Map
serde map