pub struct SyntheticDoc {
pub buffer: Buffer,
pub cursor: Position,
pub origin_top_line: i32,
pub frozen_at: u64,
pub alt_screen: bool,
}Expand description
Frozen read-only view of the terminal’s scrollback + visible
grid at the moment of an Insert → Normal transition. See
docs/dev/architecture/terminal-as-document.md §3.2 for the
build rules and §3.3 for the coord-translation invariants.
Fields§
§buffer: BufferRope-backed buffer of the snapshot text. One rope line
per grid line. Trailing-blank padding is stripped from
each row so $ lands on the last visible character
(matches what the user sees).
cursor: PositionDoc-space cursor at the moment of snapshot — the
alacritty grid cursor translated to (rope line, byte
column). For ASCII content, byte equals the grid
column; wide-char handling is the open question in
§7 of the design fragment.
origin_top_line: i32Topmost alacritty grid line at build time. Doc line N
corresponds to grid line origin_top_line + N. The
publish-time coord adapter (T-paint-1) uses this to remap
document-space ranges back to cell coordinates.
frozen_at: u64Snapshot sequence captured at build time. Used by the jumplist re-resolution path to detect when the underlying scrollback has rolled and a recorded position needs best-effort re-resolution.
alt_screen: boolTrue if the program was on the alt screen at build time. Alt-screen snapshots cover only the visible region (alt screen has no scrollback semantics).
Trait Implementations§
Source§impl Clone for SyntheticDoc
impl Clone for SyntheticDoc
Source§fn clone(&self) -> SyntheticDoc
fn clone(&self) -> SyntheticDoc
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for SyntheticDoc
impl RefUnwindSafe for SyntheticDoc
impl Send for SyntheticDoc
impl Sync for SyntheticDoc
impl Unpin for SyntheticDoc
impl UnsafeUnpin for SyntheticDoc
impl UnwindSafe for SyntheticDoc
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> 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.