#[non_exhaustive]pub enum OpErrorKind {
ShapeMismatch {
lhs: Vec<i32>,
rhs: Vec<i32>,
},
DTypeMismatch {
lhs: DType,
rhs: DType,
},
SizeMismatch {
expected: usize,
actual: usize,
},
UnsupportedDType(DType),
InvalidAxis {
axis: i32,
ndim: usize,
},
InvalidShape(Vec<i64>),
InvalidIndex(String),
OutOfMemory(usize),
InvalidArgument(String),
}Expand description
The reason an operation rejected its arguments (see Error::Op).
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.
ShapeMismatch
Operand shapes are incompatible.
Fields
DTypeMismatch
Operand element types are incompatible.
Fields
SizeMismatch
The number of host values does not match the shape.
UnsupportedDType(DType)
The operation does not support this element type.
InvalidAxis
An axis is out of range, repeated, or more than one where one is expected.
InvalidShape(Vec<i64>)
A shape is invalid: a negative or too large dimension, two -1, or an element
count that does not match.
InvalidIndex(String)
An index is out of bounds or malformed.
OutOfMemory(usize)
Host memory for this many bytes could not be allocated.
InvalidArgument(String)
An argument is invalid for another reason.
Trait Implementations§
Source§impl Clone for OpErrorKind
impl Clone for OpErrorKind
Source§impl Debug for OpErrorKind
impl Debug for OpErrorKind
Source§impl Display for OpErrorKind
impl Display for OpErrorKind
impl Eq for OpErrorKind
Source§impl PartialEq for OpErrorKind
impl PartialEq for OpErrorKind
impl StructuralPartialEq for OpErrorKind
Auto Trait Implementations§
impl Freeze for OpErrorKind
impl RefUnwindSafe for OpErrorKind
impl Send for OpErrorKind
impl Sync for OpErrorKind
impl Unpin for OpErrorKind
impl UnsafeUnpin for OpErrorKind
impl UnwindSafe for OpErrorKind
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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