Enum acme_tensor::prelude::TensorError
source · #[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<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 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)>
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§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 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 From<String> for TensorError
impl From<String> for TensorError
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§fn eq(&self, other: &TensorError) -> bool
fn eq(&self, other: &TensorError) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd for TensorError
impl PartialOrd for TensorError
source§fn partial_cmp(&self, other: &TensorError) -> Option<Ordering>
fn partial_cmp(&self, other: &TensorError) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl Serialize for TensorError
impl Serialize for TensorError
source§impl TryFrom<TensorError> for ArithmeticError
impl TryFrom<TensorError> for ArithmeticError
§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 TryFrom<TensorError> for ShapeError
impl TryFrom<TensorError> for ShapeError
§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 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