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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for HighlightRange
Source§impl Debug for HighlightRange
impl Debug for HighlightRange
impl Eq for HighlightRange
Source§impl PartialEq for HighlightRange
impl PartialEq for HighlightRange
Source§fn eq(&self, other: &HighlightRange) -> bool
fn eq(&self, other: &HighlightRange) -> bool
Tests for
self and other values to be equal, and is used by ==.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
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§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.