Skip to main content

WireLayout

Trait WireLayout 

Source
pub trait WireLayout: ZeroCopy {
    const WIRE_SIZE: usize = _;
}
Expand description

A ZeroCopy type with a compile-time-known wire size.

The default associated-const body returns size_of::<Self>(), which matches every Hopper layout today. Macros may override it in a future revision if the in-memory and on-wire representations ever diverge (e.g. compact trailing tags for optional fields).

Provided Associated Constants§

Source

const WIRE_SIZE: usize = _

Size of the on-wire representation, in bytes.

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§