#[non_exhaustive]pub enum Layout {
Compact {
size: u64,
},
Contiguous {
address: Option<u64>,
size: u64,
},
Chunked {
chunk_shape: Vec<u64>,
index: ChunkIndex,
},
Virtual,
}Expand description
How a dataset’s raw data is arranged on disk.
The curated analogue of HDF5’s layout class (H5Pget_layout), enriched with
the per-class facts needed to locate or size the data without decoding it.
Obtain it with Dataset::layout.
Use it to choose a reading strategy: a Contiguous
dataset is a single seek-and-read, while a Chunked
dataset is read (and, for an appendable index, grown) one chunk at a time —
enumerate its chunks with Dataset::chunks.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Compact
Stored inline in the dataset’s object header, as used for tiny datasets.
The bytes are already resident once the header is read, so there is no
separate file region to seek to; size is the inline byte count.
Contiguous
Stored as one contiguous run of bytes.
Fields
Chunked
Stored as a grid of independently located (and optionally filtered) chunks. Filtered datasets are always chunked.
Fields
chunk_shape: Vec<u64>The chunk edge lengths, one per dataset dimension, in the same order
as shape. This is the value returned by
chunk_shape; the on-disk
element-size dimension is stripped.
index: ChunkIndexThe index that maps chunk coordinates to file addresses, which
governs append eligibility (see ChunkIndex).
Virtual
A virtual dataset whose data is mapped from other datasets. Only the classification is exposed; the source mappings are not decoded.
Trait Implementations§
impl Eq for Layout
impl StructuralPartialEq for Layout
Auto Trait Implementations§
impl Freeze for Layout
impl RefUnwindSafe for Layout
impl Send for Layout
impl Sync for Layout
impl Unpin for Layout
impl UnsafeUnpin for Layout
impl UnwindSafe for Layout
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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