Skip to main content

PtySessionSource

Trait PtySessionSource 

Source
pub trait PtySessionSource: StreamSourceTrait {
    // Required methods
    fn get_process_id(&self) -> Option<u32>;
    fn is_process_running(&self) -> bool;
    fn send_input(&self, input: &str) -> Result<(), String>;
    fn kill_process(&self) -> Result<(), String>;
    fn resize_terminal(&self, rows: u16, cols: u16) -> Result<(), String>;
    fn get_terminal_size(&self) -> (u16, u16);
    fn get_command(&self) -> String;
    fn get_working_directory(&self) -> Option<String>;
}
Expand description

Trait for PTY session sources - real-time process execution

Required Methods§

Source

fn get_process_id(&self) -> Option<u32>

Get PTY process ID

Source

fn is_process_running(&self) -> bool

Check if PTY process is still running

Source

fn send_input(&self, input: &str) -> Result<(), String>

Send input to PTY process

Source

fn kill_process(&self) -> Result<(), String>

Kill the PTY process

Source

fn resize_terminal(&self, rows: u16, cols: u16) -> Result<(), String>

Resize the PTY terminal

Source

fn get_terminal_size(&self) -> (u16, u16)

Get terminal size

Source

fn get_command(&self) -> String

Get command being executed

Source

fn get_working_directory(&self) -> Option<String>

Get working directory

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§