Enum ndarray_npy::ViewDataError [−][src]
#[non_exhaustive]
pub enum ViewDataError {
WrongDescriptor(PyValue),
NonNativeEndian,
Misaligned,
MissingBytes(usize),
ExtraBytes(usize),
InvalidData(Box<dyn Error + Send + Sync + 'static>),
}
Expand description
An error viewing array data.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
WrongDescriptor(PyValue)
The type descriptor does not match the element type.
Tuple Fields of WrongDescriptor
0: PyValue
The type descriptor does not match the native endianness.
The start of the data is not properly aligned for the element type.
MissingBytes(usize)
The file does not contain all the data described in the header.
Tuple Fields of MissingBytes
0: usize
ExtraBytes(usize)
Extra bytes are present between the end of the data and the end of the file.
Tuple Fields of ExtraBytes
0: usize
Some of the data is invalid for the element type.
Trait Implementations
Performs the conversion.