Skip to main content

Module layout

Module layout 

Source
Expand description

Advanced layout and header surface.

Structs§

AccountHeader
The 16-byte account header, overlay-safe.
AccountReader
Header-aware read-only account reader.
FieldInfo
Descriptor for one field in a Hopper layout.
FingerprintTransition
Pair of fingerprints for asserting version transitions.
HopperHeader
The canonical 16-byte header at the start of every Hopper account.
LayoutFingerprint
An 8-byte deterministic layout fingerprint.
LayoutInfo
Runtime metadata snapshot of an account’s layout identity.

Constants§

HEADER_FORMAT
Header format version. Bump only if the header wire format itself changes.
HEADER_LEN
Header length in bytes.

Traits§

AccountLayout
Hopper account layout identity, the top of the unified trait stack.
FieldMap
Trait for layouts that expose field metadata in wire order.
FixedLayout
Trait for types with a compile-time known wire size.
LayoutContract
A compile-time layout contract binding type identity to wire format.
Pod
Marker for types that can be safely overlaid on raw account bytes.
WireLayout
A ZeroCopy type with a compile-time-known wire size.
WireType
Marker trait for types safe to use as zero-copy wire fields.
ZeroCopy
Canonical marker for types that may be overlaid on raw bytes.

Functions§

check_header
Validate the header against expected values.
init_header
Initialize an account’s header from a layout contract type.
read_discriminator
Read the discriminator byte from raw account data.
read_header_flags
Read the flags field as u16.
read_layout_id
Read the 8-byte layout_id.
read_version
Read the version byte.
write_header
Write a complete header to the beginning of data.