Lines Matching refs:is
1 //! atty is a simple utility that answers one question
2 //! > is this a tty?
4 //! usage is just as simple
7 //! if atty::is(atty::Stream::Stdout) {
38 /// returns true if this is a tty
40 pub fn is(stream: Stream) -> bool {
51 /// returns true if this is a tty
53 pub fn is(stream: Stream) -> bool {
64 /// returns true if this is a tty
66 pub fn is(stream: Stream) -> bool {
84 // this is true negative if we can detect the presence of a console on
96 /// returns true if this is _not_ a tty
98 !is(stream)
116 /// Returns true if there is an MSYS tty on the given handle.
148 // a pseudo-terminal is attached. To mitigate against false positives
156 /// returns true if this is a tty
158 pub fn is(_stream: Stream) -> bool {
164 use super::{is, Stream};
170 assert!(!is(Stream::Stderr))
177 assert!(!is(Stream::Stdout))
183 assert!(is(Stream::Stdin))
189 assert!(is(Stream::Stderr))
195 assert!(is(Stream::Stdout))
202 assert!(is(Stream::Stdin))
208 assert!(is(Stream::Stdin))