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§

source§

impl ChildStderr

source

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§

source§

impl AsFd for ChildStderr

Note: This implementation is only available on Rust 1.63+.

source§

fn as_fd(&self) -> BorrowedFd<'_>

Borrows the file descriptor. Read more
source§

impl AsRawFd for ChildStderr

source§

fn as_raw_fd(&self) -> RawFd

Extracts the raw file descriptor. Read more
source§

impl AsyncRead for ChildStderr

source§

fn poll_read( self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &mut [u8] ) -> Poll<Result<usize>>

Attempt to read from the AsyncRead into buf. Read more
§

fn poll_read_vectored( self: Pin<&mut Self>, cx: &mut Context<'_>, bufs: &mut [IoSliceMut<'_>] ) -> Poll<Result<usize, Error>>

Attempt to read from the AsyncRead into bufs using vectored IO operations. Read more
source§

impl Debug for ChildStderr

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl TryFrom<ChildStderr> for OwnedFd

Note: This implementation is only available on Rust 1.63+.

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: ChildStderr) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> AsFilelike for Twhere T: AsFd,

§

fn as_filelike(&self) -> BorrowedFd<'_>

Borrows the reference. Read more
§

fn as_filelike_view<Target>(&self) -> FilelikeView<'_, Target>where Target: FilelikeViewType,

Return a borrowing view of a resource which dereferences to a &Target. Read more
§

impl<T> AsRawFilelike for Twhere T: AsRawFd,

§

fn as_raw_filelike(&self) -> i32

Returns the raw value.
§

impl<T> AsRawSocketlike for Twhere T: AsRawFd,

§

fn as_raw_socketlike(&self) -> i32

Returns the raw value.
§

impl<T> AsSocketlike for Twhere T: AsFd,

§

fn as_socketlike(&self) -> BorrowedFd<'_>

Borrows the reference.
§

fn as_socketlike_view<Target>(&self) -> SocketlikeView<'_, Target>where Target: SocketlikeViewType,

Return a borrowing view of a resource which dereferences to a &Target. Read more
source§

impl<R> AsyncReadExt for Rwhere R: AsyncRead + ?Sized,

source§

fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadFuture<'a, Self>where Self: Unpin,

Reads some bytes from the byte stream. Read more
source§

fn read_vectored<'a>( &'a mut self, bufs: &'a mut [IoSliceMut<'a>] ) -> ReadVectoredFuture<'a, Self>where Self: Unpin,

Like read(), except it reads into a slice of buffers. Read more
source§

fn read_to_end<'a>( &'a mut self, buf: &'a mut Vec<u8, Global> ) -> ReadToEndFuture<'a, Self>where Self: Unpin,

Reads the entire contents and appends them to a Vec. Read more
source§

fn read_to_string<'a>( &'a mut self, buf: &'a mut String ) -> ReadToStringFuture<'a, Self>where Self: Unpin,

Reads the entire contents and appends them to a String. Read more
source§

fn read_exact<'a>(&'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
source§

fn take(self, limit: u64) -> Take<Self>where Self: Sized,

Creates an adapter which will read at most limit bytes from it. Read more
source§

fn bytes(self) -> Bytes<Self>where Self: Sized,

Converts this [AsyncRead] into a [Stream] of bytes. Read more
source§

fn chain<R>(self, next: R) -> Chain<Self, R>where R: AsyncRead, Self: Sized,

Creates an adapter which will chain this stream with another. Read more
source§

fn boxed_reader<'a>(self) -> Pin<Box<dyn AsyncRead + Send + 'a, Global>>where Self: Sized + Send + 'a,

Boxes the reader and changes its type to dyn AsyncRead + Send + 'a. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.