pub struct DiffStats {
pub files_changed: Vec<String>,
pub insertions: usize,
pub deletions: usize,
}Expand description
Diff statistics.
Contains changed files and insert/delete counts.
§Fields
files_changed: changed file paths (relative to repository root)insertions: number of inserted linesdeletions: number of deleted lines
§Example
use gcop_rs::git::DiffStats;
let stats = DiffStats {
files_changed: vec!["src/main.rs".to_string(), "README.md".to_string()],
insertions: 42,
deletions: 13,
};
assert_eq!(stats.files_changed.len(), 2);Fields§
§files_changed: Vec<String>Paths of files changed in the diff.
insertions: usizeNumber of inserted lines.
deletions: usizeNumber of deleted lines.
Trait Implementations§
Source§impl From<&DiffStats> for DiffStatsJson
impl From<&DiffStats> for DiffStatsJson
Auto Trait Implementations§
impl Freeze for DiffStats
impl RefUnwindSafe for DiffStats
impl Send for DiffStats
impl Sync for DiffStats
impl Unpin for DiffStats
impl UnsafeUnpin for DiffStats
impl UnwindSafe for DiffStats
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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