Enum onnxruntime::error::OrtError[][src]

#[non_exhaustive]
pub enum OrtError {
Show 25 variants StringConversion(OrtApiError), Environment(OrtApiError), SessionOptions(OrtApiError), Session(OrtApiError), Allocator(OrtApiError), InOutCount(OrtApiError), InputName(OrtApiError), GetTypeInfo(OrtApiError), CastTypeInfoToTensorInfo(OrtApiError), TensorElementType(OrtApiError), GetDimensionsCount(OrtApiError), GetDimensions(OrtApiError), CreateCpuMemoryInfo(OrtApiError), CreateTensor(OrtApiError), CreateTensorWithData(OrtApiError), FillStringTensor(OrtApiError), IsTensor(OrtApiError), GetTensorTypeAndShape(OrtApiError), Run(OrtApiError), GetTensorMutableData(OrtApiError), DownloadError(OrtDownloadError), NonMatchingDimensions(NonMatchingDimensionsError), FileDoesNotExists { filename: PathBuf, }, NonUtf8Path { path: PathBuf, }, CStringNulError(NulError),
}
Expand description

Error type centralizing all possible errors

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
StringConversion

The C API can message to the caller using a C char * which needs to be converted to Rust’s String. This operation can fail.

Tuple Fields of StringConversion

0: OrtApiError
Environment

An error occurred when creating an ONNX environment

Tuple Fields of Environment

0: OrtApiError
SessionOptions

Error occurred when creating an ONNX session options

Tuple Fields of SessionOptions

0: OrtApiError
Session

Error occurred when creating an ONNX session

Tuple Fields of Session

0: OrtApiError
Allocator

Error occurred when creating an ONNX allocator

Tuple Fields of Allocator

0: OrtApiError
InOutCount

Error occurred when counting ONNX input or output count

Tuple Fields of InOutCount

0: OrtApiError
InputName

Error occurred when getting ONNX input name

Tuple Fields of InputName

0: OrtApiError
GetTypeInfo

Error occurred when getting ONNX type information

Tuple Fields of GetTypeInfo

0: OrtApiError
CastTypeInfoToTensorInfo

Error occurred when casting ONNX type information to tensor information

Tuple Fields of CastTypeInfoToTensorInfo

0: OrtApiError
TensorElementType

Error occurred when getting tensor elements type

Tuple Fields of TensorElementType

0: OrtApiError
GetDimensionsCount

Error occurred when getting ONNX dimensions count

Tuple Fields of GetDimensionsCount

0: OrtApiError
GetDimensions

Error occurred when getting ONNX dimensions

Tuple Fields of GetDimensions

0: OrtApiError
CreateCpuMemoryInfo

Error occurred when creating CPU memory information

Tuple Fields of CreateCpuMemoryInfo

0: OrtApiError
CreateTensor

Error occurred when creating ONNX tensor

Tuple Fields of CreateTensor

0: OrtApiError
CreateTensorWithData

Error occurred when creating ONNX tensor with specific data

Tuple Fields of CreateTensorWithData

0: OrtApiError
FillStringTensor

Error occurred when filling a tensor with string data

Tuple Fields of FillStringTensor

0: OrtApiError
IsTensor

Error occurred when checking if ONNX tensor was properly initialized

Tuple Fields of IsTensor

0: OrtApiError
GetTensorTypeAndShape

Error occurred when getting tensor type and shape

Tuple Fields of GetTensorTypeAndShape

0: OrtApiError
Run

Error occurred when ONNX inference operation was called

Tuple Fields of Run

0: OrtApiError
GetTensorMutableData

Error occurred when extracting data from an ONNX tensor into an C array to be used as an ndarray::ArrayView

Tuple Fields of GetTensorMutableData

0: OrtApiError
DownloadError

Error occurred when downloading a pre-trained ONNX model from the ONNX Model Zoo

Tuple Fields of DownloadError

0: OrtDownloadError
NonMatchingDimensions

Dimensions of input data and ONNX model loaded from file do not match

Tuple Fields of NonMatchingDimensions

0: NonMatchingDimensionsError
FileDoesNotExists

File does not exists

Fields of FileDoesNotExists

filename: PathBuf

Path which does not exists

NonUtf8Path

Path is an invalid UTF-8

Fields of NonUtf8Path

path: PathBuf

Path with invalid UTF-8

CStringNulError

Attempt to build a Rust CString from a null pointer

Tuple Fields of CStringNulError

0: NulError

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

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

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

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.