pub struct MultibufferExcerptHeaderProvider { /* private fields */ }Expand description
Emits one virtual row per excerpt header, anchored above the
excerpt’s first composed row. Cheap-clone reference to the
multibuffer handle; re-reads excerpts on each collect().
T.7: when a [ThemeRegistryHandle] + the header element ids are
supplied, collect() resolves the backdrop + path elements and
bakes them into the row’s bg / cells’ fg — resolution happens
off-thread at row-build time, never on a paint path. Without a
handle (test paths) the rows fall back to bg: None (the renderer
then picks its kind default).
Debug is hand-rolled because ThemeRegistryHandle (a
dyn ThemeRegistry trait object) is not Debug; the
VirtualRowProvider trait requires Debug.
Implementations§
Source§impl MultibufferExcerptHeaderProvider
impl MultibufferExcerptHeaderProvider
Sourcepub fn new(multibuffer: MultibufferDocumentHandle) -> Self
pub fn new(multibuffer: MultibufferDocumentHandle) -> Self
Construct without theme wiring — headers render with no baked
bg/fg (the renderer’s kind default applies). Test convenience;
production uses Self::with_theme. Defaults nerd_fonts to
false (BMP-fallback palette).
Sourcepub fn with_grouping(self, grouping: FoldGrouping) -> Self
pub fn with_grouping(self, grouping: FoldGrouping) -> Self
OA.2: group header rows the way this view folds. Defaults to
SourceFile, which is what every provider but the agenda wants.
Sourcepub fn with_theme(
multibuffer: MultibufferDocumentHandle,
theme: ThemeRegistryHandle,
elements: MultibufferHeaderElementIds,
nerd_fonts: bool,
) -> Self
pub fn with_theme( multibuffer: MultibufferDocumentHandle, theme: ThemeRegistryHandle, elements: MultibufferHeaderElementIds, nerd_fonts: bool, ) -> Self
T.7: construct with the resolved theme handle + the header
element ids so collect() bakes the registered backdrop / path
colors into the header rows. MH.A3: nerd_fonts selects the
icon palette (captured at view creation; see the struct field
doc for the per-buffer-toggle follow-on note).
Trait Implementations§
Source§impl VirtualRowProvider for MultibufferExcerptHeaderProvider
impl VirtualRowProvider for MultibufferExcerptHeaderProvider
Source§fn id(&self) -> ProviderId
fn id(&self) -> ProviderId
Source§fn version(&self) -> u64
fn version(&self) -> u64
Self::collect] would emit have
changed. The worker uses the combined fingerprint of all
providers’ versions to short-circuit on the cache-hit
path without paying for the (potentially expensive)
collect calls. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for MultibufferExcerptHeaderProvider
impl !UnwindSafe for MultibufferExcerptHeaderProvider
impl Freeze for MultibufferExcerptHeaderProvider
impl Send for MultibufferExcerptHeaderProvider
impl Sync for MultibufferExcerptHeaderProvider
impl Unpin for MultibufferExcerptHeaderProvider
impl UnsafeUnpin for MultibufferExcerptHeaderProvider
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<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