pub struct Hunk {
pub old: HunkRange,
pub new: HunkRange,
pub context: String,
pub lines: Vec<DiffLine>,
}Fields§
§old: HunkRange§new: HunkRange§context: String§lines: Vec<DiffLine>Implementations§
Source§impl Hunk
impl Hunk
Sourcepub fn changed_spans(&self) -> Vec<Option<ChangedSpan>>
pub fn changed_spans(&self) -> Vec<Option<ChangedSpan>>
Pair adjacent deletion/addition runs once. Each span belongs to its own line, including unequal replacement lengths and multibyte text.
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 Hunk
impl Sync for Hunk
impl Unpin for Hunk
impl UnsafeUnpin for Hunk
impl UnwindSafe for Hunk
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