1 2 3 4 5 6 7 8 9
use atty::{is, Stream}; pub fn is_stdout() -> bool { is(Stream::Stdout) } pub fn is_stdin() -> bool { is(Stream::Stdin) }