pub struct LineCounts {
pub adds: usize,
pub dels: usize,
}Expand description
Line totals for a hunk, or any aggregation of hunks.
Canonical enumeration is -U0, so a hunk carries no context lines and the
counts are exactly its added and removed lines. Aggregating them was open-
coded in three places in the TUI alone, each re-deciding which schema field
meant which direction.
Fields§
§adds: usize§dels: usizeImplementations§
Trait Implementations§
Source§impl Add for LineCounts
impl Add for LineCounts
Source§type Output = LineCounts
type Output = LineCounts
The resulting type after applying the
+ operator.Source§fn add(self, rhs: LineCounts) -> LineCounts
fn add(self, rhs: LineCounts) -> LineCounts
Performs the
+ operation. Read moreSource§impl Clone for LineCounts
impl Clone for LineCounts
impl Copy for LineCounts
Source§impl Debug for LineCounts
impl Debug for LineCounts
Source§impl Default for LineCounts
impl Default for LineCounts
impl Eq for LineCounts
Source§impl PartialEq for LineCounts
impl PartialEq for LineCounts
impl StructuralPartialEq for LineCounts
Source§impl Sum for LineCounts
impl Sum for LineCounts
Source§fn sum<I: Iterator<Item = LineCounts>>(iter: I) -> LineCounts
fn sum<I: Iterator<Item = LineCounts>>(iter: I) -> LineCounts
Takes an iterator and generates
Self from the elements by “summing up”
the items.Auto Trait Implementations§
impl Freeze for LineCounts
impl RefUnwindSafe for LineCounts
impl Send for LineCounts
impl Sync for LineCounts
impl Unpin for LineCounts
impl UnsafeUnpin for LineCounts
impl UnwindSafe for LineCounts
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§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.