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
entry_mode: EntryMode
The mode of the added entry.
oid: ObjectId
The object id of the added entry.
An entry was added, like the addition of a file or directory.
Deletion
Fields
entry_mode: EntryMode
The mode of the deleted entry.
oid: ObjectId
The object id of the deleted entry.
An entry was deleted, like the deletion of a file or directory.
Modification
Fields
previous_entry_mode: EntryMode
The mode of the entry before the modification.
previous_oid: ObjectId
The object id of the entry before the modification.
entry_mode: EntryMode
The mode of the entry after the modification.
oid: ObjectId
The object id after the modification.
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.
Trait Implementations
sourceimpl Ord for Change
impl Ord for Change
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<Change> for Change
impl PartialOrd<Change> for Change
sourcefn partial_cmp(&self, other: &Change) -> Option<Ordering>
fn partial_cmp(&self, other: &Change) -> Option<Ordering>
1.0.0 · sourcefn 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more