#[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§
Source§impl Clone for ValidationKind
impl Clone for ValidationKind
Source§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 moreSource§impl Debug for ValidationKind
impl Debug for ValidationKind
Source§impl Hash for ValidationKind
impl Hash for ValidationKind
Source§impl PartialEq for ValidationKind
impl PartialEq for ValidationKind
Source§fn eq(&self, other: &ValidationKind) -> bool
fn eq(&self, other: &ValidationKind) -> bool
Tests for
self and other values to be equal, and is used by ==.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