pub struct RangeHighlight {
pub start: usize,
pub length: usize,
pub format: HighlightFormat,
}Expand description
One highlight range carried by a range session, in absolute document char offsets —
the same coordinate space crate::FindMatch and replace report in.
A range session is the shape used for search highlighting and (eventually) an
externally-driven spell-checker: the host computes the ranges and hands the whole set over
with crate::TextDocument::set_session_ranges, rather than implementing a per-block
callback. The document slices these absolute ranges to per-block spans at snapshot time
(a block’s absolute char start is its document_position).
Fields§
§start: usizeAbsolute char offset into the document text.
length: usize§format: HighlightFormatTrait Implementations§
Source§impl Clone for RangeHighlight
impl Clone for RangeHighlight
Source§fn clone(&self) -> RangeHighlight
fn clone(&self) -> RangeHighlight
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 moreSource§impl Debug for RangeHighlight
impl Debug for RangeHighlight
impl Eq for RangeHighlight
Source§impl PartialEq for RangeHighlight
impl PartialEq for RangeHighlight
impl StructuralPartialEq for RangeHighlight
Auto Trait Implementations§
impl Freeze for RangeHighlight
impl RefUnwindSafe for RangeHighlight
impl Send for RangeHighlight
impl Sync for RangeHighlight
impl Unpin for RangeHighlight
impl UnsafeUnpin for RangeHighlight
impl UnwindSafe for RangeHighlight
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.