#[non_exhaustive]pub enum ViewDataError {
WrongDescriptor(Value),
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(Value)
The type descriptor does not match the element type.
NonNativeEndian
The type descriptor does not match the native endianness.
Misaligned
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.
ExtraBytes(usize)
Extra bytes are present between the end of the data and the end of the file.
InvalidData(Box<dyn Error + Send + Sync + 'static>)
Some of the data is invalid for the element type.
Trait Implementations§
Source§impl Debug for ViewDataError
impl Debug for ViewDataError
Source§impl Display for ViewDataError
impl Display for ViewDataError
Source§impl Error for ViewDataError
impl Error for ViewDataError
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()
Source§impl From<ViewDataError> for ViewNpyError
impl From<ViewDataError> for ViewNpyError
Source§fn from(err: ViewDataError) -> ViewNpyError
fn from(err: ViewDataError) -> ViewNpyError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ViewDataError
impl !RefUnwindSafe for ViewDataError
impl Send for ViewDataError
impl Sync for ViewDataError
impl Unpin for ViewDataError
impl !UnwindSafe for ViewDataError
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