Enum tch::TchError[][src]

pub enum TchError {
    Convert(String),
    FileFormat(String),
    TensorNameNotFound(StringString),
    Io(Error),
    Kind(String),
    MissingImage(String),
    Nul(NulError),
    ParseInt(ParseIntError),
    Shape(String),
    UnknownKind(c_int),
    Torch(String),
    Zip(ZipError),
}
Expand description

Main library error type.

Variants

Convert(String)

Conversion error.

Tuple Fields of Convert

0: String
FileFormat(String)

Invalid file format.

Tuple Fields of FileFormat

0: String
TensorNameNotFound(StringString)

Missing tensor with name.

Tuple Fields of TensorNameNotFound

0: String1: String
Io(Error)

I/O error.

Tuple Fields of Io

0: Error
Kind(String)

Tensor kind error.

Tuple Fields of Kind

0: String
MissingImage(String)

Missing image.

Tuple Fields of MissingImage

0: String

Null pointer.

Tuple Fields of Nul

0: NulError
ParseInt(ParseIntError)

Integer parse error.

Tuple Fields of ParseInt

0: ParseIntError
Shape(String)

Invalid shape.

Tuple Fields of Shape

0: String
UnknownKind(c_int)

Unknown kind

Tuple Fields of UnknownKind

0: c_int
Torch(String)

Errors returned by the Torch C++ API.

Tuple Fields of Torch

0: String

Zip file format error.

Tuple Fields of Zip

0: ZipError

Implementations

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.

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.

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.