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

Trait UWire

Source
pub trait UWire {
    const WIRE_ID: WireIdentity;
    const PAYLOAD_FAMILY_ID: WireIdentity;
    const METADATA_LAYOUT_ID: WireIdentity;
    const FORMAT_VERSION: u16;

    // Provided methods
    fn wire_compatibility(actual: &WireIdentityRef) -> WireCompatibility { ... }
    fn payload_family_compatibility(
        actual: &WireIdentityRef,
    ) -> WireCompatibility { ... }
    fn metadata_context() -> UWireMetadataContext
       where Self: Sized { ... }
}
Expand description

Static selected-wire contract.

Required Associated Constants§

Source

const WIRE_ID: WireIdentity

Stable identity for the full selected wire.

Source

const PAYLOAD_FAMILY_ID: WireIdentity

Payload operation family supported by this selected wire.

Source

const METADATA_LAYOUT_ID: WireIdentity

Metadata byte layout used by this selected wire.

Source

const FORMAT_VERSION: u16

Metadata byte-format version supported by this selected wire.

Provided Methods§

Source

fn wire_compatibility(actual: &WireIdentityRef) -> WireCompatibility

Checks selected-wire compatibility before public frame exposure.

Source

fn payload_family_compatibility(actual: &WireIdentityRef) -> WireCompatibility

Checks payload-family compatibility before public frame exposure.

Source

fn metadata_context() -> UWireMetadataContext
where Self: Sized,

Returns the selected-wire metadata context consumed by metadata codecs.

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§

Source§

impl UWire for ProtobufWire

Source§

const WIRE_ID: WireIdentity = PROTOBUF_WIRE_ID

Source§

const PAYLOAD_FAMILY_ID: WireIdentity = PROTOBUF_PAYLOAD_FAMILY_ID

Source§

const METADATA_LAYOUT_ID: WireIdentity = NATIVE_PREFIX_METADATA_LAYOUT_ID

Source§

const FORMAT_VERSION: u16 = 1u16

Source§

impl UWire for StableContainerWireFormat

Source§

const WIRE_ID: WireIdentity = STABLE_CONTAINER_WIRE_ID

Source§

const PAYLOAD_FAMILY_ID: WireIdentity = STABLE_CONTAINER_PAYLOAD_FAMILY_ID

Source§

const METADATA_LAYOUT_ID: WireIdentity = NATIVE_PREFIX_METADATA_LAYOUT_ID

Source§

const FORMAT_VERSION: u16 = 1u16

Source§

impl UWire for UProtocolNativeWire

Source§

const WIRE_ID: WireIdentity = UPROTOCOL_NATIVE_WIRE_ID

Source§

const PAYLOAD_FAMILY_ID: WireIdentity = NATIVE_EXPLICIT_PAYLOAD_FAMILY_ID

Source§

const METADATA_LAYOUT_ID: WireIdentity = NATIVE_PREFIX_METADATA_LAYOUT_ID

Source§

const FORMAT_VERSION: u16 = 1u16