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§
Sourcefn get_process_id(&self) -> Option<u32>
fn get_process_id(&self) -> Option<u32>
Get PTY process ID
Sourcefn is_process_running(&self) -> bool
fn is_process_running(&self) -> bool
Check if PTY process is still running
Sourcefn kill_process(&self) -> Result<(), String>
fn kill_process(&self) -> Result<(), String>
Kill the PTY process
Sourcefn get_terminal_size(&self) -> (u16, u16)
fn get_terminal_size(&self) -> (u16, u16)
Get terminal size
Sourcefn get_command(&self) -> String
fn get_command(&self) -> String
Get command being executed
Sourcefn get_working_directory(&self) -> Option<String>
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".