libcosmic/cosmic/cosmic_theme/palette/bool_mask/trait.LazySelect.html
2026-04-18 20:11:25 +00:00

16 lines
No EOL
8.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Like `Select`, but can avoid evaluating the input."><title>LazySelect in cosmic::cosmic_theme::palette::bool_mask - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../" data-static-root-path="../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../static.files/storage-68b7e25d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Lazy<wbr>Select</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.lazy_select" title="lazy_select">lazy_select</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-LazySelect%3CT%3E-for-bool" title="bool">bool</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>cosmic_<wbr>theme::<wbr>palette::<wbr>bool_<wbr>mask</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../index.html">cosmic</a>::<wbr><a href="../../index.html">cosmic_theme</a>::<wbr><a href="../index.html">palette</a>::<wbr><a href="index.html">bool_mask</a></div><h1>Trait <span class="trait">LazySelect</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="https://docs.rs/palette/0.7.6/src/palette/bool_mask.rs.html#120">Source</a> </span></div><pre class="rust item-decl"><code>pub trait LazySelect&lt;T&gt;: <a class="trait" href="trait.Select.html" title="trait cosmic::cosmic_theme::palette::bool_mask::Select">Select</a>&lt;T&gt;<div class="where">where
T: <a class="trait" href="trait.HasBoolMask.html" title="trait cosmic::cosmic_theme::palette::bool_mask::HasBoolMask">HasBoolMask</a>&lt;Mask = Self&gt;,</div>{
// Required method
fn <a href="#tymethod.lazy_select" class="fn">lazy_select</a>&lt;A, B&gt;(self, a: A, b: B) -&gt; T
<span class="where">where A: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>() -&gt; T,
B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>() -&gt; T</span>;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Like <a href="trait.Select.html" title="trait cosmic::cosmic_theme::palette::bool_mask::Select"><code>Select</code></a>, but can avoid evaluating the input.</p>
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.lazy_select" class="method"><a class="src rightside" href="https://docs.rs/palette/0.7.6/src/palette/bool_mask.rs.html#128-131">Source</a><h4 class="code-header">fn <a href="#tymethod.lazy_select" class="fn">lazy_select</a>&lt;A, B&gt;(self, a: A, b: B) -&gt; T<div class="where">where
A: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>() -&gt; T,
B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>() -&gt; T,</div></h4></section></summary><div class="docblock"><p>Select lanes from the output of <code>a</code> when corresponding lanes in <code>self</code>
are <code>true</code>, and select from the output of <code>b</code> when <code>false</code>. May avoid
evaluating either option if its not selected.</p>
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/nightly/reference/items/traits.html#dyn-compatibility">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-LazySelect%3CT%3E-for-bool" class="impl"><a class="src rightside" href="https://docs.rs/palette/0.7.6/src/palette/bool_mask.rs.html#134-136">Source</a><a href="#impl-LazySelect%3CT%3E-for-bool" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="trait.LazySelect.html" title="trait cosmic::cosmic_theme::palette::bool_mask::LazySelect">LazySelect</a>&lt;T&gt; for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><div class="where">where
T: <a class="trait" href="trait.HasBoolMask.html" title="trait cosmic::cosmic_theme::palette::bool_mask::HasBoolMask">HasBoolMask</a>&lt;Mask = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>&gt;,</div></h3></section></summary><div class="impl-items"><section id="method.lazy_select" class="method trait-impl"><a class="src rightside" href="https://docs.rs/palette/0.7.6/src/palette/bool_mask.rs.html#139-142">Source</a><a href="#method.lazy_select" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.lazy_select" class="fn">lazy_select</a>&lt;A, B&gt;(self, a: A, b: B) -&gt; T<div class="where">where
A: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>() -&gt; T,
B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>() -&gt; T,</div></h4></section></div></details><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../../../../trait.impl/palette/bool_mask/trait.LazySelect.js" data-ignore-extern-crates="std" async></script></section></div></main></body></html>