//! ```
//!
//! [ansi]: https://en.wikipedia.org/wiki/ANSI_escape_code
-//! [win]: http://msdn.microsoft.com/en-us/library/windows/desktop/ms682010%28v=vs.85%29.aspx
+//! [win]: https://docs.microsoft.com/en-us/windows/console/character-mode-applications
//! [ti]: https://en.wikipedia.org/wiki/Terminfo
-#![doc(html_root_url = "https://doc.rust-lang.org/nightly/",
- html_playground_url = "https://play.rust-lang.org/",
- test(attr(deny(warnings))))]
+#![doc(
+ html_root_url = "https://doc.rust-lang.org/nightly/",
+ html_playground_url = "https://play.rust-lang.org/",
+ test(attr(deny(warnings)))
+)]
#![deny(missing_docs)]
-
#![cfg_attr(windows, feature(libc))]
use std::io::prelude::*;
-use std::io::{self, Stdout, Stderr};
+use std::io::{self, Stderr, Stdout};
pub use terminfo::TerminfoTerminal;
#[cfg(windows)]
.or_else(|| WinConsole::new(io::stderr()).ok().map(|t| Box::new(t) as Box<StderrTerminal>))
}
-
/// Terminal color definitions
#[allow(missing_docs)]
pub mod color {
/// Number for a terminal color
- pub type Color = u16;
+ pub type Color = u32;
pub const BLACK: Color = 0;
pub const RED: Color = 1;
fn get_mut(&mut self) -> &mut Self::Output;
/// Returns the contained stream, destroying the `Terminal`
- fn into_inner(self) -> Self::Output where Self: Sized;
+ fn into_inner(self) -> Self::Output
+ where
+ Self: Sized;
}