MCPcopy Create free account
hub / github.com/bytecodealliance/rustix / main

Function main

examples/stdio.rs:22–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20
21#[cfg(all(not(windows), feature = "stdio"))]
22fn main() -> io::Result<()> {
23 let (stdin, stdout, stderr) = (stdin(), stdout(), stderr());
24
25 println!("Stdin:");
26 show(stdin)?;
27
28 println!("Stdout:");
29 show(stdout)?;
30
31 println!("Stderr:");
32 show(stderr)?;
33
34 Ok(())
35}
36
37#[cfg(all(not(windows), feature = "stdio"))]
38fn show<Fd: AsFd>(fd: Fd) -> io::Result<()> {

Callers

nothing calls this directly

Calls 4

stdinFunction · 0.85
stdoutFunction · 0.85
stderrFunction · 0.85
showFunction · 0.85

Tested by

no test coverage detected