pub enum PackError {
InvalidMagic(String),
UnsupportedVersion(u32),
InvalidIndexMagic(String),
BlobNotFound(String),
Io(Error),
CompressionError(String),
DecompressionError(String),
EmptyPack,
UnexpectedObjectType(u8),
HashMismatch {
expected: String,
actual: String,
},
}Expand description
Errors that can occur while reading or writing pack files.
Variants§
InvalidMagic(String)
A .pack file did not start with the SPCK magic.
UnsupportedVersion(u32)
The pack version is newer than this build supports.
InvalidIndexMagic(String)
An .idx file did not start with the SIDX magic.
BlobNotFound(String)
The digest is not present in this pack.
Io(Error)
An underlying filesystem operation failed.
CompressionError(String)
Zstd compression failed while writing the pack.
DecompressionError(String)
Zstd decompression failed while reading the pack.
EmptyPack
At least one object is required to create a pack.
UnexpectedObjectType(u8)
An object record used a type byte this build does not know.
HashMismatch
The blob read from the pack did not match its recorded digest.
Trait Implementations§
Source§impl Error for PackError
impl Error for PackError
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 !RefUnwindSafe for PackError
impl !UnwindSafe for PackError
impl Freeze for PackError
impl Send for PackError
impl Sync for PackError
impl Unpin for PackError
impl UnsafeUnpin for PackError
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