Skip to main content

PtyMaster

pub trait PtyMaster: Send + 'static {
    // Required methods
    fn try_clone_reader(&mut self) -> Result<Box<dyn Read + Send>>;
    fn take_writer(&mut self) -> Result<Box<dyn Write + Send>>;
    fn resize(&self, size: PtySize) -> Result<()>;
    fn get_size(&self) -> Result<PtySize>;

    // Provided methods
    fn process_group_leader(&self) -> Option<i32> { ... }
    fn as_raw_fd(&self) -> Option<i32> { ... }
}
Expand description

Platform-neutral handle for the master side of a pseudo-terminal.

Required Methods§

Source

fn try_clone_reader(&mut self) -> Result<Box<dyn Read + Send>>

Source

fn take_writer(&mut self) -> Result<Box<dyn Write + Send>>

Source

fn resize(&self, size: PtySize) -> Result<()>

Source

fn get_size(&self) -> Result<PtySize>

Provided Methods§

Source

fn process_group_leader(&self) -> Option<i32>

👎Deprecated:

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.

Source

fn as_raw_fd(&self) -> Option<i32>

👎Deprecated:

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.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§