Skip to main content

Frame

Struct Frame 

Source
pub struct Frame {
Show 16 fields pub cols: u16, pub rows: u16, pub kind: FrameKind, pub cursor_row: u16, pub cursor_col: u16, pub cursor_visible: bool, pub cursor_shape: CursorShape, pub cursor_blink: bool, pub display_offset: u32, pub scrollback_len: u32, pub mouse_events: MouseEvents, pub alt_screen: bool, pub scroll: Option<ScrollOp>, pub spans: Vec<Span>, pub link_table: Vec<String>, pub overlay: Overlay,
}
Expand description

One serialized damage cycle: the decoded logical form that encode/decode round-trip. link_table holds this frame’s OSC 8 hyperlink URIs, each shipped once and referenced by Span::links. Grapheme clusters have no table — since v14 (#621) they are inlined at their column in Span::combining, because nothing interned them and the table only bought an index to overflow.

Fields§

§cols: u16§rows: u16§kind: FrameKind§cursor_row: u16

Cursor row/col in screen coordinates (0-based), and whether the engine shows it (DECTCEM). Rides in the header because the cursor moves with almost every frame (#38). Drawing the cursor — cell-invert / overlay — stays the consumer’s renderer adapter; the engine only reports state.

§cursor_col: u16§cursor_visible: bool§cursor_shape: CursorShape

The caret shape (DECSCUSR #89) and whether it blinks (att610 ?12, #81). Reported for the renderer; drawing/animation stays the consumer’s.

§cursor_blink: bool§display_offset: u32

Viewport scroll position (#112 / ADR-0013), for the consumer’s scrollbar. display_offset = lines scrolled up from the bottom (0 = following the live screen); scrollback_len = history lines (total = + rows). Ride in the header like the cursor — per-frame viewport state, not cell content.

§scrollback_len: u32§mouse_events: MouseEvents

The mouse tracking mode as a wanted-events mask (#129): which mouse event categories the app asked to receive, so the consumer routes an event to the app (bit set) or keeps it local. empty() = no reporting. Rides the header like the cursor — per-frame mode state the consumer reads, not cell content. Positions/encoding never cross; the backend encodes via encode_mouse.

§alt_screen: bool

Whether the alternate screen (?1049/?47) is active (#149). Buffer-global state a frame-mode consumer can’t derive from viewport damage — the accessibility announce policy (#119) gates on it (suppress TUI repaints). Rides the header like the cursor scalars (ADR-0014).

§scroll: Option<ScrollOp>§spans: Vec<Span>§link_table: Vec<String>§overlay: Overlay

Interaction overlays for this viewport (#108): selection, search highlights, the active match, and markers — see Overlay.

Trait Implementations§

Source§

impl Clone for Frame

Source§

fn clone(&self) -> Frame

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Frame

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Frame

Source§

impl PartialEq for Frame

Source§

fn eq(&self, other: &Frame) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Frame

Auto Trait Implementations§

§

impl Freeze for Frame

§

impl RefUnwindSafe for Frame

§

impl Send for Frame

§

impl Sync for Frame

§

impl Unpin for Frame

§

impl UnsafeUnpin for Frame

§

impl UnwindSafe for Frame

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.