pub struct NewSpan {
pub first: u64,
pub last: u64,
}Expand description
What: One run of changed lines on the new side of a file: the first new line the change touches and the last. A pure deletion touches the new line that now stands where the removed lines were. Why: The excerpt window is the union of these spans over the file’s runs, cut from the new-side file the commit produced. The script applied the old-side numbers to the new-side file, which shifts the window after an earlier insertion; this port uses the new side on both ends.
In TS you’d write (pseudocode):
type NewSpan = { first: number; last: number };Fields§
§first: u64First changed new line.
last: u64Last changed new line.
Trait Implementations§
impl Copy for NewSpan
impl Eq for NewSpan
impl StructuralPartialEq for NewSpan
Auto Trait Implementations§
impl Freeze for NewSpan
impl RefUnwindSafe for NewSpan
impl Send for NewSpan
impl Sync for NewSpan
impl Unpin for NewSpan
impl UnsafeUnpin for NewSpan
impl UnwindSafe for NewSpan
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more