pub enum BasisApplyError {
Invalid {
path: Vec<u8>,
file_id: Vec<u8>,
reason: String,
},
NotImplemented {
reason: String,
},
Internal {
reason: String,
},
NotVersioned {
path: Vec<u8>,
},
MismatchedEntryFileId {
new_path: Vec<u8>,
file_id: Vec<u8>,
entry_debug: String,
},
NewPathWithoutEntry {
new_path: Vec<u8>,
file_id: Vec<u8>,
},
}Expand description
Error returned by super::DirState::update_basis_apply_adds and
the sibling apply-changes / apply-deletes methods. Mirrors
Python’s _raise_invalid and AssertionError /
NotImplementedError paths.
Variants§
Invalid
The caller-supplied add/change/delete conflicts with existing
dirstate content — mirrors Python’s InconsistentDelta(path, file_id, reason) exception.
NotImplemented
The Python implementation raises NotImplementedError in this
branch; carry the same signal so the caller can reproduce it.
Internal
An invariant that should never be reachable was violated.
Mirrors Python’s AssertionError inside the apply helpers.
NotVersioned
The (dirname, basename) path is not versioned — the parent
directory has no entry in tree 0. Mirrors Python’s
NotVersionedError raised from _find_block when called
without add_if_missing.
MismatchedEntryFileId
An InventoryDeltaEntry supplied a new_entry whose
file_id disagrees with the delta row’s own file_id.
Python raises this as InconsistentDelta(new_path, file_id, "mismatched entry file_id …").
NewPathWithoutEntry
The delta row has new_path but no accompanying new_entry.
Python raises this as InconsistentDelta(new_path, file_id, "new_path with no entry").
Trait Implementations§
Source§impl Debug for BasisApplyError
impl Debug for BasisApplyError
Source§impl Display for BasisApplyError
impl Display for BasisApplyError
impl Eq for BasisApplyError
Source§impl Error for BasisApplyError
impl Error for BasisApplyError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for BasisApplyError
impl PartialEq for BasisApplyError
impl StructuralPartialEq for BasisApplyError
Auto Trait Implementations§
impl Freeze for BasisApplyError
impl RefUnwindSafe for BasisApplyError
impl Send for BasisApplyError
impl Sync for BasisApplyError
impl Unpin for BasisApplyError
impl UnsafeUnpin for BasisApplyError
impl UnwindSafe for BasisApplyError
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
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
key and return true if they are equal.