pub struct ViewLine {
pub content: String,
pub spans: Vec<ViewSpan>,
pub kind: LineKind,
pub old_line: Option<usize>,
pub new_line: Option<usize>,
pub is_active: bool,
pub is_active_change: bool,
pub is_primary_active: bool,
pub show_hunk_extent: bool,
pub change_id: usize,
pub hunk_index: Option<usize>,
pub has_changes: bool,
}Expand description
A line in the current view with its status
Fields§
§content: StringFull content of the line
spans: Vec<ViewSpan>Individual styled spans (for word-level highlighting)
kind: LineKindOverall line kind
old_line: Option<usize>§new_line: Option<usize>§is_active: boolPart of the active hunk (for animation styling)
is_active_change: boolThe active change itself (not just part of a hunk preview)
is_primary_active: boolThe primary focus line within the hunk (for gutter marker)
show_hunk_extent: boolShow extent marker (true only during hunk navigation)
change_id: usizeID of the change this line belongs to
hunk_index: Option<usize>Index of the hunk this line belongs to
has_changes: boolTrue if the underlying change contains any non-equal spans
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ViewLine
impl RefUnwindSafe for ViewLine
impl Send for ViewLine
impl Sync for ViewLine
impl Unpin for ViewLine
impl UnsafeUnpin for ViewLine
impl UnwindSafe for ViewLine
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