Struct mio_child_process::Process
[−]
[src]
pub struct Process { /* fields omitted */ }
An async child process
Methods
impl Process
[src]
pub fn try_recv(&mut self) -> Result<ProcessEvent, TryRecvError>
[src]
Try to receive an event from the child. This should be called after mio's Poll returns an event for this token
ⓘImportant traits for Processpub fn from_child(child: Child) -> Process
[src]
Create an async child process based on given child.
Note: this will spawn 1-3 threads in the background. These threads are blocking, but the overhead might be noticable. Use with care.
If the child is created with a Command with stdout(Stdio::piped())
, the async process will automatically listen to the stdout stream.
If the child is created with a Command with stderr(Stdio::piped())
, the async process will automatically listen to the stderr stream.
Trait Implementations
impl Write for Process
[src]
fn write(&mut self, buf: &[u8]) -> Result<usize>
[src]
Write a buffer to the Stdin stream of this child process.
If the child is not created with .stdin(Stdio::piped())
,
This function will return an error ErrorKind::NotConnected
.
fn flush(&mut self) -> Result<()>
[src]
Flushed the Stdin stream of this child process.
If the child is not created with .stdin(Stdio::piped())
,
This function will return an error ErrorKind::NotConnected
.
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
1.0.0[src]
Attempts to write an entire buffer into this write. Read more
fn write_fmt(&mut self, fmt: Arguments) -> Result<(), Error>
1.0.0[src]
Writes a formatted string into this writer, returning any error encountered. Read more
fn by_ref(&mut self) -> &mut Self
1.0.0[src]
Creates a "by reference" adaptor for this instance of Write
. Read more
impl Evented for Process
[src]
fn register(
&self,
poll: &Poll,
token: Token,
interest: Ready,
ops: PollOpt
) -> Result<()>
[src]
&self,
poll: &Poll,
token: Token,
interest: Ready,
ops: PollOpt
) -> Result<()>
Register the child process with the poll so it can notify when the child process updates
fn reregister(
&self,
poll: &Poll,
token: Token,
interest: Ready,
ops: PollOpt
) -> Result<()>
[src]
&self,
poll: &Poll,
token: Token,
interest: Ready,
ops: PollOpt
) -> Result<()>
Reregister the child process with the poll so it can notify when the child process updates
fn deregister(&self, poll: &Poll) -> Result<()>
[src]
Deregister the child process with the poll