pub enum RowRun {
Source {
len: u32,
style: Style,
},
Inlay {
len: u32,
},
}Expand description
One coloured run within a display row’s combined text.
Perf plan A.2. Carries either a lattice_syntax::Style tag
for source bytes or an Inlay discriminant for inlay-spliced
bytes. Runs are NOT baked to RGB — renderers map style → Rgba
at paint time against the resolved theme table. Reasons for the
tag, not the colour:
- A theme switch doesn’t invalidate the producer’s cache (only the colour resolution at paint changes; the run topology doesn’t).
- The producer stays theme-independent — no theme reads.
Slice A.2b.2 promoted this from a struct to an enum so the
producer can mark inlay-text bytes distinctly. Consumers map
Inlay to their inlay-virtual-text colour without having to
track byte ranges separately.
display-line B-series: this is the DisplayLine run type, owned
by the cells / DisplayMatrix substrate. (The deleted
RowPrepaint was the original consumer; B4.2 removed it but
display_matrix.rs keeps RowRun as its style-run type.)
Variants§
Source
Source-text run carrying a tree-sitter style tag.
Fields
Inlay
Inlay-virtual-text run. Carries only the byte length; the colour is consumer-resolved.
Implementations§
Source§impl RowRun
impl RowRun
Sourcepub fn len(&self) -> u32
pub fn len(&self) -> u32
Byte length of this run inside the row’s combined text.
Convenience accessor so consumers don’t need to match every
time the partition is walked. (Clippy: paired enums often
also expose is_empty, but RowRun::Inlay { len: 0 }
would be a producer bug — the partition is built with the
invariant that every run is non-empty, so an is_empty
would be misleading.)
Trait Implementations§
impl Copy for RowRun
impl Eq for RowRun
impl StructuralPartialEq for RowRun
Auto Trait Implementations§
impl Freeze for RowRun
impl RefUnwindSafe for RowRun
impl Send for RowRun
impl Sync for RowRun
impl Unpin for RowRun
impl UnsafeUnpin for RowRun
impl UnwindSafe for RowRun
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§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
key and return true if they are equal.§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
§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