aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorJakub Kotur <qtr@google.com>2020-12-21 17:28:14 +0100
committerJakub Kotur <qtr@google.com>2021-03-05 14:32:48 +0100
commit94f54147b0bc6e3f9f1449ff678cd7409789f46d (patch)
tree454836b622e98ef51c0faec40dad2836c0cee672 /examples
parentc46616738591f7bcaee466cd2db36af5cab4775f (diff)
downloadatty-94f54147b0bc6e3f9f1449ff678cd7409789f46d.tar.gz
Initial import of atty-0.2.14
Bug: 155309706 Change-Id: Iebc2b51299744581f1f098359534b286a36a0a79
Diffstat (limited to 'examples')
-rw-r--r--examples/atty.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/examples/atty.rs b/examples/atty.rs
new file mode 100644
index 0000000..3b3635e
--- /dev/null
+++ b/examples/atty.rs
@@ -0,0 +1,9 @@
+extern crate atty;
+
+use atty::{is, Stream};
+
+fn main() {
+ println!("stdout? {}", is(Stream::Stdout));
+ println!("stderr? {}", is(Stream::Stderr));
+ println!("stdin? {}", is(Stream::Stdin));
+}