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

Trait UWirePayload

Source
pub trait UWirePayload<T>: UWire {
    type Codec: PayloadCodec;
}
Expand description

Selected-wire payload mapping for typed payloads.

The wire marker, not the payload type, chooses one payload codec for T. The associated codec need not be the wire marker itself. Its implemented capability traits decide which operations are available: encode/decode, initialized TX loan, uninitialized TX loan, and receive-side typed borrow. Implementing this mapping does not grant capabilities the codec does not implement and does not make ReadDecodePayload a borrowed or in-place decode API.

Required Associated Types§

Source

type Codec: PayloadCodec

Concrete payload codec used by this selected wire for T.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§