pub struct Hunk {
pub file: String,
pub start: usize,
pub count: usize,
pub old: String,
}Expand description
One hunk of git diff -U0: where the new lines are, and the lines that were there.
Fields§
§file: StringPath relative to the workspace root, with / separators.
start: usizeThe first new line (1-based); with no new lines, the line the old ones came after.
count: usizeHow many new lines there are.
old: StringThe old lines, each with its line end (the last one without, if the old file ended without one there).
Trait Implementations§
impl Eq for Hunk
impl StructuralPartialEq for Hunk
Auto Trait Implementations§
impl Forget for Hunk
impl Freeze for Hunk
impl Move for Hunk
impl RefUnwindSafe for Hunk
impl Send for Hunkwhere
RawVecInner: Send,
impl Sync for Hunkwhere
RawVecInner: Sync,
impl Unpin for Hunk
impl UnsafeUnpin for Hunk
impl UnwindSafe for Hunkwhere
RawVecInner: UnwindSafe,
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.