Trait portable_pty::MasterPty[][src]

pub trait MasterPty: Write {
    fn resize(&self, size: PtySize) -> Result<(), Error>;
fn get_size(&self) -> Result<PtySize, Error>;
fn try_clone_reader(&self) -> Result<Box<dyn Read + Send>, Error>;
fn try_clone_writer(&self) -> Result<Box<dyn Write + Send>, Error>;
fn process_group_leader(&self) -> Option<pid_t>; }

Represents the master/control end of the pty

Required methods

fn resize(&self, size: PtySize) -> Result<(), Error>[src]

Inform the kernel and thus the child process that the window resized. It will update the winsize information maintained by the kernel, and generate a signal for the child to notice and update its state.

fn get_size(&self) -> Result<PtySize, Error>[src]

Retrieves the size of the pty as known by the kernel

fn try_clone_reader(&self) -> Result<Box<dyn Read + Send>, Error>[src]

Obtain a readable handle; output from the slave(s) is readable via this stream.

fn try_clone_writer(&self) -> Result<Box<dyn Write + Send>, Error>[src]

Obtain a writable handle; writing to it will send data to the slave end. This is equivalent to the Write impl on MasterPty itself, but allows splitting it off into a separate object.

fn process_group_leader(&self) -> Option<pid_t>[src]

If applicable to the type of the tty, return the local process id of the process group or session leader

Loading content...

Implementors

Loading content...