pub enum DataLayoutMessage {
Contiguous {
address: u64,
size: u64,
},
Compact {
data: Vec<u8>,
},
ChunkedV4 {
flags: u8,
chunk_dims: Vec<u64>,
index_type: ChunkIndexType,
earray_params: Option<EarrayParams>,
farray_params: Option<FixedArrayParams>,
index_address: u64,
},
}Expand description
Data layout message payload.
Variants§
Contiguous
Contiguous storage — raw data in a single block.
Fields
Compact
Compact storage — raw data stored within the object header.
ChunkedV4
Version 4 chunked storage.
Fields
index_type: ChunkIndexTypeType of chunk index structure.
earray_params: Option<EarrayParams>Extensible array parameters (present when index_type == ExtensibleArray).
farray_params: Option<FixedArrayParams>Fixed array parameters (present when index_type == FixedArray).
Implementations§
Source§impl DataLayoutMessage
impl DataLayoutMessage
Sourcepub fn contiguous_unallocated(size: u64) -> Self
pub fn contiguous_unallocated(size: u64) -> Self
Contiguous layout with no data allocated yet.
Sourcepub fn contiguous(address: u64, size: u64) -> Self
pub fn contiguous(address: u64, size: u64) -> Self
Contiguous layout pointing to allocated data.
Sourcepub fn chunked_v4_earray(
chunk_dims: Vec<u64>,
earray_params: EarrayParams,
index_address: u64,
) -> Self
pub fn chunked_v4_earray( chunk_dims: Vec<u64>, earray_params: EarrayParams, index_address: u64, ) -> Self
Version 4 chunked layout with extensible array index.
chunk_dims should include the trailing element-size dimension.
For example, for a 2D dataset with chunk=(1,4) and element_size=8,
pass chunk_dims = [1, 4, 8].
Sourcepub fn chunked_v4_farray(
chunk_dims: Vec<u64>,
farray_params: FixedArrayParams,
index_address: u64,
) -> Self
pub fn chunked_v4_farray( chunk_dims: Vec<u64>, farray_params: FixedArrayParams, index_address: u64, ) -> Self
Version 4 chunked layout with fixed array index.
chunk_dims should include the trailing element-size dimension.
Sourcepub fn chunked_v4_btree_v2(chunk_dims: Vec<u64>, index_address: u64) -> Self
pub fn chunked_v4_btree_v2(chunk_dims: Vec<u64>, index_address: u64) -> Self
Version 4 chunked layout with B-tree v2 index.
chunk_dims should include the trailing element-size dimension.
Sourcepub fn chunked_v4_single(chunk_dims: Vec<u64>, index_address: u64) -> Self
pub fn chunked_v4_single(chunk_dims: Vec<u64>, index_address: u64) -> Self
Version 4 chunked layout with single-chunk index.
chunk_dims should include the trailing element-size dimension.
pub fn encode(&self, ctx: &FormatContext) -> Vec<u8> ⓘ
pub fn decode(buf: &[u8], ctx: &FormatContext) -> FormatResult<(Self, usize)>
Trait Implementations§
Source§impl Clone for DataLayoutMessage
impl Clone for DataLayoutMessage
Source§fn clone(&self) -> DataLayoutMessage
fn clone(&self) -> DataLayoutMessage
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more