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