pub enum CheckpointError {
Io(Error),
InvalidMagic(Vec<u8>),
UnsupportedVersion(u32),
MetadataParse(String),
TruncatedData {
expected: usize,
got: usize,
},
NameTooLong(usize),
}Expand description
Errors that can occur during checkpoint I/O.
Variants§
Io(Error)
Wraps any std::io::Error from the underlying reader/writer.
InvalidMagic(Vec<u8>)
The file does not begin with the expected b"OXCK" magic bytes.
UnsupportedVersion(u32)
The checkpoint was written with a version this library cannot read.
MetadataParse(String)
The metadata block could not be parsed as a key-value JSON object.
TruncatedData
The byte stream ended before the expected number of bytes were read.
NameTooLong(usize)
A tensor name exceeds 65 535 bytes (the 16-bit length field limit).
Trait Implementations§
Source§impl Debug for CheckpointError
impl Debug for CheckpointError
Source§impl Display for CheckpointError
impl Display for CheckpointError
Source§impl Error for CheckpointError
impl Error for CheckpointError
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()
Auto Trait Implementations§
impl Freeze for CheckpointError
impl !RefUnwindSafe for CheckpointError
impl Send for CheckpointError
impl Sync for CheckpointError
impl Unpin for CheckpointError
impl UnsafeUnpin for CheckpointError
impl !UnwindSafe for CheckpointError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more