Error

Enum Error 

Source
pub enum Error {
Show 38 variants UnexpectedDType { msg: &'static str, expected: DType, got: DType, }, DTypeMismatchBinaryOp { lhs: DType, rhs: DType, op: &'static str, }, UnsupportedDTypeForOp(DType, &'static str), IndexOutOfRangeTake { storage_len: usize, index: usize, }, IndexOutOfRange { max_size: usize, index: usize, op: &'static str, }, DimOutOfRange { shape: Shape, dim: i32, op: &'static str, }, DuplicateDimIndex { shape: Shape, dims: Vec<usize>, op: &'static str, }, RepeatRankOutOfRange { repeats: Shape, shape: Shape, }, ElementSizeMismatch { expected: usize, got: usize, op: &'static str, }, UnexpectedNumberOfDims { expected: usize, got: usize, shape: Shape, }, UnexpectedShape { msg: String, expected: Shape, got: Shape, }, ShapeMismatchBinaryOp { lhs: Shape, rhs: Shape, op: &'static str, }, ShapeMismatchCat { dim: usize, first_shape: Shape, n: usize, nth_shape: Shape, }, ShapeMismatchFilter { src: Shape, condition: Shape, }, ShapeMismatchSelect { mask: Shape, who: &'static str, }, ShapeMismatchCopyFrom { dst: Shape, src: Shape, }, NarrowRangeInvalidArgs { shape: Shape, dim: usize, range: Range, msg: &'static str, }, NarrowInvalidArgs { shape: Shape, dim: usize, start: usize, len: usize, msg: &'static str, }, SqueezeDimNot1 { shape: Shape, dim: usize, }, BroadcastIncompatibleShapes { src_shape: Shape, dst_shape: Shape, }, OpRequiresAtLeastOneNdArray { op: &'static str, }, Rand(String), NotScalar, LenMismatchVector { lhs: usize, rhs: usize, op: &'static str, }, ShapeMismatchMatrix { lhs: (usize, usize), rhs: (usize, usize), op: &'static str, }, VectorIndexOutOfRange { len: usize, index: usize, }, MatrixIndexOutOfRange { len: usize, index: usize, position: &'static str, }, Linalg(LinalgError), Npy(NpyError), Nrst(NrstError), ParseInt(ParseIntError), FromUtf8(FromUtf8Error), Io(Error), Utf8(Utf8Error), Zip(ZipError), Context { inner: Box<Self>, context: String, }, Msg(String), UnwrapNone,
}

Variants§

§

UnexpectedDType

Fields

§msg: &'static str
§expected: DType
§got: DType
§

DTypeMismatchBinaryOp

Fields

§lhs: DType
§rhs: DType
§op: &'static str
§

UnsupportedDTypeForOp(DType, &'static str)

§

IndexOutOfRangeTake

Fields

§storage_len: usize
§index: usize
§

IndexOutOfRange

Fields

§max_size: usize
§index: usize
§op: &'static str
§

DimOutOfRange

Fields

§shape: Shape
§dim: i32
§op: &'static str
§

DuplicateDimIndex

Fields

§shape: Shape
§dims: Vec<usize>
§op: &'static str
§

RepeatRankOutOfRange

Fields

§repeats: Shape
§shape: Shape
§

ElementSizeMismatch

Fields

§expected: usize
§got: usize
§op: &'static str
§

UnexpectedNumberOfDims

Fields

§expected: usize
§got: usize
§shape: Shape
§

UnexpectedShape

Fields

§expected: Shape
§got: Shape
§

ShapeMismatchBinaryOp

Fields

§lhs: Shape
§rhs: Shape
§op: &'static str
§

ShapeMismatchCat

Fields

§dim: usize
§first_shape: Shape
§nth_shape: Shape
§

ShapeMismatchFilter

Fields

§src: Shape
§condition: Shape
§

ShapeMismatchSelect

Fields

§mask: Shape
§who: &'static str
§

ShapeMismatchCopyFrom

Fields

§dst: Shape
§src: Shape
§

NarrowRangeInvalidArgs

Fields

§shape: Shape
§dim: usize
§range: Range
§msg: &'static str
§

NarrowInvalidArgs

Fields

§shape: Shape
§dim: usize
§start: usize
§len: usize
§msg: &'static str
§

SqueezeDimNot1

Fields

§shape: Shape
§dim: usize
§

BroadcastIncompatibleShapes

Fields

§src_shape: Shape
§dst_shape: Shape
§

OpRequiresAtLeastOneNdArray

Fields

§op: &'static str
§

Rand(String)

§

NotScalar

§

LenMismatchVector

Fields

§lhs: usize
§rhs: usize
§op: &'static str
§

ShapeMismatchMatrix

Fields

§lhs: (usize, usize)
§rhs: (usize, usize)
§op: &'static str
§

VectorIndexOutOfRange

Fields

§len: usize
§index: usize
§

MatrixIndexOutOfRange

Fields

§len: usize
§index: usize
§position: &'static str
§

Linalg(LinalgError)

§

Npy(NpyError)

§

Nrst(NrstError)

§

ParseInt(ParseIntError)

Integer parse error.

§

FromUtf8(FromUtf8Error)

Utf8 parse error.

§

Io(Error)

I/O error.

§

Utf8(Utf8Error)

§

Zip(ZipError)

§

Context

Fields

§inner: Box<Self>
§context: String
§

Msg(String)

User generated error message

§

UnwrapNone

Trait Implementations§

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, __formatter: &mut Formatter<'_>) -> Result

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

impl Error for Error

Source§

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

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

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

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
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 From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<FromUtf8Error> for Error

Source§

fn from(source: FromUtf8Error) -> Self

Converts to this type from the input type.
Source§

impl From<LinalgError> for Error

Source§

fn from(source: LinalgError) -> Self

Converts to this type from the input type.
Source§

impl From<NpyError> for Error

Source§

fn from(source: NpyError) -> Self

Converts to this type from the input type.
Source§

impl From<NrstError> for Error

Source§

fn from(source: NrstError) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIntError> for Error

Source§

fn from(source: ParseIntError) -> Self

Converts to this type from the input type.
Source§

impl From<Utf8Error> for Error

Source§

fn from(source: Utf8Error) -> Self

Converts to this type from the input type.
Source§

impl From<ZipError> for Error

Source§

fn from(source: ZipError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for Error

§

impl !RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin 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> 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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> Same for T

Source§

type Output = T

Should always be Self
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