pub struct ChangeRegion {
pub start_line: usize,
pub end_line: usize,
pub kind: ChangeKind,
}Expand description
A region of changed lines for diff highlighting.
Fields§
§start_line: usizeStarting line number (1-indexed).
end_line: usizeEnding line number (1-indexed, inclusive).
kind: ChangeKindKind of change.
Implementations§
Source§impl ChangeRegion
impl ChangeRegion
Sourcepub fn new(start_line: usize, end_line: usize, kind: ChangeKind) -> Self
pub fn new(start_line: usize, end_line: usize, kind: ChangeKind) -> Self
Create a new change region.
Sourcepub fn contains_line(&self, line: usize) -> bool
pub fn contains_line(&self, line: usize) -> bool
Check if a line number is within this region.
Trait Implementations§
Source§impl Clone for ChangeRegion
impl Clone for ChangeRegion
Source§fn clone(&self) -> ChangeRegion
fn clone(&self) -> ChangeRegion
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChangeRegion
impl Debug for ChangeRegion
Source§impl PartialEq for ChangeRegion
impl PartialEq for ChangeRegion
impl Eq for ChangeRegion
impl StructuralPartialEq for ChangeRegion
Auto Trait Implementations§
impl Freeze for ChangeRegion
impl RefUnwindSafe for ChangeRegion
impl Send for ChangeRegion
impl Sync for ChangeRegion
impl Unpin for ChangeRegion
impl UnsafeUnpin for ChangeRegion
impl UnwindSafe for ChangeRegion
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