pub struct UnifiedFile {
pub old_path: Option<String>,
pub new_path: Option<String>,
pub hunks: Vec<DiffHunk>,
}Expand description
One file’s hunks from a multi-file unified diff.
Fields§
§old_path: Option<String>Old-side path, or None for /dev/null (added file).
new_path: Option<String>New-side path, or None for /dev/null (deleted file).
hunks: Vec<DiffHunk>Hunks in file order; never empty.
Trait Implementations§
Source§impl Clone for UnifiedFile
impl Clone for UnifiedFile
Source§impl Debug for UnifiedFile
impl Debug for UnifiedFile
impl Eq for UnifiedFile
Source§impl PartialEq for UnifiedFile
impl PartialEq for UnifiedFile
impl StructuralPartialEq for UnifiedFile
Auto Trait Implementations§
impl Forget for UnifiedFile
impl Freeze for UnifiedFile
impl RefUnwindSafe for UnifiedFile
impl Send for UnifiedFile
impl Sync for UnifiedFile
impl Unpin for UnifiedFile
impl UnsafeUnpin for UnifiedFile
impl UnwindSafe for UnifiedFile
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more