use thiserror::Error;
pub type Result<T> = std::result::Result<T, Error>;
#[derive(Error, Debug)]
pub enum Error {
#[error("I/O error: {0}")]
Io(#[from] std::io::Error),
#[error("memory mapping error: {0}")]
MmapError(String),
#[error("invalid file format: {0}")]
InvalidFormat(String),
#[error("core error: {0}")]
CoreError(#[from] rustpix_core::Error),
#[cfg(feature = "hdf5")]
#[error("hdf5 error: {0}")]
Hdf5(#[from] hdf5::Error),
}