Struct tty::TtyServer [] [src]

pub struct TtyServer {
    // some fields omitted
}

Methods

impl TtyServer

fn new<T>(template: Option<&T>) -> Result<TtyServer> where T: AsRawFd

Create a new TTY with the same configuration (termios and size) as the template TTY

fn new_client<T>(&self, peer: T) -> Result<TtyClient> where T: AsRawFd + IntoRawFd

Bind the peer TTY with the server TTY

fn get_master(&self) -> &File

Get the TTY master file descriptor usable by a TtyClient

fn take_slave(&mut self) -> Option<File>

Take the TTY slave file descriptor to manually pass it to a process

fn spawn(&mut self, cmd: Command) -> Result<Child>

Spawn a new process connected to the slave TTY

Trait Implementations

impl AsRef<Path> for TtyServer

fn as_ref(&self) -> &Path