logo
pub struct ChildStdin(_);
Available on unstable only.
Expand description

A handle to a child process’s standard input (stdin).

When a ChildStdin is dropped, the underlying handle gets clossed. If the child process was previously blocked on input, it becomes unblocked after dropping.

Implementations

Convert async_process::ChildStdin into std::process::Stdio.

You can use it to associate to the next process.

Examples
use async_process::Command;
use std::process::Stdio;

let mut ls_child = Command::new("ls").stdin(Stdio::piped()).spawn()?;
let stdio:Stdio = ls_child.stdin.take().unwrap().into_stdio().await?;

let mut echo_child = Command::new("echo").arg("./").stdout(stdio).spawn()?;

Trait Implementations

Attempt to write bytes from buf into the object. Read more

Attempt to flush the object, ensuring that any buffered data reach their destination. Read more

Attempt to close the object. Read more

Attempt to write bytes from bufs into the object using vectored IO operations. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Writes some bytes into the byte stream. Read more

Like write(), except that it writes a slice of buffers. Read more

Writes an entire buffer into the byte stream. Read more

Flushes the stream to ensure that all buffered contents reach their destination. Read more

Closes the writer. Read more

Boxes the writer and changes its type to dyn AsyncWrite + Send + 'a. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.