Skip to main content

TerminalScreen

Struct TerminalScreen 

Source
pub struct TerminalScreen { /* private fields */ }
Expand description

Live terminal screen fed by rmux-core’s private parser boundary.

TerminalScreen is the public core facade that server code uses to feed raw PTY bytes and inspect structured screen cells. The parser itself stays hidden behind the crate-private terminal module, so SDK/protocol code can depend on screen-cell semantics without coupling to parser internals.

Implementations§

Source§

impl TerminalScreen

Source

pub fn new(size: TerminalSize, history_limit: usize) -> Self

Builds a fresh terminal screen with the given geometry and scrollback limit.

Source

pub fn screen(&self) -> &Screen

Returns a borrow of the structured screen grid.

Source

pub fn screen_mut(&mut self) -> &mut Screen

Returns a mutable borrow of the structured screen grid.

Source

pub fn set_utf8_config(&mut self, config: Utf8Config)

Updates the tmux-style UTF-8 width and combining configuration.

Source

pub fn resize(&mut self, size: TerminalSize)

Resizes the screen and resets the scroll region.

Source

pub fn feed(&mut self, bytes: &[u8])

Feeds raw PTY output bytes through the private parser into the screen.

Source

pub fn take_replies(&mut self) -> Vec<u8>

Returns and drains terminal replies generated while parsing PTY output.

Source

pub fn pending_bytes(&self) -> Vec<u8>

Returns any bytes still buffered inside an incomplete parser state.

Source

pub fn take_terminal_passthrough(&mut self) -> Vec<TerminalPassthrough>

Returns and drains passthrough events generated while parsing PTY output.

Source

pub fn take_terminal_passthrough_dropped_count(&mut self) -> u64

Returns and drains passthrough events dropped by parser safety limits.

Source

pub fn reset_parser(&mut self)

Replaces the hidden parser with a fresh ground-state instance while preserving the current screen grid.

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> 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, 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.