pub struct DiffConflict { /* private fields */ }Expand description
A parsed merge conflict in a working file.
Source coordinates are one-based, half-open ranges, allowing empty parts.
Returned by DiffFile::conflicts in source order; its slice index is the
index accepted by super::DiffState::resolve_conflict. Fields are private
and only the parser constructs these snapshots.
Implementations§
Source§impl DiffConflict
impl DiffConflict
Sourcepub fn lines(&self) -> Range<usize> ⓘ
pub fn lines(&self) -> Range<usize> ⓘ
One-based working-file lines, including markers, with an exclusive end.
Sourcepub fn current_lines(&self) -> Range<usize> ⓘ
pub fn current_lines(&self) -> Range<usize> ⓘ
Current-side source lines, with an exclusive end; may be empty.
Sourcepub fn base_lines(&self) -> Option<Range<usize>>
pub fn base_lines(&self) -> Option<Range<usize>>
Base source lines for diff3, with an exclusive end; may be empty.
Sourcepub fn incoming_lines(&self) -> Range<usize> ⓘ
pub fn incoming_lines(&self) -> Range<usize> ⓘ
Incoming-side source lines, with an exclusive end; may be empty.
Sourcepub fn current_label(&self) -> &SharedString
pub fn current_label(&self) -> &SharedString
The label from the opening marker.
Sourcepub fn base_label(&self) -> Option<&SharedString>
pub fn base_label(&self) -> Option<&SharedString>
The base marker label, or None for a two-way conflict.
Sourcepub fn incoming_label(&self) -> &SharedString
pub fn incoming_label(&self) -> &SharedString
The label from the closing marker.
Trait Implementations§
Source§impl Clone for DiffConflict
impl Clone for DiffConflict
Auto Trait Implementations§
impl Freeze for DiffConflict
impl RefUnwindSafe for DiffConflict
impl Send for DiffConflict
impl Sync for DiffConflict
impl Unpin for DiffConflict
impl UnsafeUnpin for DiffConflict
impl UnwindSafe for DiffConflict
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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