pub struct DisplaySpan {
pub start: u32,
pub end: u32,
pub slot: String,
}Expand description
OA.5: the per-row style spans an Entry carries.
PS.1: a styled run of a candidate’s display text.
start / end are BYTE offsets into display, half-open. A range that
is out of bounds, inverted, or not on a UTF-8 boundary is dropped with a
warning naming the source — one bad span must not cost a row its other
runs, and must never panic the picker.
slot is a capture or theme-element name, resolved host-side
through exactly the path a highlights.scm capture takes
(name_to_style_with_theme): a builtin category (keyword,
text.title.1, comment) wins first, and any other name resolves
against the theme registry as a Style::Element — which is how a
plugin’s own registered element (org.todo.WAITING) reaches a picker
row. An unresolvable name renders unstyled rather than failing the row.
Naming a style rather than carrying one is deliberate, and follows
annotation-custom.slot: a Style is a closed Rust enum plus an
interned element id, and neither crosses an ABI meaningfully. A name
does, and it means a guest’s picker row is coloured by the SAME
vocabulary — and the same active colourscheme — as the buffer it came
from.
Fields§
§start: u32§end: u32§slot: StringTrait Implementations§
Source§impl Clone for DisplaySpan
impl Clone for DisplaySpan
Source§fn clone(&self) -> DisplaySpan
fn clone(&self) -> DisplaySpan
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl ComponentType for DisplaySpan
Source§impl Debug for DisplaySpan
impl Debug for DisplaySpan
impl Lift for DisplaySpan
impl Lower for DisplaySpan
Auto Trait Implementations§
impl Freeze for DisplaySpan
impl RefUnwindSafe for DisplaySpan
impl Send for DisplaySpan
impl Sync for DisplaySpan
impl Unpin for DisplaySpan
impl UnsafeUnpin for DisplaySpan
impl UnwindSafe for DisplaySpan
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more