pub struct IndexingDecoderReader { /* private fields */ }Expand description
Owned decoded output that publishes a random-access index at verified EOF.
This reader has the same Read + Send behavior, runtime telemetry, dynamic
worker controls, backpressure, and cancellation semantics as
DecoderReader. Index construction is explicit in the type so the normal
reader does not pay for checkpoint windows or lose the small, Copy
DecodeReport result.
Reaching Read EOF means both the compressed stream and collected index
have been validated. Self::report then borrows the complete result, while
Self::finish consumes the reader and returns ownership of it.
Implementations§
Source§impl IndexingDecoderReader
impl IndexingDecoderReader
Sourcepub fn handle(&self) -> DecoderHandle
pub fn handle(&self) -> DecoderHandle
Returns a cloneable telemetry and runtime-control handle.
Sourcepub fn stats(&self) -> DecoderStats
pub fn stats(&self) -> DecoderStats
Returns an approximate lock-free snapshot of decoder activity.
Sourcepub fn set_worker_limit(&self, workers: usize) -> Result<(), WorkerLimitError>
pub fn set_worker_limit(&self, workers: usize) -> Result<(), WorkerLimitError>
Changes the maximum number of workers that may accept decoder tasks.
§Errors
Returns WorkerLimitError for zero or a value above the configured
worker budget.
Sourcepub const fn report(&self) -> Option<&IndexedDecodeReport>
pub const fn report(&self) -> Option<&IndexedDecodeReport>
Returns the indexed result after verified EOF has been observed.
This is None while decoding is open and after a terminal failure.
Sourcepub fn finish(self) -> Result<IndexedDecodeReport, IndexingError>
pub fn finish(self) -> Result<IndexedDecodeReport, IndexingError>
Discards unread output, verifies the remaining stream, finalizes the index, and returns both the scalar report and index.
§Errors
Returns the first decoding, verification, input, worker, or index construction failure.
Trait Implementations§
Source§impl Read for IndexingDecoderReader
impl Read for IndexingDecoderReader
Source§fn read(&mut self, output: &mut [u8]) -> Result<usize>
fn read(&mut self, output: &mut [u8]) -> Result<usize>
Source§fn read_vectored(&mut self, buffers: &mut [IoSliceMut<'_>]) -> Result<usize>
fn read_vectored(&mut self, buffers: &mut [IoSliceMut<'_>]) -> Result<usize>
read, except that it reads into a slice of buffers. Read moreSource§fn is_read_vectored(&self) -> bool
fn is_read_vectored(&self) -> bool
can_vector)1.0.0 · Source§fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>
fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>
buf. Read more1.0.0 · Source§fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>
fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>
buf. Read more1.6.0 · Source§fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>
fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>
buf. Read moreSource§fn read_buf(&mut self, buf: BorrowedCursor<'_, u8>) -> Result<(), Error>
fn read_buf(&mut self, buf: BorrowedCursor<'_, u8>) -> Result<(), Error>
read_buf)Source§fn read_buf_exact(
&mut self,
cursor: BorrowedCursor<'_, u8>,
) -> Result<(), Error>
fn read_buf_exact( &mut self, cursor: BorrowedCursor<'_, u8>, ) -> Result<(), Error>
read_buf)cursor. Read more1.0.0 · Source§fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
Read. Read more1.0.0 · Source§fn chain<R>(self, next: R) -> Chain<Self, R>
fn chain<R>(self, next: R) -> Chain<Self, R>
1.0.0 · Source§fn take(self, limit: u64) -> Take<Self>where
Self: Sized,
fn take(self, limit: u64) -> Take<Self>where
Self: Sized,
limit bytes from it. Read moreSource§fn read_array<const N: usize>(&mut self) -> Result<[u8; N], Error>where
Self: Sized,
fn read_array<const N: usize>(&mut self) -> Result<[u8; N], Error>where
Self: Sized,
read_array)