#[repr(usize)]pub enum ArithmeticError {
DivisionByZero = 0,
Overflow = 1,
Underflow = 2,
}Variants§
Implementations§
Source§impl ArithmeticError
impl ArithmeticError
Sourcepub const fn is_division_by_zero(&self) -> bool
pub const fn is_division_by_zero(&self) -> bool
Returns true if the enum is ArithmeticError::DivisionByZero otherwise false
Sourcepub const fn is_overflow(&self) -> bool
pub const fn is_overflow(&self) -> bool
Returns true if the enum is ArithmeticError::Overflow otherwise false
Sourcepub const fn is_underflow(&self) -> bool
pub const fn is_underflow(&self) -> bool
Returns true if the enum is ArithmeticError::Underflow otherwise false
Trait Implementations§
Source§impl Clone for ArithmeticError
impl Clone for ArithmeticError
Source§fn clone(&self) -> ArithmeticError
fn clone(&self) -> ArithmeticError
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 ArithmeticError
impl Debug for ArithmeticError
Source§impl<'de> Deserialize<'de> for ArithmeticError
impl<'de> Deserialize<'de> for ArithmeticError
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 ArithmeticError
impl Display for ArithmeticError
Source§impl From<ArithmeticError> for TensorError
impl From<ArithmeticError> for TensorError
Source§fn from(error: ArithmeticError) -> Self
fn from(error: ArithmeticError) -> Self
Converts to this type from the input type.
Source§impl FromStr for ArithmeticError
impl FromStr for ArithmeticError
Source§impl Hash for ArithmeticError
impl Hash for ArithmeticError
Source§impl IntoEnumIterator for ArithmeticError
impl IntoEnumIterator for ArithmeticError
type Iterator = ArithmeticErrorIter
fn iter() -> ArithmeticErrorIter ⓘ
Source§impl Ord for ArithmeticError
impl Ord for ArithmeticError
Source§fn cmp(&self, other: &ArithmeticError) -> Ordering
fn cmp(&self, other: &ArithmeticError) -> 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 ArithmeticError
impl PartialEq for ArithmeticError
Source§impl PartialOrd for ArithmeticError
impl PartialOrd for ArithmeticError
Source§impl Serialize for ArithmeticError
impl Serialize for ArithmeticError
Source§impl TryFrom<&str> for ArithmeticError
impl TryFrom<&str> for ArithmeticError
Source§impl TryFrom<TensorError> for ArithmeticError
impl TryFrom<TensorError> for ArithmeticError
Source§type Error = TensorError
type Error = TensorError
The type returned in the event of a conversion error.
Source§fn try_from(error: TensorError) -> TensorResult<ArithmeticError>
fn try_from(error: TensorError) -> TensorResult<ArithmeticError>
Performs the conversion.
Source§impl VariantNames for ArithmeticError
impl VariantNames for ArithmeticError
impl Copy for ArithmeticError
impl Eq for ArithmeticError
impl StructuralPartialEq for ArithmeticError
Auto Trait Implementations§
impl Freeze for ArithmeticError
impl RefUnwindSafe for ArithmeticError
impl Send for ArithmeticError
impl Sync for ArithmeticError
impl Unpin for ArithmeticError
impl UnwindSafe for ArithmeticError
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