Struct async_process::ChildStderr
source · [−]pub struct ChildStderr(_);
Expand description
A handle to a child process’s standard error (stderr).
When a ChildStderr
is dropped, the underlying handle gets closed.
Implementations
sourceimpl ChildStderr
impl ChildStderr
sourcepub async fn into_stdio(self) -> Result<Stdio>
pub async fn into_stdio(self) -> Result<Stdio>
Convert async_process::ChildStderr 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").arg("x").stderr(Stdio::piped()).spawn()?;
let stdio:Stdio = ls_child.stderr.take().unwrap().into_stdio().await?;
let mut echo_child = Command::new("echo").stdin(stdio).spawn()?;
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ChildStderr
impl Send for ChildStderr
impl Sync for ChildStderr
impl Unpin for ChildStderr
impl UnwindSafe for ChildStderr
Blanket Implementations
sourceimpl<R> AsyncReadExt for R where
R: AsyncRead + ?Sized,
impl<R> AsyncReadExt for R where
R: AsyncRead + ?Sized,
sourcefn read(&'a mut self, buf: &'a mut [u8]) -> ReadFuture<'a, Self> where
Self: Unpin,
fn read(&'a mut self, buf: &'a mut [u8]) -> ReadFuture<'a, Self> where
Self: Unpin,
Reads some bytes from the byte stream. Read more
sourcefn read_vectored(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>]
) -> ReadVectoredFuture<'a, Self> where
Self: Unpin,
fn read_vectored(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>]
) -> ReadVectoredFuture<'a, Self> where
Self: Unpin,
sourcefn read_to_end(
&'a mut self,
buf: &'a mut Vec<u8, Global>
) -> ReadToEndFuture<'a, Self> where
Self: Unpin,
fn read_to_end(
&'a mut self,
buf: &'a mut Vec<u8, Global>
) -> ReadToEndFuture<'a, Self> where
Self: Unpin,
sourcefn read_to_string(
&'a mut self,
buf: &'a mut String
) -> ReadToStringFuture<'a, Self> where
Self: Unpin,
fn read_to_string(
&'a mut self,
buf: &'a mut String
) -> ReadToStringFuture<'a, Self> where
Self: Unpin,
sourcefn read_exact(&'a mut self, buf: &'a mut [u8]) -> ReadExactFuture<'a, Self> where
Self: Unpin,
fn read_exact(&'a mut self, buf: &'a mut [u8]) -> ReadExactFuture<'a, Self> where
Self: Unpin,
Reads the exact number of bytes required to fill buf
. Read more
sourcefn take(self, limit: u64) -> Take<Self>
fn take(self, limit: u64) -> Take<Self>
Creates an adapter which will read at most limit
bytes from it. Read more
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more