1.0.0[][src]Struct boolean_enums::lstd::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 IntoRawFd for ChildStdin
1.4.0
[src]

impl Write for ChildStdin
[src]

fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
[src]

Attempts to write an entire buffer into this writer. Read more

fn write_fmt(&mut self, fmt: Arguments) -> Result<(), Error>
[src]

Writes a formatted string into this writer, returning any error encountered. Read more

Important traits for &'a mut W
fn by_ref(&mut self) -> &mut Self
[src]

Creates a "by reference" adaptor for this instance of Write. Read more

impl Debug for ChildStdin
1.16.0
[src]

impl AsRawFd for ChildStdin
1.2.0
[src]

impl From<ChildStdin> for Stdio
1.20.0
[src]

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

Auto Trait Implementations

impl Send for ChildStdin

impl Sync for ChildStdin

Blanket Implementations

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

impl<T> From for T
[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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