pub trait SerializeMessage: Sized + Send + Sync + 'static {
    // Required methods
    fn serialize(&self) -> Result<Vec<u8>>;
    fn deserialize(message: &[u8]) -> Result<Self>;
}
Expand description

Trait a message type needs to implement to be usable with the TCPClient/TCPServer implementation. This allows to customize the serialization format.

Required Methods§

source

fn serialize(&self) -> Result<Vec<u8>>

source

fn deserialize(message: &[u8]) -> Result<Self>

Object Safety§

This trait is not object safe.

Implementors§