Enum ValidationKind
#[non_exhaustive]pub enum ValidationKind {
ShapeMismatch,
RankMismatch,
AxisOutOfBounds,
DTypeMismatch,
InvalidArgument,
}Expand description
Coarse classification for shared tensor validation failures.
§Examples
use tenferro_tensor_core::{ValidationError, ValidationKind};
let error = ValidationError::RankMismatch {
expected: 2,
actual: 1,
};
assert_eq!(error.kind(), ValidationKind::RankMismatch);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.
Trait Implementations§
§impl Clone for ValidationKind
impl Clone for ValidationKind
§fn clone(&self) -> ValidationKind
fn clone(&self) -> ValidationKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for ValidationKind
impl Debug for ValidationKind
§impl Hash for ValidationKind
impl Hash for ValidationKind
§impl PartialEq for ValidationKind
impl PartialEq for ValidationKind
impl Copy for ValidationKind
impl Eq for ValidationKind
impl StructuralPartialEq for ValidationKind
Auto Trait Implementations§
impl Freeze for ValidationKind
impl RefUnwindSafe for ValidationKind
impl Send for ValidationKind
impl Sync for ValidationKind
impl Unpin for ValidationKind
impl UnsafeUnpin for ValidationKind
impl UnwindSafe for ValidationKind
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> 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