pub enum FpZipError {
InvalidMagic(u32),
UnsupportedVersion(u16),
InvalidDataType(u8),
DimensionMismatch {
actual: usize,
expected: u64,
nx: u32,
ny: u32,
nz: u32,
nf: u32,
},
TypeMismatch {
expected: FpZipType,
actual: FpZipType,
},
BufferTooSmall {
needed: usize,
available: usize,
},
UnexpectedEof,
Io(Error),
}Expand description
Errors that can occur during FPZip compression or decompression.
Variants§
InvalidMagic(u32)
The compressed data does not start with the fpzip magic number.
UnsupportedVersion(u16)
The format version in the header is not supported.
InvalidDataType(u8)
The data type byte in the header is not 0 (float) or 1 (double).
DimensionMismatch
The input data length does not match nx * ny * nz * nf.
TypeMismatch
Attempted to decompress float data as double, or vice versa.
BufferTooSmall
The output buffer is too small for the result.
UnexpectedEof
The compressed data ended unexpectedly.
Io(Error)
An I/O error occurred during stream-based operations.
Trait Implementations§
Source§impl Debug for FpZipError
impl Debug for FpZipError
Source§impl Display for FpZipError
impl Display for FpZipError
Source§impl Error for FpZipError
Available on crate feature std only.
impl Error for FpZipError
Available on crate feature
std only.Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for FpZipError
impl !RefUnwindSafe for FpZipError
impl Send for FpZipError
impl Sync for FpZipError
impl Unpin for FpZipError
impl UnsafeUnpin for FpZipError
impl !UnwindSafe for FpZipError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more