pub enum ReadDataError {
Io(Error),
WrongDescriptor(Value),
MissingData,
ExtraBytes(usize),
ParseData(Box<dyn Error + Send + Sync + 'static>),
}
Expand description
An error reading array data.
Variants§
Io(Error)
An error caused by I/O.
WrongDescriptor(Value)
The type descriptor does not match the element type.
MissingData
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.
ParseData(Box<dyn Error + Send + Sync + 'static>)
An error parsing the data.
Trait Implementations§
Source§impl Debug for ReadDataError
impl Debug for ReadDataError
Source§impl Display for ReadDataError
impl Display for ReadDataError
Source§impl Error for ReadDataError
impl Error for ReadDataError
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<Error> for ReadDataError
impl From<Error> for ReadDataError
Source§fn from(err: Error) -> ReadDataError
fn from(err: Error) -> ReadDataError
Performs the conversion.
If the error kind is UnexpectedEof
, the MissingData
variant is
returned. Otherwise, the Io
variant is returned.
Source§impl From<ReadDataError> for ReadNpyError
impl From<ReadDataError> for ReadNpyError
Source§fn from(err: ReadDataError) -> ReadNpyError
fn from(err: ReadDataError) -> ReadNpyError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ReadDataError
impl !RefUnwindSafe for ReadDataError
impl Send for ReadDataError
impl Sync for ReadDataError
impl Unpin for ReadDataError
impl !UnwindSafe for ReadDataError
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