Struct std::process::ChildStdin 1.0.0[−][src]
pub struct ChildStdin { /* fields omitted */ }
Expand description
Trait Implementations
提取原始句柄,无需任何所有权。
执行转换。
执行转换。
将 ChildStdin
转换为 Stdio
Examples
ChildStdin
将在引擎盖下使用 Stdio::from
转换为 Stdio
。
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()) // 在此处转换为 Stdio
.output()
.expect("failed echo command");
// "!dlrow ,olleH" 回显到控制台
Run消费这个对象,返回原始的底层文件描述符。 Read more
消耗此对象,返回原始底层句柄。 Read more
将格式化的字符串写入此 writer,返回遇到的任何错误。 Read more
将格式化的字符串写入此 writer,返回遇到的任何错误。 Read more