pub struct MultibufferSourceEdited {
pub view: BufferId,
pub source: BufferId,
}Expand description
PD.7c: published when one of a multibuffer’s source buffers is
edited — the peer of MultibufferSourceClosed, and it exists
for the same reason.
The view keeps composing correctly on its own (excerpts slide,
content recomposes). What an edit invalidates is whatever the
PROVIDER derived from the source’s content at scan time — diff
classifications, match positions, symbol ranges — and only the
provider knows what that is or what to do about it. Publishing the
fact here rather than letting each provider re-derive
DocumentId → source from raw DocumentChanged events keeps that
translation in the one place that already owns the source map.
Fires once per applied change, so a provider that reacts expensively
should react once per source (project-diff clears that file’s
styling on the first edit and then ignores the rest until gr).
Fields§
§view: BufferId§source: BufferIdTrait Implementations§
Source§impl Clone for MultibufferSourceEdited
impl Clone for MultibufferSourceEdited
Source§fn clone(&self) -> MultibufferSourceEdited
fn clone(&self) -> MultibufferSourceEdited
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 MultibufferSourceEdited
impl Debug for MultibufferSourceEdited
Source§impl Event for MultibufferSourceEdited
impl Event for MultibufferSourceEdited
Source§fn event_type_id(&self) -> EventTypeId
fn event_type_id(&self) -> EventTypeId
static to avoid
re-allocating the metadata on every call. The macro
register_event! generates this for you.Auto Trait Implementations§
impl Freeze for MultibufferSourceEdited
impl RefUnwindSafe for MultibufferSourceEdited
impl Send for MultibufferSourceEdited
impl Sync for MultibufferSourceEdited
impl Unpin for MultibufferSourceEdited
impl UnsafeUnpin for MultibufferSourceEdited
impl UnwindSafe for MultibufferSourceEdited
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