#[non_exhaustive]pub enum MattenNdarrayError {
DynamicTensor,
ZeroSizedAxis(Vec<usize>),
NdarrayShape(ShapeError),
Matten(MattenError),
}Expand description
Errors produced by the matten ↔ ndarray conversions.
#[non_exhaustive] so future variants are not a breaking change.
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.
DynamicTensor
A dynamic (Element) tensor was passed to a conversion. Convert it to a
numeric tensor first with Tensor::try_numeric().
ZeroSizedAxis(Vec<usize>)
The input ndarray shape contained a zero-length axis, which core
matten does not support.
NdarrayShape(ShapeError)
ndarray could not construct the target array (e.g. a shape/length
mismatch).
Matten(MattenError)
Core matten rejected the conversion (e.g. the rank exceeds MAX_NDIM).
Trait Implementations§
Source§impl Debug for MattenNdarrayError
impl Debug for MattenNdarrayError
Source§impl Display for MattenNdarrayError
impl Display for MattenNdarrayError
Source§impl Error for MattenNdarrayError
impl Error for MattenNdarrayError
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 MattenNdarrayError
impl !UnwindSafe for MattenNdarrayError
impl Freeze for MattenNdarrayError
impl Send for MattenNdarrayError
impl Sync for MattenNdarrayError
impl Unpin for MattenNdarrayError
impl UnsafeUnpin for MattenNdarrayError
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