#[repr(C, packed(1))]pub struct Q42VolumeHeader {Show 23 fields
pub magic: [u8; 4],
pub version: u16,
pub flags: u16,
pub lex_offset: u64,
pub lex_length: u64,
pub bidx_offset: u64,
pub bidx_length: u64,
pub block_dir_offset: u64,
pub block_dir_length: u64,
pub data_offset: u64,
pub data_length: u64,
pub block_count: u64,
pub block_size: u32,
pub quins_per_block: u32,
pub temporal_index_offset: u64,
pub temporal_index_length: u64,
pub merkle_root: [u8; 32],
pub assertion_timestamp: u64,
pub dag_root_offset: u64,
pub dag_root_length: u64,
pub natural_person_did_offset: u64,
pub software_agent_did_offset: u64,
pub _reserved: [u8; 80],
}Expand description
Q42 volume header — 256 bytes, repr(C, packed).
v3 builds hard-reject files with version < 3 — run q42 migrate meta first.
Fields§
§magic: [u8; 4]§version: u16§flags: u16§lex_offset: u64§lex_length: u64§bidx_offset: u64§bidx_length: u64§block_dir_offset: u64§block_dir_length: u64§data_offset: u64§data_length: u64§block_count: u64§block_size: u32§quins_per_block: u32§temporal_index_offset: u64§temporal_index_length: u64§merkle_root: [u8; 32]§assertion_timestamp: u64§dag_root_offset: u64§dag_root_length: u64§natural_person_did_offset: u64§software_agent_did_offset: u64§_reserved: [u8; 80]Implementations§
Source§impl Q42VolumeHeader
impl Q42VolumeHeader
Sourcepub fn verify_version(&self) -> Result<(), String>
pub fn verify_version(&self) -> Result<(), String>
Reject v2 files. Call before any read/write on a mapped header.
Sourcepub fn new_v3(
lex_offset: u64,
lex_length: u64,
bidx_offset: u64,
bidx_length: u64,
block_dir_offset: u64,
block_dir_length: u64,
data_offset: u64,
data_length: u64,
block_count: u64,
block_size: u32,
quins_per_block: u32,
) -> Self
pub fn new_v3( lex_offset: u64, lex_length: u64, bidx_offset: u64, bidx_length: u64, block_dir_offset: u64, block_dir_length: u64, data_offset: u64, data_length: u64, block_count: u64, block_size: u32, quins_per_block: u32, ) -> Self
Build a minimal valid v3 header with all extension fields zeroed.
Trait Implementations§
Source§impl Clone for Q42VolumeHeader
impl Clone for Q42VolumeHeader
Source§fn clone(&self) -> Q42VolumeHeader
fn clone(&self) -> Q42VolumeHeader
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Q42VolumeHeader
impl Debug for Q42VolumeHeader
impl Copy for Q42VolumeHeader
Auto Trait Implementations§
impl Freeze for Q42VolumeHeader
impl RefUnwindSafe for Q42VolumeHeader
impl Send for Q42VolumeHeader
impl Sync for Q42VolumeHeader
impl Unpin for Q42VolumeHeader
impl UnsafeUnpin for Q42VolumeHeader
impl UnwindSafe for Q42VolumeHeader
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>,
Aggregate shares in an MPC protocol.
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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>
Converts
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>
Converts
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