Skip to main content

Conduit

Trait Conduit 

Source
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, via SelfRef)

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).

Required Associated Types§

Source

type Msg: MsgFamily

Source

type Tx: ConduitTx<Msg = Self::Msg>

Source

type Rx: ConduitRx<Msg = Self::Msg>

Required Methods§

Source

fn split(self) -> (Self::Tx, Self::Rx)

Implementors§