1.0.0[][src]Struct std::process::ChildStderr

pub struct ChildStderr { /* fields omitted */ }

A handle to a child process's stderr.

This struct is used in the stderr field on Child.

When an instance of ChildStderr is dropped, the ChildStderr's underlying file handle will be closed.

Trait Implementations

impl Read for ChildStderr[src]

impl AsRawFd for ChildStderr1.2.0[src]

impl IntoRawFd for ChildStderr1.4.0[src]

impl AsRawHandle for ChildStderr1.2.0[src]

impl IntoRawHandle for ChildStderr1.4.0[src]

impl From<ChildStderr> for Stdio1.20.0[src]

fn from(child: ChildStderr) -> Stdio[src]

Converts a ChildStderr into a Stdio

Examples

use std::process::{Command, Stdio};

let reverse = Command::new("rev")
    .arg("non_existing_file.txt")
    .stderr(Stdio::piped())
    .spawn()
    .expect("failed reverse command");

let cat = Command::new("cat")
    .arg("-")
    .stdin(reverse.stderr.unwrap()) // Converted into a Stdio here
    .output()
    .expect("failed echo command");

assert_eq!(
    String::from_utf8_lossy(&cat.stdout),
    "rev: cannot open non_existing_file.txt: No such file or directory\n"
);Run

impl Debug for ChildStderr1.16.0[src]

Auto Trait Implementations

impl UnwindSafe for ChildStderr

impl RefUnwindSafe for ChildStderr

impl Unpin for ChildStderr

impl Send for ChildStderr

impl Sync for ChildStderr

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]