Function stdin

Source
pub fn stdin() -> Result<&'static CFileRef>
Expand description

open stdin as a read only stream

use std::os::unix::io::AsRawFd;

let stdin = cfile::stdin().unwrap();

assert_eq!(stdin.as_raw_fd(), libc::STDIN_FILENO);