pub enum Change {
Addition {
entry_mode: EntryMode,
oid: ObjectId,
relation: Option<Relation>,
},
Deletion {
entry_mode: EntryMode,
oid: ObjectId,
relation: Option<Relation>,
},
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
An entry was added, like the addition of a file or directory.
Fields
Deletion
An entry was deleted, like the deletion of a file or directory.
Fields
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.
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 id(&self) -> &oid
fn id(&self) -> &oid
Return the hash of the object behind this change for identification. Read more
source§fn relation(&self) -> Option<Relation>
fn relation(&self) -> Option<Relation>
Return the relation that this change may have with other changes. Read more
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 PartialOrd for Change
impl PartialOrd for Change
impl Eq for Change
impl StructuralPartialEq for Change
Auto Trait Implementations§
impl Freeze for Change
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)