pub enum PytorchError {
Io(Error),
Pickle(PickleError),
Zip(ZipError),
InvalidFormat(String),
KeyNotFound(String),
Serde(Error),
}Expand description
Error type for PyTorch file operations
Variants§
Io(Error)
IO error
Pickle(PickleError)
Pickle parsing error
Zip(ZipError)
Zip archive error
InvalidFormat(String)
Invalid file format
KeyNotFound(String)
Key not found
Serde(Error)
Serde deserialization error
Trait Implementations§
Source§impl Debug for PytorchError
impl Debug for PytorchError
Source§impl Display for PytorchError
impl Display for PytorchError
Source§impl Error for PytorchError
impl Error for PytorchError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Error> for PytorchError
impl From<Error> for PytorchError
Source§impl From<Error> for PytorchError
impl From<Error> for PytorchError
Source§impl From<PickleError> for PytorchError
impl From<PickleError> for PytorchError
Source§fn from(e: PickleError) -> Self
fn from(e: PickleError) -> Self
Converts to this type from the input type.
Source§impl From<PytorchError> for PytorchStoreError
impl From<PytorchError> for PytorchStoreError
Source§fn from(e: ReaderError) -> Self
fn from(e: ReaderError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PytorchError
impl !RefUnwindSafe for PytorchError
impl Send for PytorchError
impl Sync for PytorchError
impl Unpin for PytorchError
impl !UnwindSafe for PytorchError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more