2024-04-13 08:42:00 +00:00
|
|
|
|
"anstream":[["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-AutoStream%3CS%3E\" class=\"impl\"><a class=\"src rightside\" href=\"src/anstream/auto.rs.html#31-183\">source</a><a href=\"#impl-AutoStream%3CS%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl<S> <a class=\"struct\" href=\"anstream/struct.AutoStream.html\" title=\"struct anstream::AutoStream\">AutoStream</a><S><div class=\"where\">where\n S: <a class=\"trait\" href=\"anstream/stream/trait.RawStream.html\" title=\"trait anstream::stream::RawStream\">RawStream</a>,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.new\" class=\"method\"><a class=\"src rightside\" href=\"src/anstream/auto.rs.html#62-72\">source</a><h4 class=\"code-header\">pub fn <a href=\"anstream/struct.AutoStream.html#tymethod.new\" class=\"fn\">new</a>(raw: S, choice: <a class=\"enum\" href=\"anstream/enum.ColorChoice.html\" title=\"enum anstream::ColorChoice\">ColorChoice</a>) -> Self</h4></section></summary><div class=\"docblock\"><p>Runtime control over styling behavior</p>\n<h5 id=\"example\"><a class=\"doc-anchor\" href=\"#example\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"comment\">// Like `AutoStream::choice` but without `NO_COLOR`, `CLICOLOR_FORCE`, `CI`\n</span><span class=\"kw\">fn </span>choice(raw: <span class=\"kw-2\">&</span><span class=\"kw\">dyn </span>anstream::stream::RawStream) -> anstream::ColorChoice {\n <span class=\"kw\">let </span>choice = anstream::ColorChoice::global();\n <span class=\"kw\">if </span>choice == anstream::ColorChoice::Auto {\n <span class=\"kw\">if </span>raw.is_terminal() && anstyle_query::term_supports_color() {\n anstream::ColorChoice::Always\n } <span class=\"kw\">else </span>{\n anstream::ColorChoice::Never\n }\n } <span class=\"kw\">else </span>{\n choice\n }\n}\n\n<span class=\"kw\">let </span>stream = std::io::stdout();\n<span class=\"kw\">let </span>choice = choice(<span class=\"kw-2\">&</span>stream);\n<span class=\"kw\">let </span>auto = anstream::AutoStream::new(stream, choice);</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.auto\" class=\"method\"><a class=\"src rightside\" href=\"src/anstream/auto.rs.html#77-81\">source</a><h4 class=\"code-header\">pub fn <a href=\"anstream/struct.AutoStream.html#tymethod.auto\" class=\"fn\">auto</a>(raw: S) -> Self</h4></section></summary><div class=\"docblock\"><p>Auto-adapt for the stream’s capabilities</p>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.choice\" class=\"method\"><a class=\"src rightside\" href=\"src/anstream/auto.rs.html#85-87\">source</a><h4 class=\"code-header\">pub fn <a href=\"anstream/struct.AutoStream.html#tymethod.choice\" class=\"fn\">choice</a>(raw: <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.2/std/primitive.reference.html\">&S</a>) -> <a class=\"enum\" href=\"anstream/enum.ColorChoice.html\" title=\"enum anstream::ColorChoice\">ColorChoice</a></h4></section></summary><div class=\"docblock\"><p>Report the desired choice for the given stream</p>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.always_ansi\" class=\"method\"><a class=\"src rightside\" href=\"src/anstream/auto.rs.html#92-100\">source</a><h4 class=\"code-header\">pub fn <a href=\"anstream/struct.AutoStream.html#tymethod.always_ansi\" class=\"fn\">always_ansi</a>(raw: S) -> Self</h4></section></summary><div class=\"docblock\"><p>Force ANSI escape codes to be passed through as-is, no matter what the inner <code>Write</code>\nsupports.</p>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.always\" class=\"method\"><a class=\"src rightside\" href=\"src/anstream/auto.rs.html#110-126\">source</a><h4 class=\"code
|