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 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.
pub fn as_raw_handle(&self) -> RawHandle[src]
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 consoleRun
impl IntoRawFd for ChildStdin1.4.0[src]
This is supported on Unix only.
pub fn into_raw_fd(self) -> RawFd[src]
impl IntoRawHandle for ChildStdin1.4.0[src]
This is supported on Windows only.
pub fn into_raw_handle(self) -> RawHandle[src]
impl Write for ChildStdin[src]
pub fn write(&mut self, buf: &[u8]) -> Result<usize>[src]
pub fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> Result<usize>[src]
pub fn is_write_vectored(&self) -> bool[src]
pub fn flush(&mut self) -> Result<()>[src]
pub fn write_all(&mut self, mut buf: &[u8]) -> Result<()>[src]
pub fn write_all_vectored(&mut self, mut bufs: &mut [IoSlice<'_>]) -> Result<()>[src]
pub fn write_fmt(&mut self, fmt: Arguments<'_>) -> Result<()>[src]
pub fn by_ref(&mut self) -> &mut SelfⓘNotable traits for &'_ mut F
impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<R: Read + ?Sized> Read for &mut Rimpl<W: Write + ?Sized> Write for &mut W where
Self: Sized, [src]
Notable traits for &'_ mut F
impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<R: Read + ?Sized> Read for &mut Rimpl<W: Write + ?Sized> Write for &mut WSelf: Sized,
impl Write for &ChildStdin1.48.0[src]
pub fn write(&mut self, buf: &[u8]) -> Result<usize>[src]
pub fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> Result<usize>[src]
pub fn is_write_vectored(&self) -> bool[src]
pub fn flush(&mut self) -> Result<()>[src]
pub fn write_all(&mut self, mut buf: &[u8]) -> Result<()>[src]
pub fn write_all_vectored(&mut self, mut bufs: &mut [IoSlice<'_>]) -> Result<()>[src]
pub fn write_fmt(&mut self, fmt: Arguments<'_>) -> Result<()>[src]
pub fn by_ref(&mut self) -> &mut SelfⓘNotable traits for &'_ mut F
impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<R: Read + ?Sized> Read for &mut Rimpl<W: Write + ?Sized> Write for &mut W where
Self: Sized, [src]
Notable traits for &'_ mut F
impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<R: Read + ?Sized> Read for &mut Rimpl<W: Write + ?Sized> Write for &mut WSelf: Sized,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow(&self) -> &TⓘNotable traits for &'_ mut F
impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<R: Read + ?Sized> Read for &mut Rimpl<W: Write + ?Sized> Write for &mut W[src]
Notable traits for &'_ mut F
impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<R: Read + ?Sized> Read for &mut Rimpl<W: Write + ?Sized> Write for &mut Wimpl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut TⓘNotable traits for &'_ mut F
impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<R: Read + ?Sized> Read for &mut Rimpl<W: Write + ?Sized> Write for &mut W[src]
Notable traits for &'_ mut F
impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<R: Read + ?Sized> Read for &mut Rimpl<W: Write + ?Sized> Write for &mut Wimpl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
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.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,