pub struct FileDiff {
pub added: Vec<PathBuf>,
pub removed: Vec<PathBuf>,
pub modified: Vec<PathBuf>,
pub unchanged: Vec<PathBuf>,
}Expand description
Represents changes between two index states.
Fields§
§added: Vec<PathBuf>Files that are new (not in the old state).
removed: Vec<PathBuf>Files that were removed (not in the new state).
modified: Vec<PathBuf>Files that have different hashes.
unchanged: Vec<PathBuf>Files that are unchanged.
Implementations§
Source§impl FileDiff
impl FileDiff
Sourcepub fn has_changes(&self) -> bool
pub fn has_changes(&self) -> bool
Check if there are any changes.
Sourcepub fn changed_count(&self) -> usize
pub fn changed_count(&self) -> usize
Get total number of changed files.
Sourcepub fn between(old: &IndexState, new: &IndexState) -> Self
pub fn between(old: &IndexState, new: &IndexState) -> Self
Compute diff between two states.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FileDiff
impl RefUnwindSafe for FileDiff
impl Send for FileDiff
impl Sync for FileDiff
impl Unpin for FileDiff
impl UnwindSafe for FileDiff
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<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