pub trait PtyMaster: Send + 'static {
// Required methods
fn try_clone_reader(&mut self) -> Result<Box<dyn Read + Send>, Error>;
fn take_writer(&mut self) -> Result<Box<dyn Write + Send>, Error>;
fn resize(&self, size: PtySize) -> Result<(), Error>;
fn get_size(&self) -> Result<PtySize, Error>;
// Provided methods
fn process_group_leader(&self) -> Option<i32> { ... }
fn as_raw_fd(&self) -> Option<i32> { ... }
fn interrupt_target(&self) -> Result<PtyInterruptTarget, Error> { ... }
fn kill_process_group(&self) -> Result<(), Error> { ... }
fn preferred_pid(&self, child: &(dyn PtyChild + 'static)) -> Option<u32> { ... }
}Expand description
Platform-neutral handle for the master side of a pseudo-terminal.
Required Methods§
fn try_clone_reader(&mut self) -> Result<Box<dyn Read + Send>, Error>
fn take_writer(&mut self) -> Result<Box<dyn Write + Send>, Error>
fn resize(&self, size: PtySize) -> Result<(), Error>
fn get_size(&self) -> Result<PtySize, Error>
Provided Methods§
Sourcefn process_group_leader(&self) -> Option<i32>
👎Deprecated: use facade PTY control operations; removal planned for 5.0
fn process_group_leader(&self) -> Option<i32>
use facade PTY control operations; removal planned for 5.0
Legacy Unix process-group accessor retained for source compatibility.
Platform mechanics do not consume this value; use facade operations for control. This method will be removed in the next major release.
Sourcefn as_raw_fd(&self) -> Option<i32>
👎Deprecated: use facade PTY operations; removal planned for 5.0
fn as_raw_fd(&self) -> Option<i32>
use facade PTY operations; removal planned for 5.0
Legacy Unix descriptor accessor retained for source compatibility.
The primitive representation avoids a host-native type in the neutral signature, and shared callers must not use it for platform mechanics.
Sourcefn interrupt_target(&self) -> Result<PtyInterruptTarget, Error>
fn interrupt_target(&self) -> Result<PtyInterruptTarget, Error>
Prepare an owned interrupt operation using the selected host’s PTY mechanics.
Sourcefn kill_process_group(&self) -> Result<(), Error>
fn kill_process_group(&self) -> Result<(), Error>
Kill the selected host’s PTY process group, when one exists.
Sourcefn preferred_pid(&self, child: &(dyn PtyChild + 'static)) -> Option<u32>
fn preferred_pid(&self, child: &(dyn PtyChild + 'static)) -> Option<u32>
Select the externally meaningful PID for this PTY.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".