pub struct DisplaySpan {
pub range: Range<usize>,
pub style: Style,
}Expand description
PH.1: a syntax-styled run within a candidate’s display
text. Carries a semantic Style
(a closed enum with an existing Style → ElementId map),
NOT a resolved color — the renderer resolves it via
resolve_syntax_style at paint so :colorscheme recolors
live, mirroring the Annotation::Styled carry-semantic /
resolve-at-seam invariant (marginalia §3 / §8.2). range
is a byte range into display.
Semantic Style (not a slot-key Arc<str> like
AnnotationSegment) because syntax styles are a closed
set with direct typed resolution, whereas annotation slots
are open (plugins name arbitrary slots). See
docs/dev/architecture/picker-preview-highlight.md §4.
Fields§
§range: Range<usize>§style: StyleTrait Implementations§
Source§impl Clone for DisplaySpan
impl Clone for DisplaySpan
Source§fn clone(&self) -> DisplaySpan
fn clone(&self) -> DisplaySpan
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 DisplaySpan
impl Debug for DisplaySpan
impl Eq for DisplaySpan
Source§impl PartialEq for DisplaySpan
impl PartialEq for DisplaySpan
impl StructuralPartialEq 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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.