Trait tcp_message_io::SerializeMessage
source · 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§
Object Safety§
This trait is not object safe.