#[repr(C)]pub struct Level0Root {Show 23 fields
pub magic: u32,
pub version: u16,
pub flags: u16,
pub l1_manifest_offset: u64,
pub l1_manifest_length: u64,
pub total_vector_count: u64,
pub dimension: u16,
pub base_dtype: u8,
pub profile_id: u8,
pub epoch: u32,
pub created_ns: u64,
pub modified_ns: u64,
pub entrypoint: EntrypointPtr,
pub toplayer: TopLayerPtr,
pub centroid: CentroidPtr,
pub quantdict: QuantDictPtr,
pub hot_cache: HotCachePtr,
pub prefetch_map: PrefetchMapPtr,
pub sig_algo: u16,
pub sig_length: u16,
pub signature_buf: [u8; 3684],
pub reserved: [u8; 252],
pub root_checksum: u32,
}Expand description
The Level 0 root manifest (exactly 4096 bytes).
Always located at the last 4096 bytes of the most recent MANIFEST_SEG.
Its fixed size enables instant boot: seek(EOF - 4096).
§Binary layout
| Offset | Size | Field |
|---|---|---|
| 0x000 | 4 | magic (0x52564D30 “RVM0”) |
| 0x004 | 2 | version |
| 0x006 | 2 | flags |
| 0x008 | 8 | l1_manifest_offset |
| 0x010 | 8 | l1_manifest_length |
| 0x018 | 8 | total_vector_count |
| 0x020 | 2 | dimension |
| 0x022 | 1 | base_dtype |
| 0x023 | 1 | profile_id |
| 0x024 | 4 | epoch |
| 0x028 | 8 | created_ns |
| 0x030 | 8 | modified_ns |
| 0x038 | 16 | entrypoint_ptr |
| 0x048 | 16 | toplayer_ptr |
| 0x058 | 16 | centroid_ptr |
| 0x068 | 16 | quantdict_ptr |
| 0x078 | 16 | hot_cache_ptr |
| 0x088 | 16 | prefetch_map_ptr (includes 4B padding) |
| 0x098 | 2 | sig_algo |
| 0x09A | 2 | sig_length |
| 0x09C | 3684 | signature_buf |
| 0xF00 | 252 | reserved |
| 0xFFC | 4 | root_checksum |
Fields§
§magic: u32Magic number: must be 0x52564D30 (“RVM0”).
version: u16Root manifest version.
flags: u16Root manifest flags.
l1_manifest_offset: u64Byte offset to the Level 1 manifest segment.
l1_manifest_length: u64Byte length of the Level 1 manifest segment.
total_vector_count: u64Total vectors across all segments.
dimension: u16Vector dimensionality.
base_dtype: u8Base data type enum (see DataType).
profile_id: u8Domain profile id.
epoch: u32Current overlay epoch number.
created_ns: u64File creation timestamp (nanoseconds).
modified_ns: u64Last modification timestamp (nanoseconds).
entrypoint: EntrypointPtrHNSW entry points.
toplayer: TopLayerPtrTop-layer adjacency.
centroid: CentroidPtrCluster centroids / pivots.
quantdict: QuantDictPtrQuantization dictionary.
hot_cache: HotCachePtrHot vector cache (HOT_SEG).
prefetch_map: PrefetchMapPtrPrefetch hint table.
sig_algo: u16Manifest signature algorithm.
sig_length: u16Signature byte length.
signature_buf: [u8; 3684]Signature bytes (up to 3688 bytes; only first sig_length are meaningful).
reserved: [u8; 252]Reserved / zero-padded area.
root_checksum: u32CRC32C of bytes 0x000 through 0xFFB.
Implementations§
Source§impl Level0Root
impl Level0Root
Sourcepub const SIG_BUF_SIZE: usize = 3684
pub const SIG_BUF_SIZE: usize = 3684
Size of the signature buffer within the root manifest. From offset 0x09C to 0xEFF inclusive = 3684 bytes.
Sourcepub const fn is_valid_magic(&self) -> bool
pub const fn is_valid_magic(&self) -> bool
Check whether the magic field matches the expected value.
Trait Implementations§
Source§impl Clone for Level0Root
impl Clone for Level0Root
Source§fn clone(&self) -> Level0Root
fn clone(&self) -> Level0Root
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more