pub trait IsTty {
    fn is_tty(&self) -> bool;
}
Expand description

Adds the is_tty method to types that might represent a terminal

Required Methods

Returns true if the instance is a terminal teletype, false otherwise.

Implementors

On unix, the isatty() library function returns true if a file descriptor is a terminal. Let’s implement IsTty for anything that has an associated raw file descriptor.