Module binary_layout::prelude
source · Expand description
Import this to get everything into scope that you need for defining and using layouts.
Example
use binary_layout::prelude::*;
Macros
Structs
This is a marker type to mark layouts using big endian encoding. The alternative is LittleEndian encoding.
This is a marker type to mark layouts using little endian encoding. The alternative is BigEndian encoding.
Traits
A field represents one of the fields in the data layout and offers accessors
for it. It remembers the offset of the field in its const generic parameter
and the accessors use that to access the field.
This trait is implemented for fields with “copy access”,
i.e. fields that read/write data by copying it from/to the
binary blob. Examples of this are primitive types
like u8, i32, …
This trait is implemented for fields with “slice access”,
i.e. fields that are read/write directly without a copy
by returning a borrowed slice to the underlying data.