#[repr(C)]pub struct Container10dHeader {
pub magic: [u8; 4],
pub version: u16,
pub flags: u16,
pub axis_roles: [u8; 10],
pub pad0: [u8; 2],
pub metric_descriptor: MetricCompletenessDescriptor,
pub header_crc32c: u32,
pub section_table_offset: u32,
pub section_count: u32,
}Expand description
The normative .10d v1 header — 64 bytes, repr(C), naturally aligned.
Field layout (offsets):
offset size field
0 4 magic
4 2 version
6 2 flags
8 10 axis_roles (one AxisRole u8 per AXIS_ORDER axis)
18 2 pad0 (must be zero — aligns metric_descriptor to 4)
20 32 metric_descriptor (4 x MetricBranchDescriptor, 8 bytes each)
52 4 header_crc32c (spec-reserved in P0.1; P0.3 wires shared CRC-32C)
56 4 section_table_offset (byte offset from file start; 0 = no table)
60 4 section_count (number of SectionDescriptor rows; 0 = no table)The section_table_offset + section_count fields at offsets 56–63 were
the reserved[8] field in the initial P0.1 landing; P0.2 defines their
meaning within v1 (the POD layout is unchanged — only a reserved field’s
semantics are now specified). See the P0.2 progress-log entry.
Fields§
§magic: [u8; 4]§version: u16§flags: u16§axis_roles: [u8; 10]§pad0: [u8; 2]§metric_descriptor: MetricCompletenessDescriptor§header_crc32c: u32§section_table_offset: u32Byte offset of the section table from the start of the file. 0 means
no section table (a bare header — section_count must also be 0).
Otherwise must be >= HEADER_BYTE_SIZE and within the file.
section_count: u32Number of SectionDescriptor rows in the section table. 0 means no
table (a bare header — section_table_offset must also be 0).
Must be <= MAX_SECTION_COUNT.
Implementations§
Source§impl Container10dHeader
impl Container10dHeader
Sourcepub fn proposed() -> Self
pub fn proposed() -> Self
The proposed (not-yet-frozen) v1 header: Option A axis-role taxonomy +
option (b) metric-completeness descriptor (the documented limitation
matching current full_distance reality) + default-disposition-Refuse
flag set. CRC left zero (P0.3 wires the shared CRC-32C).
Sourcepub fn encode(&self, out: &mut [u8; 64])
pub fn encode(&self, out: &mut [u8; 64])
Encode the header into a caller-supplied 64-byte buffer (little-endian where applicable; the POD is already LE-friendly). Zero-alloc.
Sourcepub fn encode_to_vec64(&self) -> [u8; 64]
pub fn encode_to_vec64(&self) -> [u8; 64]
Encode into a freshly-owned 64-byte array. Convenience for tests and writers that are not on a zero-heap hot path.
Sourcepub fn parse(data: &[u8]) -> Result<Container10dHeader, HeaderParseError>
pub fn parse(data: &[u8]) -> Result<Container10dHeader, HeaderParseError>
Parse and validate a 64-byte header. Runs every P0.1 acceptance gate:
bad magic, unknown version, non-zero structural padding, undefined axis
role, metric-completeness divergence from full_distance reality, and
(P0.2) a consistent section-table pointer.
Trait Implementations§
Source§impl Clone for Container10dHeader
impl Clone for Container10dHeader
Source§fn clone(&self) -> Container10dHeader
fn clone(&self) -> Container10dHeader
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Container10dHeader
impl Debug for Container10dHeader
Source§impl Default for Container10dHeader
impl Default for Container10dHeader
Source§impl PartialEq for Container10dHeader
impl PartialEq for Container10dHeader
Source§fn eq(&self, other: &Container10dHeader) -> bool
fn eq(&self, other: &Container10dHeader) -> bool
self and other values to be equal, and is used by ==.impl Copy for Container10dHeader
impl Eq for Container10dHeader
impl Pod for Container10dHeader
impl StructuralPartialEq for Container10dHeader
Auto Trait Implementations§
impl Freeze for Container10dHeader
impl RefUnwindSafe for Container10dHeader
impl Send for Container10dHeader
impl Sync for Container10dHeader
impl Unpin for Container10dHeader
impl UnsafeUnpin for Container10dHeader
impl UnwindSafe for Container10dHeader
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
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
§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
bits
as &Self.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more