Trait MessageTypes

Source
pub trait MessageTypes: 'static + Debug {
    type TcpToServer: Serialize + DeserializeOwned + Debug + Clone + Send + Sync + Unpin + 'static;
    type TcpFromServer: Serialize + DeserializeOwned + Debug + Clone + Send + Sync + Unpin + 'static;
    type UdpToServer: Serialize + DeserializeOwned + Debug + Clone + Send + Sync + Unpin + 'static;
    type UdpFromServer: Serialize + DeserializeOwned + Debug + Clone + Send + Sync + Unpin + 'static;
}
Expand description

Message types for the server and client communication.

This is a trait with no methods, used only to define strong types for TCP/UDP serialization and deserialization.

Required Associated Types§

Source

type TcpToServer: Serialize + DeserializeOwned + Debug + Clone + Send + Sync + Unpin + 'static

Type for peers to send to the server over TCP.

Source

type TcpFromServer: Serialize + DeserializeOwned + Debug + Clone + Send + Sync + Unpin + 'static

Type for server to send to peers over TCP.

Source

type UdpToServer: Serialize + DeserializeOwned + Debug + Clone + Send + Sync + Unpin + 'static

Type for peers to send to server over UDP.

Source

type UdpFromServer: Serialize + DeserializeOwned + Debug + Clone + Send + Sync + Unpin + 'static

Type for server to send to peers over UDP.

Implementors§