#[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 copy 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<ArithmeticError, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ArithmeticError, <__D as Deserializer<'de>>::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) -> TensorError
fn from(error: ArithmeticError) -> TensorError
Converts to this type from the input type.
Source§impl FromStr for ArithmeticError
impl FromStr for ArithmeticError
Source§type Err = ParseError
type Err = ParseError
The associated error which can be returned from parsing.
Source§fn from_str(
s: &str,
) -> Result<ArithmeticError, <ArithmeticError as FromStr>::Err>
fn from_str( s: &str, ) -> Result<ArithmeticError, <ArithmeticError as FromStr>::Err>
Parses a string
s
to return a value of this type. Read moreSource§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§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl TryFrom<&str> for ArithmeticError
impl TryFrom<&str> for ArithmeticError
Source§type Error = ParseError
type Error = ParseError
The type returned in the event of a conversion error.
Source§fn try_from(
s: &str,
) -> Result<ArithmeticError, <ArithmeticError as TryFrom<&str>>::Error>
fn try_from( s: &str, ) -> Result<ArithmeticError, <ArithmeticError as TryFrom<&str>>::Error>
Performs the conversion.
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) -> Result<ArithmeticError, TensorError>
fn try_from(error: TensorError) -> Result<ArithmeticError, TensorError>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.