#[non_exhaustive]pub enum DiffTarget {
WorktreeVsHead,
WorktreeVsTree(ObjectId),
IndexVsHead,
WorktreeVsIndex,
Commit(ObjectId),
Trees {
old: Option<ObjectId>,
new: ObjectId,
},
}Expand description
What to compare when producing a structured file diff list.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
WorktreeVsHead
Working tree and index together vs HEAD’s tree (default uncommitted diff).
WorktreeVsTree(ObjectId)
Working tree (and index) vs a specific tree OID.
IndexVsHead
Index vs HEAD’s tree (--staged).
WorktreeVsIndex
Working tree vs index (--unstaged).
Commit(ObjectId)
Patch introduced by one commit (parent tree vs commit tree).
Trees
Tree diff between two commits (old may be absent for root commits).
Trait Implementations§
Source§impl Clone for DiffTarget
impl Clone for DiffTarget
Source§impl Debug for DiffTarget
impl Debug for DiffTarget
impl Eq for DiffTarget
Source§impl PartialEq for DiffTarget
impl PartialEq for DiffTarget
impl StructuralPartialEq for DiffTarget
Auto Trait Implementations§
impl Freeze for DiffTarget
impl RefUnwindSafe for DiffTarget
impl Send for DiffTarget
impl Sync for DiffTarget
impl Unpin for DiffTarget
impl UnsafeUnpin for DiffTarget
impl UnwindSafe for DiffTarget
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