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
impl TerminalScreen
Sourcepub fn new(size: TerminalSize, history_limit: usize) -> Self
pub fn new(size: TerminalSize, history_limit: usize) -> Self
Builds a fresh terminal screen with the given geometry and scrollback limit.
Sourcepub fn screen_mut(&mut self) -> &mut Screen
pub fn screen_mut(&mut self) -> &mut Screen
Returns a mutable borrow of the structured screen grid.
Sourcepub fn set_utf8_config(&mut self, config: Utf8Config)
pub fn set_utf8_config(&mut self, config: Utf8Config)
Updates the tmux-style UTF-8 width and combining configuration.
Sourcepub fn resize(&mut self, size: TerminalSize)
pub fn resize(&mut self, size: TerminalSize)
Resizes the screen and resets the scroll region.
Sourcepub fn feed(&mut self, bytes: &[u8])
pub fn feed(&mut self, bytes: &[u8])
Feeds raw PTY output bytes through the private parser into the screen.
Sourcepub fn take_replies(&mut self) -> Vec<u8> ⓘ
pub fn take_replies(&mut self) -> Vec<u8> ⓘ
Returns and drains terminal replies generated while parsing PTY output.
Sourcepub fn pending_bytes(&self) -> Vec<u8> ⓘ
pub fn pending_bytes(&self) -> Vec<u8> ⓘ
Returns any bytes still buffered inside an incomplete parser state.
Sourcepub fn take_terminal_passthrough(&mut self) -> Vec<TerminalPassthrough>
pub fn take_terminal_passthrough(&mut self) -> Vec<TerminalPassthrough>
Returns and drains passthrough events generated while parsing PTY output.
Sourcepub fn take_terminal_passthrough_dropped_count(&mut self) -> u64
pub fn take_terminal_passthrough_dropped_count(&mut self) -> u64
Returns and drains passthrough events dropped by parser safety limits.
Sourcepub fn reset_parser(&mut self)
pub fn reset_parser(&mut self)
Replaces the hidden parser with a fresh ground-state instance while preserving the current screen grid.