#[repr(usize)]pub enum ShapeError {
DimensionMismatch = 0,
IncompatibleShapes = 1,
IncompatibleLayout = 2,
InvalidAxis = 3,
InvalidShape = 4,
MismatchedElements = 5,
NotSquare = 6,
OutOfBounds = 7,
Overflow = 8,
Unsupported = 9,
}Variants§
DimensionMismatch = 0
IncompatibleShapes = 1
IncompatibleLayout = 2
InvalidAxis = 3
InvalidShape = 4
MismatchedElements = 5
NotSquare = 6
OutOfBounds = 7
Overflow = 8
Unsupported = 9
Implementations§
Source§impl ShapeError
impl ShapeError
Sourcepub const fn is_dimension_mismatch(&self) -> bool
pub const fn is_dimension_mismatch(&self) -> bool
Returns true if the enum is ShapeError::DimensionMismatch otherwise false
Sourcepub const fn is_incompatible_shapes(&self) -> bool
pub const fn is_incompatible_shapes(&self) -> bool
Returns true if the enum is ShapeError::IncompatibleShapes otherwise false
Sourcepub const fn is_incompatible_layout(&self) -> bool
pub const fn is_incompatible_layout(&self) -> bool
Returns true if the enum is ShapeError::IncompatibleLayout otherwise false
Sourcepub const fn is_invalid_axis(&self) -> bool
pub const fn is_invalid_axis(&self) -> bool
Returns true if the enum is ShapeError::InvalidAxis otherwise false
Sourcepub const fn is_invalid_shape(&self) -> bool
pub const fn is_invalid_shape(&self) -> bool
Returns true if the enum is ShapeError::InvalidShape otherwise false
Sourcepub const fn is_mismatched_elements(&self) -> bool
pub const fn is_mismatched_elements(&self) -> bool
Returns true if the enum is ShapeError::MismatchedElements otherwise false
Sourcepub const fn is_not_square(&self) -> bool
pub const fn is_not_square(&self) -> bool
Returns true if the enum is ShapeError::NotSquare otherwise false
Sourcepub const fn is_out_of_bounds(&self) -> bool
pub const fn is_out_of_bounds(&self) -> bool
Returns true if the enum is ShapeError::OutOfBounds otherwise false
Sourcepub const fn is_overflow(&self) -> bool
pub const fn is_overflow(&self) -> bool
Returns true if the enum is ShapeError::Overflow otherwise false
Sourcepub const fn is_unsupported(&self) -> bool
pub const fn is_unsupported(&self) -> bool
Returns true if the enum is ShapeError::Unsupported otherwise false
Trait Implementations§
Source§impl Clone for ShapeError
impl Clone for ShapeError
Source§fn clone(&self) -> ShapeError
fn clone(&self) -> ShapeError
Returns a duplicate of the value. Read more
1.0.0 · 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 ShapeError
impl Debug for ShapeError
Source§impl<'de> Deserialize<'de> for ShapeError
impl<'de> Deserialize<'de> for ShapeError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ShapeError
impl Display for ShapeError
Source§impl EnumProperty for ShapeError
impl EnumProperty for ShapeError
Source§impl Error for ShapeError
impl Error for ShapeError
1.30.0 · 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()
Source§impl From<ShapeError> for TensorError
impl From<ShapeError> for TensorError
Source§fn from(error: ShapeError) -> Self
fn from(error: ShapeError) -> Self
Converts to this type from the input type.
Source§impl FromStr for ShapeError
impl FromStr for ShapeError
Source§impl Hash for ShapeError
impl Hash for ShapeError
Source§impl IntoEnumIterator for ShapeError
impl IntoEnumIterator for ShapeError
type Iterator = ShapeErrorIter
fn iter() -> ShapeErrorIter ⓘ
Source§impl Ord for ShapeError
impl Ord for ShapeError
Source§fn cmp(&self, other: &ShapeError) -> Ordering
fn cmp(&self, other: &ShapeError) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ShapeError
impl PartialEq for ShapeError
Source§impl PartialOrd for ShapeError
impl PartialOrd for ShapeError
Source§impl Serialize for ShapeError
impl Serialize for ShapeError
Source§impl TryFrom<&str> for ShapeError
impl TryFrom<&str> for ShapeError
Source§impl TryFrom<TensorError> for ShapeError
impl TryFrom<TensorError> for ShapeError
Source§type Error = TensorError
type Error = TensorError
The type returned in the event of a conversion error.
Source§fn try_from(error: TensorError) -> TensorResult<ShapeError>
fn try_from(error: TensorError) -> TensorResult<ShapeError>
Performs the conversion.
Source§impl VariantNames for ShapeError
impl VariantNames for ShapeError
impl Copy for ShapeError
impl Eq for ShapeError
impl Send for ShapeError
impl StructuralPartialEq for ShapeError
impl Sync for ShapeError
Auto Trait Implementations§
impl Freeze for ShapeError
impl RefUnwindSafe for ShapeError
impl Unpin for ShapeError
impl UnwindSafe for ShapeError
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