pub enum ZTensorError {
Show 20 variants
Io(Error),
CborSerialize(Error),
CborDeserialize(Error),
ZstdCompression(Error),
ZstdDecompression(Error),
InvalidMagicNumber {
found: Vec<u8>,
},
InvalidAlignment {
offset: u64,
alignment: u64,
},
ObjectNotFound(String),
UnsupportedDType(String),
UnsupportedEncoding(String),
InvalidFileStructure(String),
DataConversionError(String),
ChecksumMismatch {
object_name: String,
component_name: String,
expected: String,
calculated: String,
},
ChecksumFormatError(String),
UnexpectedEof,
InconsistentDataSize {
expected: u64,
found: u64,
},
TypeMismatch {
expected: String,
found: String,
context: String,
},
ManifestTooLarge {
size: u64,
},
ObjectTooLarge {
size: u64,
limit: u64,
},
Other(String),
}Expand description
All errors that can occur when working with zTensor files.
Variants§
Io(Error)
I/O error from underlying reader/writer.
CborSerialize(Error)
CBOR serialization failed.
CborDeserialize(Error)
CBOR deserialization failed.
ZstdCompression(Error)
Zstd compression failed.
ZstdDecompression(Error)
Zstd decompression failed.
InvalidMagicNumber
Invalid magic number in file header or footer.
InvalidAlignment
Component offset not aligned to 64 bytes.
ObjectNotFound(String)
Requested object not found in manifest.
UnsupportedDType(String)
Unsupported data type string.
UnsupportedEncoding(String)
Unsupported encoding string.
InvalidFileStructure(String)
File structure is invalid.
DataConversionError(String)
Data conversion failed.
ChecksumMismatch
Checksum verification failed.
ChecksumFormatError(String)
Checksum string format is invalid.
UnexpectedEof
Unexpected end of file.
InconsistentDataSize
Data size doesn’t match expected size.
TypeMismatch
Type mismatch when reading typed data.
ManifestTooLarge
Manifest exceeds maximum allowed size (1GB).
ObjectTooLarge
Object exceeds maximum allowed size.
Other(String)
Other unspecified error.
Trait Implementations§
Source§impl Debug for ZTensorError
impl Debug for ZTensorError
Source§impl Display for ZTensorError
impl Display for ZTensorError
Source§impl Error for ZTensorError
impl Error for ZTensorError
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 ZTensorError
impl !RefUnwindSafe for ZTensorError
impl Send for ZTensorError
impl Sync for ZTensorError
impl Unpin for ZTensorError
impl !UnwindSafe for ZTensorError
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