Skip to main content

TerminalFrame

Struct TerminalFrame 

Source
pub struct TerminalFrame {
Show 13 fields pub sequence: u64, pub size: TerminalSize, pub cursor_row: u16, pub cursor_column: u16, pub contents: String, pub formatted: Vec<u8>, pub scrollback_formatted: Vec<Vec<u8>>, pub alternate_screen: bool, pub mouse_protocol_enabled: bool, pub mouse_protocol_encoding: TerminalMouseProtocolEncoding, pub produced_at_unix_ms: u64, pub screen_state: PtyScreenState, pub bracketed_paste: Option<bool>,
}

Fields§

§sequence: u64§size: TerminalSize§cursor_row: u16§cursor_column: u16§contents: String§formatted: Vec<u8>§scrollback_formatted: Vec<Vec<u8>>§alternate_screen: bool§mouse_protocol_enabled: bool§mouse_protocol_encoding: TerminalMouseProtocolEncoding§produced_at_unix_ms: u64

Unix-epoch milliseconds when this frame’s screen state was materialized – the one instant PtyEventPublisher::snapshot turns live terminal state into a frame. Every hop after that (the shell’s ObservationEnvelope, the c2 relay, the harness’s terminal ring buffer, the operator wire) carries this value through unchanged; none of them may recompute, refresh, or zero it, because the whole point of the field is to let something 200ms downstream in a ring buffer still answer “how stale am I”. #[serde(default)] so a peer that predates this field decodes it as 0 – “age unknown” – instead of a fabricated timestamp. Diffing this value across two hosts also mixes in their clock skew, not just transit time, so a consumer comparing it against wall-clock time must say so rather than presenting the gap as pure network/queue latency.

§screen_state: PtyScreenState

The screen classification at the instant THIS frame’s screen was materialized – stamped once at the node from the same snapshot that produced contents/formatted, and carried through every hop unchanged like produced_at_unix_ms; no hop may recompute it against its own (possibly staler) copy of the screen. #[serde(default)] so a peer that predates this field decodes it as Unknown – “not classified” – rather than a fabricated Ready; defaulting to Unknown and not Ready is the entire point of that default.

§bracketed_paste: Option<bool>

Whether bracketed-paste mode was enabled on the PTY at the instant THIS frame’s screen was materialized, read straight off the same vt100::Screen snapshot that produced contents/formatted – Some(true) means the terminal application has turned the mode on (a paste is delivered to it as one bracketed block instead of keystrokes), Some(false) means it explicitly has not, and None means this frame predates the field or the value was never sampled. None is not a claim that the mode is off; a caller that needs to know must treat None the same as PtyScreenState::Unknown – absence of information, not a fabricated default. skip_serializing_if is load-bearing the same way it is on HarnessRuntimeTerminalFrameV1::screen_state: the key must be ABSENT from the JSON, not null, so a peer that predates this field decodes it as None rather than a fabricated Some(false).

Trait Implementations§

Source§

impl Clone for TerminalFrame

Source§

fn clone(&self) -> Self

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 TerminalFrame

Source§

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

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

impl<'de> Deserialize<'de> for TerminalFrame

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for TerminalFrame

Source§

impl PartialEq for TerminalFrame

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl Serialize for TerminalFrame

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for TerminalFrame

Auto Trait Implementations§

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.