pub struct MultibufferExcerptSource { /* private fields */ }Expand description
OA.23 — the ExcerptSourceResolver
a multibuffer-aware host wires into the plugin host.
One handle, because a view answers the whole question: the registry maps a
view to its excerpts (composed line → source buffer + line), and every
source is an Arc<dyn Document> that carries its own path.
It first took a BufferStoreHandle too, on the reasoning that the registry
could say which buffer and never which file. That was wrong, and wrong
in the way that costs a whole slice: a scan view — the agenda — mints
its sources with BufferId::next() and hands them to add_source, never to
BufferStore::insert_document_buffer, because they are not buffers the user
opened. So the store answered none for every agenda row, and the only
tests were the two none paths, which pass either way. See
a_scan_views_source_resolves_by_the_documents_own_path.
Lives here rather than in the plugin host because this crate owns the
composed→source translation; the host cannot depend on it (layering), which
is why the trait is abstract in lattice-core at all.
Implementations§
Source§impl MultibufferExcerptSource
impl MultibufferExcerptSource
pub fn new(views: MultibufferRegistryHandle) -> Self
Trait Implementations§
Source§impl Clone for MultibufferExcerptSource
impl Clone for MultibufferExcerptSource
Source§fn clone(&self) -> MultibufferExcerptSource
fn clone(&self) -> MultibufferExcerptSource
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MultibufferExcerptSource
impl Debug for MultibufferExcerptSource
Source§impl ExcerptSourceResolver for MultibufferExcerptSource
impl ExcerptSourceResolver for MultibufferExcerptSource
Auto Trait Implementations§
impl !RefUnwindSafe for MultibufferExcerptSource
impl !UnwindSafe for MultibufferExcerptSource
impl Freeze for MultibufferExcerptSource
impl Send for MultibufferExcerptSource
impl Sync for MultibufferExcerptSource
impl Unpin for MultibufferExcerptSource
impl UnsafeUnpin for MultibufferExcerptSource
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