pub enum LibverBound {
Earliest,
V18,
V110,
V112,
V114,
V200,
}Expand description
The low half of libhdf5’s H5Pset_libver_bounds — the oldest library
release a file must stay readable by.
It is the file-wide switch that picks between on-disk message versions:
libhdf5 keeps one table per message type (H5O_dtype_ver_bounds,
H5O_layout_ver_bounds, …) mapping the bound to the version it stamps.
Raising the bound lets the library use newer, tighter encodings; lowering
it keeps older readers able to open the file.
Variants§
Earliest
H5F_LIBVER_EARLIEST, the default: every message at its oldest
version that can express what the file holds.
V18
H5F_LIBVER_V18.
V110
H5F_LIBVER_V110.
V112
H5F_LIBVER_V112.
V114
H5F_LIBVER_V114.
V200
H5F_LIBVER_V200, which is H5F_LIBVER_LATEST for libhdf5 2.0.
Implementations§
Source§impl LibverBound
impl LibverBound
Sourcepub fn dtype_version(self) -> u8
pub fn dtype_version(self) -> u8
The datatype message version this bound calls for — libhdf5’s
H5O_dtype_ver_bounds (H5T.c), the floor H5T_set_version raises a
datatype to.
Sourcepub fn layout_version(self) -> u8
pub fn layout_version(self) -> u8
The data layout message version this bound calls for — libhdf5’s
H5O_layout_ver_bounds (H5Dlayout.c:44).
It is what decides the chunk index, before the dataspace gets a say:
H5D__chunk_set_info reaches the v1.10 indexes — extensible array,
fixed array, v2 B-tree, single chunk, implicit — only once this
version is 4 or more (H5Dchunk.c:936). Below that the layout message
has no index-type field at all and the chunks are indexed by the
version-1 B-tree, which is why V18 and Earliest share one index
despite differing in every other message version.
Sourcepub fn superblock_version(self) -> u8
pub fn superblock_version(self) -> u8
The superblock version this bound calls for — libhdf5’s
HDF5_superblock_ver_bounds (H5Fsuper.c:68), the floor
H5F__super_init raises the content-derived version to.
Version 0 is the H5F_LIBVER_EARLIEST entry
(HDF5_SUPERBLOCK_VERSION_DEF); a writer whose own structures need
more takes the higher of the two.
Sourcepub fn from_superblock_version(version: u8) -> Self
pub fn from_superblock_version(version: u8) -> Self
The lowest bound whose superblock_version
matches an on-disk version byte.
Lossy in one direction: superblock version 3 is shared by four bounds
(V110 through V200), because raising the low bound past V18 never
raises the superblock further — the version alone cannot tell them
apart, so this reports the lowest, V110. A version this crate’s own
writer never emits (1) reads back as Earliest, the same legacy
generation as 0; anything past 3 has no bound to report and falls back
to the library’s newest.