#[repr(C)]pub struct SegmentHeader {Show 14 fields
pub magic: u32,
pub version: u8,
pub seg_type: u8,
pub flags: u16,
pub segment_id: u64,
pub payload_length: u64,
pub timestamp_ns: u64,
pub checksum_algo: u8,
pub compression: u8,
pub reserved_0: u16,
pub reserved_1: u32,
pub content_hash: [u8; 16],
pub uncompressed_len: u32,
pub alignment_pad: u32,
}Expand description
The fixed 64-byte header that precedes every segment payload.
Layout matches the wire format exactly (repr(C), little-endian fields). Aligned to 64 bytes to match SIMD register width and cache-line size.
Fields§
§magic: u32Magic number: must be 0x52564653 (“RVFS”).
version: u8Segment format version (currently 1).
seg_type: u8Segment type discriminator (see SegmentType).
flags: u16Bitfield flags (see SegmentFlags).
segment_id: u64Monotonically increasing segment ordinal.
payload_length: u64Byte length of payload (after header, before optional footer).
timestamp_ns: u64Nanosecond UNIX timestamp of segment creation.
checksum_algo: u8Hash algorithm enum: 0=CRC32C, 1=XXH3-128, 2=SHAKE-256.
compression: u8Compression enum: 0=none, 1=LZ4, 2=ZSTD, 3=custom.
reserved_0: u16Reserved (must be zero).
reserved_1: u32Reserved (must be zero).
content_hash: [u8; 16]First 128 bits of payload hash (algorithm per checksum_algo).
uncompressed_len: u32Original payload size before compression (0 if uncompressed).
alignment_pad: u32Padding to reach the 64-byte boundary.
Implementations§
Source§impl SegmentHeader
impl SegmentHeader
Trait Implementations§
Source§impl Clone for SegmentHeader
impl Clone for SegmentHeader
Source§fn clone(&self) -> SegmentHeader
fn clone(&self) -> SegmentHeader
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more