pub struct LineEnd {
pub kind: &'static str,
pub old: u32,
pub new: u32,
pub old_line: Option<u32>,
pub new_line: Option<u32>,
}Expand description
One end of a multi-line comment, as GitLab’s line_range names it.
kind is "new" for an added line, "old" for a deleted one, and
"expanded" for an unchanged line, which exists on both sides. old and
new are the numbers the line_code carries — <sha>_<old>_<new> — and
they are not always the line’s own numbers: a line missing from one side
takes the position it sits at there — the paired hunk’s start, which is
0 only for a block at the file’s top.
old_line and new_line are the real numbers, present only on the side
the line exists, exactly as the forge’s web UI sends them.
Fields§
§kind: &'static str§old: u32§new: u32§old_line: Option<u32>§new_line: Option<u32>Trait Implementations§
impl Copy for LineEnd
impl Eq for LineEnd
impl StructuralPartialEq for LineEnd
Auto Trait Implementations§
impl Freeze for LineEnd
impl RefUnwindSafe for LineEnd
impl Send for LineEnd
impl Sync for LineEnd
impl Unpin for LineEnd
impl UnsafeUnpin for LineEnd
impl UnwindSafe for LineEnd
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.