#[non_exhaustive]pub enum BinaryPatchError {
UnsupportedSection {
header: String,
},
InvalidSectionSize {
size: String,
},
EmptyLine,
InvalidLineLength {
marker: char,
},
InvalidBase85,
Inflate {
detail: String,
},
SizeMismatch {
actual: usize,
declared: usize,
},
DeltaWithoutBase,
NoReverseSection,
}Expand description
Why a GIT binary patch section could not be read or applied (ApplyError::BinaryPatch).
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.
UnsupportedSection
A section header is neither literal <size> nor delta <size>.
InvalidSectionSize
The size after literal / delta is not a decimal number.
EmptyLine
A payload line is empty where a length marker was expected.
InvalidLineLength
A payload line starts with a character that is not a length marker (A–Z, a–z).
InvalidBase85
A payload line’s base85 body is truncated, has bytes outside the alphabet, or does not decode to its declared length.
Inflate
The zlib payload of a section could not be inflated.
SizeMismatch
A literal section inflated to a different size than its header declared.
DeltaWithoutBase
A delta section was applied without the preimage blob it is relative to.
NoReverseSection
The patch has a forward section but no reverse section.
Trait Implementations§
Source§impl Clone for BinaryPatchError
impl Clone for BinaryPatchError
Source§impl Debug for BinaryPatchError
impl Debug for BinaryPatchError
Source§impl Display for BinaryPatchError
impl Display for BinaryPatchError
impl Eq for BinaryPatchError
Source§impl Error for BinaryPatchError
impl Error for BinaryPatchError
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<BinaryPatchError> for ApplyError
impl From<BinaryPatchError> for ApplyError
Source§fn from(source: BinaryPatchError) -> Self
fn from(source: BinaryPatchError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for BinaryPatchError
impl PartialEq for BinaryPatchError
impl StructuralPartialEq for BinaryPatchError
Auto Trait Implementations§
impl Forget for BinaryPatchError
impl Freeze for BinaryPatchError
impl RefUnwindSafe for BinaryPatchError
impl Send for BinaryPatchError
impl Sync for BinaryPatchError
impl Unpin for BinaryPatchError
impl UnsafeUnpin for BinaryPatchError
impl UnwindSafe for BinaryPatchError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.