Skip to main content

Overlay

Struct Overlay 

Source
pub struct Overlay {
    pub selection: Vec<SelectionSpan>,
    pub matches: Vec<SelectionSpan>,
    pub markers: Vec<MarkerPosition>,
    pub active_match: Vec<SelectionSpan>,
}
Expand description

Interaction overlays projected onto the viewport (#108): highlight spans the engine carries on the frame so a frame-mode consumer can paint them without an in-process model query. Positions only — highlight colour is the consumer’s (theme-agnostic). Coordinates are viewport rows/cols, re-projected by frame() against the scroll offset so the engine stays the single anchoring authority.

Fields§

§selection: Vec<SelectionSpan>

The live selection projected onto visible rows (selection_range).

§matches: Vec<SelectionSpan>

The search highlights projected onto visible rows. Search matches are consumer-owned (next/prev navigation holds the Vec<Match>), so the consumer hands the highlight set back via set_search_highlights and the engine projects it here — mirroring how the engine-owned selection rides.

§markers: Vec<MarkerPosition>

Engine-owned markers visible in this viewport (#118): persistent line anchors for decorations. Unlike the selection (cleared on a screen swap) and search highlights (invalidated on output), markers re-anchor through buffer mutation and survive an alt-screen excursion; only their viewport position rides here.

§active_match: Vec<SelectionSpan>

The active (current) search match’s spans (#428, v12): the member of matches the consumer designated via set_active_search_highlight (which match is active is consumer policy — next/prev navigation). Projected by the same mechanism as matches, and also present there — the renderer’s highlight ranking resolves the overlap (#424), not exclusion here. Empty when nothing is designated.

Trait Implementations§

Source§

impl Clone for Overlay

Source§

fn clone(&self) -> Overlay

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Overlay

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Overlay

Source§

fn default() -> Overlay

Returns the “default value” for a type. Read more
Source§

impl Eq for Overlay

Source§

impl PartialEq for Overlay

Source§

fn eq(&self, other: &Overlay) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Overlay

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.