pub struct HighlightRange {
pub start_line: usize,
pub line_count: usize,
}Expand description
A highlighted line range within a scrollable region.
Used with ScrollState::set_highlights to mark search results, error
lines, or any per-line emphasis. The scrollable_with_gutter widget reads
the active highlights and renders a background band on matching lines.
Fields§
§start_line: usizeFirst line (0-based, relative to content top).
line_count: usizeNumber of lines in the range (1 = single line).
Implementations§
Source§impl HighlightRange
impl HighlightRange
Sourcepub fn line(line: usize) -> Self
pub fn line(line: usize) -> Self
Create a single-line highlight at line.
Field-name pairing: start_line + line_count → constructor named
line. Use Self::span for multi-line ranges.
Trait Implementations§
Source§impl Clone for HighlightRange
impl Clone for HighlightRange
Source§fn clone(&self) -> HighlightRange
fn clone(&self) -> HighlightRange
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 HighlightRange
impl Debug for HighlightRange
Source§impl PartialEq for HighlightRange
impl PartialEq for HighlightRange
impl Copy for HighlightRange
impl Eq for HighlightRange
impl StructuralPartialEq for HighlightRange
Auto Trait Implementations§
impl Freeze for HighlightRange
impl RefUnwindSafe for HighlightRange
impl Send for HighlightRange
impl Sync for HighlightRange
impl Unpin for HighlightRange
impl UnsafeUnpin for HighlightRange
impl UnwindSafe for HighlightRange
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