pub struct StructuredHunk {
pub old_start: usize,
pub new_start: usize,
pub old_lines: usize,
pub new_lines: usize,
pub context: Option<String>,
pub lines: Vec<StructuredLine>,
}Expand description
A contiguous run of changes plus surrounding context.
Fields§
§old_start: usize1-based starting line on the old side (unified hunk header).
new_start: usize1-based starting line on the new side.
old_lines: usizeNumber of old-side lines in this hunk (including context).
new_lines: usizeNumber of new-side lines in this hunk (including context).
context: Option<String>Optional @@ function/context header copied from Git patch text.
lines: Vec<StructuredLine>Rendered lines in hunk order.
Trait Implementations§
Source§impl Clone for StructuredHunk
impl Clone for StructuredHunk
Source§impl Debug for StructuredHunk
impl Debug for StructuredHunk
impl Eq for StructuredHunk
Source§impl PartialEq for StructuredHunk
impl PartialEq for StructuredHunk
impl StructuralPartialEq for StructuredHunk
Auto Trait Implementations§
impl Freeze for StructuredHunk
impl RefUnwindSafe for StructuredHunk
impl Send for StructuredHunk
impl Sync for StructuredHunk
impl Unpin for StructuredHunk
impl UnsafeUnpin for StructuredHunk
impl UnwindSafe for StructuredHunk
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.