1.0.0[−][src]Struct std::process::ChildStdin
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 Write for ChildStdin
[src]
fn write(&mut self, buf: &[u8]) -> Result<usize>
[src]
fn write_vectored(&mut self, bufs: &[IoSlice]) -> Result<usize>
[src]
fn flush(&mut self) -> Result<()>
[src]
fn write_all(&mut self, buf: &[u8]) -> Result<()>
[src]
Attempts to write an entire buffer into this writer. Read more
fn write_fmt(&mut self, fmt: Arguments) -> Result<()>
[src]
Writes a formatted string into this writer, returning any error encountered. Read more
ⓘImportant traits for &'_ mut Ffn by_ref(&mut self) -> &mut Self where
Self: Sized,
[src]
ⓘImportant traits for &'_ mut F
Self: Sized,
Creates a "by reference" adaptor for this instance of Write
. Read more
impl AsRawFd for ChildStdin
1.2.0[src]
impl IntoRawFd for ChildStdin
1.4.0[src]
fn into_raw_fd(self) -> RawFd
[src]
impl AsRawHandle for ChildStdin
1.2.0[src]
fn as_raw_handle(&self) -> RawHandle
[src]
impl IntoRawHandle for ChildStdin
1.4.0[src]
fn into_raw_handle(self) -> RawHandle
[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 consoleRun
impl Debug for ChildStdin
1.16.0[src]
Auto Trait Implementations
impl Send for ChildStdin
impl Sync for ChildStdin
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
ⓘImportant traits for &'_ mut Ffn borrow_mut(&mut self) -> &mut T
[src]
ⓘImportant traits for &'_ mut F
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,