Skip to main content

Error

Enum Error 

Source
pub enum Error {
Show 37 variants DTypeMismatch { lhs: DType, rhs: DType, }, TypePromotionFailed { lhs: DType, rhs: DType, }, InvalidDTypeForUnaryOp { operation: UnaryOp, dtype: DType, }, InvalidDTypeForBinaryOp { operation: BinaryOp, dtypes: SmallVec<[DType; 2]>, }, VoidTypeInOp, IndexTypeMismatch { actual: DType, }, DivisionByZero, ReshapeSizeMismatch { input_size: usize, output_size: usize, }, ShrinkBoundsViolation { dim: usize, begin: usize, end: usize, shape_size: usize, }, BindValueOutOfRange { value: i64, min: i64, max: i64, }, IndexOutOfBounds, ExpandDimensionMismatch { input_dims: usize, output_dims: usize, }, ExpandInvalidDimension { dim: usize, input: usize, output: usize, }, PermuteInvalidPermutation { permutation: Vec<usize>, expected_dims: usize, }, PadNegativeValue { dim: usize, begin: isize, end: isize, }, PadDimensionMismatch { padding_dims: usize, shape_dims: usize, }, FlipInvalidSpec { expected_dims: usize, got_dims: usize, }, ReduceAxisInvalid { axis: i32, shape_dims: usize, }, ShapeMismatch { lhs_shape: Vec<usize>, rhs_shape: Vec<usize>, }, BinaryShapeMismatch { op: BinaryOp, lhs: Box<Shape>, rhs: Box<Shape>, }, ReshapeNegativeDimension { shape: SmallVec<[isize; 4]>, }, BroadcastShapeMismatch { lhs: Box<Shape>, rhs: Box<Shape>, }, SymbolicPaddingUnsupported, SymbolicShrinkingUnsupported, SymbolicShapeUnsupported { operation: String, }, SymbolicBufferSize { bound: ConstValue, }, TernaryBranchShapeMismatch { true_branch: Box<Shape>, false_branch: Box<Shape>, }, BufferDefRequiresPtrDType { op: &'static str, dtype: DType, }, VectorizeEmpty, VectorizeDTypeMismatch { expected: DType, actual: DType, }, GepIndexOutOfBounds { index: usize, vcount: usize, }, GepRequiresVector { dtype: DType, }, ContractCountMismatch { dtype_count: usize, axis_product: usize, }, UnrollCountMismatch { dtype_count: usize, axis_product: usize, }, WhereConditionNotBool { actual: DType, }, BroadcastRequiresScalar { dtype: DType, }, MulAccDtypeMismatch { a_dtype: DType, b_dtype: DType, c_dtype: DType, },
}

Variants§

§

DTypeMismatch

DType mismatch in binary operation.

Fields

§lhs: DType
§rhs: DType
§

TypePromotionFailed

Type promotion failed - no common type.

Fields

§lhs: DType
§rhs: DType
§

InvalidDTypeForUnaryOp

Invalid dtype for operation (e.g., bitwise on float).

Fields

§operation: UnaryOp
§dtype: DType
§

InvalidDTypeForBinaryOp

Invalid dtype for operation (e.g., bitwise on float).

Fields

§operation: BinaryOp
§dtypes: SmallVec<[DType; 2]>
§

VoidTypeInOp

Void dtype cannot be used in operations.

§

IndexTypeMismatch

Index parameter must have Index dtype.

Fields

§actual: DType
§

DivisionByZero

Division by zero.

§

ReshapeSizeMismatch

Reshape size mismatch.

Fields

§input_size: usize
§output_size: usize
§

ShrinkBoundsViolation

Shrink bounds violation.

Fields

§dim: usize
§begin: usize
§end: usize
§shape_size: usize
§

BindValueOutOfRange

Bind value out of range.

Fields

§value: i64
§min: i64
§max: i64
§

IndexOutOfBounds

Index out of bounds.

§

ExpandDimensionMismatch

Expand dimension count mismatch.

Fields

§input_dims: usize
§output_dims: usize
§

ExpandInvalidDimension

Expand invalid dimension (can only expand dimensions of size 1).

Fields

§dim: usize
§input: usize
§output: usize
§

PermuteInvalidPermutation

Permute has invalid permutation.

Fields

§permutation: Vec<usize>
§expected_dims: usize
§

PadNegativeValue

Pad has negative padding value.

Fields

§dim: usize
§begin: isize
§end: isize
§

PadDimensionMismatch

Pad dimension count mismatch.

Fields

§padding_dims: usize
§shape_dims: usize
§

FlipInvalidSpec

Flip specification invalid.

Fields

§expected_dims: usize
§got_dims: usize
§

ReduceAxisInvalid

Reduce axis invalid.

Fields

§axis: i32
§shape_dims: usize
§

ShapeMismatch

Shape mismatch in elementwise operation.

Fields

§lhs_shape: Vec<usize>
§rhs_shape: Vec<usize>
§

BinaryShapeMismatch

Shape mismatch in binary operation.

Fields

§lhs: Box<Shape>
§rhs: Box<Shape>
§

ReshapeNegativeDimension

Reshape contains negative dimension.

Fields

§shape: SmallVec<[isize; 4]>
§

BroadcastShapeMismatch

Broadcasting shape mismatch.

Fields

§lhs: Box<Shape>
§rhs: Box<Shape>
§

SymbolicPaddingUnsupported

Symbolic padding unsupported.

§

SymbolicShrinkingUnsupported

Symbolic shrinking unsupported.

§

SymbolicShapeUnsupported

Symbolic shape unsupported.

Fields

§operation: String
§

SymbolicBufferSize

Symbolic buffer size unsupported.

Fields

§

TernaryBranchShapeMismatch

Ternary branch shape mismatch.

Fields

§true_branch: Box<Shape>
§false_branch: Box<Shape>
§

BufferDefRequiresPtrDType

DefineLocal must have Ptr dtype.

Fields

§op: &'static str
§dtype: DType
§

VectorizeEmpty

VECTORIZE requires at least one element.

§

VectorizeDTypeMismatch

VECTORIZE elements have mismatched dtypes.

Fields

§expected: DType
§actual: DType
§

GepIndexOutOfBounds

GEP index out of bounds.

Fields

§index: usize
§vcount: usize
§

GepRequiresVector

GEP requires vector source.

Fields

§dtype: DType
§

ContractCountMismatch

CONTRACT dtype count != axis product.

Fields

§dtype_count: usize
§axis_product: usize
§

UnrollCountMismatch

UNROLL src dtype count != axis product.

Fields

§dtype_count: usize
§axis_product: usize
§

WhereConditionNotBool

WHERE condition must be bool.

Fields

§actual: DType
§

BroadcastRequiresScalar

BROADCAST requires scalar source.

Fields

§dtype: DType
§

MulAccDtypeMismatch

MulAcc operands must have matching dtypes.

Fields

§a_dtype: DType
§b_dtype: DType
§c_dtype: DType

Trait Implementations§

Source§

impl Clone for Error

Source§

fn clone(&self) -> Error

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Error

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Error

Source§

fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for Error
where Self: Debug + Display,

Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl ErrorCompat for Error

Source§

fn backtrace(&self) -> Option<&Backtrace>

Returns a Backtrace that may be printed.
Source§

fn iter_chain(&self) -> ChainCompat<'_, '_>
where Self: AsErrorSource,

Returns an iterator for traversing the chain of errors, starting with the current error and continuing with recursive calls to Error::source. Read more
Source§

impl<__T0, __T1, __T2> IntoError<Error> for BinaryShapeMismatchSnafu<__T0, __T1, __T2>
where Error: Error + ErrorCompat, __T0: Into<BinaryOp>, __T1: Into<Box<Shape>>, __T2: Into<Box<Shape>>,

Source§

type Source = NoneError

The underlying error
Source§

fn into_error(self, error: Self::Source) -> Error

Combine the information to produce the error
Source§

impl<__T0, __T1, __T2> IntoError<Error> for BindValueOutOfRangeSnafu<__T0, __T1, __T2>
where Error: Error + ErrorCompat, __T0: Into<i64>, __T1: Into<i64>, __T2: Into<i64>,

Source§

type Source = NoneError

The underlying error
Source§

fn into_error(self, error: Self::Source) -> Error

Combine the information to produce the error
Source§

impl<__T0> IntoError<Error> for BroadcastRequiresScalarSnafu<__T0>
where Error: Error + ErrorCompat, __T0: Into<DType>,

Source§

type Source = NoneError

The underlying error
Source§

fn into_error(self, error: Self::Source) -> Error

Combine the information to produce the error
Source§

impl<__T0, __T1> IntoError<Error> for BroadcastShapeMismatchSnafu<__T0, __T1>
where Error: Error + ErrorCompat, __T0: Into<Box<Shape>>, __T1: Into<Box<Shape>>,

Source§

type Source = NoneError

The underlying error
Source§

fn into_error(self, error: Self::Source) -> Error

Combine the information to produce the error
Source§

impl<__T0, __T1> IntoError<Error> for BufferDefRequiresPtrDTypeSnafu<__T0, __T1>
where Error: Error + ErrorCompat, __T0: Into<&'static str>, __T1: Into<DType>,

Source§

type Source = NoneError

The underlying error
Source§

fn into_error(self, error: Self::Source) -> Error

Combine the information to produce the error
Source§

impl<__T0, __T1> IntoError<Error> for ContractCountMismatchSnafu<__T0, __T1>
where Error: Error + ErrorCompat, __T0: Into<usize>, __T1: Into<usize>,

Source§

type Source = NoneError

The underlying error
Source§

fn into_error(self, error: Self::Source) -> Error

Combine the information to produce the error
Source§

impl<__T0, __T1> IntoError<Error> for DTypeMismatchSnafu<__T0, __T1>
where Error: Error + ErrorCompat, __T0: Into<DType>, __T1: Into<DType>,

Source§

type Source = NoneError

The underlying error
Source§

fn into_error(self, error: Self::Source) -> Error

Combine the information to produce the error
Source§

impl IntoError<Error> for DivisionByZeroSnafu

Source§

type Source = NoneError

The underlying error
Source§

fn into_error(self, error: Self::Source) -> Error

Combine the information to produce the error
Source§

impl<__T0, __T1> IntoError<Error> for ExpandDimensionMismatchSnafu<__T0, __T1>
where Error: Error + ErrorCompat, __T0: Into<usize>, __T1: Into<usize>,

Source§

type Source = NoneError

The underlying error
Source§

fn into_error(self, error: Self::Source) -> Error

Combine the information to produce the error
Source§

impl<__T0, __T1, __T2> IntoError<Error> for ExpandInvalidDimensionSnafu<__T0, __T1, __T2>
where Error: Error + ErrorCompat, __T0: Into<usize>, __T1: Into<usize>, __T2: Into<usize>,

Source§

type Source = NoneError

The underlying error
Source§

fn into_error(self, error: Self::Source) -> Error

Combine the information to produce the error
Source§

impl<__T0, __T1> IntoError<Error> for FlipInvalidSpecSnafu<__T0, __T1>
where Error: Error + ErrorCompat, __T0: Into<usize>, __T1: Into<usize>,

Source§

type Source = NoneError

The underlying error
Source§

fn into_error(self, error: Self::Source) -> Error

Combine the information to produce the error
Source§

impl<__T0, __T1> IntoError<Error> for GepIndexOutOfBoundsSnafu<__T0, __T1>
where Error: Error + ErrorCompat, __T0: Into<usize>, __T1: Into<usize>,

Source§

type Source = NoneError

The underlying error
Source§

fn into_error(self, error: Self::Source) -> Error

Combine the information to produce the error
Source§

impl<__T0> IntoError<Error> for GepRequiresVectorSnafu<__T0>
where Error: Error + ErrorCompat, __T0: Into<DType>,

Source§

type Source = NoneError

The underlying error
Source§

fn into_error(self, error: Self::Source) -> Error

Combine the information to produce the error
Source§

impl IntoError<Error> for IndexOutOfBoundsSnafu

Source§

type Source = NoneError

The underlying error
Source§

fn into_error(self, error: Self::Source) -> Error

Combine the information to produce the error
Source§

impl<__T0> IntoError<Error> for IndexTypeMismatchSnafu<__T0>
where Error: Error + ErrorCompat, __T0: Into<DType>,

Source§

type Source = NoneError

The underlying error
Source§

fn into_error(self, error: Self::Source) -> Error

Combine the information to produce the error
Source§

impl<__T0, __T1> IntoError<Error> for InvalidDTypeForBinaryOpSnafu<__T0, __T1>
where Error: Error + ErrorCompat, __T0: Into<BinaryOp>, __T1: Into<SmallVec<[DType; 2]>>,

Source§

type Source = NoneError

The underlying error
Source§

fn into_error(self, error: Self::Source) -> Error

Combine the information to produce the error
Source§

impl<__T0, __T1> IntoError<Error> for InvalidDTypeForUnaryOpSnafu<__T0, __T1>
where Error: Error + ErrorCompat, __T0: Into<UnaryOp>, __T1: Into<DType>,

Source§

type Source = NoneError

The underlying error
Source§

fn into_error(self, error: Self::Source) -> Error

Combine the information to produce the error
Source§

impl<__T0, __T1, __T2> IntoError<Error> for MulAccDtypeMismatchSnafu<__T0, __T1, __T2>
where Error: Error + ErrorCompat, __T0: Into<DType>, __T1: Into<DType>, __T2: Into<DType>,

Source§

type Source = NoneError

The underlying error
Source§

fn into_error(self, error: Self::Source) -> Error

Combine the information to produce the error
Source§

impl<__T0, __T1> IntoError<Error> for PadDimensionMismatchSnafu<__T0, __T1>
where Error: Error + ErrorCompat, __T0: Into<usize>, __T1: Into<usize>,

Source§

type Source = NoneError

The underlying error
Source§

fn into_error(self, error: Self::Source) -> Error

Combine the information to produce the error
Source§

impl<__T0, __T1, __T2> IntoError<Error> for PadNegativeValueSnafu<__T0, __T1, __T2>
where Error: Error + ErrorCompat, __T0: Into<usize>, __T1: Into<isize>, __T2: Into<isize>,

Source§

type Source = NoneError

The underlying error
Source§

fn into_error(self, error: Self::Source) -> Error

Combine the information to produce the error
Source§

impl<__T0, __T1> IntoError<Error> for PermuteInvalidPermutationSnafu<__T0, __T1>
where Error: Error + ErrorCompat, __T0: Into<Vec<usize>>, __T1: Into<usize>,

Source§

type Source = NoneError

The underlying error
Source§

fn into_error(self, error: Self::Source) -> Error

Combine the information to produce the error
Source§

impl<__T0, __T1> IntoError<Error> for ReduceAxisInvalidSnafu<__T0, __T1>
where Error: Error + ErrorCompat, __T0: Into<i32>, __T1: Into<usize>,

Source§

type Source = NoneError

The underlying error
Source§

fn into_error(self, error: Self::Source) -> Error

Combine the information to produce the error
Source§

impl<__T0> IntoError<Error> for ReshapeNegativeDimensionSnafu<__T0>
where Error: Error + ErrorCompat, __T0: Into<SmallVec<[isize; 4]>>,

Source§

type Source = NoneError

The underlying error
Source§

fn into_error(self, error: Self::Source) -> Error

Combine the information to produce the error
Source§

impl<__T0, __T1> IntoError<Error> for ReshapeSizeMismatchSnafu<__T0, __T1>
where Error: Error + ErrorCompat, __T0: Into<usize>, __T1: Into<usize>,

Source§

type Source = NoneError

The underlying error
Source§

fn into_error(self, error: Self::Source) -> Error

Combine the information to produce the error
Source§

impl<__T0, __T1> IntoError<Error> for ShapeMismatchSnafu<__T0, __T1>
where Error: Error + ErrorCompat, __T0: Into<Vec<usize>>, __T1: Into<Vec<usize>>,

Source§

type Source = NoneError

The underlying error
Source§

fn into_error(self, error: Self::Source) -> Error

Combine the information to produce the error
Source§

impl<__T0, __T1, __T2, __T3> IntoError<Error> for ShrinkBoundsViolationSnafu<__T0, __T1, __T2, __T3>
where Error: Error + ErrorCompat, __T0: Into<usize>, __T1: Into<usize>, __T2: Into<usize>, __T3: Into<usize>,

Source§

type Source = NoneError

The underlying error
Source§

fn into_error(self, error: Self::Source) -> Error

Combine the information to produce the error
Source§

impl<__T0> IntoError<Error> for SymbolicBufferSizeSnafu<__T0>

Source§

type Source = NoneError

The underlying error
Source§

fn into_error(self, error: Self::Source) -> Error

Combine the information to produce the error
Source§

impl IntoError<Error> for SymbolicPaddingUnsupportedSnafu

Source§

type Source = NoneError

The underlying error
Source§

fn into_error(self, error: Self::Source) -> Error

Combine the information to produce the error
Source§

impl<__T0> IntoError<Error> for SymbolicShapeUnsupportedSnafu<__T0>
where Error: Error + ErrorCompat, __T0: Into<String>,

Source§

type Source = NoneError

The underlying error
Source§

fn into_error(self, error: Self::Source) -> Error

Combine the information to produce the error
Source§

impl IntoError<Error> for SymbolicShrinkingUnsupportedSnafu

Source§

type Source = NoneError

The underlying error
Source§

fn into_error(self, error: Self::Source) -> Error

Combine the information to produce the error
Source§

impl<__T0, __T1> IntoError<Error> for TernaryBranchShapeMismatchSnafu<__T0, __T1>
where Error: Error + ErrorCompat, __T0: Into<Box<Shape>>, __T1: Into<Box<Shape>>,

Source§

type Source = NoneError

The underlying error
Source§

fn into_error(self, error: Self::Source) -> Error

Combine the information to produce the error
Source§

impl<__T0, __T1> IntoError<Error> for TypePromotionFailedSnafu<__T0, __T1>
where Error: Error + ErrorCompat, __T0: Into<DType>, __T1: Into<DType>,

Source§

type Source = NoneError

The underlying error
Source§

fn into_error(self, error: Self::Source) -> Error

Combine the information to produce the error
Source§

impl<__T0, __T1> IntoError<Error> for UnrollCountMismatchSnafu<__T0, __T1>
where Error: Error + ErrorCompat, __T0: Into<usize>, __T1: Into<usize>,

Source§

type Source = NoneError

The underlying error
Source§

fn into_error(self, error: Self::Source) -> Error

Combine the information to produce the error
Source§

impl<__T0, __T1> IntoError<Error> for VectorizeDTypeMismatchSnafu<__T0, __T1>
where Error: Error + ErrorCompat, __T0: Into<DType>, __T1: Into<DType>,

Source§

type Source = NoneError

The underlying error
Source§

fn into_error(self, error: Self::Source) -> Error

Combine the information to produce the error
Source§

impl IntoError<Error> for VectorizeEmptySnafu

Source§

type Source = NoneError

The underlying error
Source§

fn into_error(self, error: Self::Source) -> Error

Combine the information to produce the error
Source§

impl IntoError<Error> for VoidTypeInOpSnafu

Source§

type Source = NoneError

The underlying error
Source§

fn into_error(self, error: Self::Source) -> Error

Combine the information to produce the error
Source§

impl<__T0> IntoError<Error> for WhereConditionNotBoolSnafu<__T0>
where Error: Error + ErrorCompat, __T0: Into<DType>,

Source§

type Source = NoneError

The underlying error
Source§

fn into_error(self, error: Self::Source) -> Error

Combine the information to produce the error
Source§

impl PartialEq for Error

Source§

fn eq(&self, other: &Error) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Error

Auto Trait Implementations§

§

impl Freeze for Error

§

impl !RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnsafeUnpin for Error

§

impl !UnwindSafe for Error

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AsErrorSource for T
where T: Error + 'static,

Source§

fn as_error_source(&self) -> &(dyn Error + 'static)

For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method receivers.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more