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 AsRawFd for ChildStderr[src]1.2.0

impl AsRawHandle for ChildStderr[src]1.2.0

impl Debug for ChildStderr[src]1.16.0

impl From<ChildStderr> for Stdio[src]1.20.0

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

Converts a ChildStderr into a Stdio


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

let reverse = Command::new("rev")
    .expect("failed reverse command");

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

    "rev: cannot open non_existing_file.txt: No such file or directory\n"

impl IntoRawFd for ChildStderr[src]1.4.0

impl IntoRawHandle for ChildStderr[src]1.4.0

impl Read for ChildStderr[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

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

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.