Preview of the proposed up-rust native-frame-model branch (up-rust b6b99c6d, up-spec f0e9b17) — not released documentation. branch · write-up

Module wire_transport

Source
Expand description

Selected-wire transport adapter core.

Product transports implement the small core traits in this module for their physical mechanics. A core accepts metadata bytes already prepared by the selected metadata codec, returns encoded metadata bytes on receive, and validates any physical mirror fields against decoded metadata before public exposure. Product transport modules should not import, match on, or branch by concrete wire families such as UProtocolNativeWire; the selected wire is owned by UWireTransport<TCore, W, C>.

§Composition walk

  1. Implement UZeroCopyTransportCore (and, when supported, UZeroCopyUninitTransportCore) for physical storage and encoded metadata carriage. These core methods do not choose a wire.
  2. Wrap the core with UWithNativePrefixWire::into_native_prefix_wire_transport for an external/custom wire, or use into_protobuf_transport / into_stable_container_transport.
  3. Use the resulting adapter through the public semantic transport traits and typed extension helpers. The adapter encodes metadata before core TX, checks the envelope and selected identities on RX, validates physical mirror fields, and only then exposes semantic metadata.
  4. Run wire_transport_adapter, trybuild role-firewall tests, wrong-identity tests, and the payload-contract round trips.

This boundary is the N+M seam from up-spec/up-l1/transport_families.adoc: a core must not branch on concrete wire types, and a wire must not contain transport-specific carriage code.

Structs§

EncodedOwnedFrame
Encoded owned frame returned by an owned core.
PreparedOwnedFrame
Prepared owned frame passed from the adapter to an owned core.
PreparedTxLoanSpec
Prepared zero-copy transmit request passed from the adapter to a core.
UWireRx
Public zero-copy receive lease after selected-wire metadata validation.
UWireTransport
Generic selected-wire transport adapter.

Traits§

UEncodedLoanedRxFrame
Raw encoded receive object that can prove its contiguous payload is loan-backed.
UEncodedOwnedListener
Listener used by cores to deliver raw encoded owned frames.
UEncodedRxFrame
Raw encoded receive object returned by a transport core.
UEncodedZeroCopyListener
Listener used by cores to deliver raw encoded zero-copy receive objects.
UHasWire
Exposes the concrete selected wire of an adapter value.
UOwnedTransportCore
Role: implemented by transports carrying already-encoded owned frames; the wire adapter composes above it — see the trait map.
USelectedWireZeroCopyTransport
Marker trait for zero-copy transports with a statically selected wire.
UWithNativePrefixWire
Convenience constructors for canonical native-prefix selected-wire transports.
UZeroCopyTransportCore
Role: implemented by transports that stay a dumb byte pipe; UWireTransport composes wires and codecs above it (recommended default) — see the trait map.
UZeroCopyUninitTransportCore
Optional encoded-core capability for uninitialized transmit loans.

Type Aliases§

ProtobufWireTransport
Protocol Buffers selected-wire transport with canonical metadata.
StableContainerWireTransport
Stable-container selected-wire transport with canonical metadata.
UNativePrefixWireTransport
Selected-wire transport using the canonical UFrame metadata field block.