Skip to main content

Link

Trait Link 

Source
pub trait Link {
    type Tx: LinkTx;
    type Rx: LinkRx;

    // Required method
    fn split(self) -> (Self::Tx, Self::Rx);

    // Provided method
    fn supports_transport_mode(mode: TransportMode) -> bool
       where Self: Sized { ... }
}
Expand description

Bidirectional raw-bytes transport.

TCP, WebSocket, SHM all implement this. No knowledge of what’s being sent — just bytes in, bytes out. The transport provides write buffers so callers can encode directly into the destination (zero-copy for SHM).

Required Associated Types§

Required Methods§

Source

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

Provided Methods§

Source

fn supports_transport_mode(mode: TransportMode) -> bool
where Self: Sized,

Whether this link supports the requested transport mode.

Most links support both bare and stable. Special transports may override this to reject unsupported modes during the transport prologue.

Implementors§

Source§

type Tx = Tx

Source§

type Rx = Rx