#[non_exhaustive]pub enum FormatError {
Show 81 variants
SignatureNotFound,
UnsupportedVersion(u8),
UnexpectedEof {
expected: usize,
available: usize,
},
InvalidOffsetSize(u8),
InvalidLengthSize(u8),
InvalidObjectHeaderSignature,
InvalidObjectHeaderVersion(u8),
UnsupportedMessage(u16),
InvalidDatatypeClass(u8),
InvalidDatatypeVersion {
class: u8,
version: u8,
},
InvalidStringPadding(u8),
InvalidCharacterSet(u8),
InvalidByteOrder(u8),
InvalidReferenceType(u8),
InvalidFileSpaceStrategy(u8),
UnsupportedFileSpaceInfoVersion(u8),
InvalidFreeSpaceManager,
InvalidCompoundSize,
EmptyCompoundType,
DuplicateCompoundField(String),
CompoundFieldOutOfBounds {
name: String,
offset: u64,
field_size: u32,
compound_size: u32,
},
CompoundFieldOverlap {
first: String,
second: String,
},
CompoundFieldMissing(String),
CompoundFieldTypeMismatch(String),
InvalidDataspaceVersion(u8),
InvalidDataspaceType(u8),
InvalidLayoutVersion(u8),
InvalidLayoutClass(u8),
NoDataAllocated,
TypeMismatch {
expected: &'static str,
actual: &'static str,
},
DataSizeMismatch {
expected: usize,
actual: usize,
},
InvalidLocalHeapSignature,
InvalidLocalHeapVersion(u8),
InvalidBTreeSignature,
InvalidBTreeNodeType(u8),
InvalidSymbolTableNodeSignature,
InvalidSymbolTableNodeVersion(u8),
PathNotFound(String),
InvalidLinkVersion(u8),
InvalidLinkType(u8),
InvalidLinkInfoVersion(u8),
InvalidBTreeV2Signature,
InvalidBTreeV2Version(u8),
InvalidFractalHeapSignature,
InvalidFractalHeapVersion(u8),
InvalidHeapIdType(u8),
HugeObjectNotFound(u64),
UnsupportedFilteredHeapObject,
UnsupportedVirtualLayout,
InvalidAttributeVersion(u8),
InvalidAttributeInfoVersion(u8),
InvalidSharedMessageVersion(u8),
InvalidGlobalHeapSignature,
InvalidGlobalHeapVersion(u8),
GlobalHeapObjectNotFound {
collection_address: u64,
index: u16,
},
VlDataError(String),
VariableLengthElementLimitExceeded {
limit: usize,
actual: u64,
},
VariableLengthByteLimitExceeded {
limit: usize,
required: u64,
},
SerializationError(String),
DatasetMissingData,
DatasetMissingShape,
ChunkedVlenStringUnsupported,
ShapeDataMismatch {
expected: usize,
actual: usize,
element_size: usize,
},
InvalidChunkGeometry(&'static str),
InvalidFilterPipelineVersion(u8),
UnsupportedFilter(u16),
FilterError(String),
DecompressionError(String),
CompressionError(String),
Fletcher32Mismatch {
expected: u32,
computed: u32,
},
ChunkedReadError(String),
ChunkAssemblyError(String),
ChecksumMismatch {
expected: u32,
computed: u32,
},
NestingDepthExceeded,
DuplicateDatasetName(String),
UnsupportedZfp(String),
ValueTooLargeForPlatform {
value: u64,
target: &'static str,
},
OffsetOverflow {
offset: u64,
length: u64,
},
Source(String),
LibverBoundsUnsatisfiable {
writes: &'static str,
requested_low: &'static str,
requested_high: &'static str,
},
InvalidObjectReference(u64),
}Expand description
Errors that can occur when parsing HDF5 binary format structures.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
SignatureNotFound
The HDF5 magic signature was not found at any valid offset.
UnsupportedVersion(u8)
The superblock version is not supported.
UnexpectedEof
Unexpected end of data.
Fields
InvalidOffsetSize(u8)
Invalid offset size (must be 2, 4, or 8).
InvalidLengthSize(u8)
Invalid length size (must be 2, 4, or 8).
InvalidObjectHeaderSignature
Invalid object header signature.
InvalidObjectHeaderVersion(u8)
Invalid object header version.
UnsupportedMessage(u16)
Unknown message type that is marked as must-understand.
InvalidDatatypeClass(u8)
Invalid datatype class.
InvalidDatatypeVersion
Invalid datatype version for a given class.
InvalidStringPadding(u8)
Invalid string padding type.
InvalidCharacterSet(u8)
Invalid character set.
InvalidByteOrder(u8)
Invalid byte order.
InvalidReferenceType(u8)
Invalid reference type.
InvalidFileSpaceStrategy(u8)
Invalid file-space management strategy code in a File Space Info message.
UnsupportedFileSpaceInfoVersion(u8)
Unsupported File Space Info message version (only version 1 is handled).
InvalidFreeSpaceManager
A free-space manager block (FSHD/FSSE) is malformed.
InvalidCompoundSize
A compound datatype has a zero total size.
EmptyCompoundType
A compound datatype contains no fields.
DuplicateCompoundField(String)
A compound datatype contains the same field name more than once.
CompoundFieldOutOfBounds
A compound field extends past the declared compound size.
Fields
CompoundFieldOverlap
Two compound fields overlap.
CompoundFieldMissing(String)
A named compound field was not present.
CompoundFieldTypeMismatch(String)
A compound field has an incompatible datatype.
InvalidDataspaceVersion(u8)
Invalid dataspace version.
InvalidDataspaceType(u8)
Invalid dataspace type.
InvalidLayoutVersion(u8)
Invalid data layout version.
InvalidLayoutClass(u8)
Invalid data layout class.
NoDataAllocated
No data allocated for contiguous layout.
TypeMismatch
Type mismatch when reading data.
Fields
DataSizeMismatch
Data size mismatch.
InvalidLocalHeapSignature
Invalid local heap signature.
InvalidLocalHeapVersion(u8)
Invalid local heap version.
InvalidBTreeSignature
Invalid B-tree v1 signature.
InvalidBTreeNodeType(u8)
Invalid B-tree node type.
InvalidSymbolTableNodeSignature
Invalid symbol table node signature.
InvalidSymbolTableNodeVersion(u8)
Invalid symbol table node version.
PathNotFound(String)
Path not found during group traversal.
InvalidLinkVersion(u8)
Invalid Link message version.
InvalidLinkType(u8)
Invalid link type code.
InvalidLinkInfoVersion(u8)
Invalid Link Info message version.
InvalidBTreeV2Signature
Invalid B-tree v2 signature.
InvalidBTreeV2Version(u8)
Invalid B-tree v2 version.
InvalidFractalHeapSignature
Invalid fractal heap signature.
InvalidFractalHeapVersion(u8)
Invalid fractal heap version.
InvalidHeapIdType(u8)
Invalid heap ID type.
HugeObjectNotFound(u64)
A fractal-heap “huge” object’s heap ID referenced a B-tree key that is not present in the heap’s huge-objects v2 B-tree.
UnsupportedFilteredHeapObject
A fractal-heap object lives in an I/O-filter-encoded heap (filtered managed or huge storage), whose filtered bytes this reader does not decode. Link and attribute heaps are never filtered, so this does not arise for them.
UnsupportedVirtualLayout
A dataset uses the Virtual (VDS) data layout, which maps its elements to regions of other datasets, possibly in other files. This reader does not yet resolve virtual mappings, so such a dataset is refused rather than read as empty or wrong.
InvalidAttributeVersion(u8)
Invalid attribute message version.
InvalidAttributeInfoVersion(u8)
Invalid Attribute Info message version.
Invalid shared message version.
InvalidGlobalHeapSignature
Invalid global heap collection signature.
InvalidGlobalHeapVersion(u8)
Invalid global heap version.
GlobalHeapObjectNotFound
Global heap object not found.
VlDataError(String)
Variable-length data error.
VariableLengthElementLimitExceeded
A variable-length read exceeded its configured element limit.
Fields
VariableLengthByteLimitExceeded
A variable-length read exceeded its configured payload-byte limit.
Fields
SerializationError(String)
Serialization error.
DatasetMissingData
Dataset is missing data.
DatasetMissingShape
Dataset is missing shape.
ChunkedVlenStringUnsupported
A variable-length string dataset was requested with chunked, filtered, or resizable storage. VL element references live in the global heap, whose addresses are only known after data layout, so they cannot be patched into compressed chunks written beforehand.
ShapeDataMismatch
The dataset’s element count implied by its shape does not match the
amount of data supplied (shape.product() * element_size != data.len()).
Fields
InvalidChunkGeometry(&'static str)
A chunked/filtered/extensible dataset’s chunk geometry is invalid — for example chunk dimensions whose rank disagrees with the shape, a zero chunk dimension, a maximum shape whose rank disagrees with the shape or that is smaller than the current shape, or chunking requested on a scalar dataset. Reported up front so a malformed request is refused instead of panicking in the chunk splitter or producing an unreadable dataset. The payload is a human-readable reason.
InvalidFilterPipelineVersion(u8)
Invalid filter pipeline version.
UnsupportedFilter(u16)
Unsupported filter ID.
FilterError(String)
Filter processing error.
DecompressionError(String)
Decompression error.
CompressionError(String)
Compression error.
Fletcher32Mismatch
Fletcher32 checksum mismatch.
ChunkedReadError(String)
Chunked dataset read error.
ChunkAssemblyError(String)
Chunk assembly error.
ChecksumMismatch
CRC32C checksum mismatch.
NestingDepthExceeded
Maximum nesting/continuation depth exceeded (malformed data protection).
DuplicateDatasetName(String)
Duplicate dataset name detected during parallel metadata merge.
UnsupportedZfp(String)
ZFP filter configuration is invalid (e.g. missing element type, rank out of range).
ValueTooLargeForPlatform
A file-derived 64-bit value (an offset, length, size, or element count)
does not fit in the target integer type on this platform. This is the
guard that replaces silent as usize / as u32 truncation: on a 32-bit
host, usize is 32 bits, so an HDF5 offset or length above usize::MAX
would otherwise wrap and read the wrong bytes. The original value is
preserved for diagnostics, and target names the type we tried to
narrow to (e.g. "usize", "u32").
Fields
OffsetOverflow
Two file-derived values (typically an offset and a length) overflow u64
when added to form a slice bound. Reported instead of wrapping so a
malformed file cannot produce a wrapped or out-of-range index.
Fields
Source(String)
A random-access byte source (see [crate::source::FileSource]) failed to
supply the requested bytes. The string carries a backend-specific reason
(e.g. an underlying std::io::Error rendered to text), so this stays
no_std/alloc-friendly and free of an std::io dependency.
LibverBoundsUnsatisfiable
The library-version bounds requested via
FileBuilder::with_libver_bounds
cannot be satisfied. This crate’s writer emits exactly one on-disk format
(the version 3 / HDF5 1.10 superblock), so a bound that excludes it — an
upper bound older than 1.10, or a lower bound newer than 1.10 — is
unsatisfiable. The fields carry the format produced and the bounds asked
for, as LibVer::name labels.
Fields
InvalidObjectReference(u64)
An HDF5 object reference (H5R_OBJECT) could not be resolved to an
object: the stored address is null or undefined (HADDR_UNDEF), or it
does not point at a group or dataset object header. The payload is the
stored (base-relative) address, preserved for diagnostics.
Trait Implementations§
Source§impl Clone for FormatError
impl Clone for FormatError
Source§fn clone(&self) -> FormatError
fn clone(&self) -> FormatError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FormatError
impl Debug for FormatError
Source§impl Display for FormatError
impl Display for FormatError
impl Eq for FormatError
Source§impl Error for FormatError
Available on crate feature std only.
impl Error for FormatError
std only.1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<FormatError> for Error
Available on crate feature std only.
impl From<FormatError> for Error
std only.Source§fn from(e: FormatError) -> Self
fn from(e: FormatError) -> Self
Source§impl From<FormatError> for MatError
impl From<FormatError> for MatError
Source§fn from(e: FormatError) -> Self
fn from(e: FormatError) -> Self
Source§impl PartialEq for FormatError
impl PartialEq for FormatError
Source§fn eq(&self, other: &FormatError) -> bool
fn eq(&self, other: &FormatError) -> bool
self and other values to be equal, and is used by ==.