pub struct EmfContainerReader<'a> { /* private fields */ }Expand description
Immutable zero-copy view of an EMF-64 container file.
Implementations§
Source§impl<'a> EmfContainerReader<'a>
impl<'a> EmfContainerReader<'a>
Sourcepub fn parse(bytes: &'a [u8]) -> Result<Self, EmfError>
pub fn parse(bytes: &'a [u8]) -> Result<Self, EmfError>
Parse under conservative 16 MiB / 4096-chunk budgets.
Sourcepub fn parse_with_limits(
bytes: &'a [u8],
limits: EmfReadLimits,
) -> Result<Self, EmfError>
pub fn parse_with_limits( bytes: &'a [u8], limits: EmfReadLimits, ) -> Result<Self, EmfError>
Parse and validate an EMF container under explicit file/chunk budgets.
Sourcepub fn parse_legacy_with_limits(
bytes: &'a [u8],
limits: EmfReadLimits,
) -> Result<Self, EmfError>
pub fn parse_legacy_with_limits( bytes: &'a [u8], limits: EmfReadLimits, ) -> Result<Self, EmfError>
Migration-only admission of v1 files with defective truncated integrity. A successful call does not certify a full digest for a legacy file.
Sourcepub fn parse_with_extension_limits(
bytes: &'a [u8],
limits: EmfReadLimits,
extension_limits: EmfExtensionLimits,
) -> Result<Self, EmfError>
pub fn parse_with_extension_limits( bytes: &'a [u8], limits: EmfReadLimits, extension_limits: EmfExtensionLimits, ) -> Result<Self, EmfError>
Current-format reader with independently bounded metadata/PCM admission.
Sourcepub fn header(&self) -> &EmfContainerHeader
pub fn header(&self) -> &EmfContainerHeader
Access the parsed container header.
Sourcepub fn extension(&self) -> Option<&EmfExtensionView<'a>>
pub fn extension(&self) -> Option<&EmfExtensionView<'a>>
Typed v3 interpretation and verified original PCM; absent for repaired v2.
Sourcepub fn chunk_count(&self) -> usize
pub fn chunk_count(&self) -> usize
Total number of chunks / bricks in this container.
Sourcepub fn chunk_entry(&self, index: usize) -> Option<EmfChunkDirectoryEntry>
pub fn chunk_entry(&self, index: usize) -> Option<EmfChunkDirectoryEntry>
Read a chunk directory entry by index.
Sourcepub fn chunk_payload(&self, index: usize) -> Option<&'a [u8]>
pub fn chunk_payload(&self, index: usize) -> Option<&'a [u8]>
Borrow the raw byte payload of a chunk.
Sourcepub fn cell(
&self,
chunk_index: usize,
cell_index: usize,
) -> Option<EmfCellRecord64>
pub fn cell( &self, chunk_index: usize, cell_index: usize, ) -> Option<EmfCellRecord64>
Read a specific 64B cell from a chunk.
Sourcepub fn find_chunk_by_hilbert(&self, hilbert_key: u64) -> Option<usize>
pub fn find_chunk_by_hilbert(&self, hilbert_key: u64) -> Option<usize>
Legacy spatial-only lookup deterministically selects time index zero. Use find_chunk_at_time for another stored snapshot.
Sourcepub fn find_chunk_at_time(
&self,
hilbert_key: u64,
time_slice: u32,
) -> Option<usize>
pub fn find_chunk_at_time( &self, hilbert_key: u64, time_slice: u32, ) -> Option<usize>
Exact spatial/time lookup. V3 canonical directories use a lower-bound binary search then scan only equal spatial keys; unsorted v2 is bounded linear.
Sourcepub fn lookup_work_bound(&self) -> usize
pub fn lookup_work_bound(&self) -> usize
Conservative directory visits per exact lookup, for caller work admission.
Sourcepub fn lookup_brick_cell(
&self,
bx: u32,
by: u32,
bz: u32,
lx: u8,
ly: u8,
lz: u8,
order: u32,
) -> Option<EmfCellRecord64>
pub fn lookup_brick_cell( &self, bx: u32, by: u32, bz: u32, lx: u8, ly: u8, lz: u8, order: u32, ) -> Option<EmfCellRecord64>
Direct lookup of a voxel cell using brick coordinates (bx, by, bz) and local coords (lx, ly, lz).
pub fn lookup_brick_cell_at_time( &self, bx: u32, by: u32, bz: u32, lx: u8, ly: u8, lz: u8, order: u32, time_slice: u32, ) -> Option<EmfCellRecord64>
Sourcepub fn dense_volume(&self) -> Result<DenseEmfVolume, EmfError>
pub fn dense_volume(&self) -> Result<DenseEmfVolume, EmfError>
Unpack Hilbert 8³ bricks into a dense [t][z][y][x] grid of scientific cells.
This decodes physical fields only. V3 independent PCM and interpretation
remain available through extension(); they must not be inferred from sigma.
.10d MID2/FIEL names the field; it does not duplicate these cells.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for EmfContainerReader<'a>
impl<'a> RefUnwindSafe for EmfContainerReader<'a>
impl<'a> Send for EmfContainerReader<'a>
impl<'a> Sync for EmfContainerReader<'a>
impl<'a> Unpin for EmfContainerReader<'a>
impl<'a> UnsafeUnpin for EmfContainerReader<'a>
impl<'a> UnwindSafe for EmfContainerReader<'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