pub struct UnifiedDiff {
pub text: String,
pub added: usize,
pub removed: usize,
pub truncated: bool,
}Expand description
A rendered unified diff plus its summary stats.
Fields§
§text: StringUnified-diff body (hunk headers + context/insert/delete lines), capped
at the requested line count. No --- a/… / +++ b/… file header —
callers render the path themselves.
added: usizeTotal inserted lines (uncapped — counted before truncation).
removed: usizeTotal removed lines (uncapped — counted before truncation).
truncated: booltrue when the rendered body was cut at max_lines.
Implementations§
Trait Implementations§
Source§impl Clone for UnifiedDiff
impl Clone for UnifiedDiff
Source§fn clone(&self) -> UnifiedDiff
fn clone(&self) -> UnifiedDiff
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UnifiedDiff
impl Debug for UnifiedDiff
impl Eq for UnifiedDiff
Source§impl PartialEq for UnifiedDiff
impl PartialEq for UnifiedDiff
impl StructuralPartialEq for UnifiedDiff
Auto Trait Implementations§
impl Freeze for UnifiedDiff
impl RefUnwindSafe for UnifiedDiff
impl Send for UnifiedDiff
impl Sync for UnifiedDiff
impl Unpin for UnifiedDiff
impl UnsafeUnpin for UnifiedDiff
impl UnwindSafe for UnifiedDiff
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§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.