#[repr(C, packed(1))]pub struct HopperHeader {
pub disc: u8,
pub version: u8,
pub flags: u16,
pub layout_id: [u8; 8],
pub schema_epoch: u32,
}Expand description
The canonical 16-byte header at the start of a headered Hopper account.
The reserved header tail carries a schema_epoch: u32 so the runtime
can distinguish schema-compatible minor versions from wire-
incompatible revisions without bumping the single version byte.
byte 0 : disc (u8)
byte 1 : version (u8)
bytes 2-3 : flags (u16 LE)
bytes 4-11 : layout_id (first 8 bytes of canonical wire fingerprint)
bytes 12-15: schema_epoch (u32 LE), audit-addedschema_epoch defaults to 1 at account initialisation via
init_header. Programs that publish a migration bump this
field to advertise the new shape while retaining the same
disc/version. Runtime header validation checks these values. Current
generated headered clients compare the stored layout_id before decoding;
compact clients use their separate size/discriminator path.
Fields§
§disc: u8§version: u8§flags: u16§layout_id: [u8; 8]§schema_epoch: u32Schema-evolution epoch. Little-endian u32. 1 for freshly
initialised headers; bumped by migration helpers.
Implementations§
Source§impl HopperHeader
impl HopperHeader
Trait Implementations§
Source§impl Clone for HopperHeader
impl Clone for HopperHeader
impl Copy for HopperHeader
Source§impl Debug for HopperHeader
impl Debug for HopperHeader
impl Eq for HopperHeader
Source§impl PartialEq for HopperHeader
impl PartialEq for HopperHeader
impl StructuralPartialEq for HopperHeader
Auto Trait Implementations§
impl Freeze for HopperHeader
impl RefUnwindSafe for HopperHeader
impl Send for HopperHeader
impl Sync for HopperHeader
impl Unpin for HopperHeader
impl UnsafeUnpin for HopperHeader
impl UnwindSafe for HopperHeader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more