#[repr(usize)]pub enum TensorError {
Arithmetic(ArithmeticError),
Shape(ShapeError),
Singular,
NotScalar,
Unknown(String),
}
Variants§
Implementations§
Source§impl TensorError
impl TensorError
Sourcepub const fn is_arithmetic(&self) -> bool
pub const fn is_arithmetic(&self) -> bool
Returns true if the enum is TensorError::Arithmetic otherwise false
Sourcepub const fn is_shape(&self) -> bool
pub const fn is_shape(&self) -> bool
Returns true if the enum is TensorError::Shape otherwise false
Sourcepub const fn is_singular(&self) -> bool
pub const fn is_singular(&self) -> bool
Returns true if the enum is TensorError::Singular otherwise false
Sourcepub const fn is_not_scalar(&self) -> bool
pub const fn is_not_scalar(&self) -> bool
Returns true if the enum is TensorError::NotScalar otherwise false
Sourcepub const fn is_unknown(&self) -> bool
pub const fn is_unknown(&self) -> bool
Returns true if the enum is TensorError::Unknown otherwise false
Trait Implementations§
Source§impl Clone for TensorError
impl Clone for TensorError
Source§fn clone(&self) -> TensorError
fn clone(&self) -> TensorError
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 TensorError
impl Debug for TensorError
Source§impl<'de> Deserialize<'de> for TensorError
impl<'de> Deserialize<'de> for TensorError
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TensorError, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TensorError, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for TensorError
impl Display for TensorError
Source§impl Error for TensorError
impl Error for TensorError
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<&str> for TensorError
impl From<&str> for TensorError
Source§fn from(error: &str) -> TensorError
fn from(error: &str) -> TensorError
Converts to this type from the input type.
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 From<ShapeError> for TensorError
impl From<ShapeError> for TensorError
Source§fn from(error: ShapeError) -> TensorError
fn from(error: ShapeError) -> TensorError
Converts to this type from the input type.
Source§impl From<String> for TensorError
impl From<String> for TensorError
Source§fn from(error: String) -> TensorError
fn from(error: String) -> TensorError
Converts to this type from the input type.
Source§impl Hash for TensorError
impl Hash for TensorError
Source§impl Ord for TensorError
impl Ord for TensorError
Source§fn cmp(&self, other: &TensorError) -> Ordering
fn cmp(&self, other: &TensorError) -> 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 TensorError
impl PartialEq for TensorError
Source§impl PartialOrd for TensorError
impl PartialOrd for TensorError
Source§impl Serialize for TensorError
impl Serialize for TensorError
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<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 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) -> Result<ShapeError, TensorError>
fn try_from(error: TensorError) -> Result<ShapeError, TensorError>
Performs the conversion.
Source§impl VariantNames for TensorError
impl VariantNames for TensorError
impl Eq for TensorError
impl Send for TensorError
impl StructuralPartialEq for TensorError
impl Sync for TensorError
Auto Trait Implementations§
impl Freeze for TensorError
impl RefUnwindSafe for TensorError
impl Unpin for TensorError
impl UnwindSafe for TensorError
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.