Skip to main content

Hdf5Error

Enum Hdf5Error 

Source
pub enum Hdf5Error {
Show 58 variants Io(Error), InvalidFormat(String), InvalidSignature(Vec<u8>), UnsupportedVersion(u8, u8), UnsupportedSuperblockVersion(u8), InvalidObjectHeader(String), DatasetNotFound(String), GroupNotFound(String), AttributeNotFound(String), InvalidDatatype(String), UnsupportedDatatype(String), TypeConversion { from: String, to: String, }, InvalidDimensions(String), InvalidShape { expected: Vec<usize>, actual: Vec<usize>, }, InvalidChunkSize(String), Compression(String), Decompression(String), UnsupportedCompressionFilter(String), ChecksumMismatch { expected: u32, actual: u32, }, InvalidAttributeValue(String), OutOfBounds { index: usize, size: usize, }, InvalidOffset(String), InvalidSize(String), SymbolTable(String), BTree(String), Heap(String), Message(String), InvalidMessageType(u8), UnsupportedMessageType(u8), Layout(String), UnsupportedLayout(String), FillValue(String), FilterPipeline(String), InvalidFilter(String), StringEncoding(FromUtf8Error), InvalidStringPadding(String), Reference(String), InvalidReference(String), Dataspace(String), InvalidDataspace(String), UnsupportedDataspace(String), Selection(String), Link(String), InvalidLink(String), UnsupportedLinkType(String), ObjectExists(String), InvalidObjectName(String), PathNotFound(String), InvalidPath(String), ReadOnly, WriteOnly, FileAlreadyOpen(String), FileNotOpen, FeatureNotAvailable { feature: String, }, Internal(String), Utf8Error(Utf8Error), TryFromIntError(TryFromIntError), Core(OxiGdalError),
}
Expand description

Comprehensive HDF5 error types

Variants§

§

Io(Error)

I/O error during file operations

§

InvalidFormat(String)

Invalid HDF5 file format

§

InvalidSignature(Vec<u8>)

Invalid HDF5 signature (should be \x89HDF\r\n\x1a\n)

§

UnsupportedVersion(u8, u8)

Unsupported HDF5 version

§

UnsupportedSuperblockVersion(u8)

Unsupported superblock version

§

InvalidObjectHeader(String)

Invalid object header

§

DatasetNotFound(String)

Dataset not found

§

GroupNotFound(String)

Group not found

§

AttributeNotFound(String)

Attribute not found

§

InvalidDatatype(String)

Invalid datatype

§

UnsupportedDatatype(String)

Unsupported datatype

§

TypeConversion

Type conversion error

Fields

§from: String

Source type

§to: String

Target type

§

InvalidDimensions(String)

Invalid dimensions

§

InvalidShape

Invalid shape

Fields

§expected: Vec<usize>

Expected shape

§actual: Vec<usize>

Actual shape

§

InvalidChunkSize(String)

Invalid chunk size

§

Compression(String)

Compression error

§

Decompression(String)

Decompression error

§

UnsupportedCompressionFilter(String)

Unsupported compression filter

§

ChecksumMismatch

Checksum mismatch

Fields

§expected: u32

Expected checksum value

§actual: u32

Actual computed checksum value

§

InvalidAttributeValue(String)

Invalid attribute value

§

OutOfBounds

Out of bounds access

Fields

§index: usize

Requested index

§size: usize

Maximum size

§

InvalidOffset(String)

Invalid offset

§

InvalidSize(String)

Invalid size

§

SymbolTable(String)

Symbol table error

§

BTree(String)

B-tree error

§

Heap(String)

Heap error

§

Message(String)

Message error

§

InvalidMessageType(u8)

Invalid message type

§

UnsupportedMessageType(u8)

Unsupported message type

§

Layout(String)

Layout error

§

UnsupportedLayout(String)

Unsupported layout

§

FillValue(String)

Fill value error

§

FilterPipeline(String)

Filter pipeline error

§

InvalidFilter(String)

Invalid filter

§

StringEncoding(FromUtf8Error)

String encoding error

§

InvalidStringPadding(String)

Invalid string padding

§

Reference(String)

Reference error

§

InvalidReference(String)

Invalid reference

§

Dataspace(String)

Dataspace error

§

InvalidDataspace(String)

Invalid dataspace

§

UnsupportedDataspace(String)

Unsupported dataspace

§

Selection(String)

Selection error

Link error

Invalid link

§

UnsupportedLinkType(String)

Unsupported link type

§

ObjectExists(String)

Object already exists

§

InvalidObjectName(String)

Invalid object name

§

PathNotFound(String)

Path not found

§

InvalidPath(String)

Invalid path

§

ReadOnly

File is read-only

§

WriteOnly

File is write-only

§

FileAlreadyOpen(String)

File already open

§

FileNotOpen

File not open

§

FeatureNotAvailable

Feature not available (Pure Rust limitations)

Fields

§feature: String

Feature name

§

Internal(String)

Internal error (should not happen)

§

Utf8Error(Utf8Error)

UTF-8 conversion error

§

TryFromIntError(TryFromIntError)

Integer conversion error

§

Core(OxiGdalError)

OxiGDAL core error

Implementations§

Source§

impl Hdf5Error

Source

pub fn invalid_format(msg: impl Into<String>) -> Self

Create an invalid format error

Source

pub fn invalid_datatype(msg: impl Into<String>) -> Self

Create an invalid datatype error

Source

pub fn unsupported_datatype(msg: impl Into<String>) -> Self

Create an unsupported datatype error

Source

pub fn type_conversion(from: impl Into<String>, to: impl Into<String>) -> Self

Create a type conversion error

Source

pub fn invalid_dimensions(msg: impl Into<String>) -> Self

Create an invalid dimensions error

Source

pub fn invalid_shape(expected: Vec<usize>, actual: Vec<usize>) -> Self

Create an invalid shape error

Source

pub fn compression(msg: impl Into<String>) -> Self

Create a compression error

Source

pub fn decompression(msg: impl Into<String>) -> Self

Create a decompression error

Source

pub fn dataset_not_found(name: impl Into<String>) -> Self

Create a dataset not found error

Source

pub fn group_not_found(name: impl Into<String>) -> Self

Create a group not found error

Source

pub fn attribute_not_found(name: impl Into<String>) -> Self

Create an attribute not found error

Source

pub fn feature_not_available(feature: impl Into<String>) -> Self

Create a feature not available error

Source

pub fn internal(msg: impl Into<String>) -> Self

Create an internal error

Source

pub fn code(&self) -> &'static str

Get the error code for this HDF5 error

Error codes are stable across versions and can be used for documentation and error handling.

Source

pub fn suggestion(&self) -> Option<&'static str>

Get a helpful suggestion for fixing this HDF5 error

Returns a human-readable suggestion that can help users resolve the error.

Source

pub fn context(&self) -> ErrorContext

Get additional context about this HDF5 error

Returns structured context information including dataset/attribute names and paths.

Trait Implementations§

Source§

impl Debug for Hdf5Error

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Hdf5Error

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for Hdf5Error

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Error> for Hdf5Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<FromUtf8Error> for Hdf5Error

Source§

fn from(source: FromUtf8Error) -> Self

Converts to this type from the input type.
Source§

impl From<OxiGdalError> for Hdf5Error

Source§

fn from(source: OxiGdalError) -> Self

Converts to this type from the input type.
Source§

impl From<TryFromIntError> for Hdf5Error

Source§

fn from(source: TryFromIntError) -> Self

Converts to this type from the input type.
Source§

impl From<Utf8Error> for Hdf5Error

Source§

fn from(source: Utf8Error) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.