Struct ubend::Chain [−][src]
pub struct Chain { /* fields omitted */ }
Represents a pipe chain.
Methods
impl Chain
[src]
impl Chain
pub fn kill(&mut self, sig: c_int) -> Result<()>
[src]
pub fn kill(&mut self, sig: c_int) -> Result<()>
Send signal sig
to all child processes.
pub fn new(pipes: Vec<Pipes>) -> Result<Self>
[src]
pub fn new(pipes: Vec<Pipes>) -> Result<Self>
Create a new pipe chain. This function is called by the spawn! macro.
pub fn stdin(&mut self) -> Option<File>
[src]
pub fn stdin(&mut self) -> Option<File>
Take ownership of stdin of the first process in the chain.
pub fn stdout(&mut self) -> Option<File>
[src]
pub fn stdout(&mut self) -> Option<File>
Take ownership of stdout of the last process in the chain.
pub fn stderr(&mut self) -> Option<File>
[src]
pub fn stderr(&mut self) -> Option<File>
Take ownership of stderr of the last process in the chain.
pub fn wait_all(&mut self) -> Vec<WaitResult>
[src]
pub fn wait_all(&mut self) -> Vec<WaitResult>
Wait for all child processes to finish.
pub fn wait_last(&mut self) -> WaitResult
[src]
pub fn wait_last(&mut self) -> WaitResult
Wait for the last child process to finish.
pub fn output(self) -> Result<Output, OutputError>
[src]
pub fn output(self) -> Result<Output, OutputError>
Close stdin of the first child process and read stdout and stderr of the last child process (if possible) and wait for the last child process to finish.
Trait Implementations
impl Debug for Chain
[src]
impl Debug for Chain
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Drop for Chain
[src]
impl Drop for Chain