#[non_exhaustive]pub enum BundleError {
BadSignature,
UnsupportedVersion,
UnsupportedCapability(String),
MalformedLine(String),
ObjectFormatMismatch {
bundle_name: &'static str,
repo_name: &'static str,
},
MissingPrerequisite {
oid: ObjectId,
subject: Option<String>,
},
PrerequisitesNotConnected,
EmptyRefs,
MissingPack,
Io(String),
Cancelled,
}Expand description
Bundle read/write/verify failures.
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.
BadSignature
The file does not begin with a v2/v3 bundle signature.
UnsupportedVersion
Only versions 2 and 3 are supported.
UnsupportedCapability(String)
A v3 @ capability was not recognized.
MalformedLine(String)
A header line could not be parsed.
ObjectFormatMismatch
Header object format disagrees with the repository.
Fields
MissingPrerequisite
A prerequisite commit is absent from the ODB.
Fields
PrerequisitesNotConnected
Prerequisite objects exist but are not connected to local refs.
EmptyRefs
No ref tips were listed in the header.
MissingPack
The pack stream did not start where expected.
Io(String)
Underlying I/O failure.
Cancelled
The operation was cancelled before the bundle finished unpacking.
Implementations§
Source§impl BundleError
impl BundleError
Sourcepub fn is_cancelled(&self) -> bool
pub fn is_cancelled(&self) -> bool
Whether the bundle operation was cancelled.
Trait Implementations§
Source§impl Clone for BundleError
impl Clone for BundleError
Source§impl Debug for BundleError
impl Debug for BundleError
Source§impl Display for BundleError
impl Display for BundleError
impl Eq for BundleError
Source§impl Error for BundleError
impl Error for BundleError
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<Error> for BundleError
impl From<Error> for BundleError
Source§impl PartialEq for BundleError
impl PartialEq for BundleError
impl StructuralPartialEq for BundleError
Auto Trait Implementations§
impl Freeze for BundleError
impl RefUnwindSafe for BundleError
impl Send for BundleError
impl Sync for BundleError
impl Unpin for BundleError
impl UnsafeUnpin for BundleError
impl UnwindSafe for BundleError
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.