pub struct DiffRenderState {
pub sign_map: Arc<DiffSignMap>,
pub sign_maps: Arc<HashMap<BufferId, Arc<DiffSignMap>>>,
pub active_session_hunk_count: Option<usize>,
}Expand description
D.3.d.1 (2026-05-29): renderer-side projection of the
active document’s diff overlay state. Carries the
DiffSignMap for the gutter-sign column; future D.3.e
(line tints) reads through the same map.
sign_map defaults to an empty Arc<DiffSignMap> so
renderers never have to handle the Option path; an
empty map’s sign_at is None for every line.
Fields§
§sign_map: Arc<DiffSignMap>§sign_maps: Arc<HashMap<BufferId, Arc<DiffSignMap>>>D-fix.3b: per-buffer sign maps for EVERY live diff session, so a
side-by-side diff tints BOTH panes — each pane reads its own
buffer’s map by BufferId. The proposed/current (right) buffer maps
to the current-side sign_map(); the baseline (left) buffer maps to
the baseline_sign_map(). Renderers look up sign_maps.get(buffer_id)
per pane; the legacy single sign_map above stays the active-doc map
for the modeline hunk count.
active_session_hunk_count: Option<usize>D.3.g (2026-05-29): hunk count for the active
document’s DiffSession, if any. None means no
session is open for the active buffer. Some(0) means
a session is open but the buffer currently matches
baseline (no hunks). The modeline diff-mode indicator
reads this to render [diff: N hunks] only when a
session is active.
Trait Implementations§
Source§impl Clone for DiffRenderState
impl Clone for DiffRenderState
Source§fn clone(&self) -> DiffRenderState
fn clone(&self) -> DiffRenderState
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 DiffRenderState
impl Debug for DiffRenderState
Source§impl Default for DiffRenderState
impl Default for DiffRenderState
Source§fn default() -> DiffRenderState
fn default() -> DiffRenderState
Auto Trait Implementations§
impl Freeze for DiffRenderState
impl RefUnwindSafe for DiffRenderState
impl Send for DiffRenderState
impl Sync for DiffRenderState
impl Unpin for DiffRenderState
impl UnsafeUnpin for DiffRenderState
impl UnwindSafe for DiffRenderState
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<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