Skip to main content

Level0Root

Struct Level0Root 

Source
#[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

OffsetSizeField
0x0004magic (0x52564D30 “RVM0”)
0x0042version
0x0062flags
0x0088l1_manifest_offset
0x0108l1_manifest_length
0x0188total_vector_count
0x0202dimension
0x0221base_dtype
0x0231profile_id
0x0244epoch
0x0288created_ns
0x0308modified_ns
0x03816entrypoint_ptr
0x04816toplayer_ptr
0x05816centroid_ptr
0x06816quantdict_ptr
0x07816hot_cache_ptr
0x08816prefetch_map_ptr (includes 4B padding)
0x0982sig_algo
0x09A2sig_length
0x09C3684signature_buf
0xF00252reserved
0xFFC4root_checksum

Fields§

§magic: u32

Magic number: must be 0x52564D30 (“RVM0”).

§version: u16

Root manifest version.

§flags: u16

Root manifest flags.

§l1_manifest_offset: u64

Byte offset to the Level 1 manifest segment.

§l1_manifest_length: u64

Byte length of the Level 1 manifest segment.

§total_vector_count: u64

Total vectors across all segments.

§dimension: u16

Vector dimensionality.

§base_dtype: u8

Base data type enum (see DataType).

§profile_id: u8

Domain profile id.

§epoch: u32

Current overlay epoch number.

§created_ns: u64

File creation timestamp (nanoseconds).

§modified_ns: u64

Last modification timestamp (nanoseconds).

§entrypoint: EntrypointPtr

HNSW entry points.

§toplayer: TopLayerPtr

Top-layer adjacency.

§centroid: CentroidPtr

Cluster centroids / pivots.

§quantdict: QuantDictPtr

Quantization dictionary.

§hot_cache: HotCachePtr

Hot vector cache (HOT_SEG).

§prefetch_map: PrefetchMapPtr

Prefetch hint table.

§sig_algo: u16

Manifest signature algorithm.

§sig_length: u16

Signature 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: u32

CRC32C of bytes 0x000 through 0xFFB.

Implementations§

Source§

impl Level0Root

Source

pub const SIG_BUF_SIZE: usize = 3684

Size of the signature buffer within the root manifest. From offset 0x09C to 0xEFF inclusive = 3684 bytes.

Source

pub const fn zeroed() -> Self

Create a zeroed root manifest with only the magic set.

Source

pub const fn is_valid_magic(&self) -> bool

Check whether the magic field matches the expected value.

Trait Implementations§

Source§

impl Clone for Level0Root

Source§

fn clone(&self) -> Level0Root

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Level0Root

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for Level0Root

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.