pub trait IsTty {
// Required method
fn is_tty(&self) -> bool;
}Expand description
Adds the is_tty method to types that might represent a terminal
use std::io::stdout;
use crossterm::tty::IsTty;
let is_tty: bool = stdout().is_tty();Required Methods§
Implementors§
impl<S: AsRawHandle> IsTty for S
On windows, GetConsoleMode will return true if we are in a terminal.
Otherwise false.