pub trait Protocol<Engine, App> {
type Client;
type Server;
type Msg;
}Expand description
Designing everything for a pratical system is hard. Designing everything
correctly is impossible. That’s why a versioned spec module is prepared.
At any time top level module does wildcard re-exporting from the latest
version of spec. To survive from a breaking change, change use crate::*
to use crate::spec::v1::*.
The “ghost” meta-type for protocol implementation, i.e. a group of receivers
including client, server, etc. Engines are generic over Protocol instead
of contained receiver states, which normally take the engine type as generic
parameter, to prevent cyclic type.