Home
last modified time | relevance | path

Searched refs:ColorChoice (Results 1 – 20 of 20) sorted by relevance

/third_party/rust/crates/codespan/codespan-reporting/src/
Dterm.rs4 use termcolor::{ColorChoice, WriteColor};
48 pub struct ColorArg(pub ColorChoice);
66 _ if src.eq_ignore_ascii_case("auto") => Ok(ColorArg(ColorChoice::Auto)), in from_str()
67 _ if src.eq_ignore_ascii_case("always") => Ok(ColorArg(ColorChoice::Always)), in from_str()
68 _ if src.eq_ignore_ascii_case("ansi") => Ok(ColorArg(ColorChoice::AlwaysAnsi)), in from_str()
69 _ if src.eq_ignore_ascii_case("never") => Ok(ColorArg(ColorChoice::Never)), in from_str()
75 impl Into<ColorChoice> for ColorArg {
76 fn into(self) -> ColorChoice { in into() argument
/third_party/rust/crates/clap/src/output/
Dfmt.rs2 use crate::util::color::ColorChoice;
14 color_when: ColorChoice,
19 pub(crate) fn new(stream: Stream, color_when: ColorChoice) -> Self { in new()
37 use termcolor::{BufferWriter, ColorChoice as DepColorChoice}; in print()
40 ColorChoice::Always => DepColorChoice::Always, in print()
41 ColorChoice::Auto if is_a_tty(self.stream) => DepColorChoice::Auto, in print()
/third_party/rust/crates/clap/src/util/
Dcolor.rs6 pub enum ColorChoice { enum
61 impl Default for ColorChoice { implementation
67 impl std::fmt::Display for ColorChoice { implementation
76 impl std::str::FromStr for ColorChoice { implementation
89 impl ValueEnum for ColorChoice { implementation
/third_party/rust/crates/termcolor/src/
Dlib.rs206 pub enum ColorChoice { enum
222 impl Default for ColorChoice { implementation
223 fn default() -> ColorChoice { in default()
224 ColorChoice::Auto in default()
228 impl FromStr for ColorChoice { implementation
231 fn from_str(s: &str) -> Result<ColorChoice, ColorChoiceParseError> { in from_str() argument
233 "always" => Ok(ColorChoice::Always), in from_str()
234 "always-ansi" => Ok(ColorChoice::AlwaysAnsi), in from_str()
235 "never" => Ok(ColorChoice::Never), in from_str()
236 "auto" => Ok(ColorChoice::Auto), in from_str()
[all …]
/third_party/rust/crates/termcolor/
DREADME.md55 use termcolor::{Color, ColorChoice, ColorSpec, StandardStream, WriteColor};
58 let mut stdout = StandardStream::stdout(ColorChoice::Always);
74 use termcolor::{BufferWriter, Color, ColorChoice, ColorSpec, WriteColor};
77 let mut bufwtr = BufferWriter::stderr(ColorChoice::Always);
88 [`ColorChoice`](https://docs.rs/termcolor/1.*/termcolor/enum.ColorChoice.html)
/third_party/rust/crates/env_logger/src/fmt/writer/termcolor/
Dextern_impl.rs9 use termcolor::{self, ColorChoice, ColorSpec, WriteColor};
180 fn into_color_choice(self) -> ColorChoice { in into_color_choice() argument
182 WriteStyle::Always => ColorChoice::Always, in into_color_choice()
183 WriteStyle::Auto => ColorChoice::Auto, in into_color_choice()
184 WriteStyle::Never => ColorChoice::Never, in into_color_choice()
/third_party/rust/crates/quote/benches/
Dtimer.rs3 use termcolor::{Color, ColorChoice, ColorSpec, StandardStream, WriteColor};
14 let mut writer = StandardStream::stderr(ColorChoice::Auto); in time()
/third_party/rust/crates/syn/tests/
Dzzz_stable.rs4 use termcolor::{Color, ColorChoice, ColorSpec, StandardStream, WriteColor};
23 let mut stderr = StandardStream::stderr(ColorChoice::Auto); in notice()
/third_party/rust/crates/syn/tests/features/macro/
Dlib.rs6 use termcolor::{Color, ColorChoice, ColorSpec, StandardStream, WriteColor};
21 let ref mut stderr = StandardStream::stderr(ColorChoice::Auto); in check()
/third_party/rust/crates/codespan/codespan-reporting/examples/
Dpeg_calculator.rs13 use codespan_reporting::term::termcolor::{ColorChoice, StandardStream};
40 let writer = StandardStream::stderr(ColorChoice::Always); in main()
Dcustom_files.rs14 use codespan_reporting::term::termcolor::{ColorChoice, StandardStream};
32 let writer = StandardStream::stderr(ColorChoice::Always); in main()
/third_party/rust/crates/clap/src/error/
Dmod.rs25 use crate::util::{color::ColorChoice, safe_exit, SUCCESS_CODE, USAGE_CODE};
72 color_when: ColorChoice,
73 color_help_when: ColorChoice,
133 color_when: ColorChoice::Never, in new()
134 color_help_when: ColorChoice::Never, in new()
293 pub(crate) fn set_color(mut self, color_when: ColorChoice) -> Self { in set_color()
298 pub(crate) fn set_colored_help(mut self, color_help_when: ColorChoice) -> Self { in set_colored_help()
/third_party/rust/crates/clap/src/builder/
Dcommand.rs28 use crate::util::{color::ColorChoice, Id};
1044 pub fn color(self, color: ColorChoice) -> Self { in color()
1050 ColorChoice::Auto => cmd.global_setting(AppSettings::ColorAuto), in color()
1051 ColorChoice::Always => cmd.global_setting(AppSettings::ColorAlways), in color()
1052 ColorChoice::Never => cmd.global_setting(AppSettings::ColorNever), in color()
3351 pub fn get_color(&self) -> ColorChoice { in get_color() argument
3357 ColorChoice::Never in get_color()
3360 ColorChoice::Always in get_color()
3363 ColorChoice::Auto in get_color()
3366 ColorChoice::Never in get_color()
[all …]
/third_party/rust/crates/clap/tests/derive_ui/
Dbool_value_enum.stderr7 = help: the trait `ValueEnum` is implemented for `ColorChoice`
/third_party/rust/crates/cxx/gen/src/
Derror.rs5 use codespan_reporting::term::termcolor::{ColorChoice, StandardStream, WriteColor};
64 let writer = StandardStream::stderr(ColorChoice::Auto); in format_err()
/third_party/rust/crates/clap/src/
Dlib.rs105 pub use crate::util::color::ColorChoice;
Dmacros.rs646 …tput::fmt::Colorizer::new($crate::output::fmt::Stream::Stderr, $crate::ColorChoice::Auto).with_con…
/third_party/rust/crates/codespan/
DREADME.md36 use codespan_reporting::term::termcolor::{ColorChoice, StandardStream};
93 let writer = StandardStream::stderr(ColorChoice::Always);
/third_party/rust/crates/clap/tests/builder/
Dapp_settings.rs1205 .color(clap::ColorChoice::Never) in color_is_global()
1208 assert_eq!(cmd.get_color(), clap::ColorChoice::Never); in color_is_global()
1211 assert_eq!(sub.get_color(), clap::ColorChoice::Never); in color_is_global()
/third_party/rust/crates/clap/
DCHANGELOG.md107 - Implement `Display` and `FromStr` for `ColorChoice`
160 - `ColorChoice` now implements `ValueEnum`
1339 - `clap::App::color` / `clap::ColorChoice` to specify color setting for the app
1388 - Always respect `ColorChoice::Never`, even if that means we skip colors in some cases