pub trait Conduit {
type Msg: MsgFamily;
type Tx: ConduitTx<Msg = Self::Msg>;
type Rx: ConduitRx<Msg = Self::Msg>;
// Required method
fn split(self) -> (Self::Tx, Self::Rx);
}Expand description
Bidirectional typed transport. Wraps a Link and owns serialization.
Uses a MsgFamily so that the same type family serves both sides:
- Send:
MsgFamily::Msg<'a>for any'a(borrowed data serialized in place) - Recv:
MsgFamily::Msg<'static>(owned, viaSelfRef)
Two implementations:
BareConduit: Link + postcard. If the link dies, it’s dead.StableConduit: Link + postcard + seq/ack/replay. Handles reconnect transparently. Replay buffer stores encoded bytes (no clone needed).