pub enum HunkLine {
Context(String),
Added(String),
Removed(String),
}Expand description
One line inside a hunk, tagged by what the diff said about it.
Variants§
Context(String)
Unchanged line, present in both old and new file.
Added(String)
Line present only in the new file.
Removed(String)
Line present only in the old file. Has no new-file line number.
Implementations§
Source§impl HunkLine
impl HunkLine
Sourcepub const fn marker(&self) -> char
pub const fn marker(&self) -> char
The gutter marker for this line kind, matching unified-diff notation.
Lives on the type rather than in the renderer so that “which character
means removed” is answered once. The renderer pairs it with
Hunk::numbered_lines, and the two together are the whole gutter.
Trait Implementations§
impl Eq for HunkLine
impl StructuralPartialEq for HunkLine
Auto Trait Implementations§
impl Freeze for HunkLine
impl RefUnwindSafe for HunkLine
impl Send for HunkLine
impl Sync for HunkLine
impl Unpin for HunkLine
impl UnsafeUnpin for HunkLine
impl UnwindSafe for HunkLine
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.