pub struct Q42VolumeManifest {
pub generation: u64,
pub segments: Vec<Q42VolumeSegment>,
pub lexicon_segments: Vec<Q42LexiconSegment>,
}Expand description
Front-embedded catalog which makes immutable Q42 segments one snapshot.
Fields§
§generation: u64§segments: Vec<Q42VolumeSegment>§lexicon_segments: Vec<Q42LexiconSegment>Implementations§
Source§impl Q42VolumeManifest
impl Q42VolumeManifest
Sourcepub fn encode(&self) -> Result<Vec<u8>>
pub fn encode(&self) -> Result<Vec<u8>>
Serialize the manifest (magic, version, generation, then volume + lexicon segment entries) — validates first and enforces the 4 MiB front-matter ceiling.
Sourcepub fn decode(bytes: &[u8]) -> Result<Self>
pub fn decode(bytes: &[u8]) -> Result<Self>
Parse a manifest blob: size cap, magic, version, and each
segment entry — then validate().
Sourcepub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Structural validation: locator syntax, hash-range ordering, non-empty segments, duplicate detection.
Sourcepub fn segment_range_for_object(
&self,
object_hash: u64,
) -> Option<Q42SegmentMatchRange>
pub fn segment_range_for_object( &self, object_hash: u64, ) -> Option<Q42SegmentMatchRange>
Return every segment whose committed object interval can contain the given value. Equal boundaries remain complete across adjacent volumes.
Sourcepub fn segment_indices_for_object_into(
&self,
object_hash: u64,
cursor: usize,
out: &mut [usize],
) -> Result<Option<Q42SegmentMatchPage>>
pub fn segment_indices_for_object_into( &self, object_hash: u64, cursor: usize, out: &mut [usize], ) -> Result<Option<Q42SegmentMatchPage>>
Fill a bounded page of matching segment indices. This caps caller work even when a high-frequency object falls on many volume boundaries.
Sourcepub fn segment_from_file(
path: &Path,
locator: String,
) -> Result<Q42VolumeSegment>
pub fn segment_from_file( path: &Path, locator: String, ) -> Result<Q42VolumeSegment>
Build the manifest entry for an on-disk segment: scans every superblock for first/last object hash and Quin count, then hashes the file (SHA-256).
Sourcepub fn lexicon_segment_from_file(
path: &Path,
locator: String,
) -> Result<Q42LexiconSegment>
pub fn lexicon_segment_from_file( path: &Path, locator: String, ) -> Result<Q42LexiconSegment>
Build the manifest entry for a Q42LEX shard: first/last hash from the lexicon view plus the file’s SHA-256.
Trait Implementations§
Source§impl Clone for Q42VolumeManifest
impl Clone for Q42VolumeManifest
Source§impl Debug for Q42VolumeManifest
impl Debug for Q42VolumeManifest
impl Eq for Q42VolumeManifest
Source§impl PartialEq for Q42VolumeManifest
impl PartialEq for Q42VolumeManifest
impl StructuralPartialEq for Q42VolumeManifest
Auto Trait Implementations§
impl Freeze for Q42VolumeManifest
impl RefUnwindSafe for Q42VolumeManifest
impl Send for Q42VolumeManifest
impl Sync for Q42VolumeManifest
impl Unpin for Q42VolumeManifest
impl UnsafeUnpin for Q42VolumeManifest
impl UnwindSafe for Q42VolumeManifest
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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