Runtime control over styling behavior
\n// Like `AutoStream::choice` but without `NO_COLOR`, `CLICOLOR_FORCE`, `CI`\nfn choice(raw: &dyn anstream::stream::RawStream) -> anstream::ColorChoice {\n let choice = anstream::ColorChoice::global();\n if choice == anstream::ColorChoice::Auto {\n if raw.is_terminal() && anstyle_query::term_supports_color() {\n anstream::ColorChoice::Always\n } else {\n anstream::ColorChoice::Never\n }\n } else {\n choice\n }\n}\n\nlet stream = std::io::stdout();\nlet choice = choice(&stream);\nlet auto = anstream::AutoStream::new(stream, choice);
Report the desired choice for the given stream
\nForce ANSI escape codes to be passed through as-is, no matter what the inner Write
\nsupports.
Get the wrapped RawStream
Prefer AutoStream::choice
This doesn’t report what is requested but what is currently active.
\nGet exclusive access to the AutoStream
Why?
\nGet exclusive access to the AutoStream
Why?
\ncan_vector
)