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§
Sourcetype TcpToServer: Serialize + DeserializeOwned + Debug + Clone + Send + Sync + Unpin + 'static
type TcpToServer: Serialize + DeserializeOwned + Debug + Clone + Send + Sync + Unpin + 'static
Type for peers to send to the server over TCP.
Sourcetype TcpFromServer: Serialize + DeserializeOwned + Debug + Clone + Send + Sync + Unpin + 'static
type TcpFromServer: Serialize + DeserializeOwned + Debug + Clone + Send + Sync + Unpin + 'static
Type for server to send to peers over TCP.
Sourcetype UdpToServer: Serialize + DeserializeOwned + Debug + Clone + Send + Sync + Unpin + 'static
type UdpToServer: Serialize + DeserializeOwned + Debug + Clone + Send + Sync + Unpin + 'static
Type for peers to send to server over UDP.
Sourcetype UdpFromServer: Serialize + DeserializeOwned + Debug + Clone + Send + Sync + Unpin + 'static
type UdpFromServer: Serialize + DeserializeOwned + Debug + Clone + Send + Sync + Unpin + 'static
Type for server to send to peers over UDP.