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

pub struct ChildStdin { /* fields omitted */ }

A handle to a child process's standard input (stdin).

This struct is used in the stdin field on Child.

When an instance of ChildStdin is dropped, the ChildStdin's underlying file handle will be closed. If the child process was blocked on input prior to being dropped, it will become unblocked after dropping.

Trait Implementations

impl AsRawFd for ChildStdin1.2.0[src]

This is supported on Unix only.

impl AsRawHandle for ChildStdin1.2.0[src]

This is supported on Windows only.

impl Debug for ChildStdin1.16.0[src]

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

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

Converts a ChildStdin into a Stdio

Examples

ChildStdin will be converted to Stdio using Stdio::from under the hood.

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

let reverse = Command::new("rev")
    .stdin(Stdio::piped())
    .spawn()
    .expect("failed reverse command");

let _echo = Command::new("echo")
    .arg("Hello, world!")
    .stdout(reverse.stdin.unwrap()) // Converted into a Stdio here
    .output()
    .expect("failed echo command");

// "!dlrow ,olleH" echoed to console
Run

impl IntoRawFd for ChildStdin1.4.0[src]

This is supported on Unix only.

impl IntoRawHandle for ChildStdin1.4.0[src]

This is supported on Windows only.

impl Write for ChildStdin[src]

impl Write for &ChildStdin1.48.0[src]

Auto Trait Implementations

impl RefUnwindSafe for ChildStdin[src]

impl Send for ChildStdin[src]

impl Sync for ChildStdin[src]

impl Unpin for ChildStdin[src]

impl UnwindSafe for ChildStdin[src]

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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> 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.