pub enum NpyError {
Core(Error),
Zip(ZipError),
Io(Error),
Utf8(Utf8Error),
NotNpyFile,
UnsupportVersion {
major: u8,
minor: u8,
},
Header {
error: String,
field: &'static str,
},
LackField {
field: &'static str,
},
UnsupportedDescr(String),
UnsupportedDType(DType),
UnsupportUSize,
Context {
err: Box<Self>,
contexts: Vec<String>,
},
}Variants§
Core(Error)
Zip(ZipError)
Io(Error)
Utf8(Utf8Error)
NotNpyFile
UnsupportVersion
Header
LackField
UnsupportedDescr(String)
UnsupportedDType(DType)
UnsupportUSize
Context
Implementations§
Source§impl NpyError
impl NpyError
pub fn context<C>(self, ctx: C) -> Self
pub fn with_context<C, F>(self, f: F) -> Self
pub fn root_cause(&self) -> &Self
pub fn into_root_cause(self) -> Self
pub fn contexts(&self) -> &[String]
Trait Implementations§
Source§impl Error for NpyError
impl Error for NpyError
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 !RefUnwindSafe for NpyError
impl !UnwindSafe for NpyError
impl Freeze for NpyError
impl Send for NpyError
impl Sync for NpyError
impl Unpin for NpyError
impl UnsafeUnpin for NpyError
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more