Skip to main content

Protocol

Trait Protocol 

Source
pub trait Protocol: Send + 'static {
    type ToServer: ProtocolData;
    type ToClient: ProtocolData;
    type Codec: ProtocolCodec;
}
Expand description

The set of types for provide interaction capabilities for parties.

Required Associated Types§

Source

type ToServer: ProtocolData

The message type sent to a server (from a client).

Source

type ToClient: ProtocolData

The message type sent to a client (from a server).

Source

type Codec: ProtocolCodec

The codec (serialization format) used to pack and unpack messages.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§