pub trait TypedPhase<Role, Wire> {
type ProtocolPhase;
type Message: AsRef<Wire> + TryFrom<Wire, Error = Wire> + Into<Wire>;
}Expand description
Associates a connection typestate with its generated legal message type.
Implementations are provided only for matching sender roles and decoded wire
directions. This is the bridge which lets crate::Conn infer middleware’s
Role, ProtocolPhase, and Message indices from its own phase parameter.
Required Associated Types§
Sourcetype ProtocolPhase
type ProtocolPhase
Generated grammar phase corresponding to the connection typestate.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".