Trait zellij_server::os_input_output::ServerOsApi [−][src]
pub trait ServerOsApi: Send + Sync {}Show methods
fn set_terminal_size_using_fd(&self, fd: RawFd, cols: u16, rows: u16); fn spawn_terminal(&self, file_to_open: Option<PathBuf>) -> (RawFd, Pid); fn read_from_tty_stdout(
&self,
fd: RawFd,
buf: &mut [u8]
) -> Result<usize, Error>; fn async_file_reader(&self, fd: RawFd) -> Box<dyn AsyncReader>; fn write_to_tty_stdin(&self, fd: RawFd, buf: &[u8]) -> Result<usize, Error>; fn tcdrain(&self, fd: RawFd) -> Result<(), Error>; fn kill(&self, pid: Pid) -> Result<(), Error>; fn box_clone(&self) -> Box<dyn ServerOsApi>; fn recv_from_client(&self) -> (ClientToServerMsg, ErrorContext); fn send_to_client(&self, msg: ServerToClientMsg); fn add_client_sender(&self); fn send_to_temp_client(&self, msg: ServerToClientMsg); fn remove_client_sender(&self); fn update_receiver(&mut self, stream: LocalSocketStream); fn load_palette(&self) -> Palette;
Expand description
The ServerOsApi
trait represents an abstract interface to the features of an operating system that
Zellij server requires.
Required methods
fn set_terminal_size_using_fd(&self, fd: RawFd, cols: u16, rows: u16)
[src]
fn set_terminal_size_using_fd(&self, fd: RawFd, cols: u16, rows: u16)
[src]Sets the size of the terminal associated to file descriptor fd
.
Spawn a new terminal, with an optional file to open in a terminal program.
Read bytes from the standard output of the virtual terminal referred to by fd
.
fn async_file_reader(&self, fd: RawFd) -> Box<dyn AsyncReader>
[src]
fn async_file_reader(&self, fd: RawFd) -> Box<dyn AsyncReader>
[src]Creates an AsyncReader
that can be used to read from fd
in an async context
Write bytes to the standard input of the virtual terminal referred to by fd
.
Wait until all output written to the object referred to by fd
has been transmitted.
fn box_clone(&self) -> Box<dyn ServerOsApi>
[src]
fn box_clone(&self) -> Box<dyn ServerOsApi>
[src]Returns a Box
pointer to this ServerOsApi
struct.
fn recv_from_client(&self) -> (ClientToServerMsg, ErrorContext)
[src]
fn recv_from_client(&self) -> (ClientToServerMsg, ErrorContext)
[src]Receives a message on server-side IPC channel
fn send_to_client(&self, msg: ServerToClientMsg)
[src]
fn send_to_client(&self, msg: ServerToClientMsg)
[src]Sends a message to client
fn add_client_sender(&self)
[src]
fn add_client_sender(&self)
[src]Adds a sender to client
fn send_to_temp_client(&self, msg: ServerToClientMsg)
[src]
fn send_to_temp_client(&self, msg: ServerToClientMsg)
[src]Send to the temporary client
fn remove_client_sender(&self)
[src]
fn remove_client_sender(&self)
[src]Removes the sender to client
fn update_receiver(&mut self, stream: LocalSocketStream)
[src]
fn update_receiver(&mut self, stream: LocalSocketStream)
[src]Update the receiver socket for the client
fn load_palette(&self) -> Palette
[src]