Struct rbatis_core::runtime::process::ChildStdin [−]
pub struct ChildStdin(_);
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
impl ChildStdin
impl ChildStdin
pub async fn into_stdio(self) -> Result<Stdio, Error>
pub async fn into_stdio(self) -> Result<Stdio, Error>
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
impl AsyncWrite for ChildStdin
impl AsyncWrite for ChildStdin
Attempt to write bytes from buf
into the object. Read more
pub fn poll_flush(
self: Pin<&mut ChildStdin>,
cx: &mut Context<'_>
) -> Poll<Result<(), Error>>
pub fn poll_flush(
self: Pin<&mut ChildStdin>,
cx: &mut Context<'_>
) -> Poll<Result<(), Error>>
Attempt to flush the object, ensuring that any buffered data reach their destination. Read more
pub fn poll_close(
self: Pin<&mut ChildStdin>,
cx: &mut Context<'_>
) -> Poll<Result<(), Error>>
pub fn poll_close(
self: Pin<&mut ChildStdin>,
cx: &mut Context<'_>
) -> Poll<Result<(), Error>>
Attempt to close the object. Read more
Auto Trait Implementations
impl RefUnwindSafe for ChildStdin
impl Send for ChildStdin
impl Sync for ChildStdin
impl Unpin for ChildStdin
impl UnwindSafe for ChildStdin
Blanket Implementations
impl<W> AsyncWriteExt for W where
W: AsyncWrite + ?Sized,
impl<W> AsyncWriteExt for W where
W: AsyncWrite + ?Sized,
Writes some bytes into the byte stream. Read more
Like [write()
][AsyncWriteExt::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
Mutably borrows from an owned value. Read more