#[non_exhaustive]pub enum ObjectReadFailure {
Io(Error),
Zlib {
detail: String,
},
CorruptObject {
detail: String,
},
ObjectStreamTruncated {
expected: u64,
actual: u64,
},
UnknownObjectType {
name: String,
},
ObjectHeaderTooLong {
oid: String,
},
DeltaChainTooDeep {
limit: usize,
},
InvalidObject {
kind: ObjectKind,
check: FsckError,
},
}Expand description
Failure decoding object bytes from loose storage or a pack entry.
Used as the source of ObjectError::CorruptLoose and ObjectError::CorruptPacked
so object-read layers do not store a recursive Error.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Io(Error)
Filesystem read failed while loading object bytes.
Zlib
zlib inflate/deflate failure on object payload bytes.
CorruptObject
Object header or payload failed structural checks (see ObjectError::Corrupt).
ObjectStreamTruncated
Declared size did not match bytes read from a stream.
UnknownObjectType
Object type token in a header was not recognized.
ObjectHeaderTooLong
Loose object header type field exceeds Git’s limit.
DeltaChainTooDeep
Delta chain exceeded the read-side depth limit.
InvalidObject
Payload failed the same checks used when refusing writes (git fsck rules).
Trait Implementations§
Source§impl Debug for ObjectReadFailure
impl Debug for ObjectReadFailure
Source§impl Display for ObjectReadFailure
impl Display for ObjectReadFailure
Source§impl Error for ObjectReadFailure
impl Error for ObjectReadFailure
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 ObjectReadFailure
impl !UnwindSafe for ObjectReadFailure
impl Forget for ObjectReadFailure
impl Freeze for ObjectReadFailure
impl Send for ObjectReadFailure
impl Sync for ObjectReadFailure
impl Unpin for ObjectReadFailure
impl UnsafeUnpin for ObjectReadFailure
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