pub enum Change {
Addition {
entry_mode: EntryMode,
oid: ObjectId,
},
Deletion {
entry_mode: EntryMode,
oid: ObjectId,
},
Modification {
previous_entry_mode: EntryMode,
previous_oid: ObjectId,
entry_mode: EntryMode,
oid: ObjectId,
},
}
Expand description
Represents any possible change in order to turn one tree into another.
Variants§
Addition
Fields
An entry was added, like the addition of a file or directory.
Deletion
Fields
An entry was deleted, like the deletion of a file or directory.
Modification
Fields
An entry was modified, e.g. changing the contents of a file adjusts its object id and turning a file into a symbolic link adjusts its mode.
Implementations§
Trait Implementations§
source§impl Change for Change
Available on crate feature blob
only.
impl Change for Change
Available on crate feature
blob
only.source§fn kind(&self) -> ChangeKind
fn kind(&self) -> ChangeKind
Return the kind of this change.
source§fn entry_mode(&self) -> EntryMode
fn entry_mode(&self) -> EntryMode
Return more information about the kind of entry affected by this change.
source§fn id_and_entry_mode(&self) -> (&oid, EntryMode)
fn id_and_entry_mode(&self) -> (&oid, EntryMode)
Return the id of the change along with its mode.
source§impl Ord for Change
impl Ord for Change
source§impl PartialEq for Change
impl PartialEq for Change
source§impl PartialOrd for Change
impl PartialOrd for Change
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for Change
impl StructuralEq for Change
impl StructuralPartialEq for Change
Auto Trait Implementations§
impl RefUnwindSafe for Change
impl Send for Change
impl Sync for Change
impl Unpin for Change
impl UnwindSafe for Change
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more