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),
}

Main library error type.

Variants

Convert(String)

Conversion error.

FileFormat(String)

Invalid file format.

TensorNameNotFound(StringString)

Missing tensor with name.

Io(Error)

I/O error.

Kind(String)

Tensor kind error.

MissingImage(String)

Missing image.

Null pointer.

ParseInt(ParseIntError)

Integer parse error.

Shape(String)

Invalid shape.

UnknownKind(c_int)

Unknown kind

Torch(String)

Errors returned by the Torch C++ API.

Zip file format error.

Implementations

impl TchError[src]

pub fn path_context(&self, path_name: &str) -> Self[src]

Trait Implementations

impl Debug for TchError[src]

impl Display for TchError[src]

impl Error for TchError[src]

impl From<Error> for TchError[src]

impl From<NulError> for TchError[src]

impl From<ParseIntError> for TchError[src]

impl From<ZipError> for TchError[src]

Auto Trait Implementations

impl !RefUnwindSafe for TchError

impl Send for TchError

impl Sync for TchError

impl Unpin for TchError

impl !UnwindSafe for TchError

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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