pub trait MessageWire {
type Wire;
}Expand description
The wire of a typed publish value: whether the resolved codec serializes it.
Implemented for every serde::Serialize value (the EncodedWire: the resolved codec
encodes it), and per-type for Serialized values (the SerializedWire: the bytes leave
as they are) - #[derive(Serialized)] writes that impl, or see Serialized for the
hand-written form. The projection is what lets one message(&value) entry serve both wires:
the value’s type picks the lane, and the call site does not change.
Required Associated Types§
Sourcetype Wire
type Wire
The value’s wire: EncodedWire or SerializedWire.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".