pub struct WasmSliceQ42Reader<'a> { /* private fields */ }Expand description
Transport-neutral reader over a borrowed .q42 volume or 48-byte NQuin slice.
Implementations§
Source§impl<'a> WasmSliceQ42Reader<'a>
impl<'a> WasmSliceQ42Reader<'a>
Sourcepub fn open(bytes: &'a [u8]) -> Result<Self>
pub fn open(bytes: &'a [u8]) -> Result<Self>
Open and validate a .q42 volume slice or a raw 48-byte NQuin array slice.
Sourcepub fn is_unified_volume(&self) -> bool
pub fn is_unified_volume(&self) -> bool
Returns true if backed by a full Q42VOL headered volume rather than raw 48B quins.
Sourcepub fn version(&self) -> u32
pub fn version(&self) -> u32
Version number of the volume (3 or 4 for unified .q42, 0 for raw NQuin slice).
Sourcepub fn block_count(&self) -> u64
pub fn block_count(&self) -> u64
Number of SuperBlocks (0 for raw NQuin slices).
Sourcepub fn execute_query_page_into(
&self,
plan: Q42RangeQueryPlan,
cursor: Q42RangeQueryCursor,
compressed: &mut [u8],
decoded: &mut [u8],
out: &mut [NQuin],
) -> Result<Q42RangeQueryPage>
pub fn execute_query_page_into( &self, plan: Q42RangeQueryPlan, cursor: Q42RangeQueryCursor, compressed: &mut [u8], decoded: &mut [u8], out: &mut [NQuin], ) -> Result<Q42RangeQueryPage>
Zero-heap paged pattern query into caller-supplied buffers.
For unified .q42 volumes, compressed must be at least
MAX_COMPRESSED_SUPERBLOCK_SIZE and decoded must be at least SUPERBLOCK_SIZE.
Sourcepub fn find_object_into(
&self,
object_hash: u64,
cursor: Q42ObjectSearchCursor,
compressed: &mut [u8],
decoded: &mut [u8],
out: &mut [NQuin],
) -> Result<Option<Q42ObjectMatchPage>>
pub fn find_object_into( &self, object_hash: u64, cursor: Q42ObjectSearchCursor, compressed: &mut [u8], decoded: &mut [u8], out: &mut [NQuin], ) -> Result<Option<Q42ObjectMatchPage>>
Zero-heap exact object lookup using BIDX on unified volumes or linear scan on raw slices.
Sourcepub fn lookup_lexicon_hash_into(
&self,
hash: u64,
page_scratch: &mut [u8],
out: &mut [u8],
) -> Result<Option<usize>>
pub fn lookup_lexicon_hash_into( &self, hash: u64, page_scratch: &mut [u8], out: &mut [u8], ) -> Result<Option<usize>>
Zero-heap lexicon hash lookup supporting both flat v1 Q42LEX and paged v2/v4 Q42LEX.
Sourcepub fn collect_all_quins(&self) -> Result<Vec<NQuin>>
pub fn collect_all_quins(&self) -> Result<Vec<NQuin>>
Cold-path helper to collect all NQuin records from the slice.
Auto Trait Implementations§
impl<'a> Freeze for WasmSliceQ42Reader<'a>
impl<'a> RefUnwindSafe for WasmSliceQ42Reader<'a>
impl<'a> Send for WasmSliceQ42Reader<'a>
impl<'a> Sync for WasmSliceQ42Reader<'a>
impl<'a> Unpin for WasmSliceQ42Reader<'a>
impl<'a> UnsafeUnpin for WasmSliceQ42Reader<'a>
impl<'a> UnwindSafe for WasmSliceQ42Reader<'a>
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
§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