pub enum DiffEntry<Content> {
LeftOnly {
path: Path,
entry_type: TreeEntryType,
content: Content,
},
Both {
path: Path,
left_type: TreeEntryType,
right_type: TreeEntryType,
content: Content,
},
RightOnly {
path: Path,
entry_type: TreeEntryType,
content: Content,
},
}Available on crate feature
diff only.Expand description
Represents a diff of a single file
It is generic over the content of the file diff. For tree diffs, Content
is a pair of ObjectIds, one of which may be zero. For full diffs,
Content is a similar::TextDiff.
Variants§
Implementations§
Trait Implementations§
Source§impl<Content: Ord> Ord for DiffEntry<Content>
impl<Content: Ord> Ord for DiffEntry<Content>
1.21.0 · Source§fn 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
Source§impl<Content: PartialOrd> PartialOrd for DiffEntry<Content>
impl<Content: PartialOrd> PartialOrd for DiffEntry<Content>
impl<Content: Eq> Eq for DiffEntry<Content>
impl<Content> StructuralPartialEq for DiffEntry<Content>
Auto Trait Implementations§
impl<Content> Freeze for DiffEntry<Content>where
Content: Freeze,
impl<Content> RefUnwindSafe for DiffEntry<Content>where
Content: RefUnwindSafe,
impl<Content> Send for DiffEntry<Content>where
Content: Send,
impl<Content> Sync for DiffEntry<Content>where
Content: Sync,
impl<Content> Unpin for DiffEntry<Content>where
Content: Unpin,
impl<Content> UnsafeUnpin for DiffEntry<Content>where
Content: UnsafeUnpin,
impl<Content> UnwindSafe for DiffEntry<Content>where
Content: UnwindSafe,
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