| {"rustc_vv":"rustc 1.54.0 (a178d0322 2021-07-26)\nbinary: rustc\ncommit-hash: a178d0322ce20e33eac124758e837cbd80a6f633\ncommit-date: 2021-07-26\nhost: x86_64-unknown-linux-gnu\nrelease: 1.54.0\nLLVM version: 12.0.1\n"} |
| body{background-color:#0f1419;color:#c5c5c5;}h1,h2,h3,h4{color:white;}h1.fqn{border-bottom-color:#5c6773;}h1.fqn a{color:#fff;}h2,h3,h4{border-bottom-color:#5c6773;}h4{border:none;}.in-band{background-color:#0f1419;}.invisible{background:rgba(0,0,0,0);}code{color:#ffb454;}h3>code,h4>code,h5>code{color:#e6e1cf;}pre>code{color:#e6e1cf;}span code{color:#e6e1cf;}.docblock a>code{color:#39AFD7 !important;}.docblock code,.docblock-short code{background-color:#191f26;}pre,.rustdoc.source .example-wrap{color:#e6e1cf;background-color:#191f26;}.sidebar{background-color:#14191f;}.logo-container.rust-logo>img{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);}*{scrollbar-color:#5c6773 transparent;}.sidebar{scrollbar-color:#5c6773 transparent;}::-webkit-scrollbar-track{background-color:transparent;}::-webkit-scrollbar-thumb{background-color:#5c6773;}.sidebar::-webkit-scrollbar-track{background-color:transparent;}.sidebar::-webkit-scrollbar-thumb{background-color:#5c6773;}.sidebar .current{background-color:transparent;color:#ffb44c;}.source .sidebar{background-color:#0f1419;}.sidebar .location{border-color:#000;background-color:#0f1419;color:#fff;}.sidebar-elems .location{color:#ff7733;}.sidebar-elems .location a{color:#fff;}.sidebar .version{border-bottom-color:#424c57;}.sidebar-title{border-top-color:#5c6773;border-bottom-color:#5c6773;}.block a:hover{background:transparent;color:#ffb44c;}.line-numbers span{color:#5c6773;}.line-numbers .line-highlighted{color:#708090;background-color:rgba(255,236,164,0.06);padding-right:4px;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#5c6773;}.docblock table,.docblock table td,.docblock table th{border-color:#5c6773;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#c5c5c5;}.search-results a:hover{background-color:#777;}.search-results a:focus{color:#000 !important;background-color:#c6afb3;}.search-results a{color:#0096cf;}.search-results a span.desc{color:#c5c5c5;}.content .item-info::before{color:#ccc;}.content span.foreigntype,.content a.foreigntype{color:#ef57ff;}.content span.union,.content a.union{color:#98a01c;}.content span.constant,.content a.constant,.content span.static,.content a.static{color:#6380a0;}.content span.primitive,.content a.primitive{color:#32889b;}.content span.traitalias,.content a.traitalias{color:#57d399;}.content span.keyword,.content a.keyword{color:#de5249;}.content span.externcrate,.content span.mod,.content a.mod{color:#acccf9;}.content span.struct,.content a.struct{color:#ffa0a5;}.content span.enum,.content a.enum{color:#99e0c9;}.content span.trait,.content a.trait{color:#39AFD7;}.content span.type,.content a.type{color:#cfbcf5;}.content span.fn,.content a.fn,.content span.method,.content a.method,.content span.tymethod,.content a.tymethod,.content .fnname{color:#fdd687;}.content span.attr,.content a.attr,.content span.derive,.content a.derive,.content span.macro,.content a.macro{color:#a37acc;}pre.rust .comment{color:#788797;}pre.rust .doccomment{color:#a1ac88;}nav:not(.sidebar){border-bottom-color:#424c57;}nav.main .current{border-top-color:#5c6773;border-bottom-color:#5c6773;}nav.main .separator{border:1px solid #5c6773;}a{color:#c5c5c5;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#39AFD7;}details.rustdoc-toggle>summary.hideme>span,details.rustdoc-toggle>summary::before,details.undocumented>summary::before{color:#999;}#crate-search{color:#c5c5c5;background-color:#141920;box-shadow:0 0 0 1px #424c57,0 0 0 2px transparent;border-color:#424c57;}.search-input{color:#ffffff;background-color:#141920;box-shadow:0 0 0 1px #424c57,0 0 0 2px transparent;transition:box-shadow 150ms ease-in-out;}#crate-search+.search-input:focus{box-shadow:0 0 0 1px #148099,0 0 0 2px transparent;}.search-input:disabled{background-color:#3e3e3e;}.module-item .stab,.import-item .stab{color:#000;}.stab.unstable,.stab.deprecated,.stab.portability{color:#c5c5c5;background:#314559 !important;border-style:none !important;border-radius:4px;padding:3px 6px 3px 6px;}.stab.portability>code{color:#e6e1cf;background:none;}#help>div{background:#14191f;box-shadow:0px 6px 20px 0px black;border:none;border-radius:4px;}#help>div>span{border-bottom-color:#5c6773;}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:#788797;}.line-numbers :target{background-color:transparent;}pre.rust .number,pre.rust .string{color:#b8cc52;}pre.rust .kw,pre.rust .kw-2,pre.rust .prelude-ty,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .op,pre.rust .lifetime{color:#ff7733;}pre.rust .macro,pre.rust .macro-nonterminal{color:#a37acc;}pre.rust .question-mark{color:#ff9011;}pre.rust .self{color:#36a3d9;font-style:italic;}pre.rust .attribute{color:#e6e1cf;}pre.rust .attribute .ident,pre.rust .attribute .op{color:#e6e1cf;}.example-wrap>pre.line-number{color:#5c67736e;border:none;}a.test-arrow{font-size:100%;color:#788797;border-radius:4px;background-color:rgba(57,175,215,0.09);}a.test-arrow:hover{background-color:rgba(57,175,215,0.368);color:#c5c5c5;}.toggle-label,.code-attribute{color:#999;}:target,:target>*{background:rgba(255,236,164,0.06);border-right:3px solid rgba(255,180,76,0.85);}pre.compile_fail{border-left:2px solid rgba(255,0,0,.4);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.4);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#39AFD7;}.tooltip::after{background-color:#314559;color:#c5c5c5;border:1px solid #5c6773;}.tooltip::before{border-color:transparent #314559 transparent transparent;}.notable-traits-tooltiptext{background-color:#314559;border-color:#5c6773;}.notable-traits-tooltiptext .notable{border-bottom-color:#5c6773;}#titles>button.selected{background-color:#141920 !important;border-bottom:1px solid #ffb44c !important;border-top:none;}#titles>button:not(.selected){background-color:transparent !important;border:none;}#titles>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}#titles>button>div.count{color:#888;}.search-input:focus{}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{}.content span.struct,.content a.struct,.block a.current.struct{}#titles>button:hover,#titles>button.selected{}.content span.type,.content a.type,.block a.current.type{}.content span.union,.content a.union,.block a.current.union{}pre.rust .lifetime{}.stab.unstable{}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){}.content span.enum,.content a.enum,.block a.current.enum{}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{}.content span.keyword,.content a.keyword,.block a.current.keyword{}pre.rust .comment{}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{}pre.rust .kw{}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{}pre.rust .doccomment{}.stab.deprecated{}.content a.attr,.content a.derive,.content a.macro{}.stab.portability{}.content span.primitive,.content a.primitive,.block a.current.primitive{}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{}pre.rust .kw-2,pre.rust .prelude-ty{}.content span.trait,.content a.trait,.block a.current.trait{}.search-results a:focus span{}a.result-trait:focus{}a.result-traitalias:focus{}a.result-mod:focus,a.result-externcrate:focus{}a.result-mod:focus{}a.result-externcrate:focus{}a.result-enum:focus{}a.result-struct:focus{}a.result-union:focus{}a.result-fn:focus,a.result-method:focus,a.result-tymethod:focus{}a.result-type:focus{}a.result-foreigntype:focus{}a.result-attr:focus,a.result-derive:focus,a.result-macro:focus{}a.result-constant:focus,a.result-static:focus{}a.result-primitive:focus{}a.result-keyword:focus{}@media (max-width:700px){.sidebar-menu{background-color:#14191f;border-bottom-color:#5c6773;border-right-color:#5c6773;}.sidebar-elems{background-color:#14191f;border-right-color:#5c6773;}#sidebar-filler{background-color:#14191f;border-bottom-color:#5c6773;}}kbd{color:#c5c5c5;background-color:#314559;border-color:#5c6773;border-bottom-color:#5c6773;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,#help-button{border-color:#5c6773;background-color:#0f1419;color:#fff;}#theme-picker>img,#settings-menu>img{filter:invert(100);}#copy-path{color:#fff;}#copy-path>img{filter:invert(70%);}#copy-path:hover>img{filter:invert(100%);}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,#help-button:hover,#help-button:focus{border-color:#e0e0e0;}#theme-choices{border-color:#5c6773;background-color:#0f1419;}#theme-choices>button:not(:first-child){border-top-color:#5c6773;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:rgba(110,110,110,0.33);}@media (max-width:700px){#theme-picker{background:#0f1419;}}#all-types{background-color:#14191f;}#all-types:hover{background-color:rgba(70,70,70,0.33);}.search-results .result-name span.alias{color:#c5c5c5;}.search-results .result-name span.grey{color:#999;}#sidebar-toggle{background-color:#14191f;}#sidebar-toggle:hover{background-color:rgba(70,70,70,0.33);}#source-sidebar{background-color:#14191f;}#source-sidebar>.title{color:#fff;border-bottom-color:#5c6773;}div.files>a:hover,div.name:hover{background-color:#14191f;color:#ffb44c;}div.files>.selected{background-color:#14191f;color:#ffb44c;}.setting-line>.title{border-bottom-color:#5c6773;}input:checked+.slider{background-color:#ffb454 !important;} |
| <svg width="24" height="25" viewBox="0 0 24 25" xmlns="http://www.w3.org/2000/svg" aria-label="Copy to clipboard"><path d="M18 20h2v3c0 1-1 2-2 2H2c-.998 0-2-1-2-2V5c0-.911.755-1.667 1.667-1.667h5A3.323 3.323 0 0110 0a3.323 3.323 0 013.333 3.333h5C19.245 3.333 20 4.09 20 5v8.333h-2V9H2v14h16v-3zM3 7h14c0-.911-.793-1.667-1.75-1.667H13.5c-.957 0-1.75-.755-1.75-1.666C11.75 2.755 10.957 2 10 2s-1.75.755-1.75 1.667c0 .911-.793 1.666-1.75 1.666H4.75C3.793 5.333 3 6.09 3 7z"/><path d="M4 19h6v2H4zM12 11H4v2h8zM4 17h4v-2H4zM15 15v-3l-4.5 4.5L15 21v-3l8.027-.032L23 15z"/></svg> |
| window.ALL_CRATES = ["deltae"]; |
| <!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="`Tolerance` and `DeltaEq` traits"><meta name="keywords" content="rust, rustlang, rust-lang, eq"><title>deltae::eq - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> | ||
| <link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> | ||
| <link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../deltae/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module eq</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#traits">Traits</a></li></ul></div><div id="sidebar-vars" data-name="eq" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">deltae</a>::<wbr><a class="mod" href="#">eq</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/deltae/eq.rs.html#1-131" title="goto source code">[src]</a></span></h1><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><h2 id="tolerance-and-deltaeq-traits" class="section-header"><a href="#tolerance-and-deltaeq-traits"><code>Tolerance</code> and <code>DeltaEq</code> traits</a></h2> | ||
| <p>This module deals with comparing two colors by <a href="../struct.DeltaE.html" title="DeltaE"><code>DeltaE</code></a> within a certain <a href="trait.Tolerance.html" title="Tolerance"><code>Tolerance</code></a>.</p> | ||
| <p>See also: <a href="../macro.assert_delta_eq.html" title="assert_delta_eq"><code>assert_delta_eq</code></a></p> | ||
| <h3 id="implementing-tolerance-and-deltaeq" class="section-header"><a href="#implementing-tolerance-and-deltaeq">Implementing <code>Tolerance</code> and <code>DeltaEq</code></a></h3> | ||
| <div class="example-wrap"><pre class="rust rust-example-rendered"> | ||
| <span class="kw">use</span> <span class="ident">deltae</span>::<span class="kw-2">*</span>; | ||
| <span class="kw">struct</span> <span class="ident">MyTolerance</span>(<span class="ident">f32</span>); | ||
| <span class="kw">impl</span> <span class="ident">Tolerance</span> <span class="kw">for</span> <span class="ident">MyTolerance</span> { | ||
| <span class="kw">fn</span> <span class="ident">tolerance</span>(<span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">f32</span> { | ||
| <span class="self">self</span>.<span class="number">0</span> | ||
| } | ||
| } | ||
| <span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Copy</span>, <span class="ident">Clone</span>)]</span> | ||
| <span class="kw">struct</span> <span class="ident">MyLab</span>(<span class="ident">f32</span>, <span class="ident">f32</span>, <span class="ident">f32</span>); | ||
| <span class="comment">// Types that implement Into<Lab> also implement the Delta trait</span> | ||
| <span class="kw">impl</span> <span class="ident">From</span><span class="op"><</span><span class="ident">MyLab</span><span class="op">></span> <span class="kw">for</span> <span class="ident">LabValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">mylab</span>: <span class="ident">MyLab</span>) <span class="op">-</span><span class="op">></span> <span class="ident">LabValue</span> { | ||
| <span class="ident">LabValue</span> { | ||
| <span class="ident">l</span>: <span class="ident">mylab</span>.<span class="number">0</span>, | ||
| <span class="ident">a</span>: <span class="ident">mylab</span>.<span class="number">1</span>, | ||
| <span class="ident">b</span>: <span class="ident">mylab</span>.<span class="number">2</span>, | ||
| } | ||
| } | ||
| } | ||
| <span class="kw">impl</span><span class="op"><</span><span class="ident">D</span>: <span class="ident">Delta</span> <span class="op">+</span> <span class="ident">Copy</span><span class="op">></span> <span class="ident">DeltaEq</span><span class="op"><</span><span class="ident">D</span><span class="op">></span> <span class="kw">for</span> <span class="ident">MyLab</span> {} | ||
| <span class="kw">let</span> <span class="ident">mylab</span> <span class="op">=</span> <span class="ident">MyLab</span>(<span class="number">89.73</span>, <span class="number">1.88</span>, <span class="op">-</span><span class="number">6.96</span>); | ||
| <span class="kw">let</span> <span class="ident">lab</span> <span class="op">=</span> <span class="ident">LabValue::new</span>(<span class="number">89.73</span>, <span class="number">1.88</span>, <span class="op">-</span><span class="number">6.96</span>).<span class="ident">unwrap</span>(); | ||
| <span class="kw">let</span> <span class="ident">de2000</span> <span class="op">=</span> <span class="ident">mylab</span>.<span class="ident">delta</span>(<span class="ident">lab</span>, <span class="ident">DEMethod::DE2000</span>); | ||
| <span class="macro">assert!</span>(<span class="ident">mylab</span>.<span class="ident">delta_eq</span>(<span class="kw-2">&</span><span class="ident">lab</span>, <span class="ident">DE1976</span>, <span class="number">0.0</span>));</pre></div> | ||
| </div></details><h2 id="traits" class="section-header"><a href="#traits">Traits</a></h2> | ||
| <table><tr class="module-item"><td><a class="trait" href="trait.DeltaEq.html" title="deltae::eq::DeltaEq trait">DeltaEq</a></td><td class="docblock-short"><p>Trait to determine whether two values are within a certain tolerance of <a href="../struct.DeltaE.html" title="DeltaE"><code>DeltaE</code></a>. Types that | ||
| implement Into<<a href="../color/struct.LabValue.html" title="LabValue"><code>LabValue</code></a>> implicitly implement <a href="../trait.Delta.html" title="Delta"><code>Delta</code></a>. Types that implement <a href="../trait.Delta.html" title="Delta"><code>Delta</code></a> and | ||
| <a href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Copy.html" title="Copy"><code>Copy</code></a> may also implement DeltaEq for other types that also implement <a href="../trait.Delta.html" title="Delta"><code>Delta</code></a> and <a href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Copy.html" title="Copy"><code>Copy</code></a>.</p> | ||
| </td></tr><tr class="module-item"><td><a class="trait" href="trait.Tolerance.html" title="deltae::eq::Tolerance trait">Tolerance</a></td><td class="docblock-short"><p>Trait to define a tolerance value for the <a href="trait.DeltaEq.html" title="DeltaEq"><code>DeltaEq</code></a> trait</p> | ||
| </td></tr></table></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="deltae" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html> |
| initSidebarItems({"trait":[["DeltaEq","Trait to determine whether two values are within a certain tolerance of [`DeltaE`]. Types that implement Into<[`LabValue`]> implicitly implement [`Delta`]. Types that implement [`Delta`] and [`Copy`] may also implement DeltaEq for other types that also implement [`Delta`] and [`Copy`]."],["Tolerance","Trait to define a tolerance value for the [`DeltaEq`] trait"]]}); |
| <!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="Trait to determine whether two values are within a certain tolerance of [`DeltaE`]. Types that implement Into<[`LabValue`]> implicitly implement [`Delta`]. Types that implement [`Delta`] and [`Copy`] may also implement DeltaEq for other types that also implement [`Delta`] and [`Copy`]."><meta name="keywords" content="rust, rustlang, rust-lang, DeltaEq"><title>DeltaEq in deltae::eq - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> | ||
| <link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> | ||
| <link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></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="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../deltae/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Trait DeltaEq</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#provided-methods">Provided Methods</a></h3><div class="sidebar-links"><a href="#method.delta_eq">delta_eq</a></div><h3 class="sidebar-title"><a href="#implementors">Implementors</a></h3></div><h2 class="location">Other items in<br><a href="../index.html">deltae</a>::<wbr><a href="index.html">eq</a></h2><div id="sidebar-vars" data-name="DeltaEq" data-ty="trait" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Trait <a href="../index.html">deltae</a>::<wbr><a href="index.html">eq</a>::<wbr><a class="trait" href="#">DeltaEq</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/deltae/eq.rs.html#72-77" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust trait">pub trait DeltaEq<D: <a class="trait" href="../trait.Delta.html" title="trait deltae::Delta">Delta</a> + <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>>: <a class="trait" href="../trait.Delta.html" title="trait deltae::Delta">Delta</a> + <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> { | ||
| fn <a href="#method.delta_eq" class="fnname">delta_eq</a><T: <a class="trait" href="trait.Tolerance.html" title="trait deltae::eq::Tolerance">Tolerance</a>>(<br> &self, <br> other: D, <br> method: <a class="enum" href="../enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a>, <br> tolerance: T<br> ) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a> { ... } | ||
| }</pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Trait to determine whether two values are within a certain tolerance of <a href="../struct.DeltaE.html" title="DeltaE"><code>DeltaE</code></a>. Types that | ||
| implement Into<<a href="../color/struct.LabValue.html" title="LabValue"><code>LabValue</code></a>> implicitly implement <a href="../trait.Delta.html" title="Delta"><code>Delta</code></a>. Types that implement <a href="../trait.Delta.html" title="Delta"><code>Delta</code></a> and | ||
| <a href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Copy.html" title="Copy"><code>Copy</code></a> may also implement DeltaEq for other types that also implement <a href="../trait.Delta.html" title="Delta"><code>Delta</code></a> and <a href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Copy.html" title="Copy"><code>Copy</code></a>.</p> | ||
| <div class="example-wrap"><pre class="rust rust-example-rendered"> | ||
| <span class="kw">use</span> <span class="ident">deltae</span>::<span class="kw-2">*</span>; | ||
| <span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Copy</span>, <span class="ident">Clone</span>)]</span> | ||
| <span class="kw">struct</span> <span class="ident">MyLab</span>(<span class="ident">f32</span>, <span class="ident">f32</span>, <span class="ident">f32</span>); | ||
| <span class="comment">// Types that implement Into<Lab> implicitly implement the Delta trait</span> | ||
| <span class="kw">impl</span> <span class="ident">From</span><span class="op"><</span><span class="ident">MyLab</span><span class="op">></span> <span class="kw">for</span> <span class="ident">LabValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">mylab</span>: <span class="ident">MyLab</span>) <span class="op">-</span><span class="op">></span> <span class="ident">LabValue</span> { | ||
| <span class="ident">LabValue</span> { | ||
| <span class="ident">l</span>: <span class="ident">mylab</span>.<span class="number">0</span>, | ||
| <span class="ident">a</span>: <span class="ident">mylab</span>.<span class="number">1</span>, | ||
| <span class="ident">b</span>: <span class="ident">mylab</span>.<span class="number">2</span>, | ||
| } | ||
| } | ||
| } | ||
| <span class="comment">// Types that implement Delta and Copy may also implement DeltaEq for other types that also</span> | ||
| <span class="comment">// implement Delta and Copy</span> | ||
| <span class="kw">impl</span><span class="op"><</span><span class="ident">D</span>: <span class="ident">Delta</span> <span class="op">+</span> <span class="ident">Copy</span><span class="op">></span> <span class="ident">DeltaEq</span><span class="op"><</span><span class="ident">D</span><span class="op">></span> <span class="kw">for</span> <span class="ident">MyLab</span> {} | ||
| <span class="kw">let</span> <span class="ident">mylab</span> <span class="op">=</span> <span class="ident">MyLab</span>(<span class="number">89.73</span>, <span class="number">1.88</span>, <span class="op">-</span><span class="number">6.96</span>); | ||
| <span class="kw">let</span> <span class="ident">lab</span> <span class="op">=</span> <span class="ident">LabValue::new</span>(<span class="number">89.73</span>, <span class="number">1.88</span>, <span class="op">-</span><span class="number">6.96</span>).<span class="ident">unwrap</span>(); | ||
| <span class="kw">let</span> <span class="ident">de2000</span> <span class="op">=</span> <span class="ident">mylab</span>.<span class="ident">delta</span>(<span class="ident">lab</span>, <span class="ident">DEMethod::DE2000</span>); | ||
| <span class="macro">assert!</span>(<span class="ident">mylab</span>.<span class="ident">delta_eq</span>(<span class="kw-2">&</span><span class="ident">lab</span>, <span class="ident">DE1976</span>, <span class="number">0.0</span>));</pre></div> | ||
| </div></details><h2 id="provided-methods" class="small-section-header">Provided methods<a href="#provided-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle" open><summary><div id="method.delta_eq" class="method has-srclink"><h4 class="code-header">fn <a href="#method.delta_eq" class="fnname">delta_eq</a><T: <a class="trait" href="trait.Tolerance.html" title="trait deltae::eq::Tolerance">Tolerance</a>>(<br> &self, <br> other: D, <br> method: <a class="enum" href="../enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a>, <br> tolerance: T<br>) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a class="srclink" href="../../src/deltae/eq.rs.html#74-76" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Return true if the value is less than or equal to the <a href="trait.Tolerance.html" title="Tolerance"><code>Tolerance</code></a></p> | ||
| </div></details></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><div id="impl-DeltaEq%3CD%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<D: <a class="trait" href="../trait.Delta.html" title="trait deltae::Delta">Delta</a> + <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>> <a class="trait" href="trait.DeltaEq.html" title="trait deltae::eq::DeltaEq">DeltaEq</a><D> for <a class="struct" href="../color/struct.LabValue.html" title="struct deltae::color::LabValue">LabValue</a></h3><a href="#impl-DeltaEq%3CD%3E" class="anchor"></a><a class="srclink" href="../../src/deltae/eq.rs.html#129" title="goto source code">[src]</a></div><div id="impl-DeltaEq%3CD%3E-1" class="impl has-srclink"><h3 class="code-header in-band">impl<D: <a class="trait" href="../trait.Delta.html" title="trait deltae::Delta">Delta</a> + <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>> <a class="trait" href="trait.DeltaEq.html" title="trait deltae::eq::DeltaEq">DeltaEq</a><D> for <a class="struct" href="../color/struct.LchValue.html" title="struct deltae::color::LchValue">LchValue</a></h3><a href="#impl-DeltaEq%3CD%3E-1" class="anchor"></a><a class="srclink" href="../../src/deltae/eq.rs.html#130" title="goto source code">[src]</a></div><div id="impl-DeltaEq%3CD%3E-2" class="impl has-srclink"><h3 class="code-header in-band">impl<D: <a class="trait" href="../trait.Delta.html" title="trait deltae::Delta">Delta</a> + <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>> <a class="trait" href="trait.DeltaEq.html" title="trait deltae::eq::DeltaEq">DeltaEq</a><D> for <a class="struct" href="../color/struct.XyzValue.html" title="struct deltae::color::XyzValue">XyzValue</a></h3><a href="#impl-DeltaEq%3CD%3E-2" class="anchor"></a><a class="srclink" href="../../src/deltae/eq.rs.html#131" title="goto source code">[src]</a></div></div><script type="text/javascript" src="../../implementors/deltae/eq/trait.DeltaEq.js" async></script></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="deltae" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html> |
| <!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="Trait to define a tolerance value for the [`DeltaEq`] trait"><meta name="keywords" content="rust, rustlang, rust-lang, Tolerance"><title>Tolerance in deltae::eq - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> | ||
| <link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> | ||
| <link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></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="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../deltae/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Trait Tolerance</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#required-methods">Required Methods</a></h3><div class="sidebar-links"><a href="#tymethod.tolerance">tolerance</a></div><h3 class="sidebar-title"><a href="#foreign-impls">Implementations on Foreign Types</a></h3><div class="sidebar-links"><a href="#impl-Tolerance-for-f32">f32</a><a href="#impl-Tolerance-for-f64">f64</a></div><h3 class="sidebar-title"><a href="#implementors">Implementors</a></h3></div><h2 class="location">Other items in<br><a href="../index.html">deltae</a>::<wbr><a href="index.html">eq</a></h2><div id="sidebar-vars" data-name="Tolerance" data-ty="trait" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Trait <a href="../index.html">deltae</a>::<wbr><a href="index.html">eq</a>::<wbr><a class="trait" href="#">Tolerance</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/deltae/eq.rs.html#100-103" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust trait">pub trait Tolerance { | ||
| fn <a href="#tymethod.tolerance" class="fnname">tolerance</a>(self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f32.html">f32</a>; | ||
| }</pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Trait to define a tolerance value for the <a href="trait.DeltaEq.html" title="DeltaEq"><code>DeltaEq</code></a> trait</p> | ||
| </div></details><h2 id="required-methods" class="small-section-header">Required methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle" open><summary><div id="tymethod.tolerance" class="method has-srclink"><h4 class="code-header">fn <a href="#tymethod.tolerance" class="fnname">tolerance</a>(self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f32.html">f32</a></h4><a class="srclink" href="../../src/deltae/eq.rs.html#102" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Return a tolerance value</p> | ||
| </div></details></div><h2 id="foreign-impls" class="small-section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Tolerance-for-f32" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="trait.Tolerance.html" title="trait deltae::eq::Tolerance">Tolerance</a> for <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f32.html">f32</a></h3><a href="#impl-Tolerance-for-f32" class="anchor"></a><a class="srclink" href="../../src/deltae/eq.rs.html#105-109" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.tolerance" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.tolerance" class="fnname">tolerance</a>(self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f32.html">f32</a></h4><a href="#method.tolerance" class="anchor"></a><a class="srclink" href="../../src/deltae/eq.rs.html#106-108" title="goto source code">[src]</a></div></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Tolerance-for-f64" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="trait.Tolerance.html" title="trait deltae::eq::Tolerance">Tolerance</a> for <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a></h3><a href="#impl-Tolerance-for-f64" class="anchor"></a><a class="srclink" href="../../src/deltae/eq.rs.html#111-115" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.tolerance-1" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.tolerance" class="fnname">tolerance</a>(self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f32.html">f32</a></h4><a href="#method.tolerance-1" class="anchor"></a><a class="srclink" href="../../src/deltae/eq.rs.html#112-114" title="goto source code">[src]</a></div></div></details><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Tolerance" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="trait.Tolerance.html" title="trait deltae::eq::Tolerance">Tolerance</a> for <a class="struct" href="../struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a></h3><a href="#impl-Tolerance" class="anchor"></a><a class="srclink" href="../../src/deltae/eq.rs.html#117-121" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.tolerance-2" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.tolerance" class="fnname">tolerance</a>(self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f32.html">f32</a></h4><a href="#method.tolerance-2" class="anchor"></a><a class="srclink" href="../../src/deltae/eq.rs.html#118-120" title="goto source code">[src]</a></div></div></details></div><script type="text/javascript" src="../../implementors/deltae/eq/trait.Tolerance.js" async></script></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="deltae" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html> |
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta http-equiv="refresh" content="0;URL=macro.assert_delta_eq.html"> | ||
| <title>Redirection</title> | ||
| </head> | ||
| <body> | ||
| <p>Redirecting to <a href="macro.assert_delta_eq.html">macro.assert_delta_eq.html</a>...</p> | ||
| <script>location.replace("macro.assert_delta_eq.html" + location.search + location.hash);</script> | ||
| </body> | ||
| </html> |
| <!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="Convenience macro for asserting two values are equivalent within a tolerance"><meta name="keywords" content="rust, rustlang, rust-lang, assert_delta_eq"><title>assert_delta_eq in deltae - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><script src="../crates.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg"> | ||
| <link rel="alternate icon" type="image/png" href="../favicon-16x16.png"> | ||
| <link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc macro"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../deltae/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="index.html">deltae</a></h2><div id="sidebar-vars" data-name="assert_delta_eq" data-ty="macro" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Macro <a href="index.html">deltae</a>::<wbr><a class="macro" href="#">assert_delta_eq</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/deltae/eq.rs.html#90-97" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><div class="example-wrap"><pre class="rust macro"> | ||
| <span class="macro">macro_rules!</span> <span class="ident">assert_delta_eq</span> { | ||
| (<span class="macro-nonterminal">$</span><span class="macro-nonterminal">reference</span>:<span class="ident">expr</span>, <span class="macro-nonterminal">$</span><span class="macro-nonterminal">sample</span>:<span class="ident">expr</span>, <span class="macro-nonterminal">$</span><span class="macro-nonterminal">method</span>:<span class="ident">expr</span>, <span class="macro-nonterminal">$</span><span class="macro-nonterminal">tolerance</span>:<span class="ident">expr</span>) <span class="op">=</span><span class="op">></span> { ... }; | ||
| (<span class="macro-nonterminal">$</span><span class="macro-nonterminal">reference</span>:<span class="ident">expr</span>, <span class="macro-nonterminal">$</span><span class="macro-nonterminal">sample</span>:<span class="ident">expr</span>, <span class="macro-nonterminal">$</span><span class="macro-nonterminal">method</span>:<span class="ident">expr</span>, <span class="macro-nonterminal">$</span><span class="macro-nonterminal">tolerance</span>:<span class="ident">expr</span>, $(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">message</span>:<span class="ident">tt</span>)<span class="kw-2">*</span>) <span class="op">=</span><span class="op">></span> { ... }; | ||
| }</pre></div> | ||
| </div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Convenience macro for asserting two values are equivalent within a tolerance</p> | ||
| <div class="example-wrap"><pre class="rust rust-example-rendered"> | ||
| <span class="kw">use</span> <span class="ident">deltae</span>::<span class="kw-2">*</span>; | ||
| <span class="kw">let</span> <span class="ident">lab0</span> <span class="op">=</span> <span class="ident">LabValue::new</span>(<span class="number">50.0</span>, <span class="number">0.0</span>, <span class="number">0.0</span>).<span class="ident">unwrap</span>(); | ||
| <span class="kw">let</span> <span class="ident">lab1</span> <span class="op">=</span> <span class="ident">LabValue::new</span>(<span class="number">50.1</span>, <span class="number">0.1</span>, <span class="number">0.1</span>).<span class="ident">unwrap</span>(); | ||
| <span class="comment">// Assert that the difference between lab0 and lab1 is less than 1.0 DE2000</span> | ||
| <span class="macro">assert_delta_eq!</span>(<span class="ident">lab0</span>, <span class="ident">lab1</span>, <span class="ident">DE2000</span>, <span class="number">1.0</span>);</pre></div> | ||
| </div></details></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="deltae" data-search-index-js="../search-index.js" data-search-js="../search.js"></div><script src="../main.js"></script></body></html> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
| <?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;"> | ||
| <defs> | ||
| <style type="text/css"><![CDATA[ | ||
| #logo { | ||
| fill-rule: nonzero; | ||
| } | ||
| #logo-teeth { | ||
| stroke: #000000; | ||
| stroke-width: 0.92px; | ||
| } | ||
| @media (prefers-color-scheme: dark) { | ||
| #logo { | ||
| fill: #FFFFFF; | ||
| fill-rule: nonzero; | ||
| } | ||
| #logo-teeth { | ||
| fill: #FFFFFF; | ||
| stroke: #FFFFFF; | ||
| stroke-width: 0.92px; | ||
| } | ||
| } | ||
| ]]></style> | ||
| </defs> | ||
| <path id="logo" d="M15.993,1.54c-7.972,0 -14.461,6.492 -14.461,14.462c0,7.969 6.492,14.461 14.461,14.461c7.97,0 14.462,-6.492 14.462,-14.461c0,-7.97 -6.492,-14.462 -14.462,-14.462Zm-0.021,1.285c0.511,0.013 0.924,0.439 0.924,0.951c0,0.522 -0.43,0.952 -0.952,0.952c-0.522,0 -0.951,-0.43 -0.951,-0.952c0,0 0,0 0,0c0,-0.522 0.429,-0.952 0.951,-0.952c0.01,0 0.019,0.001 0.028,0.001Zm2.178,1.566c3.379,0.633 6.313,2.723 8.016,5.709l-1.123,2.533c-0.193,0.438 0.006,0.952 0.44,1.147l2.16,0.958c0.067,0.675 0.076,1.355 0.025,2.031l-1.202,0c-0.12,0 -0.169,0.08 -0.169,0.196l0,0.551c0,1.297 -0.731,1.582 -1.373,1.652c-0.612,0.07 -1.288,-0.257 -1.374,-0.63c-0.361,-2.029 -0.961,-2.46 -1.909,-3.21c1.178,-0.746 2.401,-1.85 2.401,-3.325c0,-1.594 -1.092,-2.597 -1.835,-3.09c-1.046,-0.688 -2.203,-0.826 -2.515,-0.826l-12.421,0c1.717,-1.918 4.02,-3.218 6.55,-3.696l1.466,1.536c0.33,0.346 0.878,0.361 1.223,0.028l1.64,-1.564Zm-13.522,7.043c0.511,0.015 0.924,0.44 0.924,0.951c0,0.522 -0.43,0.952 -0.952,0.952c-0.522,0 -0.951,-0.43 -0.951,-0.952c0,0 0,0 0,0c0,-0.522 0.429,-0.951 0.951,-0.951c0.009,0 0.019,0 0.028,0Zm22.685,0.043c0.511,0.015 0.924,0.44 0.924,0.951c0,0.522 -0.43,0.952 -0.952,0.952c-0.522,0 -0.951,-0.43 -0.951,-0.952c0,0 0,0 0,0c0,-0.522 0.429,-0.952 0.951,-0.952c0.01,0 0.019,0 0.028,0.001Zm-20.892,0.153l1.658,0l0,7.477l-3.347,0c-0.414,-1.452 -0.542,-2.97 -0.38,-4.47l2.05,-0.912c0.438,-0.195 0.637,-0.706 0.441,-1.144l-0.422,-0.951Zm6.92,0.079l3.949,0c0.205,0 1.441,0.236 1.441,1.163c0,0.768 -0.948,1.043 -1.728,1.043l-3.665,0l0.003,-2.206Zm0,5.373l3.026,0c0.275,0 1.477,0.079 1.86,1.615c0.119,0.471 0.385,2.007 0.566,2.499c0.18,0.551 0.911,1.652 1.691,1.652l4.938,0c-0.331,0.444 -0.693,0.863 -1.083,1.255l-2.01,-0.432c-0.468,-0.101 -0.93,0.199 -1.031,0.667l-0.477,2.228c-3.104,1.406 -6.672,1.389 -9.762,-0.046l-0.478,-2.228c-0.101,-0.468 -0.56,-0.767 -1.028,-0.667l-1.967,0.423c-0.365,-0.377 -0.704,-0.778 -1.016,-1.2l9.567,0c0.107,0 0.181,-0.018 0.181,-0.119l0,-3.384c0,-0.097 -0.074,-0.119 -0.181,-0.119l-2.799,0l0.003,-2.144Zm-4.415,7.749c0.512,0.015 0.924,0.44 0.924,0.951c0,0.522 -0.429,0.952 -0.951,0.952c-0.522,0 -0.952,-0.43 -0.952,-0.952c0,0 0,0 0,0c0,-0.522 0.43,-0.952 0.952,-0.952c0.009,0 0.018,0.001 0.027,0.001Zm14.089,0.043c0.511,0.015 0.924,0.439 0.923,0.951c0,0.522 -0.429,0.952 -0.951,0.952c-0.522,0 -0.951,-0.43 -0.951,-0.952c0,0 0,0 0,0c0,-0.522 0.429,-0.952 0.951,-0.952c0.009,0 0.018,0 0.028,0.001Z"/><path id="logo-teeth" d="M29.647,16.002c0,7.49 -6.163,13.653 -13.654,13.653c-7.49,0 -13.654,-6.163 -13.654,-13.653c0,-7.491 6.164,-13.654 13.654,-13.654c7.491,0 13.654,6.163 13.654,13.654Zm-0.257,-1.319l2.13,1.319l-2.13,1.318l1.83,1.71l-2.344,0.878l1.463,2.035l-2.475,0.404l1.04,2.282l-2.506,-0.089l0.575,2.442l-2.441,-0.576l0.089,2.506l-2.283,-1.04l-0.403,2.475l-2.035,-1.462l-0.878,2.343l-1.71,-1.829l-1.319,2.129l-1.318,-2.129l-1.71,1.829l-0.878,-2.343l-2.035,1.462l-0.404,-2.475l-2.282,1.04l0.089,-2.506l-2.442,0.576l0.575,-2.442l-2.505,0.089l1.04,-2.282l-2.475,-0.404l1.462,-2.035l-2.343,-0.878l1.829,-1.71l-2.129,-1.318l2.129,-1.319l-1.829,-1.71l2.343,-0.878l-1.462,-2.035l2.475,-0.404l-1.04,-2.282l2.505,0.089l-0.575,-2.441l2.442,0.575l-0.089,-2.506l2.282,1.04l0.404,-2.475l2.035,1.463l0.878,-2.344l1.71,1.83l1.318,-2.13l1.319,2.13l1.71,-1.83l0.878,2.344l2.035,-1.463l0.403,2.475l2.283,-1.04l-0.089,2.506l2.441,-0.575l-0.575,2.441l2.506,-0.089l-1.04,2.282l2.475,0.404l-1.463,2.035l2.344,0.878l-1.83,1.71Z"/></svg> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
| (function() {var implementors = {}; | ||
| implementors["deltae"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.StructuralPartialEq.html\" title=\"trait core::marker::StructuralPartialEq\">StructuralPartialEq</a> for <a class=\"struct\" href=\"deltae/color/struct.LabValue.html\" title=\"struct deltae::color::LabValue\">LabValue</a>","synthetic":false,"types":["deltae::color::LabValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.StructuralPartialEq.html\" title=\"trait core::marker::StructuralPartialEq\">StructuralPartialEq</a> for <a class=\"struct\" href=\"deltae/color/struct.LchValue.html\" title=\"struct deltae::color::LchValue\">LchValue</a>","synthetic":false,"types":["deltae::color::LchValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.StructuralPartialEq.html\" title=\"trait core::marker::StructuralPartialEq\">StructuralPartialEq</a> for <a class=\"struct\" href=\"deltae/color/struct.XyzValue.html\" title=\"struct deltae::color::XyzValue\">XyzValue</a>","synthetic":false,"types":["deltae::color::XyzValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.StructuralPartialEq.html\" title=\"trait core::marker::StructuralPartialEq\">StructuralPartialEq</a> for <a class=\"enum\" href=\"deltae/enum.DEMethod.html\" title=\"enum deltae::DEMethod\">DEMethod</a>","synthetic":false,"types":["deltae::DEMethod"]}]; | ||
| if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() |
| (function() {var implementors = {}; | ||
| implementors["deltae"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/str/traits/trait.FromStr.html\" title=\"trait core::str::traits::FromStr\">FromStr</a> for <a class=\"enum\" href=\"deltae/enum.DEMethod.html\" title=\"enum deltae::DEMethod\">DEMethod</a>","synthetic":false,"types":["deltae::DEMethod"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/str/traits/trait.FromStr.html\" title=\"trait core::str::traits::FromStr\">FromStr</a> for <a class=\"struct\" href=\"deltae/color/struct.LabValue.html\" title=\"struct deltae::color::LabValue\">LabValue</a>","synthetic":false,"types":["deltae::color::LabValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/str/traits/trait.FromStr.html\" title=\"trait core::str::traits::FromStr\">FromStr</a> for <a class=\"struct\" href=\"deltae/color/struct.LchValue.html\" title=\"struct deltae::color::LchValue\">LchValue</a>","synthetic":false,"types":["deltae::color::LchValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/str/traits/trait.FromStr.html\" title=\"trait core::str::traits::FromStr\">FromStr</a> for <a class=\"struct\" href=\"deltae/color/struct.XyzValue.html\" title=\"struct deltae::color::XyzValue\">XyzValue</a>","synthetic":false,"types":["deltae::color::XyzValue"]}]; | ||
| if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() |
| (function() {var implementors = {}; | ||
| implementors["deltae"] = []; | ||
| if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() |
| (function() {var implementors = {}; | ||
| implementors["deltae"] = []; | ||
| if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() |
| Copyright 2014, 2015 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. | ||
| This Font Software is licensed under the SIL Open Font License, Version 1.1. | ||
| This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL | ||
| ----------------------------------------------------------- | ||
| SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 | ||
| ----------------------------------------------------------- | ||
| PREAMBLE | ||
| The goals of the Open Font License (OFL) are to stimulate worldwide | ||
| development of collaborative font projects, to support the font creation | ||
| efforts of academic and linguistic communities, and to provide a free and | ||
| open framework in which fonts may be shared and improved in partnership | ||
| with others. | ||
| The OFL allows the licensed fonts to be used, studied, modified and | ||
| redistributed freely as long as they are not sold by themselves. The | ||
| fonts, including any derivative works, can be bundled, embedded, | ||
| redistributed and/or sold with any software provided that any reserved | ||
| names are not used by derivative works. The fonts and derivatives, | ||
| however, cannot be released under any other type of license. The | ||
| requirement for fonts to remain under this license does not apply | ||
| to any document created using the fonts or their derivatives. | ||
| DEFINITIONS | ||
| "Font Software" refers to the set of files released by the Copyright | ||
| Holder(s) under this license and clearly marked as such. This may | ||
| include source files, build scripts and documentation. | ||
| "Reserved Font Name" refers to any names specified as such after the | ||
| copyright statement(s). | ||
| "Original Version" refers to the collection of Font Software components as | ||
| distributed by the Copyright Holder(s). | ||
| "Modified Version" refers to any derivative made by adding to, deleting, | ||
| or substituting -- in part or in whole -- any of the components of the | ||
| Original Version, by changing formats or by porting the Font Software to a | ||
| new environment. | ||
| "Author" refers to any designer, engineer, programmer, technical | ||
| writer or other person who contributed to the Font Software. | ||
| PERMISSION & CONDITIONS | ||
| Permission is hereby granted, free of charge, to any person obtaining | ||
| a copy of the Font Software, to use, study, copy, merge, embed, modify, | ||
| redistribute, and sell modified and unmodified copies of the Font | ||
| Software, subject to the following conditions: | ||
| 1) Neither the Font Software nor any of its individual components, | ||
| in Original or Modified Versions, may be sold by itself. | ||
| 2) Original or Modified Versions of the Font Software may be bundled, | ||
| redistributed and/or sold with any software, provided that each copy | ||
| contains the above copyright notice and this license. These can be | ||
| included either as stand-alone text files, human-readable headers or | ||
| in the appropriate machine-readable metadata fields within text or | ||
| binary files as long as those fields can be easily viewed by the user. | ||
| 3) No Modified Version of the Font Software may use the Reserved Font | ||
| Name(s) unless explicit written permission is granted by the corresponding | ||
| Copyright Holder. This restriction only applies to the primary font name as | ||
| presented to the users. | ||
| 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font | ||
| Software shall not be used to promote, endorse or advertise any | ||
| Modified Version, except to acknowledge the contribution(s) of the | ||
| Copyright Holder(s) and the Author(s) or with their explicit written | ||
| permission. | ||
| 5) The Font Software, modified or unmodified, in part or in whole, | ||
| must be distributed entirely under this license, and must not be | ||
| distributed under any other license. The requirement for fonts to | ||
| remain under this license does not apply to any document created | ||
| using the Font Software. | ||
| TERMINATION | ||
| This license becomes null and void if any of the above conditions are | ||
| not met. | ||
| DISCLAIMER | ||
| THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF | ||
| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT | ||
| OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE | ||
| COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
| INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL | ||
| DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
| FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM | ||
| OTHER DEALINGS IN THE FONT SOFTWARE. |
Sorry, the diff of this file is not supported yet
| (function(){var itemTypes=["mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","primitive","associatedtype","constant","associatedconstant","union","foreigntype","keyword","existential","attr","derive","traitalias"];var TY_PRIMITIVE=itemTypes.indexOf("primitive");var TY_KEYWORD=itemTypes.indexOf("keyword");function printTab(nb){if(nb===0||nb===1||nb===2){searchState.currentTab=nb}var nb_copy=nb;onEachLazy(document.getElementById("titles").childNodes,function(elem){if(nb_copy===0){addClass(elem,"selected")}else{removeClass(elem,"selected")}nb_copy-=1});onEachLazy(document.getElementById("results").childNodes,function(elem){if(nb===0){addClass(elem,"active")}else{removeClass(elem,"active")}nb-=1})}function removeEmptyStringsFromArray(x){for(var i=0,len=x.length;i<len;++i){if(x[i]===""){x.splice(i,1);i-=1}}}var levenshtein_row2=[];function levenshtein(s1,s2){if(s1===s2){return 0}var s1_len=s1.length,s2_len=s2.length;if(s1_len&&s2_len){var i1=0,i2=0,a,b,c,c2,row=levenshtein_row2;while(i1<s1_len){row[i1]=++i1}while(i2<s2_len){c2=s2.charCodeAt(i2);a=i2;++i2;b=i2;for(i1=0;i1<s1_len;++i1){c=a+(s1.charCodeAt(i1)!==c2?1:0);a=row[i1];b=b<a?(b<c?b+1:c):(a<c?a+1:c);row[i1]=b}}return b}return s1_len+s2_len}window.initSearch=function(rawSearchIndex){var MAX_LEV_DISTANCE=3;var MAX_RESULTS=200;var GENERICS_DATA=1;var NAME=0;var INPUTS_DATA=0;var OUTPUT_DATA=1;var NO_TYPE_FILTER=-1;var currentResults,index,searchIndex;var ALIASES={};var params=searchState.getQueryStringParams();if(searchState.input.value===""){searchState.input.value=params.search||""}function execQuery(query,searchWords,filterCrates){function itemTypeFromName(typename){for(var i=0,len=itemTypes.length;i<len;++i){if(itemTypes[i]===typename){return i}}return NO_TYPE_FILTER}var valLower=query.query.toLowerCase(),val=valLower,typeFilter=itemTypeFromName(query.type),results={},results_in_args={},results_returned={},split=valLower.split("::");removeEmptyStringsFromArray(split);function transformResults(results){var out=[];for(var i=0,len=results.length;i<len;++i){if(results[i].id>-1){var obj=searchIndex[results[i].id];obj.lev=results[i].lev;var res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=obj.displayPath+obj.name;obj.fullPath+="|"+obj.ty;obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}return out}function sortResults(results,isType){var ar=[];for(var entry in results){if(hasOwnPropertyRustdoc(results,entry)){ar.push(results[entry])}}results=ar;var i,len,result;for(i=0,len=results.length;i<len;++i){result=results[i];result.word=searchWords[result.id];result.item=searchIndex[result.id]||{}}if(results.length===0){return[]}results.sort(function(aaa,bbb){var a,b;a=(aaa.word!==val);b=(bbb.word!==val);if(a!==b){return a-b}a=(aaa.lev);b=(bbb.lev);if(a!==b){return a-b}a=(aaa.item.crate!==window.currentCrate);b=(bbb.item.crate!==window.currentCrate);if(a!==b){return a-b}a=aaa.word.length;b=bbb.word.length;if(a!==b){return a-b}a=aaa.word;b=bbb.word;if(a!==b){return(a>b?+1:-1)}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}if((aaa.item.ty===TY_PRIMITIVE&&bbb.item.ty!==TY_KEYWORD)||(aaa.item.ty===TY_KEYWORD&&bbb.item.ty!==TY_PRIMITIVE)){return-1}if((bbb.item.ty===TY_PRIMITIVE&&aaa.item.ty!==TY_PRIMITIVE)||(bbb.item.ty===TY_KEYWORD&&aaa.item.ty!==TY_KEYWORD)){return 1}a=(aaa.item.desc==="");b=(bbb.item.desc==="");if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});for(i=0,len=results.length;i<len;++i){result=results[i];if(result.dontValidate){continue}var name=result.item.name.toLowerCase(),path=result.item.path.toLowerCase(),parent=result.item.parent;if(!isType&&!validateResult(name,path,split,parent)){result.id=-1}}return transformResults(results)}function extractGenerics(val){val=val.toLowerCase();if(val.indexOf("<")!==-1){var values=val.substring(val.indexOf("<")+1,val.lastIndexOf(">"));return{name:val.substring(0,val.indexOf("<")),generics:values.split(/\s*,\s*/),}}return{name:val,generics:[],}}function getObjectNameFromId(id){if(typeof id==="number"){return searchIndex[id].name}return id}function checkGenerics(obj,val){var tmp_lev,elem_name;if(val.generics.length>0){if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>=val.generics.length){var elems=Object.create(null);var elength=obj[GENERICS_DATA].length;for(var x=0;x<elength;++x){elems[getObjectNameFromId(obj[GENERICS_DATA][x])]+=1}var total=0;var done=0;var vlength=val.generics.length;for(x=0;x<vlength;++x){var lev=MAX_LEV_DISTANCE+1;var firstGeneric=getObjectNameFromId(val.generics[x]);var match=null;if(elems[firstGeneric]){match=firstGeneric;lev=0}else{for(elem_name in elems){tmp_lev=levenshtein(elem_name,firstGeneric);if(tmp_lev<lev){lev=tmp_lev;match=elem_name}}}if(match!==null){elems[match]-=1;if(elems[match]==0){delete elems[match]}total+=lev;done+=1}else{return MAX_LEV_DISTANCE+1}}return Math.ceil(total/done)}}return MAX_LEV_DISTANCE+1}function checkType(obj,val,literalSearch){var lev_distance=MAX_LEV_DISTANCE+1;var len,x,firstGeneric;if(obj[NAME]===val.name){if(literalSearch){if(val.generics&&val.generics.length!==0){if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>=val.generics.length){var elems=Object.create(null);len=obj[GENERICS_DATA].length;for(x=0;x<len;++x){elems[getObjectNameFromId(obj[GENERICS_DATA][x])]+=1}var allFound=true;len=val.generics.length;for(x=0;x<len;++x){firstGeneric=getObjectNameFromId(val.generics[x]);if(elems[firstGeneric]){elems[firstGeneric]-=1}else{allFound=false;break}}if(allFound){return true}}else{return false}}return true}if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length!==0){var tmp_lev=checkGenerics(obj,val);if(tmp_lev<=MAX_LEV_DISTANCE){return tmp_lev}}else{return 0}}if(literalSearch){if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>0){return obj[GENERICS_DATA].some(function(name){return name===val.name})}return false}lev_distance=Math.min(levenshtein(obj[NAME],val.name),lev_distance);if(lev_distance<=MAX_LEV_DISTANCE){lev_distance=Math.ceil((checkGenerics(obj,val)+lev_distance)/2)}else if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>0){var olength=obj[GENERICS_DATA].length;for(x=0;x<olength;++x){lev_distance=Math.min(levenshtein(obj[GENERICS_DATA][x],val.name),lev_distance)}}return lev_distance+1}function findArg(obj,val,literalSearch,typeFilter){var lev_distance=MAX_LEV_DISTANCE+1;if(obj&&obj.type&&obj.type[INPUTS_DATA]&&obj.type[INPUTS_DATA].length>0){var length=obj.type[INPUTS_DATA].length;for(var i=0;i<length;i++){var tmp=obj.type[INPUTS_DATA][i];if(!typePassesFilter(typeFilter,tmp[1])){continue}tmp=checkType(tmp,val,literalSearch);if(literalSearch){if(tmp){return true}continue}lev_distance=Math.min(tmp,lev_distance);if(lev_distance===0){return 0}}}return literalSearch?false:lev_distance}function checkReturned(obj,val,literalSearch,typeFilter){var lev_distance=MAX_LEV_DISTANCE+1;if(obj&&obj.type&&obj.type.length>OUTPUT_DATA){var ret=obj.type[OUTPUT_DATA];if(typeof ret[0]==="string"){ret=[ret]}for(var x=0,len=ret.length;x<len;++x){var tmp=ret[x];if(!typePassesFilter(typeFilter,tmp[1])){continue}tmp=checkType(tmp,val,literalSearch);if(literalSearch){if(tmp){return true}continue}lev_distance=Math.min(tmp,lev_distance);if(lev_distance===0){return 0}}}return literalSearch?false:lev_distance}function checkPath(contains,lastElem,ty){if(contains.length===0){return 0}var ret_lev=MAX_LEV_DISTANCE+1;var path=ty.path.split("::");if(ty.parent&&ty.parent.name){path.push(ty.parent.name.toLowerCase())}var length=path.length;var clength=contains.length;if(clength>length){return MAX_LEV_DISTANCE+1}for(var i=0;i<length;++i){if(i+clength>length){break}var lev_total=0;var aborted=false;for(var x=0;x<clength;++x){var lev=levenshtein(path[i+x],contains[x]);if(lev>MAX_LEV_DISTANCE){aborted=true;break}lev_total+=lev}if(!aborted){ret_lev=Math.min(ret_lev,Math.round(lev_total/clength))}}return ret_lev}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER)return true;if(filter===type)return true;var name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,desc:item.desc,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,}}function handleAliases(ret,query,filterCrates){var aliases=[];var crateAliases=[];if(filterCrates!==undefined){if(ALIASES[filterCrates]&&ALIASES[filterCrates][query.search]){var query_aliases=ALIASES[filterCrates][query.search];var len=query_aliases.length;for(var i=0;i<len;++i){aliases.push(createAliasFromItem(searchIndex[query_aliases[i]]))}}}else{Object.keys(ALIASES).forEach(function(crate){if(ALIASES[crate][query.search]){var pushTo=crate===window.currentCrate?crateAliases:aliases;var query_aliases=ALIASES[crate][query.search];var len=query_aliases.length;for(var i=0;i<len;++i){pushTo.push(createAliasFromItem(searchIndex[query_aliases[i]]))}}})}var sortFunc=function(aaa,bbb){if(aaa.path<bbb.path){return 1}else if(aaa.path===bbb.path){return 0}return-1};crateAliases.sort(sortFunc);aliases.sort(sortFunc);var pushFunc=function(alias){alias.alias=query.raw;var res=buildHrefAndPath(alias);alias.displayPath=pathSplitter(res[0]);alias.fullPath=alias.displayPath+alias.name;alias.href=res[1];ret.others.unshift(alias);if(ret.others.length>MAX_RESULTS){ret.others.pop()}};onEach(aliases,pushFunc);onEach(crateAliases,pushFunc)}var nSearchWords=searchWords.length;var i,it;var ty;var fullId;var returned;var in_args;var len;if((val.charAt(0)==="\""||val.charAt(0)==="'")&&val.charAt(val.length-1)===val.charAt(0)){val=extractGenerics(val.substr(1,val.length-2));for(i=0;i<nSearchWords;++i){if(filterCrates!==undefined&&searchIndex[i].crate!==filterCrates){continue}in_args=findArg(searchIndex[i],val,true,typeFilter);returned=checkReturned(searchIndex[i],val,true,typeFilter);ty=searchIndex[i];fullId=ty.id;if(searchWords[i]===val.name&&typePassesFilter(typeFilter,searchIndex[i].ty)&&results[fullId]===undefined){results[fullId]={id:i,index:-1,dontValidate:true,}}if(in_args&&results_in_args[fullId]===undefined){results_in_args[fullId]={id:i,index:-1,dontValidate:true,}}if(returned&&results_returned[fullId]===undefined){results_returned[fullId]={id:i,index:-1,dontValidate:true,}}}query.inputs=[val];query.output=val;query.search=val}else if(val.search("->")>-1){var trimmer=function(s){return s.trim()};var parts=val.split("->").map(trimmer);var input=parts[0];var inputs=input.split(",").map(trimmer).sort();for(i=0,len=inputs.length;i<len;++i){inputs[i]=extractGenerics(inputs[i])}var output=extractGenerics(parts[1]);for(i=0;i<nSearchWords;++i){if(filterCrates!==undefined&&searchIndex[i].crate!==filterCrates){continue}var type=searchIndex[i].type;ty=searchIndex[i];if(!type){continue}fullId=ty.id;returned=checkReturned(ty,output,true,NO_TYPE_FILTER);if(output.name==="*"||returned){in_args=false;var is_module=false;if(input==="*"){is_module=true}else{var allFound=true;for(it=0,len=inputs.length;allFound&&it<len;it++){allFound=checkType(type,inputs[it],true)}in_args=allFound}if(in_args){results_in_args[fullId]={id:i,index:-1,dontValidate:true,}}if(returned){results_returned[fullId]={id:i,index:-1,dontValidate:true,}}if(is_module){results[fullId]={id:i,index:-1,dontValidate:true,}}}}query.inputs=inputs.map(function(input){return input.name});query.output=output.name}else{query.inputs=[val];query.output=val;query.search=val;val=val.replace(/_/g,"");var valGenerics=extractGenerics(val);var paths=valLower.split("::");removeEmptyStringsFromArray(paths);val=paths[paths.length-1];var contains=paths.slice(0,paths.length>1?paths.length-1:1);var lev,j;for(j=0;j<nSearchWords;++j){ty=searchIndex[j];if(!ty||(filterCrates!==undefined&&ty.crate!==filterCrates)){continue}var lev_add=0;if(paths.length>1){lev=checkPath(contains,paths[paths.length-1],ty);if(lev>MAX_LEV_DISTANCE){continue}else if(lev>0){lev_add=lev/10}}returned=MAX_LEV_DISTANCE+1;in_args=MAX_LEV_DISTANCE+1;var index=-1;lev=MAX_LEV_DISTANCE+1;fullId=ty.id;if(searchWords[j].indexOf(split[i])>-1||searchWords[j].indexOf(val)>-1||ty.normalizedName.indexOf(val)>-1){if(typePassesFilter(typeFilter,ty.ty)&&results[fullId]===undefined){index=ty.normalizedName.indexOf(val)}}if((lev=levenshtein(searchWords[j],val))<=MAX_LEV_DISTANCE){if(typePassesFilter(typeFilter,ty.ty)){lev+=1}else{lev=MAX_LEV_DISTANCE+1}}in_args=findArg(ty,valGenerics,false,typeFilter);returned=checkReturned(ty,valGenerics,false,typeFilter);lev+=lev_add;if(lev>0&&val.length>3&&searchWords[j].indexOf(val)>-1){if(val.length<6){lev-=1}else{lev=0}}if(in_args<=MAX_LEV_DISTANCE){if(results_in_args[fullId]===undefined){results_in_args[fullId]={id:j,index:index,lev:in_args,}}results_in_args[fullId].lev=Math.min(results_in_args[fullId].lev,in_args)}if(returned<=MAX_LEV_DISTANCE){if(results_returned[fullId]===undefined){results_returned[fullId]={id:j,index:index,lev:returned,}}results_returned[fullId].lev=Math.min(results_returned[fullId].lev,returned)}if(index!==-1||lev<=MAX_LEV_DISTANCE){if(index!==-1&&paths.length<2){lev=0}if(results[fullId]===undefined){results[fullId]={id:j,index:index,lev:lev,}}results[fullId].lev=Math.min(results[fullId].lev,lev)}}}var ret={"in_args":sortResults(results_in_args,true),"returned":sortResults(results_returned,true),"others":sortResults(results,false),};handleAliases(ret,query,filterCrates);return ret}function validateResult(name,path,keys,parent){for(var i=0,len=keys.length;i<len;++i){if(!(name.indexOf(keys[i])>-1||path.indexOf(keys[i])>-1||(parent!==undefined&&parent.name!==undefined&&parent.name.toLowerCase().indexOf(keys[i])>-1)||levenshtein(name,keys[i])<=MAX_LEV_DISTANCE)){return false}}return true}function getQuery(raw){var matches,type,query;query=raw;matches=query.match(/^(fn|mod|struct|enum|trait|type|const|macro)\s*:\s*/i);if(matches){type=matches[1].replace(/^const$/,"constant");query=query.substring(matches[0].length)}return{raw:raw,query:query,type:type,id:query+type}}function nextTab(direction){var next=(searchState.currentTab+direction+3)%searchState.focusedByTab.length;searchState.focusedByTab[searchState.currentTab]=document.activeElement;printTab(next);focusSearchResult()}function focusSearchResult(){var target=searchState.focusedByTab[searchState.currentTab]||document.querySelectorAll(".search-results.active a").item(0)||document.querySelectorAll("#titles > button").item(searchState.currentTab);if(target){target.focus()}}function buildHrefAndPath(item){var displayPath;var href;var type=itemTypes[item.ty];var name=item.name;var path=item.path;if(type==="mod"){displayPath=path+"::";href=window.rootPath+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="primitive"||type==="keyword"){displayPath="";href=window.rootPath+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=window.rootPath+name+"/index.html"}else if(item.parent!==undefined){var myparent=item.parent;var anchor="#"+type+"."+name;var parentType=itemTypes[myparent.ty];var pageType=parentType;var pageName=myparent.name;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){var enumNameIdx=item.path.lastIndexOf("::");var enumName=item.path.substr(enumNameIdx+2);path=item.path.substr(0,enumNameIdx);displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="#variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}href=window.rootPath+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html"+anchor}else{displayPath=item.path+"::";href=window.rootPath+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href]}function escape(content){var h1=document.createElement("h1");h1.textContent=content;return h1.innerHTML}function pathSplitter(path){var tmp="<span>"+path.replace(/::/g,"::</span><span>");if(tmp.endsWith("<span>")){return tmp.slice(0,tmp.length-6)}return tmp}function addTab(array,query,display){var extraClass="";if(display===true){extraClass=" active"}var output=document.createElement("div");var duplicates={};var length=0;if(array.length>0){output.className="search-results "+extraClass;array.forEach(function(item){if(item.is_alias!==true){if(duplicates[item.fullPath]){return}duplicates[item.fullPath]=true}var name=item.name;var type=itemTypes[item.ty];length+=1;var extra="";if(type==="primitive"){extra=" <i>(primitive type)</i>"}else if(type==="keyword"){extra=" <i>(keyword)</i>"}var link=document.createElement("a");link.className="result-"+type;link.href=item.href;var wrapper=document.createElement("div");var resultName=document.createElement("div");resultName.className="result-name";if(item.is_alias){var alias=document.createElement("span");alias.className="alias";var bold=document.createElement("b");bold.innerText=item.alias;alias.appendChild(bold);alias.insertAdjacentHTML("beforeend","<span class=\"grey\"><i> - see </i></span>");resultName.appendChild(alias)}resultName.insertAdjacentHTML("beforeend",item.displayPath+"<span class=\""+type+"\">"+name+extra+"</span>");wrapper.appendChild(resultName);var description=document.createElement("div");description.className="desc";var spanDesc=document.createElement("span");spanDesc.insertAdjacentHTML("beforeend",item.desc);description.appendChild(spanDesc);wrapper.appendChild(description);link.appendChild(wrapper);output.appendChild(link)})}else{output.className="search-failed"+extraClass;output.innerHTML="No results :(<br/>"+"Try on <a href=\"https://duckduckgo.com/?q="+encodeURIComponent("rust "+query.query)+"\">DuckDuckGo</a>?<br/><br/>"+"Or try looking in one of these:<ul><li>The <a "+"href=\"https://doc.rust-lang.org/reference/index.html\">Rust Reference</a> "+" for technical details about the language.</li><li><a "+"href=\"https://doc.rust-lang.org/rust-by-example/index.html\">Rust By "+"Example</a> for expository code examples.</a></li><li>The <a "+"href=\"https://doc.rust-lang.org/book/index.html\">Rust Book</a> for "+"introductions to language features and the language itself.</li><li><a "+"href=\"https://docs.rs\">Docs.rs</a> for documentation of crates released on"+" <a href=\"https://crates.io/\">crates.io</a>.</li></ul>"}return[output,length]}function makeTabHeader(tabNb,text,nbElems){if(searchState.currentTab===tabNb){return"<button class=\"selected\">"+text+" <div class=\"count\">("+nbElems+")</div></button>"}return"<button>"+text+" <div class=\"count\">("+nbElems+")</div></button>"}function showResults(results){var search=searchState.outputElement();if(results.others.length===1&&getSettingValue("go-to-only-result")==="true"&&(!search.firstChild||search.firstChild.innerText!==searchState.loadingText)){var elem=document.createElement("a");elem.href=results.others[0].href;removeClass(elem,"active");document.body.appendChild(elem);elem.click();return}var query=getQuery(searchState.input.value);currentResults=query.id;var ret_others=addTab(results.others,query);var ret_in_args=addTab(results.in_args,query,false);var ret_returned=addTab(results.returned,query,false);var currentTab=searchState.currentTab;if((currentTab===0&&ret_others[1]===0)||(currentTab===1&&ret_in_args[1]===0)||(currentTab===2&&ret_returned[1]===0)){if(ret_others[1]!==0){currentTab=0}else if(ret_in_args[1]!==0){currentTab=1}else if(ret_returned[1]!==0){currentTab=2}}var output="<h1>Results for "+escape(query.query)+(query.type?" (type: "+escape(query.type)+")":"")+"</h1>"+"<div id=\"titles\">"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"</div>";var resultsElem=document.createElement("div");resultsElem.id="results";resultsElem.appendChild(ret_others[0]);resultsElem.appendChild(ret_in_args[0]);resultsElem.appendChild(ret_returned[0]);search.innerHTML=output;search.appendChild(resultsElem);searchState.focusedByTab=[null,null,null];searchState.showResults(search);var elems=document.getElementById("titles").childNodes;elems[0].onclick=function(){printTab(0)};elems[1].onclick=function(){printTab(1)};elems[2].onclick=function(){printTab(2)};printTab(currentTab)}function execSearch(query,searchWords,filterCrates){function getSmallest(arrays,positions,notDuplicates){var start=null;for(var it=0,len=positions.length;it<len;++it){if(arrays[it].length>positions[it]&&(start===null||start>arrays[it][positions[it]].lev)&&!notDuplicates[arrays[it][positions[it]].fullPath]){start=arrays[it][positions[it]].lev}}return start}function mergeArrays(arrays){var ret=[];var positions=[];var notDuplicates={};for(var x=0,arrays_len=arrays.length;x<arrays_len;++x){positions.push(0)}while(ret.length<MAX_RESULTS){var smallest=getSmallest(arrays,positions,notDuplicates);if(smallest===null){break}for(x=0;x<arrays_len&&ret.length<MAX_RESULTS;++x){if(arrays[x].length>positions[x]&&arrays[x][positions[x]].lev===smallest&&!notDuplicates[arrays[x][positions[x]].fullPath]){ret.push(arrays[x][positions[x]]);notDuplicates[arrays[x][positions[x]].fullPath]=true;positions[x]+=1}}}return ret}var queries=query.raw.split(",");var results={"in_args":[],"returned":[],"others":[],};for(var i=0,len=queries.length;i<len;++i){query=queries[i].trim();if(query.length!==0){var tmp=execQuery(getQuery(query),searchWords,filterCrates);results.in_args.push(tmp.in_args);results.returned.push(tmp.returned);results.others.push(tmp.others)}}if(queries.length>1){return{"in_args":mergeArrays(results.in_args),"returned":mergeArrays(results.returned),"others":mergeArrays(results.others),}}return{"in_args":results.in_args[0],"returned":results.returned[0],"others":results.others[0],}}function getFilterCrates(){var elem=document.getElementById("crate-search");if(elem&&elem.value!=="All crates"&&hasOwnPropertyRustdoc(rawSearchIndex,elem.value)){return elem.value}return undefined}function search(e,forced){var params=searchState.getQueryStringParams();var query=getQuery(searchState.input.value.trim());if(e){e.preventDefault()}if(query.query.length===0){return}if(!forced&&query.id===currentResults){if(query.query.length>0){searchState.putBackSearch(searchState.input)}return}searchState.title="Results for "+query.query+" - Rust";if(searchState.browserSupportsHistoryApi()){var newURL=getNakedUrl()+"?search="+encodeURIComponent(query.raw)+window.location.hash;if(!history.state&&!params.search){history.pushState(query,"",newURL)}else{history.replaceState(query,"",newURL)}}var filterCrates=getFilterCrates();showResults(execSearch(query,index,filterCrates))}function buildIndex(rawSearchIndex){searchIndex=[];var searchWords=[];var i,word;var currentIndex=0;var id=0;for(var crate in rawSearchIndex){if(!hasOwnPropertyRustdoc(rawSearchIndex,crate)){continue}var crateSize=0;searchWords.push(crate);var crateRow={crate:crate,ty:1,name:crate,path:"",desc:rawSearchIndex[crate].doc,parent:undefined,type:null,id:id,normalizedName:crate.indexOf("_")===-1?crate:crate.replace(/_/g,""),};id+=1;searchIndex.push(crateRow);currentIndex+=1;var itemTypes=rawSearchIndex[crate].t;var itemNames=rawSearchIndex[crate].n;var itemPaths=rawSearchIndex[crate].q;var itemDescs=rawSearchIndex[crate].d;var itemParentIdxs=rawSearchIndex[crate].i;var itemFunctionSearchTypes=rawSearchIndex[crate].f;var paths=rawSearchIndex[crate].p;var aliases=rawSearchIndex[crate].a;var len=paths.length;for(i=0;i<len;++i){paths[i]={ty:paths[i][0],name:paths[i][1]}}len=itemTypes.length;var lastPath="";for(i=0;i<len;++i){if(typeof itemNames[i]==="string"){word=itemNames[i].toLowerCase();searchWords.push(word)}else{word="";searchWords.push("")}var row={crate:crate,ty:itemTypes[i],name:itemNames[i],path:itemPaths[i]?itemPaths[i]:lastPath,desc:itemDescs[i],parent:itemParentIdxs[i]>0?paths[itemParentIdxs[i]-1]:undefined,type:itemFunctionSearchTypes[i],id:id,normalizedName:word.indexOf("_")===-1?word:word.replace(/_/g,""),};id+=1;searchIndex.push(row);lastPath=row.path;crateSize+=1}if(aliases){ALIASES[crate]={};var j,local_aliases;for(var alias_name in aliases){if(!hasOwnPropertyRustdoc(aliases,alias_name)){continue}if(!hasOwnPropertyRustdoc(ALIASES[crate],alias_name)){ALIASES[crate][alias_name]=[]}local_aliases=aliases[alias_name];for(j=0,len=local_aliases.length;j<len;++j){ALIASES[crate][alias_name].push(local_aliases[j]+currentIndex)}}}currentIndex+=crateSize}return searchWords}function registerSearchEvents(){var searchAfter500ms=function(){searchState.clearInputTimeout();if(searchState.input.value.length===0){if(searchState.browserSupportsHistoryApi()){history.replaceState("",window.currentCrate+" - Rust",getNakedUrl()+window.location.hash)}searchState.hideResults()}else{searchState.timeout=setTimeout(search,500)}};searchState.input.onkeyup=searchAfter500ms;searchState.input.oninput=searchAfter500ms;document.getElementsByClassName("search-form")[0].onsubmit=function(e){e.preventDefault();searchState.clearInputTimeout();search()};searchState.input.onchange=function(e){if(e.target!==document.activeElement){return}searchState.clearInputTimeout();setTimeout(search,0)};searchState.input.onpaste=searchState.input.onchange;searchState.outputElement().addEventListener("keydown",function(e){if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey){return}if(e.which===38){var previous=document.activeElement.previousElementSibling;if(previous){previous.focus()}else{searchState.focus()}e.preventDefault()}else if(e.which===40){var next=document.activeElement.nextElementSibling;if(next){next.focus()}var rect=document.activeElement.getBoundingClientRect();if(window.innerHeight-rect.bottom<rect.height){window.scrollBy(0,rect.height)}e.preventDefault()}else if(e.which===37){nextTab(-1);e.preventDefault()}else if(e.which===39){nextTab(1);e.preventDefault()}});searchState.input.addEventListener("keydown",function(e){if(e.which===40){focusSearchResult();e.preventDefault()}});var selectCrate=document.getElementById("crate-search");if(selectCrate){selectCrate.onchange=function(){updateLocalStorage("rustdoc-saved-filter-crate",selectCrate.value);search(undefined,true)}}if(searchState.browserSupportsHistoryApi()){var previousTitle=document.title;window.addEventListener("popstate",function(e){var params=searchState.getQueryStringParams();document.title=previousTitle;currentResults=null;if(params.search&¶ms.search.length>0){searchState.input.value=params.search;search(e)}else{searchState.input.value="";searchState.hideResults()}})}window.onpageshow=function(){var qSearch=searchState.getQueryStringParams().search;if(searchState.input.value===""&&qSearch){searchState.input.value=qSearch}search()}}index=buildIndex(rawSearchIndex);registerSearchEvents();if(searchState.getQueryStringParams().search){search()}};if(window.searchIndex!==undefined){initSearch(window.searchIndex)}})() |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
| Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. | ||
| This Font Software is licensed under the SIL Open Font License, Version 1.1. | ||
| This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL | ||
| ----------------------------------------------------------- | ||
| SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 | ||
| ----------------------------------------------------------- | ||
| PREAMBLE | ||
| The goals of the Open Font License (OFL) are to stimulate worldwide | ||
| development of collaborative font projects, to support the font creation | ||
| efforts of academic and linguistic communities, and to provide a free and | ||
| open framework in which fonts may be shared and improved in partnership | ||
| with others. | ||
| The OFL allows the licensed fonts to be used, studied, modified and | ||
| redistributed freely as long as they are not sold by themselves. The | ||
| fonts, including any derivative works, can be bundled, embedded, | ||
| redistributed and/or sold with any software provided that any reserved | ||
| names are not used by derivative works. The fonts and derivatives, | ||
| however, cannot be released under any other type of license. The | ||
| requirement for fonts to remain under this license does not apply | ||
| to any document created using the fonts or their derivatives. | ||
| DEFINITIONS | ||
| "Font Software" refers to the set of files released by the Copyright | ||
| Holder(s) under this license and clearly marked as such. This may | ||
| include source files, build scripts and documentation. | ||
| "Reserved Font Name" refers to any names specified as such after the | ||
| copyright statement(s). | ||
| "Original Version" refers to the collection of Font Software components as | ||
| distributed by the Copyright Holder(s). | ||
| "Modified Version" refers to any derivative made by adding to, deleting, | ||
| or substituting -- in part or in whole -- any of the components of the | ||
| Original Version, by changing formats or by porting the Font Software to a | ||
| new environment. | ||
| "Author" refers to any designer, engineer, programmer, technical | ||
| writer or other person who contributed to the Font Software. | ||
| PERMISSION & CONDITIONS | ||
| Permission is hereby granted, free of charge, to any person obtaining | ||
| a copy of the Font Software, to use, study, copy, merge, embed, modify, | ||
| redistribute, and sell modified and unmodified copies of the Font | ||
| Software, subject to the following conditions: | ||
| 1) Neither the Font Software nor any of its individual components, | ||
| in Original or Modified Versions, may be sold by itself. | ||
| 2) Original or Modified Versions of the Font Software may be bundled, | ||
| redistributed and/or sold with any software, provided that each copy | ||
| contains the above copyright notice and this license. These can be | ||
| included either as stand-alone text files, human-readable headers or | ||
| in the appropriate machine-readable metadata fields within text or | ||
| binary files as long as those fields can be easily viewed by the user. | ||
| 3) No Modified Version of the Font Software may use the Reserved Font | ||
| Name(s) unless explicit written permission is granted by the corresponding | ||
| Copyright Holder. This restriction only applies to the primary font name as | ||
| presented to the users. | ||
| 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font | ||
| Software shall not be used to promote, endorse or advertise any | ||
| Modified Version, except to acknowledge the contribution(s) of the | ||
| Copyright Holder(s) and the Author(s) or with their explicit written | ||
| permission. | ||
| 5) The Font Software, modified or unmodified, in part or in whole, | ||
| must be distributed entirely under this license, and must not be | ||
| distributed under any other license. The requirement for fonts to | ||
| remain under this license does not apply to any document created | ||
| using the Font Software. | ||
| TERMINATION | ||
| This license becomes null and void if any of the above conditions are | ||
| not met. | ||
| DISCLAIMER | ||
| THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF | ||
| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT | ||
| OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE | ||
| COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
| INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL | ||
| DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
| FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM | ||
| OTHER DEALINGS IN THE FONT SOFTWARE. |
Sorry, the diff of this file is not supported yet
| { | ||
| "git": { | ||
| "sha1": "fe542e64fa41c4670dcccd51e86909fcd4fe4cf3" | ||
| "sha1": "96ea85d0b131586ae4900a10a756d512cfd1ca38" | ||
| } | ||
| } |
+39
-39
| # This file is automatically @generated by Cargo. | ||
| # It is not intended for manual editing. | ||
| version = 3 | ||
| [[package]] | ||
@@ -7,4 +9,5 @@ name = "ansi_term" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" | ||
| dependencies = [ | ||
| "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", | ||
| "winapi", | ||
| ] | ||
@@ -16,6 +19,7 @@ | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" | ||
| dependencies = [ | ||
| "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", | ||
| "termion 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", | ||
| "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", | ||
| "libc", | ||
| "termion", | ||
| "winapi", | ||
| ] | ||
@@ -27,2 +31,3 @@ | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" | ||
@@ -33,10 +38,11 @@ [[package]] | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" | ||
| dependencies = [ | ||
| "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", | ||
| "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", | ||
| "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", | ||
| "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", | ||
| "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", | ||
| "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", | ||
| "vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", | ||
| "ansi_term", | ||
| "atty", | ||
| "bitflags", | ||
| "strsim", | ||
| "textwrap", | ||
| "unicode-width", | ||
| "vec_map", | ||
| ] | ||
@@ -46,5 +52,5 @@ | ||
| name = "deltae" | ||
| version = "0.2.1" | ||
| version = "0.3.0" | ||
| dependencies = [ | ||
| "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", | ||
| "clap", | ||
| ] | ||
@@ -56,2 +62,3 @@ | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "bedcc7a809076656486ffe045abeeac163da1b558e963a31e29fbfbeba916917" | ||
@@ -62,2 +69,3 @@ [[package]] | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef" | ||
@@ -68,2 +76,3 @@ [[package]] | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "12229c14a0f65c4f1cb046a3b52047cdd9da1f4b30f8a39c5063c8bae515e252" | ||
@@ -74,4 +83,5 @@ [[package]] | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" | ||
| dependencies = [ | ||
| "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", | ||
| "redox_syscall", | ||
| ] | ||
@@ -83,2 +93,3 @@ | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" | ||
@@ -89,7 +100,8 @@ [[package]] | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "dde0593aeb8d47accea5392b39350015b5eccb12c0d98044d856983d89548dea" | ||
| dependencies = [ | ||
| "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", | ||
| "numtoa 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", | ||
| "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", | ||
| "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", | ||
| "libc", | ||
| "numtoa", | ||
| "redox_syscall", | ||
| "redox_termios", | ||
| ] | ||
@@ -101,4 +113,5 @@ | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" | ||
| dependencies = [ | ||
| "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", | ||
| "unicode-width", | ||
| ] | ||
@@ -110,2 +123,3 @@ | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526" | ||
@@ -116,2 +130,3 @@ [[package]] | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" | ||
@@ -122,5 +137,6 @@ [[package]] | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770" | ||
| dependencies = [ | ||
| "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", | ||
| "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", | ||
| "winapi-i686-pc-windows-gnu", | ||
| "winapi-x86_64-pc-windows-gnu", | ||
| ] | ||
@@ -132,2 +148,3 @@ | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" | ||
@@ -138,19 +155,2 @@ [[package]] | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| [metadata] | ||
| "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" | ||
| "checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" | ||
| "checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" | ||
| "checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" | ||
| "checksum libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)" = "bedcc7a809076656486ffe045abeeac163da1b558e963a31e29fbfbeba916917" | ||
| "checksum numtoa 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef" | ||
| "checksum redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)" = "12229c14a0f65c4f1cb046a3b52047cdd9da1f4b30f8a39c5063c8bae515e252" | ||
| "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" | ||
| "checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" | ||
| "checksum termion 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dde0593aeb8d47accea5392b39350015b5eccb12c0d98044d856983d89548dea" | ||
| "checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" | ||
| "checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526" | ||
| "checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" | ||
| "checksum winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770" | ||
| "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" | ||
| "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" | ||
| checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" |
+2
-2
@@ -16,4 +16,4 @@ # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO | ||
| name = "deltae" | ||
| version = "0.2.1" | ||
| authors = ["Ryan O'Beirne <ryanobeirne@gmail.com>"] | ||
| version = "0.3.0" | ||
| authors = ["Ryan O'Beirne <ryanobeirne@ryanobeirne.com>"] | ||
| description = "Calculate Delta E between two colors in CIE Lab space." | ||
@@ -20,0 +20,0 @@ homepage = "https://github.com/ryanobeirne/deltae" |
@@ -1,1 +0,1 @@ | ||
| {"rustc_fingerprint":5667308607842013832,"outputs":{"7418947162089833526":["___\nlib___.rlib\nlib___.dylib\nlib___.dylib\nlib___.a\nlib___.dylib\n/Users/Spoonflower/.rustup/toolchains/stable-x86_64-apple-darwin\ndebug_assertions\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_feature=\"sse3\"\ntarget_feature=\"ssse3\"\ntarget_os=\"macos\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"apple\"\nunix\n",""],"4476964694761187371":["___\nlib___.rlib\nlib___.dylib\nlib___.dylib\nlib___.a\nlib___.dylib\n/Users/Spoonflower/.rustup/toolchains/stable-x86_64-apple-darwin\ndebug_assertions\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_feature=\"sse3\"\ntarget_feature=\"ssse3\"\ntarget_os=\"macos\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"apple\"\nunix\n",""],"1164083562126845933":["rustc 1.38.0 (625451e37 2019-09-23)\nbinary: rustc\ncommit-hash: 625451e376bb2e5283fc4741caa0a3e8a2ca4d54\ncommit-date: 2019-09-23\nhost: x86_64-apple-darwin\nrelease: 1.38.0\nLLVM version: 9.0\n",""],"1138116330425514636":["___\n",""]},"successes":{}} | ||
| {"rustc_fingerprint":1500937188507510876,"outputs":{"17598535894874457435":{"success":true,"status":"","code":0,"stdout":"rustc 1.54.0 (a178d0322 2021-07-26)\nbinary: rustc\ncommit-hash: a178d0322ce20e33eac124758e837cbd80a6f633\ncommit-date: 2021-07-26\nhost: x86_64-unknown-linux-gnu\nrelease: 1.54.0\nLLVM version: 12.0.1\n","stderr":""},"2797684049618456168":{"success":false,"status":"exit status: 1","code":1,"stdout":"","stderr":"error: `-Csplit-debuginfo` is unstable on this platform\n\n"},"931469667778813386":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/ryanobeirne/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\ndebug_assertions\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""}},"successes":{}} |
@@ -1,1 +0,1 @@ | ||
| <?xml version="1.0" ?><svg height="1792" viewBox="0 0 1792 1792" width="1792" xmlns="http://www.w3.org/2000/svg"><path d="M1615 0q70 0 122.5 46.5t52.5 116.5q0 63-45 151-332 629-465 752-97 91-218 91-126 0-216.5-92.5t-90.5-219.5q0-128 92-212l638-579q59-54 130-54zm-909 1034q39 76 106.5 130t150.5 76l1 71q4 213-129.5 347t-348.5 134q-123 0-218-46.5t-152.5-127.5-86.5-183-29-220q7 5 41 30t62 44.5 59 36.5 46 17q41 0 55-37 25-66 57.5-112.5t69.5-76 88-47.5 103-25.5 125-10.5z"/></svg> | ||
| <svg xmlns="http://www.w3.org/2000/svg" width="1792" height="1792" viewBox="0 0 1792 1792"><path d="M1615 0q70 0 122.5 46.5t52.5 116.5q0 63-45 151-332 629-465 752-97 91-218 91-126 0-216.5-92.5t-90.5-219.5q0-128 92-212l638-579q59-54 130-54zm-909 1034q39 76 106.5 130t150.5 76l1 71q4 213-129.5 347t-348.5 134q-123 0-218-46.5t-152.5-127.5-86.5-183-29-220q7 5 41 30t62 44.5 59 36.5 46 17q41 0 55-37 25-66 57.5-112.5t69.5-76 88-47.5 103-25.5 125-10.5z"/></svg> |
@@ -26,3 +26,4 @@ These documentation pages include resources by third parties. This copyright | ||
| * Source Code Pro (SourceCodePro-Regular.woff, SourceCodePro-Semibold.woff): | ||
| * Source Code Pro (SourceCodePro-Regular.ttf.woff, | ||
| SourceCodePro-Semibold.ttf.woff, SourceCodePro-It.ttf.woff): | ||
@@ -36,12 +37,12 @@ Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), | ||
| * Source Serif Pro (SourceSerifPro-Regular.ttf.woff, | ||
| SourceSerifPro-Bold.ttf.woff, SourceSerifPro-It.ttf.woff): | ||
| * Source Serif 4 (SourceSerif4-Regular.ttf.woff, SourceSerif4-Bold.ttf.woff, | ||
| SourceSerif4-It.ttf.woff): | ||
| Copyright 2014 Adobe Systems Incorporated (http://www.adobe.com/), with | ||
| Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of | ||
| Adobe Systems Incorporated in the United States and/or other countries. | ||
| Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name | ||
| 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United | ||
| States and/or other countries. | ||
| Licensed under the SIL Open Font License, Version 1.1. | ||
| See SourceSerifPro-LICENSE.txt. | ||
| See SourceSerif4-LICENSE.md. | ||
| This copyright file is intended to be distributed with rustdoc output. |
@@ -1,1 +0,1 @@ | ||
| body{background-color:#353535;color:#ddd;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){color:#ddd;}h1.fqn{border-bottom-color:#d2d2d2;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){border-bottom-color:#d2d2d2;}.in-band{background-color:#353535;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#2A2A2A;}pre{background-color:#2A2A2A;}.sidebar{background-color:#505050;}.sidebar .current{background-color:#333;}.source .sidebar{background-color:#353535;}.sidebar .location{border-color:#fff;background:#575757;color:#DDD;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#444;}.line-numbers span{color:#3B91E2;}.line-numbers .line-highlighted{background-color:#0a042f !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#DDD;}.docblock table,.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#ddd;}.content .highlighted{color:#eee !important;background-color:#616161;}.content .highlighted a,.content .highlighted span{color:#eee !important;}.content .highlighted.trait{background-color:#013191;}.content .highlighted.traitalias{background-color:#013191;}.content .highlighted.mod,.content .highlighted.externcrate{background-color:#afc6e4;}.content .highlighted.mod{background-color:#803a1b;}.content .highlighted.externcrate{background-color:#396bac;}.content .highlighted.enum{background-color:#5b4e68;}.content .highlighted.struct{background-color:#194e9f;}.content .highlighted.union{background-color:#b7bd49;}.content .highlighted.fn,.content .highlighted.method,.content .highlighted.tymethod{background-color:#4950ed;}.content .highlighted.type{background-color:#38902c;}.content .highlighted.foreigntype{background-color:#b200d6;}.content .highlighted.attr,.content .highlighted.derive,.content .highlighted.macro{background-color:#217d1c;}.content .highlighted.constant,.content .highlighted.static{background-color:#0063cc;}.content .highlighted.primitive{background-color:#00708a;}.content .highlighted.keyword{background-color:#884719;}.content span.enum,.content a.enum,.block a.current.enum{color:#82b089;}.content span.struct,.content a.struct,.block a.current.struct{color:#2dbfb8;}.content span.type,.content a.type,.block a.current.type{color:#ff7f00;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#dd7de8;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#09bd00;}.content span.union,.content a.union,.block a.current.union{color:#a6ae37;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#82a5c9;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#43aec7;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#bda000;}.content span.trait,.content a.trait,.block a.current.trait{color:#b78cf2;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#b397da;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#2BAB63;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#de5249;}pre.rust .comment{color:#8d8d8b;}pre.rust .doccomment{color:#8ca375;}nav{border-bottom-color:#4e4e4e;}nav.main .current{border-top-color:#eee;border-bottom-color:#eee;}nav.main .separator{border-color:#eee;}a{color:#ddd;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.stability a{color:#D2991D;}.stab.internal a{color:#304FFE;}a.test-arrow{color:#dedede;}.collapse-toggle{color:#999;}#crate-search{color:#111;background-color:#f0f0f0;border-color:#000;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input{color:#111;background-color:#f0f0f0;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input:focus{border-color:#008dfd;}#crate-search+.search-input:focus{box-shadow:0 0 8px 4px #078dd8;}.module-item .stab{color:#ddd;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;color:#2f2f2f;}.stab.internal{background:#FFB9B3;border-color:#B71C1C;color:#2f2f2f;}.stab.deprecated{background:#F3DFFF;border-color:#7F0087;color:#2f2f2f;}.stab.portability{background:#C4ECFF;border-color:#7BA5DB;color:#2f2f2f;}.stab.portability>code{color:#ddd;}#help>div{background:#4d4d4d;border-color:#bfbfbf;}#help dt{border-color:#bfbfbf;background:rgba(0,0,0,0);color:black;}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:#ddd;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#ab8ac1;}pre.rust .kw-2,pre.rust .prelude-ty{color:#769acb;}pre.rust .number,pre.rust .string{color:#83a300;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#ee6868;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#d97f26;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#4a4949;}a.test-arrow{background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label{color:#999;}:target>code,:target>.in-band{background-color:#494a3d;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.6);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.6);}.information>.compile_fail:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:rgba(255,142,0,1);}.search-failed a{color:#0089ff;}.tooltip .tooltiptext{background-color:black;color:#fff;}.tooltip .tooltiptext::after{border-color:transparent black transparent transparent;}.important-traits .tooltip .tooltiptext{background-color:white;color:black;border-color:black;}#titles>div:not(.selected){background-color:#252525;border-top-color:#252525;}#titles>div:hover,#titles>div.selected{border-top-color:#0089ff;}#titles>div>div.count{color:#888;}.modal{background-color:rgba(0,0,0,0.3);}.modal-content{background-color:#272727;border-color:#999;}.modal-content>.close{background-color:#272727;border-color:#999;}.modal-content>.close:hover{background-color:#ff1f1f;color:white;}.modal-content>.whiter{background-color:#272727;}.modal-content>.close:hover+.whiter{background-color:#ff1f1f;}@media (max-width:700px){.sidebar-menu{background-color:#505050;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#505050;border-right-color:#000;}#sidebar-filler{background-color:#505050;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu{border-color:#e0e0e0;background:#f0f0f0;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus{border-color:#ffb900;}#theme-choices{border-color:#e0e0e0;background-color:#353535;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#4e4e4e;}@media (max-width:700px){#theme-picker{background:#f0f0f0;}}#all-types{background-color:#505050;}#all-types:hover{background-color:#606060;}.search-results td span.alias{color:#fff;}.search-results td span.grey{color:#ccc;}#sidebar-toggle{background-color:#565656;}#sidebar-toggle:hover{background-color:#676767;}#source-sidebar{background-color:#565656;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#444;}div.files>.selected{background-color:#333;} | ||
| body{background-color:#353535;color:#ddd;}h1,h2,h3,h4{color:#ddd;}h1.fqn{border-bottom-color:#d2d2d2;}h2,h3,h4{border-bottom-color:#d2d2d2;}.in-band{background-color:#353535;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#2A2A2A;}pre,.rustdoc.source .example-wrap{background-color:#2A2A2A;}.sidebar{background-color:#505050;}.logo-container.rust-logo>img{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff)}*{scrollbar-color:rgb(64,65,67) #717171;}.sidebar{scrollbar-color:rgba(32,34,37,.6) transparent;}::-webkit-scrollbar-track{background-color:#717171;}::-webkit-scrollbar-thumb{background-color:rgba(32,34,37,.6);}.sidebar::-webkit-scrollbar-track{background-color:#717171;}.sidebar::-webkit-scrollbar-thumb{background-color:rgba(32,34,37,.6);}.sidebar .current{background-color:#333;}.source .sidebar{background-color:#353535;}.sidebar .location{border-color:#fff;background:#575757;color:#DDD;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#444;}.line-numbers span{color:#3B91E2;}.line-numbers .line-highlighted{background-color:#0a042f !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#DDD;}.docblock table,.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#ddd;}.search-results a:hover{background-color:#777;}.search-results a:focus{color:#eee !important;background-color:#616161;}.search-results a:focus span{color:#eee !important;}a.result-trait:focus{background-color:#013191;}a.result-traitalias:focus{background-color:#013191;}a.result-mod:focus,a.result-externcrate:focus{background-color:#afc6e4;}a.result-mod:focus{background-color:#803a1b;}a.result-externcrate:focus{background-color:#396bac;}a.result-enum:focus{background-color:#5b4e68;}a.result-struct:focus{background-color:#194e9f;}a.result-union:focus{background-color:#b7bd49;}a.result-fn:focus,a.result-method:focus,a.result-tymethod:focus{background-color:#4950ed;}a.result-type:focus{background-color:#38902c;}a.result-foreigntype:focus{background-color:#b200d6;}a.result-attr:focus,a.result-derive:focus,a.result-macro:focus{background-color:#217d1c;}a.result-constant:focus,a.result-static:focus{background-color:#0063cc;}a.result-primitive:focus{background-color:#00708a;}a.result-keyword:focus{background-color:#884719;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#82b089;}.content span.struct,.content a.struct,.block a.current.struct{color:#2dbfb8;}.content span.type,.content a.type,.block a.current.type{color:#ff7f00;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#dd7de8;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#09bd00;}.content span.union,.content a.union,.block a.current.union{color:#a6ae37;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#82a5c9;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#43aec7;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#bda000;}.content span.trait,.content a.trait,.block a.current.trait{color:#b78cf2;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#b397da;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#2BAB63;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#de5249;}pre.rust .comment{color:#8d8d8b;}pre.rust .doccomment{color:#8ca375;}nav:not(.sidebar){border-bottom-color:#4e4e4e;}nav.main .current{border-top-color:#eee;border-bottom-color:#eee;}nav.main .separator{border-color:#eee;}a{color:#ddd;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#D2991D;}a.test-arrow{color:#dedede;}details.rustdoc-toggle>summary.hideme>span,details.rustdoc-toggle>summary::before,details.undocumented>summary::before{color:#999;}#crate-search{color:#111;background-color:#f0f0f0;border-color:#000;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input{color:#111;background-color:#f0f0f0;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input:focus{border-color:#008dfd;}.search-input:disabled{background-color:#c5c4c4;}#crate-search+.search-input:focus{box-shadow:0 0 8px 4px #078dd8;}.module-item .stab,.import-item .stab{color:#ddd;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;color:#2f2f2f;}.stab.deprecated{background:#ffc4c4;border-color:#db7b7b;color:#2f2f2f;}.stab.portability{background:#F3DFFF;border-color:#b07bdb;color:#2f2f2f;}.stab.portability>code{background:none;}#help>div{background:#4d4d4d;border-color:#bfbfbf;}#help>div>span{border-bottom-color:#bfbfbf;}#help dt{border-color:#bfbfbf;background:rgba(0,0,0,0);}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:#ddd;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#ab8ac1;}pre.rust .kw-2,pre.rust .prelude-ty{color:#769acb;}pre.rust .number,pre.rust .string{color:#83a300;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#ee6868;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#d97f26;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#4a4949;}a.test-arrow{background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label,.code-attribute{color:#999;}:target,:target>*{background-color:#494a3d;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.8);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.8);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.8);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.8);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#0089ff;}.tooltip::after{background-color:#000;color:#fff;border-color:#000;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#111;border-color:#777;}.notable-traits-tooltiptext .notable{border-bottom-color:#d2d2d2;}#titles>button:not(.selected){background-color:#252525;border-top-color:#252525;}#titles>button:hover,#titles>button.selected{border-top-color:#0089ff;background-color:#353535;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-menu{background-color:#505050;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#505050;border-right-color:#000;}#sidebar-filler{background-color:#505050;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,#help-button{border-color:#e0e0e0;background:#f0f0f0;color:#000;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,#help-button:hover,#help-button:focus{border-color:#ffb900;}#copy-path{color:#999;}#copy-path>img{filter:invert(50%);}#copy-path:hover>img{filter:invert(65%);}#theme-choices{border-color:#e0e0e0;background-color:#353535;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#4e4e4e;}@media (max-width:700px){#theme-picker{background:#f0f0f0;}}#all-types{background-color:#505050;}#all-types:hover{background-color:#606060;}.search-results .result-name span.alias{color:#fff;}.search-results .result-name span.grey{color:#ccc;}#sidebar-toggle{background-color:#565656;}#sidebar-toggle:hover{background-color:#676767;}#source-sidebar{background-color:#565656;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#444;}div.files>.selected{background-color:#333;}.setting-line>.title{border-bottom-color:#ddd;} |
@@ -1,3 +0,5 @@ | ||
| <!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="List of all items in this crate"><meta name="keywords" content="rust, rustlang, rust-lang"><title>List of all items in this crate</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../dark.css"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../deltae/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span> | ||
| </span> | ||
| <span class='in-band'>List of all items</span></h1><h3 id='Structs'>Structs</h3><ul class='structs docblock'><li><a href='struct.DeltaE.html'>DeltaE</a></li><li><a href='struct.LabValue.html'>LabValue</a></li><li><a href='struct.LchValue.html'>LchValue</a></li><li><a href='struct.XyzValue.html'>XyzValue</a></li></ul><h3 id='Enums'>Enums</h3><ul class='enums docblock'><li><a href='enum.DEMethod.html'>DEMethod</a></li><li><a href='enum.ValueError.html'>ValueError</a></li></ul><h3 id='Traits'>Traits</h3><ul class='traits docblock'><li><a href='trait.Delta.html'>Delta</a></li><li><a href='trait.Round.html'>Round</a></li><li><a href='trait.Validate.html'>Validate</a></li></ul><h3 id='Constants'>Constants</h3><ul class='constants docblock'><li><a href='constant.DECMC1.html'>DECMC1</a></li><li><a href='constant.DECMC2.html'>DECMC2</a></li></ul></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "deltae";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html> | ||
| <!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="List of all items in this crate"><meta name="keywords" content="rust, rustlang, rust-lang"><title>List of all items in this crate</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><script src="../crates.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg"> | ||
| <link rel="alternate icon" type="image/png" href="../favicon-16x16.png"> | ||
| <link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../deltae/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Crate deltae</h2><div class="block version"><p>Version 0.3.0</p></div><a id="all-types" href="index.html"><p>Back to index</p></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">List of all items</span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span> | ||
| </span> | ||
| </h1><h3 id="Structs">Structs</h3><ul class="structs docblock"><li><a href="struct.DeltaE.html">DeltaE</a></li><li><a href="color/struct.LabValue.html">color::LabValue</a></li><li><a href="color/struct.LchValue.html">color::LchValue</a></li><li><a href="color/struct.XyzValue.html">color::XyzValue</a></li></ul><h3 id="Enums">Enums</h3><ul class="enums docblock"><li><a href="enum.DEMethod.html">DEMethod</a></li><li><a href="color/enum.ValueError.html">color::ValueError</a></li></ul><h3 id="Traits">Traits</h3><ul class="traits docblock"><li><a href="trait.Delta.html">Delta</a></li><li><a href="trait.Round.html">Round</a></li><li><a href="trait.Validate.html">Validate</a></li><li><a href="eq/trait.DeltaEq.html">eq::DeltaEq</a></li><li><a href="eq/trait.Tolerance.html">eq::Tolerance</a></li></ul><h3 id="Macros">Macros</h3><ul class="macros docblock"><li><a href="macro.assert_delta_eq.html">assert_delta_eq</a></li></ul><h3 id="Constants">Constants</h3><ul class="constants docblock"><li><a href="constant.DECMC1.html">DECMC1</a></li><li><a href="constant.DECMC2.html">DECMC2</a></li></ul></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="deltae" data-search-index-js="../search-index.js" data-search-js="../search.js"></div><script src="../main.js"></script></body></html> |
@@ -1,10 +0,27 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta http-equiv="refresh" content="0;URL=../../deltae/enum.ValueError.html"> | ||
| </head> | ||
| <body> | ||
| <p>Redirecting to <a href="../../deltae/enum.ValueError.html">../../deltae/enum.ValueError.html</a>...</p> | ||
| <script>location.replace("../../deltae/enum.ValueError.html" + location.search + location.hash);</script> | ||
| </body> | ||
| </html> | ||
| <!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="Value validation Error type"><meta name="keywords" content="rust, rustlang, rust-lang, ValueError"><title>ValueError in deltae::color - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> | ||
| <link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> | ||
| <link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../deltae/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Enum ValueError</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#variants">Variants</a></h3><div class="sidebar-links"><a href="#variant.BadFormat">BadFormat</a><a href="#variant.OutOfBounds">OutOfBounds</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-Display">Display</a><a href="#impl-Error">Error</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-ToString">ToString</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><h2 class="location">Other items in<br><a href="../index.html">deltae</a>::<wbr><a href="index.html">color</a></h2><div id="sidebar-vars" data-name="ValueError" data-ty="enum" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Enum <a href="../index.html">deltae</a>::<wbr><a href="index.html">color</a>::<wbr><a class="enum" href="#">ValueError</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/deltae/color.rs.html#155-160" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust enum">pub enum ValueError { | ||
| OutOfBounds, | ||
| BadFormat, | ||
| }</pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Value validation Error type</p> | ||
| </div></details><h2 id="variants" class="variants small-section-header"> | ||
| Variants<a href="#variants" class="anchor"></a></h2> | ||
| <div id="variant.OutOfBounds" class="variant small-section-header"><a href="#variant.OutOfBounds" class="anchor field"></a><code>OutOfBounds</code></div><div class="docblock"><p>The value is outside the acceptable range</p> | ||
| </div><div id="variant.BadFormat" class="variant small-section-header"><a href="#variant.BadFormat" class="anchor field"></a><code>BadFormat</code></div><div class="docblock"><p>The value is formatted incorrectly</p> | ||
| </div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Debug" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="enum.ValueError.html" title="enum deltae::color::ValueError">ValueError</a></h3><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/deltae/color.rs.html#153" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.54.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.54.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4><a href="#method.fmt" class="anchor"></a><a class="srclink" href="../../src/deltae/color.rs.html#153" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p> | ||
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Display" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="enum" href="enum.ValueError.html" title="enum deltae::color::ValueError">ValueError</a></h3><a href="#impl-Display" class="anchor"></a><a class="srclink" href="../../src/deltae/color.rs.html#162-166" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt-1" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Display.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.54.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.54.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4><a href="#method.fmt-1" class="anchor"></a><a class="srclink" href="../../src/deltae/color.rs.html#163-165" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></p> | ||
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Error" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/error/trait.Error.html" title="trait std::error::Error">Error</a> for <a class="enum" href="enum.ValueError.html" title="enum deltae::color::ValueError">ValueError</a></h3><a href="#impl-Error" class="anchor"></a><a class="srclink" href="../../src/deltae/color.rs.html#177" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.source" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/std/error/trait.Error.html#method.source" class="fnname">source</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&(dyn <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/error/trait.Error.html" title="trait std::error::Error">Error</a> + 'static)></h4><span class="since" title="Stable since Rust version 1.30.0">1.30.0</span><a href="#method.source" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/std/error.rs.html#106" title="goto source code">[src]</a></div></summary><div class='docblock'><p>The lower-level source of this error, if any. <a href="https://doc.rust-lang.org/1.54.0/std/error/trait.Error.html#method.source">Read more</a></p> | ||
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.backtrace" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/std/error/trait.Error.html#method.backtrace" class="fnname">backtrace</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="struct" href="https://doc.rust-lang.org/1.54.0/std/backtrace/struct.Backtrace.html" title="struct std::backtrace::Backtrace">Backtrace</a>></h4><a href="#method.backtrace" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/std/error.rs.html#134" title="goto source code">[src]</a></div></summary><div class="item-info"><div class="stab unstable"><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>backtrace</code>)</div></div><div class='docblock'><p>Returns a stack backtrace, if available, of where this error occurred. <a href="https://doc.rust-lang.org/1.54.0/std/error/trait.Error.html#method.backtrace">Read more</a></p> | ||
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.description" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/std/error/trait.Error.html#method.description" class="fnname">description</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a></h4><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.description" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/std/error.rs.html#146" title="goto source code">[src]</a></div></summary><div class="item-info"><div class="stab deprecated"><span class="emoji">👎</span> Deprecated since 1.42.0: <p>use the Display impl or to_string()</p> | ||
| </div></div><div class='docblock'> <a href="https://doc.rust-lang.org/1.54.0/std/error/trait.Error.html#method.description">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.cause" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/std/error/trait.Error.html#method.cause" class="fnname">cause</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&dyn <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/error/trait.Error.html" title="trait std::error::Error">Error</a>></h4><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.cause" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/std/error.rs.html#156" title="goto source code">[src]</a></div></summary><div class="item-info"><div class="stab deprecated"><span class="emoji">👎</span> Deprecated since 1.33.0: <p>replaced by Error::source, which can support downcasting</p> | ||
| </div></div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="enum.ValueError.html" title="enum deltae::color::ValueError">ValueError</a></h3><a href="#impl-RefUnwindSafe" class="anchor"></a></div><div id="impl-Send" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="enum.ValueError.html" title="enum deltae::color::ValueError">ValueError</a></h3><a href="#impl-Send" class="anchor"></a></div><div id="impl-Sync" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="enum.ValueError.html" title="enum deltae::color::ValueError">ValueError</a></h3><a href="#impl-Sync" class="anchor"></a></div><div id="impl-Unpin" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="enum.ValueError.html" title="enum deltae::color::ValueError">ValueError</a></h3><a href="#impl-Unpin" class="anchor"></a></div><div id="impl-UnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="enum.ValueError.html" title="enum deltae::color::ValueError">ValueError</a></h3><a href="#impl-UnwindSafe" class="anchor"></a></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Any" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#131-135" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.54.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4><a href="#method.type_id" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#132" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></p> | ||
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Borrow%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&</a>T</h4><a href="#method.borrow" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#210" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p> | ||
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-BorrowMut%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow_mut" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&mut </a>T</h4><a href="#method.borrow_mut" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#217" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p> | ||
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-From%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#544-548" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4><a href="#method.from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#545" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> | ||
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Into%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></h3><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#533-540" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4><a href="#method.into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#537" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> | ||
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-ToString" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/alloc/string/trait.ToString.html" title="trait alloc::string::ToString">ToString</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-ToString" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/alloc/string.rs.html#2372-2386" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.to_string" class="method trait-impl has-srclink"><h4 class="code-header">pub default fn <a href="https://doc.rust-lang.org/1.54.0/alloc/string/trait.ToString.html#tymethod.to_string" class="fnname">to_string</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4><a href="#method.to_string" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/alloc/string.rs.html#2378" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Converts the given value to a <code>String</code>. <a href="https://doc.rust-lang.org/1.54.0/alloc/string/trait.ToString.html#tymethod.to_string">Read more</a></p> | ||
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TryFrom%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></h3><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#581-590" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4><a href="#associatedtype.Error" class="anchor"></a></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p> | ||
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_from" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4><a href="#method.try_from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#587" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> | ||
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TryInto%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></h3><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#567-576" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error-1" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4><a href="#associatedtype.Error-1" class="anchor"></a></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p> | ||
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4><a href="#method.try_into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#573" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> | ||
| </div></details></div></details></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="deltae" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html> |
@@ -1,40 +0,29 @@ | ||
| <!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="API documentation for the Rust `color` mod in crate `deltae`."><meta name="keywords" content="rust, rustlang, rust-lang, color"><title>deltae::color - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../deltae/index.html'><img src='../../rust-logo.png' alt='logo' width='100'></a><p class='location'>Module color</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#types">Type Definitions</a></li></ul></div><p class='location'><a href='../index.html'>deltae</a></p><script>window.sidebarCurrent = {name: 'color', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/deltae/color.rs.html#1-388' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>deltae</a>::<wbr><a class="mod" href=''>color</a></span></h1><div class='docblock'><p>Manipulate and convert CIE L*a*b* and Lch colors.</p> | ||
| <h3 id="lab" class="section-header"><a href="#lab">Lab</a></h3> | ||
| <ul> | ||
| <li><strong>L</strong>: Lightness (0...100)</li> | ||
| <li><strong>a</strong>: green-magenta (-128...128)</li> | ||
| <li><strong>b</strong>: blue-yellow (-128...128)</li> | ||
| </ul> | ||
| <h3 id="lch" class="section-header"><a href="#lch">Lch</a></h3> | ||
| <ul> | ||
| <li><strong>L</strong>: Lightness (0...100)</li> | ||
| <li><strong>c</strong>: Chroma (0...181.0139)</li> | ||
| <li><strong>h</strong>: Hue (0...360°)</li> | ||
| </ul> | ||
| <!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="Manipulate and convert CIE L*a*b* and Lch colors."><meta name="keywords" content="rust, rustlang, rust-lang, color"><title>deltae::color - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> | ||
| <link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> | ||
| <link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../deltae/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module color</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li></ul></div><div id="sidebar-vars" data-name="color" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">deltae</a>::<wbr><a class="mod" href="#">color</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/deltae/color.rs.html#1-177" title="goto source code">[src]</a></span></h1><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Manipulate and convert CIE L*a*b* and Lch colors.</p> | ||
| <h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1> | ||
| <div class="example-wrap"><pre class="rust rust-example-rendered"> | ||
| <span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">deltae</span>; | ||
| <span class="kw">use</span> <span class="ident">deltae</span>::<span class="ident">color</span>::{<span class="ident">LabValue</span>, <span class="ident">LchValue</span>}; | ||
| <span class="kw">use</span> <span class="ident">std</span>::<span class="ident">str</span>::<span class="ident">FromStr</span>; | ||
| <span class="kw">fn</span> <span class="ident">main</span>() { | ||
| <span class="kw">let</span> <span class="ident">lab0</span> <span class="op">=</span> <span class="ident">LabValue</span>::<span class="ident">from_str</span>(<span class="string">"95.08, -0.17, -10.81"</span>).<span class="ident">unwrap</span>(); | ||
| <span class="kw">let</span> <span class="ident">lab1</span> <span class="op">=</span> <span class="ident">LabValue</span> { | ||
| <span class="ident">l</span>: <span class="number">95.08</span>, | ||
| <span class="ident">a</span>: <span class="op">-</span><span class="number">0.17</span>, | ||
| <span class="ident">b</span>: <span class="op">-</span><span class="number">10.81</span>, | ||
| }; | ||
| <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">lab0</span>, <span class="ident">lab1</span>); | ||
| <span class="kw">let</span> <span class="ident">lch0</span> <span class="op">=</span> <span class="ident">lab0</span>.<span class="ident">to_lch</span>(); | ||
| <span class="kw">let</span> <span class="ident">lab2</span> <span class="op">=</span> <span class="ident">lch0</span>.<span class="ident">to_lab</span>(); | ||
| <span class="macro">println</span><span class="macro">!</span>(<span class="string">"{}"</span>, <span class="ident">lch0</span>); <span class="comment">// [L:89.73, c:7.2094, h:285.1157]</span> | ||
| <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">lab0</span>.<span class="ident">round_to</span>(<span class="number">4</span>), <span class="ident">lab2</span>.<span class="ident">round_to</span>(<span class="number">4</span>)); | ||
| }</pre></div> | ||
| </div><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2> | ||
| <table><tr class='module-item'><td><a class="struct" href="struct.LabValue.html" title='deltae::color::LabValue struct'>LabValue</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.LchValue.html" title='deltae::color::LchValue struct'>LchValue</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.XyzValue.html" title='deltae::color::XyzValue struct'>XyzValue</a></td><td class='docblock-short'></td></tr></table><h2 id='enums' class='section-header'><a href="#enums">Enums</a></h2> | ||
| <table><tr class='module-item'><td><a class="enum" href="enum.ValueError.html" title='deltae::color::ValueError enum'>ValueError</a></td><td class='docblock-short'></td></tr></table><h2 id='types' class='section-header'><a href="#types">Type Definitions</a></h2> | ||
| <table><tr class='module-item'><td><a class="type" href="type.ValueResult.html" title='deltae::color::ValueResult type'>ValueResult</a></td><td class='docblock-short'></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../../";window.currentCrate = "deltae";</script><script src="../../aliases.js"></script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html> | ||
| <span class="kw">use</span> <span class="ident">deltae</span>::<span class="kw-2">*</span>; | ||
| <span class="kw">let</span> <span class="ident">lab0</span>: <span class="ident">LabValue</span> <span class="op">=</span> <span class="string">"95.08, -0.17, -10.81"</span>.<span class="ident">parse</span>().<span class="ident">unwrap</span>(); | ||
| <span class="kw">let</span> <span class="ident">lch0</span> <span class="op">=</span> <span class="ident">LchValue</span> { | ||
| <span class="ident">l</span>: <span class="number">95.08</span>, | ||
| <span class="ident">c</span>: <span class="number">10.811337</span>, | ||
| <span class="ident">h</span>: <span class="number">269.09903</span>, | ||
| }; | ||
| <span class="macro">assert!</span>(<span class="ident">lab0</span>.<span class="ident">delta_eq</span>(<span class="kw-2">&</span><span class="ident">lch0</span>, <span class="ident">DE2000</span>, <span class="number">0.01</span>)); | ||
| <span class="kw">let</span> <span class="ident">lch0</span> <span class="op">=</span> <span class="ident">LchValue::from</span>(<span class="ident">lab0</span>); | ||
| <span class="kw">let</span> <span class="ident">lab2</span> <span class="op">=</span> <span class="ident">LabValue::from</span>(<span class="ident">lch0</span>); | ||
| <span class="macro">println!</span>(<span class="string">"{}"</span>, <span class="ident">lch0</span>); <span class="comment">// [L:89.73, c:7.2094, h:285.1157]</span> | ||
| <span class="macro">assert_eq!</span>(<span class="ident">lab0</span>.<span class="ident">round_to</span>(<span class="number">4</span>), <span class="ident">lab2</span>.<span class="ident">round_to</span>(<span class="number">4</span>));</pre></div> | ||
| </div></details><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2> | ||
| <table><tr class="module-item"><td><a class="struct" href="struct.LabValue.html" title="deltae::color::LabValue struct">LabValue</a></td><td class="docblock-short"><p>CIEL*a*b*</p> | ||
| </td></tr><tr class="module-item"><td><a class="struct" href="struct.LchValue.html" title="deltae::color::LchValue struct">LchValue</a></td><td class="docblock-short"><p>Lch: Luminance, Chroma, Hue</p> | ||
| </td></tr><tr class="module-item"><td><a class="struct" href="struct.XyzValue.html" title="deltae::color::XyzValue struct">XyzValue</a></td><td class="docblock-short"><p>CIE 1931 XYZ</p> | ||
| </td></tr></table><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2> | ||
| <table><tr class="module-item"><td><a class="enum" href="enum.ValueError.html" title="deltae::color::ValueError enum">ValueError</a></td><td class="docblock-short"><p>Value validation Error type</p> | ||
| </td></tr></table></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="deltae" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html> |
@@ -1,1 +0,1 @@ | ||
| initSidebarItems({"enum":[["ValueError",""]],"struct":[["LabValue",""],["LchValue",""],["XyzValue",""]],"type":[["ValueResult",""]]}); | ||
| initSidebarItems({"enum":[["ValueError","Value validation Error type"]],"struct":[["LabValue","CIEL*a*b*"],["LchValue","Lch: Luminance, Chroma, Hue"],["XyzValue","CIE 1931 XYZ"]]}); |
@@ -1,2 +0,4 @@ | ||
| <!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="API documentation for the Rust `DECMC1` constant in crate `deltae`."><meta name="keywords" content="rust, rustlang, rust-lang, DECMC1"><title>deltae::DECMC1 - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../dark.css"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../deltae/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='index.html'>deltae</a></p><script>window.sidebarCurrent = {name: 'DECMC1', ty: 'constant', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/deltae/lib.rs.html#133' title='goto source code'>[src]</a></span><span class='in-band'>Constant <a href='index.html'>deltae</a>::<wbr><a class="constant" href=''>DECMC1</a></span></h1><pre class='rust const'>pub const DECMC1: <a class="enum" href="../deltae/enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a></pre><div class='docblock'><p>DeltaE CMC (1:1)</p> | ||
| </div></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "deltae";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html> | ||
| <!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="DeltaE CMC (1:1)"><meta name="keywords" content="rust, rustlang, rust-lang, DECMC1"><title>DECMC1 in deltae - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><script src="../crates.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg"> | ||
| <link rel="alternate icon" type="image/png" href="../favicon-16x16.png"> | ||
| <link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../deltae/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="index.html">deltae</a></h2><div id="sidebar-vars" data-name="DECMC1" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="index.html">deltae</a>::<wbr><a class="constant" href="#">DECMC1</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/deltae/lib.rs.html#213" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const DECMC1: <a class="enum" href="enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a>;</pre><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>DeltaE CMC (1:1)</p> | ||
| </div></details></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="deltae" data-search-index-js="../search-index.js" data-search-js="../search.js"></div><script src="../main.js"></script></body></html> |
@@ -1,2 +0,4 @@ | ||
| <!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="API documentation for the Rust `DECMC2` constant in crate `deltae`."><meta name="keywords" content="rust, rustlang, rust-lang, DECMC2"><title>deltae::DECMC2 - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../dark.css"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../deltae/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='index.html'>deltae</a></p><script>window.sidebarCurrent = {name: 'DECMC2', ty: 'constant', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/deltae/lib.rs.html#135' title='goto source code'>[src]</a></span><span class='in-band'>Constant <a href='index.html'>deltae</a>::<wbr><a class="constant" href=''>DECMC2</a></span></h1><pre class='rust const'>pub const DECMC2: <a class="enum" href="../deltae/enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a></pre><div class='docblock'><p>DeltaE CMC (2:1)</p> | ||
| </div></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "deltae";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html> | ||
| <!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="DeltaE CMC (2:1)"><meta name="keywords" content="rust, rustlang, rust-lang, DECMC2"><title>DECMC2 in deltae - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><script src="../crates.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg"> | ||
| <link rel="alternate icon" type="image/png" href="../favicon-16x16.png"> | ||
| <link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../deltae/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="index.html">deltae</a></h2><div id="sidebar-vars" data-name="DECMC2" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="index.html">deltae</a>::<wbr><a class="constant" href="#">DECMC2</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/deltae/lib.rs.html#215" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const DECMC2: <a class="enum" href="enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a>;</pre><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>DeltaE CMC (2:1)</p> | ||
| </div></details></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="deltae" data-search-index-js="../search-index.js" data-search-js="../search.js"></div><script src="../main.js"></script></body></html> |
@@ -5,2 +5,3 @@ <!DOCTYPE html> | ||
| <meta http-equiv="refresh" content="0;URL=../../deltae/trait.Delta.html"> | ||
| <title>Redirection</title> | ||
| </head> | ||
@@ -7,0 +8,0 @@ <body> |
@@ -1,38 +0,41 @@ | ||
| <!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="API documentation for the Rust `DEMethod` enum in crate `deltae`."><meta name="keywords" content="rust, rustlang, rust-lang, DEMethod"><title>deltae::DEMethod - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../dark.css"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../deltae/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Enum DEMethod</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.DE2000">DE2000</a><a href="#variant.DECMC">DECMC</a><a href="#variant.DE1994G">DE1994G</a><a href="#variant.DE1994T">DE1994T</a><a href="#variant.DE1976">DE1976</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Copy">Copy</a><a href="#impl-Debug">Debug</a><a href="#impl-Default">Default</a><a href="#impl-Display">Display</a><a href="#impl-Eq">Eq</a><a href="#impl-FromStr">FromStr</a><a href="#impl-PartialEq%3CDEMethod%3E">PartialEq<DEMethod></a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-ToString">ToString</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><p class='location'><a href='index.html'>deltae</a></p><script>window.sidebarCurrent = {name: 'DEMethod', ty: 'enum', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/deltae/lib.rs.html#119-130' title='goto source code'>[src]</a></span><span class='in-band'>Enum <a href='index.html'>deltae</a>::<wbr><a class="enum" href=''>DEMethod</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust enum'>pub enum DEMethod { | ||
| <!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="The most common DeltaE methods"><meta name="keywords" content="rust, rustlang, rust-lang, DEMethod"><title>DEMethod in deltae - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><script src="../crates.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg"> | ||
| <link rel="alternate icon" type="image/png" href="../favicon-16x16.png"> | ||
| <link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../deltae/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Enum DEMethod</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#variants">Variants</a></h3><div class="sidebar-links"><a href="#variant.DE1976">DE1976</a><a href="#variant.DE1994G">DE1994G</a><a href="#variant.DE1994T">DE1994T</a><a href="#variant.DE2000">DE2000</a><a href="#variant.DECMC">DECMC</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Copy">Copy</a><a href="#impl-Debug">Debug</a><a href="#impl-Default">Default</a><a href="#impl-Display">Display</a><a href="#impl-Eq">Eq</a><a href="#impl-FromStr">FromStr</a><a href="#impl-PartialEq%3CDEMethod%3E">PartialEq<DEMethod></a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-ToString">ToString</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><h2 class="location">Other items in<br><a href="index.html">deltae</a></h2><div id="sidebar-vars" data-name="DEMethod" data-ty="enum" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Enum <a href="index.html">deltae</a>::<wbr><a class="enum" href="#">DEMethod</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/deltae/lib.rs.html#199-210" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust enum">pub enum DEMethod { | ||
| DE2000, | ||
| DECMC(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>), | ||
| DECMC(<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f32.html">f32</a>, <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f32.html">f32</a>), | ||
| DE1994G, | ||
| DE1994T, | ||
| DE1976, | ||
| }</pre></div><div class='docblock'><p>The most common DeltaE methods</p> | ||
| </div><h2 id='variants' class='variants small-section-header'> | ||
| Variants<a href='#variants' class='anchor'></a></h2> | ||
| <span id="variant.DE2000" class="variant small-section-header"><a href="#variant.DE2000" class="anchor field"></a><code id='DE2000.v'>DE2000</code></span><div class='docblock'><p>The default DeltaE method</p> | ||
| </div><span id="variant.DECMC" class="variant small-section-header"><a href="#variant.DECMC" class="anchor field"></a><code id='DECMC.v'>DECMC(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>)</code></span><div class='docblock'><p>An implementation of DeltaE with tolerances for Lightness and Chroma</p> | ||
| </div><span id="variant.DE1994G" class="variant small-section-header"><a href="#variant.DE1994G" class="anchor field"></a><code id='DE1994G.v'>DE1994G</code></span><div class='docblock'><p>CIE94 DeltaE implementation, weighted with a tolerance for graphics</p> | ||
| </div><span id="variant.DE1994T" class="variant small-section-header"><a href="#variant.DE1994T" class="anchor field"></a><code id='DE1994T.v'>DE1994T</code></span><div class='docblock'><p>CIE94 DeltaE implementation, weighted with a tolerance for textiles</p> | ||
| </div><span id="variant.DE1976" class="variant small-section-header"><a href="#variant.DE1976" class="anchor field"></a><code id='DE1976.v'>DE1976</code></span><div class='docblock'><p>The original DeltaE implementation, a basic euclidian distance formula</p> | ||
| </div><h2 id='implementations' class='small-section-header'>Trait Implementations<a href='#implementations' class='anchor'></a></h2><div id='implementations-list'><h3 id='impl-Default' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="enum" href="../deltae/enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a></code><a href='#impl-Default' class='anchor'></a><a class='srclink' href='../src/deltae/lib.rs.html#139-143' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.default' class="method hidden"><code id='default.v'>fn <a href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default' class='fnname'>default</a>() -> <a class="enum" href="../deltae/enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a></code><a class='srclink' href='../src/deltae/lib.rs.html#140-142' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns the "default value" for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></p> | ||
| </div></div><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="../deltae/enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../src/deltae/lib.rs.html#118' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code id='clone.v'>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class="enum" href="../deltae/enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a></code><a class='srclink' href='../src/deltae/lib.rs.html#118' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p> | ||
| </div><h4 id='method.clone_from' class="method"><code id='clone_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#131-133' title='goto source code'>[src]</a></h4><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p> | ||
| </div></div><h3 id='impl-PartialEq%3CDEMethod%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="enum" href="../deltae/enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a>> for <a class="enum" href="../deltae/enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a></code><a href='#impl-PartialEq%3CDEMethod%3E' class='anchor'></a><a class='srclink' href='../src/deltae/lib.rs.html#118' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq' class="method hidden"><code id='eq.v'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, other: &<a class="enum" href="../deltae/enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/deltae/lib.rs.html#118' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p> | ||
| </div><h4 id='method.ne' class="method hidden"><code id='ne.v'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a class="enum" href="../deltae/enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/deltae/lib.rs.html#118' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p> | ||
| </div></div><h3 id='impl-Eq' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="enum" href="../deltae/enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a></code><a href='#impl-Eq' class='anchor'></a><a class='srclink' href='../src/deltae/lib.rs.html#137' title='goto source code'>[src]</a></h3><div class='impl-items'></div><h3 id='impl-Copy' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="enum" href="../deltae/enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a></code><a href='#impl-Copy' class='anchor'></a><a class='srclink' href='../src/deltae/lib.rs.html#118' title='goto source code'>[src]</a></h3><div class='impl-items'></div><h3 id='impl-Display' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="enum" href="../deltae/enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a></code><a href='#impl-Display' class='anchor'></a><a class='srclink' href='../src/deltae/lib.rs.html#145-160' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code id='fmt.v'>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../src/deltae/lib.rs.html#146-159' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></p> | ||
| </div></div><h3 id='impl-Debug' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../deltae/enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../src/deltae/lib.rs.html#118' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt-1' class="method hidden"><code id='fmt.v-1'>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../src/deltae/lib.rs.html#118' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p> | ||
| </div></div><h3 id='impl-FromStr' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html" title="trait core::str::FromStr">FromStr</a> for <a class="enum" href="../deltae/enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a></code><a href='#impl-FromStr' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#237-251' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Err' class="type"><code id='Err.t'>type <a href='https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#associatedtype.Err' class="type">Err</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a></code></h4><div class='docblock'><p>The associated error which can be returned from parsing.</p> | ||
| </div><h4 id='method.from_str' class="method hidden"><code id='from_str.v'>fn <a href='https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#tymethod.from_str' class='fnname'>from_str</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../deltae/enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a>, Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#associatedtype.Err" title="type core::str::FromStr::Err">Err</a>></code><a class='srclink' href='../src/deltae/convert.rs.html#239-250' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Parses a string <code>s</code> to return a value of this type. <a href="https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#tymethod.from_str">Read more</a></p> | ||
| </div></div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-Send' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="../deltae/enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="../deltae/enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="../deltae/enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="../deltae/enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="../deltae/enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-From%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href='#impl-From%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#550-552' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from' class="method hidden"><code id='from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(t: T) -> T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#551' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-ToString' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html" title="trait alloc::string::ToString">ToString</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-ToString' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/string.rs.html#2134-2144' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.to_string' class="method hidden"><code id='to_string.v'>default fn <a href='https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html#tymethod.to_string' class='fnname'>to_string</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/string.rs.html#2136-2143' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Converts the given value to a <code>String</code>. <a href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html#tymethod.to_string">Read more</a></p> | ||
| </div></div><h3 id='impl-ToOwned' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></code><a href='#impl-ToOwned' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#81-92' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Owned' class="type"><code id='Owned.t'>type <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned' class="type">Owned</a> = T</code></h4><div class='docblock'><p>The resulting type after obtaining ownership.</p> | ||
| </div><h4 id='method.to_owned' class="method hidden"><code id='to_owned.v'>fn <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned' class='fnname'>to_owned</a>(&self) -> T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#85-87' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p> | ||
| </div><h4 id='method.clone_into' class="method hidden"><code id='clone_into.v'>fn <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into' class='fnname'>clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T)</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#89-91' title='goto source code'>[src]</a></h4><div class='stability hidden'><div class='stab unstable'><details><summary><span class='emoji'>🔬</span> This is a nightly-only experimental API. (<code>toowned_clone_into</code>)</summary><p>recently added</p> | ||
| </details></div></div><div class='docblock hidden'><p>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p> | ||
| </div></div><h3 id='impl-Into%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href='#impl-Into%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#541-546' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.into' class="method hidden"><code id='into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into' class='fnname'>into</a>(self) -> U</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#543-545' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-TryFrom%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></code><a href='#impl-TryFrom%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#569-575' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error' class="type"><code id='Error.t'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error' class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p> | ||
| </div><h4 id='method.try_from' class="method hidden"><code id='try_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#572-574' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-TryInto%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><a href='#impl-TryInto%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#557-564' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-1' class="type"><code id='Error.t-1'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error' class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p> | ||
| </div><h4 id='method.try_into' class="method hidden"><code id='try_into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into' class='fnname'>try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#561-563' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213-215' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code id='borrow.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p> | ||
| </div></div><h3 id='impl-BorrowMut%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-BorrowMut%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code id='borrow_mut.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#219' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p> | ||
| </div></div><h3 id='impl-Any' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#100-102' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code id='type_id.v'>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#101' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p> | ||
| </div></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "deltae";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html> | ||
| }</pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The most common DeltaE methods</p> | ||
| </div></details><h2 id="variants" class="variants small-section-header"> | ||
| Variants<a href="#variants" class="anchor"></a></h2> | ||
| <div id="variant.DE2000" class="variant small-section-header"><a href="#variant.DE2000" class="anchor field"></a><code>DE2000</code></div><div class="docblock"><p>The default DeltaE method</p> | ||
| </div><div id="variant.DECMC" class="variant small-section-header"><a href="#variant.DECMC" class="anchor field"></a><code>DECMC(<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f32.html">f32</a>, <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f32.html">f32</a>)</code></div><div class="docblock"><p>An implementation of DeltaE with tolerances for Lightness and Chroma</p> | ||
| </div><div id="variant.DE1994G" class="variant small-section-header"><a href="#variant.DE1994G" class="anchor field"></a><code>DE1994G</code></div><div class="docblock"><p>CIE94 DeltaE implementation, weighted with a tolerance for graphics</p> | ||
| </div><div id="variant.DE1994T" class="variant small-section-header"><a href="#variant.DE1994T" class="anchor field"></a><code>DE1994T</code></div><div class="docblock"><p>CIE94 DeltaE implementation, weighted with a tolerance for textiles</p> | ||
| </div><div id="variant.DE1976" class="variant small-section-header"><a href="#variant.DE1976" class="anchor field"></a><code>DE1976</code></div><div class="docblock"><p>The original DeltaE implementation, a basic euclidian distance formula</p> | ||
| </div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Clone" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a></h3><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../src/deltae/lib.rs.html#198" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="enum" href="enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a></h4><a href="#method.clone" class="anchor"></a><a class="srclink" href="../src/deltae/lib.rs.html#198" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p> | ||
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone_from" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&</a>Self)</h4><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.clone_from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/clone.rs.html#130" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></p> | ||
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Debug" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a></h3><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/deltae/lib.rs.html#198" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.54.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.54.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4><a href="#method.fmt" class="anchor"></a><a class="srclink" href="../src/deltae/lib.rs.html#198" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p> | ||
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Default" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="enum" href="enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a></h3><a href="#impl-Default" class="anchor"></a><a class="srclink" href="../src/deltae/lib.rs.html#219-223" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.default" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/default/trait.Default.html#tymethod.default" class="fnname">default</a>() -> <a class="enum" href="enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a></h4><a href="#method.default" class="anchor"></a><a class="srclink" href="../src/deltae/lib.rs.html#220-222" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.54.0/core/default/trait.Default.html#tymethod.default">Read more</a></p> | ||
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Display" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="enum" href="enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a></h3><a href="#impl-Display" class="anchor"></a><a class="srclink" href="../src/deltae/lib.rs.html#225-240" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt-1" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Display.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.54.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.54.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4><a href="#method.fmt-1" class="anchor"></a><a class="srclink" href="../src/deltae/lib.rs.html#226-239" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></p> | ||
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-FromStr" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/str/traits/trait.FromStr.html" title="trait core::str::traits::FromStr">FromStr</a> for <a class="enum" href="enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a></h3><a href="#impl-FromStr" class="anchor"></a><a class="srclink" href="../src/deltae/convert.rs.html#225-239" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Err" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/str/traits/trait.FromStr.html#associatedtype.Err" class="type">Err</a> = <a class="struct" href="https://doc.rust-lang.org/1.54.0/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a></h4><a href="#associatedtype.Err" class="anchor"></a></div></summary><div class='docblock'><p>The associated error which can be returned from parsing.</p> | ||
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from_str" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/str/traits/trait.FromStr.html#tymethod.from_str" class="fnname">from_str</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a>, Self::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/str/traits/trait.FromStr.html#associatedtype.Err" title="type core::str::traits::FromStr::Err">Err</a>></h4><a href="#method.from_str" class="anchor"></a><a class="srclink" href="../src/deltae/convert.rs.html#227-238" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Parses a string <code>s</code> to return a value of this type. <a href="https://doc.rust-lang.org/1.54.0/core/str/traits/trait.FromStr.html#tymethod.from_str">Read more</a></p> | ||
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-PartialEq%3CDEMethod%3E" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="enum" href="enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a>> for <a class="enum" href="enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a></h3><a href="#impl-PartialEq%3CDEMethod%3E" class="anchor"></a><a class="srclink" href="../src/deltae/lib.rs.html#198" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.eq" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="enum" href="enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.eq" class="anchor"></a><a class="srclink" href="../src/deltae/lib.rs.html#198" title="goto source code">[src]</a></div></summary><div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used | ||
| by <code>==</code>. <a href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p> | ||
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.ne" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: &<a class="enum" href="enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.ne" class="anchor"></a><a class="srclink" href="../src/deltae/lib.rs.html#198" title="goto source code">[src]</a></div></summary><div class='docblock'><p>This method tests for <code>!=</code>.</p> | ||
| </div></details></div></details><div id="impl-Copy" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="enum" href="enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a></h3><a href="#impl-Copy" class="anchor"></a><a class="srclink" href="../src/deltae/lib.rs.html#198" title="goto source code">[src]</a></div><div id="impl-Eq" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="enum" href="enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a></h3><a href="#impl-Eq" class="anchor"></a><a class="srclink" href="../src/deltae/lib.rs.html#217" title="goto source code">[src]</a></div><div id="impl-StructuralPartialEq" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="enum" href="enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a></h3><a href="#impl-StructuralPartialEq" class="anchor"></a><a class="srclink" href="../src/deltae/lib.rs.html#198" title="goto source code">[src]</a></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a></h3><a href="#impl-RefUnwindSafe" class="anchor"></a></div><div id="impl-Send" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a></h3><a href="#impl-Send" class="anchor"></a></div><div id="impl-Sync" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a></h3><a href="#impl-Sync" class="anchor"></a></div><div id="impl-Unpin" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a></h3><a href="#impl-Unpin" class="anchor"></a></div><div id="impl-UnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a></h3><a href="#impl-UnwindSafe" class="anchor"></a></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Any" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#131-135" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.54.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4><a href="#method.type_id" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#132" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></p> | ||
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Borrow%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&</a>T</h4><a href="#method.borrow" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#210" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p> | ||
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-BorrowMut%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow_mut" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&mut </a>T</h4><a href="#method.borrow_mut" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#217" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p> | ||
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-From%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#544-548" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4><a href="#method.from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#545" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> | ||
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Into%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></h3><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#533-540" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4><a href="#method.into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#537" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> | ||
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-ToOwned" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></h3><a href="#impl-ToOwned" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/alloc/borrow.rs.html#84-96" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Owned" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="type">Owned</a> = T</h4><a href="#associatedtype.Owned" class="anchor"></a></div></summary><div class='docblock'><p>The resulting type after obtaining ownership.</p> | ||
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.to_owned" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&self) -> T</h4><a href="#method.to_owned" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/alloc/borrow.rs.html#89" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.54.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p> | ||
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone_into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&mut </a>T)</h4><a href="#method.clone_into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/alloc/borrow.rs.html#93" title="goto source code">[src]</a></div></summary><div class="item-info"><div class="stab unstable"><details><summary><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>toowned_clone_into</code>)</summary><p>recently added</p> | ||
| </details></div></div><div class='docblock'><p>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.54.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p> | ||
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-ToString" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/alloc/string/trait.ToString.html" title="trait alloc::string::ToString">ToString</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-ToString" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/alloc/string.rs.html#2372-2386" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.to_string" class="method trait-impl has-srclink"><h4 class="code-header">pub default fn <a href="https://doc.rust-lang.org/1.54.0/alloc/string/trait.ToString.html#tymethod.to_string" class="fnname">to_string</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4><a href="#method.to_string" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/alloc/string.rs.html#2378" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Converts the given value to a <code>String</code>. <a href="https://doc.rust-lang.org/1.54.0/alloc/string/trait.ToString.html#tymethod.to_string">Read more</a></p> | ||
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TryFrom%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></h3><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#581-590" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4><a href="#associatedtype.Error" class="anchor"></a></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p> | ||
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_from" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4><a href="#method.try_from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#587" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> | ||
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TryInto%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></h3><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#567-576" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error-1" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4><a href="#associatedtype.Error-1" class="anchor"></a></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p> | ||
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4><a href="#method.try_into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#573" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> | ||
| </div></details></div></details></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="deltae" data-search-index-js="../search-index.js" data-search-js="../search.js"></div><script src="../main.js"></script></body></html> |
@@ -1,12 +0,13 @@ | ||
| <!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="API documentation for the Rust `deltae` crate."><meta name="keywords" content="rust, rustlang, rust-lang, deltae"><title>deltae - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../dark.css"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../deltae/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Crate deltae</p><div class="sidebar-elems"><a id='all-types' href='all.html'><p>See all deltae's items</p></a><div class="block items"><ul><li><a href="#reexports">Re-exports</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#constants">Constants</a></li><li><a href="#traits">Traits</a></li></ul></div><p class='location'></p><script>window.sidebarCurrent = {name: 'deltae', ty: 'mod', relpath: '../'};</script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/deltae/lib.rs.html#1-160' title='goto source code'>[src]</a></span><span class='in-band'>Crate <a class="mod" href=''>deltae</a></span></h1><div class='docblock'><p>Calculate <a href="http://www.colorwiki.com/wiki/Delta_E:_The_Color_Difference">Delta E</a> | ||
| <!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="Calculate Delta E (color difference) between two colors in CIE Lab space."><meta name="keywords" content="rust, rustlang, rust-lang, deltae"><title>deltae - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><script src="../crates.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg"> | ||
| <link rel="alternate icon" type="image/png" href="../favicon-16x16.png"> | ||
| <link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod crate"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../deltae/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Crate deltae</h2><div class="block version"><p>Version 0.3.0</p></div><div class="sidebar-elems"><a id="all-types" href="all.html"><p>See all deltae's items</p></a><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#macros">Macros</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#constants">Constants</a></li><li><a href="#traits">Traits</a></li></ul></div><div id="sidebar-vars" data-name="deltae" data-ty="mod" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Crate <a class="mod" href="#">deltae</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/deltae/lib.rs.html#1-240" title="goto source code">[src]</a></span></h1><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Calculate <a href="http://www.colorwiki.com/wiki/Delta_E:_The_Color_Difference">Delta E</a> | ||
| (color difference) between two colors in CIE Lab space.</p> | ||
| <h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1> | ||
| <div class="example-wrap"><pre class="rust rust-example-rendered"> | ||
| <span class="kw">use</span> <span class="ident">std</span>::<span class="ident">error</span>::<span class="ident">Error</span>; | ||
| <span class="kw">use</span> <span class="ident">std</span>::<span class="ident">str</span>::<span class="ident">FromStr</span>; | ||
| <span class="kw">use</span> <span class="ident">std::error::Error</span>; | ||
| <span class="kw">use</span> <span class="ident">deltae</span>::<span class="kw-2">*</span>; | ||
| <span class="kw">fn</span> <span class="ident">main</span>() <span class="op">-></span> <span class="prelude-ty">Result</span><span class="op"><</span>(), <span class="ident">Box</span><span class="op"><</span><span class="kw">dyn</span> <span class="ident">Error</span><span class="op">>></span>{ | ||
| <span class="kw">fn</span> <span class="ident">main</span>() <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Result</span><span class="op"><</span>(), <span class="ident">Box</span><span class="op"><</span><span class="kw">dyn</span> <span class="ident">Error</span><span class="op">></span><span class="op">></span>{ | ||
| <span class="comment">// Lab from a string</span> | ||
| <span class="kw">let</span> <span class="ident">lab0</span> <span class="op">=</span> <span class="ident">LabValue</span>::<span class="ident">from_str</span>(<span class="string">"89.73, 1.88, -6.96"</span>)<span class="question-mark">?</span>; | ||
| <span class="kw">let</span> <span class="ident">lab0</span>: <span class="ident">LabValue</span> <span class="op">=</span> <span class="string">"89.73, 1.88, -6.96"</span>.<span class="ident">parse</span>()<span class="question-mark">?</span>; | ||
| <span class="comment">// Lab directly from values</span> | ||
@@ -19,21 +20,43 @@ <span class="kw">let</span> <span class="ident">lab1</span> <span class="op">=</span> <span class="ident">LabValue</span> { | ||
| <span class="comment">// Create your own Lab type</span> | ||
| <span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>, <span class="ident">Copy</span>)]</span> | ||
| <span class="kw">struct</span> <span class="ident">MyLab</span>(<span class="ident">f32</span>, <span class="ident">f32</span>, <span class="ident">f32</span>); | ||
| <span class="comment">// Types that implement Into<LabValue> also implement the Delta trait</span> | ||
| <span class="kw">impl</span> <span class="ident">From</span><span class="op"><</span><span class="ident">MyLab</span><span class="op">></span> <span class="kw">for</span> <span class="ident">LabValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">mylab</span>: <span class="ident">MyLab</span>) <span class="op">-</span><span class="op">></span> <span class="self">Self</span> { | ||
| <span class="ident">LabValue</span> { <span class="ident">l</span>: <span class="ident">mylab</span>.<span class="number">0</span>, <span class="ident">a</span>: <span class="ident">mylab</span>.<span class="number">1</span>, <span class="ident">b</span>: <span class="ident">mylab</span>.<span class="number">2</span> } | ||
| } | ||
| } | ||
| <span class="kw">let</span> <span class="ident">mylab</span> <span class="op">=</span> <span class="ident">MyLab</span>(<span class="number">95.08</span>, <span class="op">-</span><span class="number">0.17</span>, <span class="op">-</span><span class="number">10.81</span>); | ||
| <span class="comment">// Implement DeltaEq for your own types</span> | ||
| <span class="kw">impl</span><span class="op"><</span><span class="ident">D</span>: <span class="ident">Delta</span> <span class="op">+</span> <span class="ident">Copy</span><span class="op">></span> <span class="ident">DeltaEq</span><span class="op"><</span><span class="ident">D</span><span class="op">></span> <span class="kw">for</span> <span class="ident">MyLab</span> {} | ||
| <span class="comment">// Assert that colors are equivalent within a tolerance</span> | ||
| <span class="macro">assert_delta_eq!</span>(<span class="ident">mylab</span>, <span class="ident">lab1</span>, <span class="ident">DE2000</span>, <span class="number">0.0</span>, <span class="string">"mylab is not equal to lab1!"</span>); | ||
| <span class="comment">// Calculate DeltaE between two lab values</span> | ||
| <span class="kw">let</span> <span class="ident">de0</span> <span class="op">=</span> <span class="ident">DeltaE</span>::<span class="ident">new</span>(<span class="kw-2">&</span><span class="ident">lab0</span>, <span class="kw-2">&</span><span class="ident">lab1</span>, <span class="ident">DE2000</span>); | ||
| <span class="kw">let</span> <span class="ident">de0</span> <span class="op">=</span> <span class="ident">DeltaE::new</span>(<span class="kw-2">&</span><span class="ident">lab0</span>, <span class="kw-2">&</span><span class="ident">lab1</span>, <span class="ident">DE2000</span>); | ||
| <span class="comment">// Use the Delta trait</span> | ||
| <span class="kw">let</span> <span class="ident">de1</span> <span class="op">=</span> <span class="ident">lab0</span>.<span class="ident">delta</span>(<span class="ident">lab1</span>, <span class="ident">DE2000</span>); | ||
| <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">de0</span>, <span class="ident">de1</span>); | ||
| <span class="macro">assert_eq!</span>(<span class="ident">de0</span>, <span class="ident">de1</span>); | ||
| <span class="comment">// Convert to other color types</span> | ||
| <span class="kw">let</span> <span class="ident">lch0</span> <span class="op">=</span> <span class="ident">LchValue</span>::<span class="ident">from</span>(<span class="ident">lab0</span>); | ||
| <span class="kw">let</span> <span class="ident">xyz0</span> <span class="op">=</span> <span class="ident">XyzValue</span>::<span class="ident">from</span>(<span class="ident">lab1</span>); | ||
| <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">lch0</span>, <span class="ident">lab0</span>); | ||
| <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">xyz0</span>, <span class="ident">lab1</span>); | ||
| <span class="kw">let</span> <span class="ident">lch0</span> <span class="op">=</span> <span class="ident">LchValue::from</span>(<span class="ident">lab0</span>); | ||
| <span class="kw">let</span> <span class="ident">xyz0</span> <span class="op">=</span> <span class="ident">XyzValue::from</span>(<span class="ident">lab1</span>); | ||
| <span class="comment">// If DE2000 is less than 1.0, the colors are considered equivalent</span> | ||
| <span class="macro">assert!</span>(<span class="ident">lch0</span>.<span class="ident">delta_eq</span>(<span class="kw-2">&</span><span class="ident">lab0</span>, <span class="ident">DE2000</span>, <span class="number">1.0</span>)); | ||
| <span class="macro">assert!</span>(<span class="ident">xyz0</span>.<span class="ident">delta_eq</span>(<span class="kw-2">&</span><span class="ident">lab1</span>, <span class="ident">DE2000</span>, <span class="number">1.0</span>)); | ||
| <span class="comment">// Calculate DeltaE between different color types</span> | ||
| <span class="kw">let</span> <span class="ident">de2</span> <span class="op">=</span> <span class="ident">lch0</span>.<span class="ident">delta</span>(<span class="ident">xyz0</span>, <span class="ident">DE2000</span>); | ||
| <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">de2</span>.<span class="ident">round_to</span>(<span class="number">4</span>), <span class="ident">de0</span>.<span class="ident">round_to</span>(<span class="number">4</span>)); | ||
| <span class="macro">assert_eq!</span>(<span class="ident">de2</span>.<span class="ident">round_to</span>(<span class="number">4</span>), <span class="ident">de0</span>.<span class="ident">round_to</span>(<span class="number">4</span>)); | ||
| <span class="comment">// There is some loss of accuracy in the conversion.</span> | ||
| <span class="comment">// Usually rounding to 4 decimal places is more than enough.</span> | ||
| <span class="macro">println</span><span class="macro">!</span>(<span class="string">"{}\n{}\n{}\n{}\n{}\n{}\n{}\n"</span>, | ||
| <span class="comment">// Recalculate DeltaE with different method</span> | ||
| <span class="kw">let</span> <span class="ident">de3</span> <span class="op">=</span> <span class="ident">de2</span>.<span class="ident">with_method</span>(<span class="ident">DE1976</span>); | ||
| <span class="macro">println!</span>(<span class="string">"{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n"</span>, | ||
| <span class="ident">lab0</span>, <span class="comment">// [L:89.73, a:1.88, b:-6.96]</span> | ||
@@ -46,2 +69,3 @@ <span class="ident">lab1</span>, <span class="comment">// [L:95.08, a:-0.17, b:-10.81]</span> | ||
| <span class="ident">de2</span>, <span class="comment">// 5.316937</span> | ||
| <span class="ident">de3</span>, <span class="comment">// 6.902717</span> | ||
| ); | ||
@@ -51,19 +75,20 @@ | ||
| }</pre></div> | ||
| </div><h2 id='reexports' class='section-header'><a href="#reexports">Re-exports</a></h2> | ||
| <table><tr><td><code>pub use <a class="enum" href="../deltae/enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a>::*;</code></td></tr></table><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2> | ||
| <table><tr class='module-item'><td><a class="struct" href="struct.DeltaE.html" title='deltae::DeltaE struct'>DeltaE</a></td><td class='docblock-short'><p>The measured difference between two colors</p> | ||
| </td></tr><tr class='module-item'><td><a class="struct" href="struct.LabValue.html" title='deltae::LabValue struct'>LabValue</a></td><td class='docblock-short'><p>CIEL*a*b*</p> | ||
| </td></tr><tr class='module-item'><td><a class="struct" href="struct.LchValue.html" title='deltae::LchValue struct'>LchValue</a></td><td class='docblock-short'><p>Lch: Luminance, Chroma, Hue</p> | ||
| </td></tr><tr class='module-item'><td><a class="struct" href="struct.XyzValue.html" title='deltae::XyzValue struct'>XyzValue</a></td><td class='docblock-short'><p>XYZ</p> | ||
| </td></tr></table><h2 id='enums' class='section-header'><a href="#enums">Enums</a></h2> | ||
| <table><tr class='module-item'><td><a class="enum" href="enum.DEMethod.html" title='deltae::DEMethod enum'>DEMethod</a></td><td class='docblock-short'><p>The most common DeltaE methods</p> | ||
| </td></tr><tr class='module-item'><td><a class="enum" href="enum.ValueError.html" title='deltae::ValueError enum'>ValueError</a></td><td class='docblock-short'><p>Value validation Error type</p> | ||
| </td></tr></table><h2 id='constants' class='section-header'><a href="#constants">Constants</a></h2> | ||
| <table><tr class='module-item'><td><a class="constant" href="constant.DECMC1.html" title='deltae::DECMC1 constant'>DECMC1</a></td><td class='docblock-short'><p>DeltaE CMC (1:1)</p> | ||
| </td></tr><tr class='module-item'><td><a class="constant" href="constant.DECMC2.html" title='deltae::DECMC2 constant'>DECMC2</a></td><td class='docblock-short'><p>DeltaE CMC (2:1)</p> | ||
| </td></tr></table><h2 id='traits' class='section-header'><a href="#traits">Traits</a></h2> | ||
| <table><tr class='module-item'><td><a class="trait" href="trait.Delta.html" title='deltae::Delta trait'>Delta</a></td><td class='docblock-short'><p>Trait to determine color difference between various types. | ||
| </div></details><h2 id="reexports" class="section-header"><a href="#reexports">Re-exports</a></h2> | ||
| <table><tr class="import-item"><td><code>pub use <a class="enum" href="enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a>::*;</code></td><td class="docblock-short"></td></tr><tr class="import-item"><td><code>pub use <a class="mod" href="color/index.html" title="mod deltae::color">color</a>::*;</code></td><td class="docblock-short"></td></tr><tr class="import-item"><td><code>pub use <a class="mod" href="eq/index.html" title="mod deltae::eq">eq</a>::*;</code></td><td class="docblock-short"></td></tr></table><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2> | ||
| <table><tr class="module-item"><td><a class="mod" href="color/index.html" title="deltae::color mod">color</a></td><td class="docblock-short"><p>Manipulate and convert CIE L*a*b* and Lch colors.</p> | ||
| </td></tr><tr class="module-item"><td><a class="mod" href="eq/index.html" title="deltae::eq mod">eq</a></td><td class="docblock-short"><p><code>Tolerance</code> and <code>DeltaEq</code> traits</p> | ||
| </td></tr></table><h2 id="macros" class="section-header"><a href="#macros">Macros</a></h2> | ||
| <table><tr class="module-item"><td><a class="macro" href="macro.assert_delta_eq.html" title="deltae::assert_delta_eq macro">assert_delta_eq</a></td><td class="docblock-short"><p>Convenience macro for asserting two values are equivalent within a tolerance</p> | ||
| </td></tr></table><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2> | ||
| <table><tr class="module-item"><td><a class="struct" href="struct.DeltaE.html" title="deltae::DeltaE struct">DeltaE</a></td><td class="docblock-short"><p>The measured difference between two colors</p> | ||
| </td></tr></table><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2> | ||
| <table><tr class="module-item"><td><a class="enum" href="enum.DEMethod.html" title="deltae::DEMethod enum">DEMethod</a></td><td class="docblock-short"><p>The most common DeltaE methods</p> | ||
| </td></tr></table><h2 id="constants" class="section-header"><a href="#constants">Constants</a></h2> | ||
| <table><tr class="module-item"><td><a class="constant" href="constant.DECMC1.html" title="deltae::DECMC1 constant">DECMC1</a></td><td class="docblock-short"><p>DeltaE CMC (1:1)</p> | ||
| </td></tr><tr class="module-item"><td><a class="constant" href="constant.DECMC2.html" title="deltae::DECMC2 constant">DECMC2</a></td><td class="docblock-short"><p>DeltaE CMC (2:1)</p> | ||
| </td></tr></table><h2 id="traits" class="section-header"><a href="#traits">Traits</a></h2> | ||
| <table><tr class="module-item"><td><a class="trait" href="trait.Delta.html" title="deltae::Delta trait">Delta</a></td><td class="docblock-short"><p>Trait to determine color difference between various types. | ||
| As long as the type can be converted to Lab, we can calculate DeltaE.</p> | ||
| </td></tr><tr class='module-item'><td><a class="trait" href="trait.Round.html" title='deltae::Round trait'>Round</a></td><td class='docblock-short'><p>Trait for rounding values to a number of decimal places</p> | ||
| </td></tr><tr class='module-item'><td><a class="trait" href="trait.Validate.html" title='deltae::Validate trait'>Validate</a></td><td class='docblock-short'><p>Trait to validate whether a type has appropriate values</p> | ||
| </td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "deltae";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html> | ||
| </td></tr><tr class="module-item"><td><a class="trait" href="trait.Round.html" title="deltae::Round trait">Round</a></td><td class="docblock-short"><p>Trait for rounding values to a number of decimal places</p> | ||
| </td></tr><tr class="module-item"><td><a class="trait" href="trait.Validate.html" title="deltae::Validate trait">Validate</a></td><td class="docblock-short"><p>Trait to validate whether a type has appropriate values</p> | ||
| </td></tr></table></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="deltae" data-search-index-js="../search-index.js" data-search-js="../search.js"></div><script src="../main.js"></script></body></html> |
@@ -5,2 +5,3 @@ <!DOCTYPE html> | ||
| <meta http-equiv="refresh" content="0;URL=../../deltae/trait.Round.html"> | ||
| <title>Redirection</title> | ||
| </head> | ||
@@ -7,0 +8,0 @@ <body> |
@@ -1,1 +0,1 @@ | ||
| initSidebarItems({"constant":[["DECMC1","DeltaE CMC (1:1)"],["DECMC2","DeltaE CMC (2:1)"]],"enum":[["DEMethod","The most common DeltaE methods"],["ValueError","Value validation Error type"]],"struct":[["DeltaE","The measured difference between two colors"],["LabValue","CIEL*a*b*"],["LchValue","Lch: Luminance, Chroma, Hue"],["XyzValue","XYZ"]],"trait":[["Delta","Trait to determine color difference between various types. As long as the type can be converted to Lab, we can calculate DeltaE."],["Round","Trait for rounding values to a number of decimal places"],["Validate","Trait to validate whether a type has appropriate values"]]}); | ||
| initSidebarItems({"constant":[["DECMC1","DeltaE CMC (1:1)"],["DECMC2","DeltaE CMC (2:1)"]],"enum":[["DEMethod","The most common DeltaE methods"]],"macro":[["assert_delta_eq","Convenience macro for asserting two values are equivalent within a tolerance"]],"mod":[["color","Manipulate and convert CIE L*a*b* and Lch colors."],["eq","`Tolerance` and `DeltaEq` traits"]],"struct":[["DeltaE","The measured difference between two colors"]],"trait":[["Delta","Trait to determine color difference between various types. As long as the type can be converted to Lab, we can calculate DeltaE."],["Round","Trait for rounding values to a number of decimal places"],["Validate","Trait to validate whether a type has appropriate values"]]}); |
@@ -1,48 +0,69 @@ | ||
| <!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="API documentation for the Rust `DeltaE` struct in crate `deltae`."><meta name="keywords" content="rust, rustlang, rust-lang, DeltaE"><title>deltae::DeltaE - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../dark.css"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../deltae/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Struct DeltaE</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.method">method</a><a href="#structfield.value">value</a></div><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.new">new</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Copy">Copy</a><a href="#impl-Debug">Debug</a><a href="#impl-Display">Display</a><a href="#impl-PartialEq%3CDeltaE%3E">PartialEq<DeltaE></a><a href="#impl-PartialEq%3Cf32%3E">PartialEq<f32></a><a href="#impl-PartialOrd%3CDeltaE%3E">PartialOrd<DeltaE></a><a href="#impl-Round">Round</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-ToString">ToString</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><p class='location'><a href='index.html'>deltae</a></p><script>window.sidebarCurrent = {name: 'DeltaE', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/deltae/lib.rs.html#81-86' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='index.html'>deltae</a>::<wbr><a class="struct" href=''>DeltaE</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct DeltaE { | ||
| pub method: <a class="enum" href="../deltae/enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a>, | ||
| pub value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, | ||
| }</pre></div><div class='docblock'><h2 id="the-measured-difference-between-two-colors" class="section-header"><a href="#the-measured-difference-between-two-colors">The measured difference between two colors</a></h2> | ||
| <p>There are many different methods of calculating color difference. | ||
| Different methods have a specific purpose, mainly in determining the level | ||
| of tolerance for describing the difference between two colors.</p> | ||
| </div><h2 id='fields' class='fields small-section-header'> | ||
| Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.method" class="structfield small-section-header"><a href="#structfield.method" class="anchor field"></a><code id="method.v">method: <a class="enum" href="../deltae/enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a></code></span><div class='docblock'><p>The mathematical method used for calculating color difference</p> | ||
| </div><span id="structfield.value" class="structfield small-section-header"><a href="#structfield.value" class="anchor field"></a><code id="value.v">value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></code></span><div class='docblock'><p>The calculated value</p> | ||
| </div><h2 id='methods' class='small-section-header'>Methods<a href='#methods' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="struct" href="../deltae/struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../src/deltae/lib.rs.html#88-94' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code id='new.v'>pub fn <a href='#method.new' class='fnname'>new</a><A, B>(a: A, b: B, method: <a class="enum" href="../deltae/enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a>) -> <a class="struct" href="../deltae/struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a> <span class="where fmt-newline">where<br> A: <a class="trait" href="../deltae/trait.Delta.html" title="trait deltae::Delta">Delta</a>,<br> B: <a class="trait" href="../deltae/trait.Delta.html" title="trait deltae::Delta">Delta</a>, </span></code><a class='srclink' href='../src/deltae/lib.rs.html#90-93' title='goto source code'>[src]</a></h4><div class='docblock'><p>New <code>DeltaE</code> from colors and <code>DEMethod</code>.</p> | ||
| </div></div><h2 id='implementations' class='small-section-header'>Trait Implementations<a href='#implementations' class='anchor'></a></h2><div id='implementations-list'><h3 id='impl-Round' class='impl'><code class='in-band'>impl <a class="trait" href="../deltae/trait.Round.html" title="trait deltae::Round">Round</a> for <a class="struct" href="../deltae/struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a></code><a href='#impl-Round' class='anchor'></a><a class='srclink' href='../src/deltae/round.rs.html#15-20' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.round_to' class="method hidden"><code id='round_to.v'>fn <a href='../deltae/trait.Round.html#tymethod.round_to' class='fnname'>round_to</a>(self, places: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -> Self</code><a class='srclink' href='../src/deltae/round.rs.html#16-19' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Rounds the value to a number of decimal places</p> | ||
| </div></div><h3 id='impl-PartialOrd%3CDeltaE%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="../deltae/struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a>> for <a class="struct" href="../deltae/struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a></code><a href='#impl-PartialOrd%3CDeltaE%3E' class='anchor'></a><a class='srclink' href='../src/deltae/lib.rs.html#111-115' title='goto source code'>[src]</a></h3><div class='docblock'><p>One should be careful when ordering DeltaE. A <code>DE2000:1.0</code> value is not | ||
| <!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="The measured difference between two colors"><meta name="keywords" content="rust, rustlang, rust-lang, DeltaE"><title>DeltaE in deltae - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><script src="../crates.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg"> | ||
| <link rel="alternate icon" type="image/png" href="../favicon-16x16.png"> | ||
| <link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../deltae/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct DeltaE</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.method">method</a><a href="#method.new">new</a><a href="#method.reference">reference</a><a href="#method.sample">sample</a><a href="#method.value">value</a><a href="#method.with_method">with_method</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Copy">Copy</a><a href="#impl-Debug">Debug</a><a href="#impl-Display">Display</a><a href="#impl-PartialEq%3CDeltaE%3E">PartialEq<DeltaE></a><a href="#impl-PartialEq%3Cf32%3E">PartialEq<f32></a><a href="#impl-PartialOrd%3CDeltaE%3E">PartialOrd<DeltaE></a><a href="#impl-Round">Round</a><a href="#impl-Tolerance">Tolerance</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-ToString">ToString</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><h2 class="location">Other items in<br><a href="index.html">deltae</a></h2><div id="sidebar-vars" data-name="DeltaE" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="index.html">deltae</a>::<wbr><a class="struct" href="#">DeltaE</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/deltae/lib.rs.html#105-114" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct">pub struct DeltaE { /* fields omitted */ }</pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><h2 id="the-measured-difference-between-two-colors" class="section-header"><a href="#the-measured-difference-between-two-colors">The measured difference between two colors</a></h2> | ||
| <p>There are many different methods of calculating color difference. Different methods have a | ||
| specific purpose, mainly in determining the level of tolerance for describing the difference | ||
| between two colors. Regardless of the <a href="enum.DEMethod.html" title="DEMethod"><code>DEMethod</code></a> used, <a href="struct.DeltaE.html" title="DeltaE"><code>DeltaE</code></a> is always calculated based on the | ||
| <a href="color/struct.LabValue.html" title="LabValue"><code>LabValue</code></a>s of the two colors.</p> | ||
| </div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="struct" href="struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../src/deltae/lib.rs.html#116-168" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.new" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.new" class="fnname">new</a><A, B>(a: A, b: B, method: <a class="enum" href="enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a>) -> <a class="struct" href="struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a> <span class="where fmt-newline">where<br> A: <a class="trait" href="trait.Delta.html" title="trait deltae::Delta">Delta</a>,<br> B: <a class="trait" href="trait.Delta.html" title="trait deltae::Delta">Delta</a>, </span></h4><a href="#method.new" class="anchor"></a><a class="srclink" href="../src/deltae/lib.rs.html#127-130" title="goto source code">[src]</a></div></summary><div class="docblock"><p>New <a href="struct.DeltaE.html" title="DeltaE"><code>DeltaE</code></a> from two colors and a <a href="enum.DEMethod.html" title="DEMethod"><code>DEMethod</code></a>.</p> | ||
| <div class="example-wrap"><pre class="rust rust-example-rendered"> | ||
| <span class="kw">use</span> <span class="ident">deltae</span>::{<span class="ident">LabValue</span>, <span class="ident">DeltaE</span>, <span class="ident">DEMethod::DE2000</span>}; | ||
| <span class="kw">let</span> <span class="ident">lab0</span> <span class="op">=</span> <span class="ident">LabValue::new</span>(<span class="number">89.73</span>, <span class="number">1.88</span>, <span class="op">-</span><span class="number">6.96</span>).<span class="ident">unwrap</span>(); | ||
| <span class="kw">let</span> <span class="ident">lab1</span> <span class="op">=</span> <span class="ident">LabValue::new</span>(<span class="number">95.08</span>, <span class="op">-</span><span class="number">0.17</span>, <span class="op">-</span><span class="number">10.81</span>).<span class="ident">unwrap</span>(); | ||
| <span class="kw">let</span> <span class="ident">de0</span> <span class="op">=</span> <span class="ident">DeltaE::new</span>(<span class="kw-2">&</span><span class="ident">lab0</span>, <span class="kw-2">&</span><span class="ident">lab1</span>, <span class="ident">DE2000</span>); | ||
| <span class="macro">assert_eq!</span>(<span class="ident">de0</span>, <span class="number">5.316941</span>);</pre></div> | ||
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.with_method" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.with_method" class="fnname">with_method</a>(self, method: <a class="enum" href="enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a>) -> Self</h4><a href="#method.with_method" class="anchor"></a><a class="srclink" href="../src/deltae/lib.rs.html#143-145" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Recalculate <a href="struct.DeltaE.html" title="DeltaE"><code>DeltaE</code></a> with another <a href="enum.DEMethod.html" title="DEMethod"><code>DEMethod</code></a></p> | ||
| <div class="example-wrap"><pre class="rust rust-example-rendered"> | ||
| <span class="kw">use</span> <span class="ident">deltae</span>::{<span class="ident">Delta</span>, <span class="ident">DeltaE</span>, <span class="ident">LabValue</span>, <span class="ident">DEMethod</span>}; | ||
| <span class="kw">let</span> <span class="ident">lab0</span> <span class="op">=</span> <span class="ident">LabValue::new</span>(<span class="number">89.73</span>, <span class="number">1.88</span>, <span class="op">-</span><span class="number">6.96</span>).<span class="ident">unwrap</span>(); | ||
| <span class="kw">let</span> <span class="ident">lab1</span> <span class="op">=</span> <span class="ident">LabValue::new</span>(<span class="number">95.08</span>, <span class="op">-</span><span class="number">0.17</span>, <span class="op">-</span><span class="number">10.81</span>).<span class="ident">unwrap</span>(); | ||
| <span class="kw">let</span> <span class="ident">de2000</span> <span class="op">=</span> <span class="ident">lab0</span>.<span class="ident">delta</span>(<span class="ident">lab1</span>, <span class="ident">DEMethod::DE2000</span>); | ||
| <span class="kw">let</span> <span class="ident">de1976</span> <span class="op">=</span> <span class="ident">de2000</span>.<span class="ident">with_method</span>(<span class="ident">DEMethod::DE1976</span>); | ||
| <span class="macro">assert_eq!</span>(<span class="ident">de1976</span>, <span class="number">6.902716</span>);</pre></div> | ||
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.method" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.method" class="fnname">method</a>(&self) -> &<a class="enum" href="enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a></h4><a href="#method.method" class="anchor"></a><a class="srclink" href="../src/deltae/lib.rs.html#148-150" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Return a reference the <a href="struct.DeltaE.html" title="DeltaE"><code>DeltaE</code></a> method used in the calculation</p> | ||
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.value" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.value" class="fnname">value</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f32.html">f32</a></h4><a href="#method.value" class="anchor"></a><a class="srclink" href="../src/deltae/lib.rs.html#153-155" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Return a reference to the <a href="struct.DeltaE.html" title="DeltaE"><code>DeltaE</code></a> value</p> | ||
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.reference" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.reference" class="fnname">reference</a>(&self) -> &<a class="struct" href="color/struct.LabValue.html" title="struct deltae::color::LabValue">LabValue</a></h4><a href="#method.reference" class="anchor"></a><a class="srclink" href="../src/deltae/lib.rs.html#159-161" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Return a reference to the reference <a href="color/struct.LabValue.html" title="LabValue"><code>LabValue</code></a> used in the calculation. A reference color | ||
| is the base color to which the sample color is being compared.</p> | ||
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.sample" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.sample" class="fnname">sample</a>(&self) -> &<a class="struct" href="color/struct.LabValue.html" title="struct deltae::color::LabValue">LabValue</a></h4><a href="#method.sample" class="anchor"></a><a class="srclink" href="../src/deltae/lib.rs.html#165-167" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Return a reference to the sample <a href="color/struct.LabValue.html" title="LabValue"><code>LabValue</code></a> used in the calculation. A sample color is | ||
| the color being compared to the reference color.</p> | ||
| </div></details></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Clone" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a></h3><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../src/deltae/lib.rs.html#104" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a></h4><a href="#method.clone" class="anchor"></a><a class="srclink" href="../src/deltae/lib.rs.html#104" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p> | ||
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone_from" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&</a>Self)</h4><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.clone_from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/clone.rs.html#130" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></p> | ||
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Debug" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a></h3><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/deltae/lib.rs.html#104" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.54.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.54.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4><a href="#method.fmt" class="anchor"></a><a class="srclink" href="../src/deltae/lib.rs.html#104" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p> | ||
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Display" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="struct" href="struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a></h3><a href="#impl-Display" class="anchor"></a><a class="srclink" href="../src/deltae/lib.rs.html#170-174" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt-1" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Display.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.54.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.54.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4><a href="#method.fmt-1" class="anchor"></a><a class="srclink" href="../src/deltae/lib.rs.html#171-173" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></p> | ||
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-PartialEq%3CDeltaE%3E" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a>> for <a class="struct" href="struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a></h3><a href="#impl-PartialEq%3CDeltaE%3E" class="anchor"></a><a class="srclink" href="../src/deltae/lib.rs.html#182-186" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.eq-1" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&</a>Self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.eq-1" class="anchor"></a><a class="srclink" href="../src/deltae/lib.rs.html#183-185" title="goto source code">[src]</a></div></summary><div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used | ||
| by <code>==</code>. <a href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p> | ||
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.ne-1" class="method trait-impl has-srclink"><h4 class="code-header"><div class="code-attribute">#[must_use]</div>fn <a href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.ne-1" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/cmp.rs.html#213" title="goto source code">[src]</a></div></summary><div class='docblock'><p>This method tests for <code>!=</code>.</p> | ||
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-PartialEq%3Cf32%3E" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f32.html">f32</a>> for <a class="struct" href="struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a></h3><a href="#impl-PartialEq%3Cf32%3E" class="anchor"></a><a class="srclink" href="../src/deltae/lib.rs.html#176-180" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.eq" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, f: &<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f32.html">f32</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.eq" class="anchor"></a><a class="srclink" href="../src/deltae/lib.rs.html#177-179" title="goto source code">[src]</a></div></summary><div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used | ||
| by <code>==</code>. <a href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p> | ||
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.ne" class="method trait-impl has-srclink"><h4 class="code-header"><div class="code-attribute">#[must_use]</div>fn <a href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.ne" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/cmp.rs.html#213" title="goto source code">[src]</a></div></summary><div class='docblock'><p>This method tests for <code>!=</code>.</p> | ||
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-PartialOrd%3CDeltaE%3E" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a>> for <a class="struct" href="struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a></h3><a href="#impl-PartialOrd%3CDeltaE%3E" class="anchor"></a><a class="srclink" href="../src/deltae/lib.rs.html#191-195" title="goto source code">[src]</a></div></summary><div class="docblock"><p>One should be careful when ordering DeltaE. A <code>DE2000:1.0</code> value is not | ||
| necessarily the same amount of color difference as a amount of color | ||
| difference <code>DE1976:1.0</code> value.</p> | ||
| </div><div class='impl-items'><h4 id='method.partial_cmp' class="method hidden"><code id='partial_cmp.v'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp' class='fnname'>partial_cmp</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></code><a class='srclink' href='../src/deltae/lib.rs.html#112-114' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></p> | ||
| </div><h4 id='method.lt' class="method"><code id='lt.v'><span class="docblock attributes">#[must_use] | ||
| </span>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt' class='fnname'>lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#796-801' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></p> | ||
| </div><h4 id='method.le' class="method"><code id='le.v'><span class="docblock attributes">#[must_use] | ||
| </span>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le' class='fnname'>le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#818-823' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></p> | ||
| </div><h4 id='method.gt' class="method"><code id='gt.v'><span class="docblock attributes">#[must_use] | ||
| </span>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt' class='fnname'>gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#839-844' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></p> | ||
| </div><h4 id='method.ge' class="method"><code id='ge.v'><span class="docblock attributes">#[must_use] | ||
| </span>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge' class='fnname'>ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#861-866' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></p> | ||
| </div></div><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../deltae/struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../src/deltae/lib.rs.html#80' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code id='clone.v'>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class="struct" href="../deltae/struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a></code><a class='srclink' href='../src/deltae/lib.rs.html#80' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p> | ||
| </div><h4 id='method.clone_from' class="method"><code id='clone_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#131-133' title='goto source code'>[src]</a></h4><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p> | ||
| </div></div><h3 id='impl-PartialEq%3CDeltaE%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="../deltae/struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a>> for <a class="struct" href="../deltae/struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a></code><a href='#impl-PartialEq%3CDeltaE%3E' class='anchor'></a><a class='srclink' href='../src/deltae/lib.rs.html#80' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq' class="method hidden"><code id='eq.v'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, other: &<a class="struct" href="../deltae/struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/deltae/lib.rs.html#80' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p> | ||
| </div><h4 id='method.ne' class="method hidden"><code id='ne.v'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a class="struct" href="../deltae/struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/deltae/lib.rs.html#80' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p> | ||
| </div></div><h3 id='impl-PartialEq%3Cf32%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>> for <a class="struct" href="../deltae/struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a></code><a href='#impl-PartialEq%3Cf32%3E' class='anchor'></a><a class='srclink' href='../src/deltae/lib.rs.html#102-106' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq-1' class="method hidden"><code id='eq.v-1'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, f: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/deltae/lib.rs.html#103-105' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p> | ||
| </div><h4 id='method.ne-1' class="method"><code id='ne.v-1'><span class="docblock attributes">#[must_use] | ||
| </span>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#200' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests for <code>!=</code>.</p> | ||
| </div></div><h3 id='impl-Copy' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="../deltae/struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a></code><a href='#impl-Copy' class='anchor'></a><a class='srclink' href='../src/deltae/lib.rs.html#80' title='goto source code'>[src]</a></h3><div class='impl-items'></div><h3 id='impl-Display' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="struct" href="../deltae/struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a></code><a href='#impl-Display' class='anchor'></a><a class='srclink' href='../src/deltae/lib.rs.html#96-100' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code id='fmt.v'>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../src/deltae/lib.rs.html#97-99' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></p> | ||
| </div></div><h3 id='impl-Debug' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../deltae/struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../src/deltae/lib.rs.html#80' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt-1' class="method hidden"><code id='fmt.v-1'>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../src/deltae/lib.rs.html#80' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p> | ||
| </div></div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-Send' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../deltae/struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../deltae/struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../deltae/struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../deltae/struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../deltae/struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-From%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href='#impl-From%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#550-552' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from' class="method hidden"><code id='from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(t: T) -> T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#551' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-ToString' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html" title="trait alloc::string::ToString">ToString</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-ToString' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/string.rs.html#2134-2144' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.to_string' class="method hidden"><code id='to_string.v'>default fn <a href='https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html#tymethod.to_string' class='fnname'>to_string</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/string.rs.html#2136-2143' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Converts the given value to a <code>String</code>. <a href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html#tymethod.to_string">Read more</a></p> | ||
| </div></div><h3 id='impl-ToOwned' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></code><a href='#impl-ToOwned' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#81-92' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Owned' class="type"><code id='Owned.t'>type <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned' class="type">Owned</a> = T</code></h4><div class='docblock'><p>The resulting type after obtaining ownership.</p> | ||
| </div><h4 id='method.to_owned' class="method hidden"><code id='to_owned.v'>fn <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned' class='fnname'>to_owned</a>(&self) -> T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#85-87' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p> | ||
| </div><h4 id='method.clone_into' class="method hidden"><code id='clone_into.v'>fn <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into' class='fnname'>clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T)</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#89-91' title='goto source code'>[src]</a></h4><div class='stability hidden'><div class='stab unstable'><details><summary><span class='emoji'>🔬</span> This is a nightly-only experimental API. (<code>toowned_clone_into</code>)</summary><p>recently added</p> | ||
| </details></div></div><div class='docblock hidden'><p>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p> | ||
| </div></div><h3 id='impl-Into%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href='#impl-Into%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#541-546' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.into' class="method hidden"><code id='into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into' class='fnname'>into</a>(self) -> U</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#543-545' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-TryFrom%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></code><a href='#impl-TryFrom%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#569-575' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error' class="type"><code id='Error.t'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error' class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p> | ||
| </div><h4 id='method.try_from' class="method hidden"><code id='try_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#572-574' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-TryInto%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><a href='#impl-TryInto%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#557-564' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-1' class="type"><code id='Error.t-1'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error' class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p> | ||
| </div><h4 id='method.try_into' class="method hidden"><code id='try_into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into' class='fnname'>try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#561-563' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213-215' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code id='borrow.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p> | ||
| </div></div><h3 id='impl-BorrowMut%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-BorrowMut%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code id='borrow_mut.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#219' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p> | ||
| </div></div><h3 id='impl-Any' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#100-102' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code id='type_id.v'>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#101' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p> | ||
| </div></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "deltae";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html> | ||
| </div><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.partial_cmp" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fnname">partial_cmp</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&</a>Self) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.54.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4><a href="#method.partial_cmp" class="anchor"></a><a class="srclink" href="../src/deltae/lib.rs.html#192-194" title="goto source code">[src]</a></div></summary><div class='docblock'><p>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></p> | ||
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.lt" class="method trait-impl has-srclink"><h4 class="code-header"><div class="code-attribute">#[must_use]</div>fn <a href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialOrd.html#method.lt" class="fnname">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.lt" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/cmp.rs.html#978" title="goto source code">[src]</a></div></summary><div class='docblock'><p>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></p> | ||
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.le" class="method trait-impl has-srclink"><h4 class="code-header"><div class="code-attribute">#[must_use]</div>fn <a href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialOrd.html#method.le" class="fnname">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.le" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/cmp.rs.html#997" title="goto source code">[src]</a></div></summary><div class='docblock'><p>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> | ||
| operator. <a href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></p> | ||
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.gt" class="method trait-impl has-srclink"><h4 class="code-header"><div class="code-attribute">#[must_use]</div>fn <a href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialOrd.html#method.gt" class="fnname">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.gt" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/cmp.rs.html#1019" title="goto source code">[src]</a></div></summary><div class='docblock'><p>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></p> | ||
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.ge" class="method trait-impl has-srclink"><h4 class="code-header"><div class="code-attribute">#[must_use]</div>fn <a href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialOrd.html#method.ge" class="fnname">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.ge" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/cmp.rs.html#1038" title="goto source code">[src]</a></div></summary><div class='docblock'><p>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> | ||
| operator. <a href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></p> | ||
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Round" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="trait.Round.html" title="trait deltae::Round">Round</a> for <a class="struct" href="struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a></h3><a href="#impl-Round" class="anchor"></a><a class="srclink" href="../src/deltae/round.rs.html#15-22" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.round_to" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="trait.Round.html#tymethod.round_to" class="fnname">round_to</a>(self, places: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i32.html">i32</a>) -> Self</h4><a href="#method.round_to" class="anchor"></a><a class="srclink" href="../src/deltae/round.rs.html#16-21" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Rounds the value to a number of decimal places</p> | ||
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Tolerance" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="eq/trait.Tolerance.html" title="trait deltae::eq::Tolerance">Tolerance</a> for <a class="struct" href="struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a></h3><a href="#impl-Tolerance" class="anchor"></a><a class="srclink" href="../src/deltae/eq.rs.html#117-121" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.tolerance" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="eq/trait.Tolerance.html#tymethod.tolerance" class="fnname">tolerance</a>(self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f32.html">f32</a></h4><a href="#method.tolerance" class="anchor"></a><a class="srclink" href="../src/deltae/eq.rs.html#118-120" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Return a tolerance value</p> | ||
| </div></details></div></details><div id="impl-Copy" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a></h3><a href="#impl-Copy" class="anchor"></a><a class="srclink" href="../src/deltae/lib.rs.html#104" title="goto source code">[src]</a></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a></h3><a href="#impl-RefUnwindSafe" class="anchor"></a></div><div id="impl-Send" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a></h3><a href="#impl-Send" class="anchor"></a></div><div id="impl-Sync" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a></h3><a href="#impl-Sync" class="anchor"></a></div><div id="impl-Unpin" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a></h3><a href="#impl-Unpin" class="anchor"></a></div><div id="impl-UnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a></h3><a href="#impl-UnwindSafe" class="anchor"></a></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Any" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#131-135" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.54.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4><a href="#method.type_id" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#132" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></p> | ||
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Borrow%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&</a>T</h4><a href="#method.borrow" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#210" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p> | ||
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-BorrowMut%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow_mut" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&mut </a>T</h4><a href="#method.borrow_mut" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#217" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p> | ||
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-From%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#544-548" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4><a href="#method.from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#545" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> | ||
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Into%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></h3><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#533-540" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4><a href="#method.into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#537" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> | ||
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-ToOwned" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></h3><a href="#impl-ToOwned" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/alloc/borrow.rs.html#84-96" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Owned" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="type">Owned</a> = T</h4><a href="#associatedtype.Owned" class="anchor"></a></div></summary><div class='docblock'><p>The resulting type after obtaining ownership.</p> | ||
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.to_owned" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&self) -> T</h4><a href="#method.to_owned" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/alloc/borrow.rs.html#89" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.54.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p> | ||
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone_into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&mut </a>T)</h4><a href="#method.clone_into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/alloc/borrow.rs.html#93" title="goto source code">[src]</a></div></summary><div class="item-info"><div class="stab unstable"><details><summary><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>toowned_clone_into</code>)</summary><p>recently added</p> | ||
| </details></div></div><div class='docblock'><p>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.54.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p> | ||
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-ToString" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/alloc/string/trait.ToString.html" title="trait alloc::string::ToString">ToString</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-ToString" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/alloc/string.rs.html#2372-2386" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.to_string" class="method trait-impl has-srclink"><h4 class="code-header">pub default fn <a href="https://doc.rust-lang.org/1.54.0/alloc/string/trait.ToString.html#tymethod.to_string" class="fnname">to_string</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4><a href="#method.to_string" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/alloc/string.rs.html#2378" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Converts the given value to a <code>String</code>. <a href="https://doc.rust-lang.org/1.54.0/alloc/string/trait.ToString.html#tymethod.to_string">Read more</a></p> | ||
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TryFrom%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></h3><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#581-590" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4><a href="#associatedtype.Error" class="anchor"></a></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p> | ||
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_from" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4><a href="#method.try_from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#587" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> | ||
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TryInto%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></h3><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#567-576" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error-1" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4><a href="#associatedtype.Error-1" class="anchor"></a></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p> | ||
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4><a href="#method.try_into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#573" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> | ||
| </div></details></div></details></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="deltae" data-search-index-js="../search-index.js" data-search-js="../search.js"></div><script src="../main.js"></script></body></html> |
@@ -1,7 +0,8 @@ | ||
| <!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="API documentation for the Rust `Delta` trait in crate `deltae`."><meta name="keywords" content="rust, rustlang, rust-lang, Delta"><title>deltae::Delta - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../dark.css"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../deltae/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Trait Delta</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#provided-methods">Provided Methods</a><div class="sidebar-links"><a href="#method.delta">delta</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class='location'><a href='index.html'>deltae</a></p><script>window.sidebarCurrent = {name: 'Delta', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/deltae/delta.rs.html#5-28' title='goto source code'>[src]</a></span><span class='in-band'>Trait <a href='index.html'>deltae</a>::<wbr><a class="trait" href=''>Delta</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust trait'>pub trait Delta <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a>>, </span>{ | ||
| fn <a href='#method.delta' class='fnname'>delta</a><L: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a>>>(self, other: L, method: <a class="enum" href="../deltae/enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a>) -> <a class="struct" href="../deltae/struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a> { ... } | ||
| }</pre></div><div class='docblock'><p>Trait to determine color difference between various types. | ||
| <!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="Trait to determine color difference between various types. As long as the type can be converted to Lab, we can calculate DeltaE."><meta name="keywords" content="rust, rustlang, rust-lang, Delta"><title>Delta in deltae - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><script src="../crates.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg"> | ||
| <link rel="alternate icon" type="image/png" href="../favicon-16x16.png"> | ||
| <link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></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="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../deltae/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Trait Delta</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#provided-methods">Provided Methods</a></h3><div class="sidebar-links"><a href="#method.delta">delta</a></div><h3 class="sidebar-title"><a href="#implementors">Implementors</a></h3></div><h2 class="location">Other items in<br><a href="index.html">deltae</a></h2><div id="sidebar-vars" data-name="Delta" data-ty="trait" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Trait <a href="index.html">deltae</a>::<wbr><a class="trait" href="#">Delta</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/deltae/delta.rs.html#5-29" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust trait">pub trait Delta: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="color/struct.LabValue.html" title="struct deltae::color::LabValue">LabValue</a>> { | ||
| fn <a href="#method.delta" class="fnname">delta</a><L: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="color/struct.LabValue.html" title="struct deltae::color::LabValue">LabValue</a>>>(self, other: L, method: <a class="enum" href="enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a>) -> <a class="struct" href="struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a> { ... } | ||
| }</pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Trait to determine color difference between various types. | ||
| As long as the type can be converted to Lab, we can calculate DeltaE.</p> | ||
| </div> | ||
| <h2 id='provided-methods' class='small-section-header'>Provided methods<a href='#provided-methods' class='anchor'></a></h2><div class='methods'><h3 id='method.delta' class='method'><code id='delta.v'>fn <a href='#method.delta' class='fnname'>delta</a><L: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a>>>(self, other: L, method: <a class="enum" href="../deltae/enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a>) -> <a class="struct" href="../deltae/struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a></code></h3><div class='docblock'><p>Calculate DeltaE between 2 types</p> | ||
| </div></details><h2 id="provided-methods" class="small-section-header">Provided methods<a href="#provided-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle" open><summary><div id="method.delta" class="method has-srclink"><h4 class="code-header">fn <a href="#method.delta" class="fnname">delta</a><L: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="color/struct.LabValue.html" title="struct deltae::color::LabValue">LabValue</a>>>(self, other: L, method: <a class="enum" href="enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a>) -> <a class="struct" href="struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a></h4><a class="srclink" href="../src/deltae/delta.rs.html#16-28" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Calculate DeltaE between 2 types</p> | ||
@@ -11,9 +12,6 @@ <div class="example-wrap"><pre class="rust rust-example-rendered"> | ||
| <span class="kw">let</span> <span class="ident">lch</span> <span class="op">=</span> <span class="ident">LchValue</span>::<span class="ident">new</span>(<span class="number">60.3</span>, <span class="number">89.2</span>, <span class="number">270.0</span>).<span class="ident">unwrap</span>(); | ||
| <span class="kw">let</span> <span class="ident">xyz</span> <span class="op">=</span> <span class="ident">XyzValue</span>::<span class="ident">new</span>(<span class="number">0.347</span>, <span class="number">0.912</span>, <span class="number">0.446</span>).<span class="ident">unwrap</span>(); | ||
| <span class="kw">let</span> <span class="ident">lch</span> <span class="op">=</span> <span class="ident">LchValue::new</span>(<span class="number">60.3</span>, <span class="number">89.2</span>, <span class="number">270.0</span>).<span class="ident">unwrap</span>(); | ||
| <span class="kw">let</span> <span class="ident">xyz</span> <span class="op">=</span> <span class="ident">XyzValue::new</span>(<span class="number">0.347</span>, <span class="number">0.912</span>, <span class="number">0.446</span>).<span class="ident">unwrap</span>(); | ||
| <span class="kw">let</span> <span class="ident">de</span> <span class="op">=</span> <span class="ident">lch</span>.<span class="ident">delta</span>(<span class="ident">xyz</span>, <span class="ident">DE1976</span>); | ||
| <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">de</span>, <span class="number">180.18364</span>);</pre></div> | ||
| </div></div><span class='loading-content'>Loading content...</span> | ||
| <h2 id='implementors' class='small-section-header'>Implementors<a href='#implementors' class='anchor'></a></h2><div class='item-list' id='implementors-list'><h3 id='impl-Delta' class='impl'><code class='in-band'>impl<T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a>>> Delta for T</code><a href='#impl-Delta' class='anchor'></a><a class='srclink' href='../src/deltae/delta.rs.html#30' title='goto source code'>[src]</a></h3><div class='impl-items'></div></div><span class='loading-content'>Loading content...</span><script type="text/javascript">window.inlined_types=new Set([]);</script><script type="text/javascript" async | ||
| src="../implementors/deltae/trait.Delta.js"> | ||
| </script></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "deltae";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html> | ||
| <span class="macro">assert_eq!</span>(<span class="ident">de</span>, <span class="number">180.18364</span>);</pre></div> | ||
| </div></details></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><div id="impl-Delta" class="impl has-srclink"><h3 class="code-header in-band">impl<T: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="color/struct.LabValue.html" title="struct deltae::color::LabValue">LabValue</a>>> <a class="trait" href="trait.Delta.html" title="trait deltae::Delta">Delta</a> for T</h3><a href="#impl-Delta" class="anchor"></a><a class="srclink" href="../src/deltae/delta.rs.html#31" title="goto source code">[src]</a></div></div><script type="text/javascript" src="../implementors/deltae/trait.Delta.js" async></script></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="deltae" data-search-index-js="../search-index.js" data-search-js="../search.js"></div><script src="../main.js"></script></body></html> |
@@ -1,9 +0,7 @@ | ||
| <!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="API documentation for the Rust `Round` trait in crate `deltae`."><meta name="keywords" content="rust, rustlang, rust-lang, Round"><title>deltae::Round - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../dark.css"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../deltae/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Trait Round</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.round_to">round_to</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class='location'><a href='index.html'>deltae</a></p><script>window.sidebarCurrent = {name: 'Round', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/deltae/round.rs.html#4-7' title='goto source code'>[src]</a></span><span class='in-band'>Trait <a href='index.html'>deltae</a>::<wbr><a class="trait" href=''>Round</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust trait'>pub trait Round { | ||
| fn <a href='#tymethod.round_to' class='fnname'>round_to</a>(self, places: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -> Self; | ||
| }</pre></div><div class='docblock'><p>Trait for rounding values to a number of decimal places</p> | ||
| </div> | ||
| <h2 id='required-methods' class='small-section-header'>Required methods<a href='#required-methods' class='anchor'></a></h2><div class='methods'><h3 id='tymethod.round_to' class='method'><code id='round_to.v'>fn <a href='#tymethod.round_to' class='fnname'>round_to</a>(self, places: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -> Self</code></h3><div class='docblock'><p>Rounds the value to a number of decimal places</p> | ||
| </div></div><span class='loading-content'>Loading content...</span> | ||
| <h2 id='implementors' class='small-section-header'>Implementors<a href='#implementors' class='anchor'></a></h2><div class='item-list' id='implementors-list'><h3 id='impl-Round' class='impl'><code class='in-band'>impl Round for <a class="struct" href="../deltae/struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a></code><a href='#impl-Round' class='anchor'></a><a class='srclink' href='../src/deltae/round.rs.html#15-20' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.round_to' class="method hidden"><code id='round_to.v-1'>fn <a href='#method.round_to' class='fnname'>round_to</a>(self, places: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -> Self</code><a class='srclink' href='../src/deltae/round.rs.html#16-19' title='goto source code'>[src]</a></h4></div><h3 id='impl-Round-1' class='impl'><code class='in-band'>impl Round for <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a href='#impl-Round-1' class='anchor'></a><a class='srclink' href='../src/deltae/round.rs.html#22-29' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.round_to-1' class="method hidden"><code id='round_to.v-2'>fn <a href='#method.round_to-1' class='fnname'>round_to</a>(self, places: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -> <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a class='srclink' href='../src/deltae/round.rs.html#23-28' title='goto source code'>[src]</a></h4></div><h3 id='impl-Round-2' class='impl'><code class='in-band'>impl Round for <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a href='#impl-Round-2' class='anchor'></a><a class='srclink' href='../src/deltae/round.rs.html#31-38' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.round_to-2' class="method hidden"><code id='round_to.v-3'>fn <a href='#method.round_to-2' class='fnname'>round_to</a>(self, places: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -> <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a class='srclink' href='../src/deltae/round.rs.html#32-37' title='goto source code'>[src]</a></h4></div><h3 id='impl-Round-3' class='impl'><code class='in-band'>impl Round for <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a href='#impl-Round-3' class='anchor'></a><a class='srclink' href='../src/deltae/round.rs.html#40-47' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.round_to-3' class="method hidden"><code id='round_to.v-4'>fn <a href='#method.round_to-3' class='fnname'>round_to</a>(self, places: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -> <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a class='srclink' href='../src/deltae/round.rs.html#41-46' title='goto source code'>[src]</a></h4></div></div><span class='loading-content'>Loading content...</span><script type="text/javascript">window.inlined_types=new Set([]);</script><script type="text/javascript" async | ||
| src="../implementors/deltae/trait.Round.js"> | ||
| </script></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "deltae";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html> | ||
| <!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="Trait for rounding values to a number of decimal places"><meta name="keywords" content="rust, rustlang, rust-lang, Round"><title>Round in deltae - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><script src="../crates.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg"> | ||
| <link rel="alternate icon" type="image/png" href="../favicon-16x16.png"> | ||
| <link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></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="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../deltae/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Trait Round</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#required-methods">Required Methods</a></h3><div class="sidebar-links"><a href="#tymethod.round_to">round_to</a></div><h3 class="sidebar-title"><a href="#implementors">Implementors</a></h3></div><h2 class="location">Other items in<br><a href="index.html">deltae</a></h2><div id="sidebar-vars" data-name="Round" data-ty="trait" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Trait <a href="index.html">deltae</a>::<wbr><a class="trait" href="#">Round</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/deltae/round.rs.html#4-7" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust trait">pub trait Round { | ||
| fn <a href="#tymethod.round_to" class="fnname">round_to</a>(self, places: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i32.html">i32</a>) -> Self; | ||
| }</pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Trait for rounding values to a number of decimal places</p> | ||
| </div></details><h2 id="required-methods" class="small-section-header">Required methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle" open><summary><div id="tymethod.round_to" class="method has-srclink"><h4 class="code-header">fn <a href="#tymethod.round_to" class="fnname">round_to</a>(self, places: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i32.html">i32</a>) -> Self</h4><a class="srclink" href="../src/deltae/round.rs.html#6" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Rounds the value to a number of decimal places</p> | ||
| </div></details></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Round" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="trait.Round.html" title="trait deltae::Round">Round</a> for <a class="struct" href="color/struct.LabValue.html" title="struct deltae::color::LabValue">LabValue</a></h3><a href="#impl-Round" class="anchor"></a><a class="srclink" href="../src/deltae/round.rs.html#24-32" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.round_to" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.round_to" class="fnname">round_to</a>(self, places: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i32.html">i32</a>) -> <a class="struct" href="color/struct.LabValue.html" title="struct deltae::color::LabValue">LabValue</a></h4><a href="#method.round_to" class="anchor"></a><a class="srclink" href="../src/deltae/round.rs.html#25-31" title="goto source code">[src]</a></div></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Round-1" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="trait.Round.html" title="trait deltae::Round">Round</a> for <a class="struct" href="color/struct.LchValue.html" title="struct deltae::color::LchValue">LchValue</a></h3><a href="#impl-Round-1" class="anchor"></a><a class="srclink" href="../src/deltae/round.rs.html#34-42" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.round_to-1" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.round_to" class="fnname">round_to</a>(self, places: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i32.html">i32</a>) -> <a class="struct" href="color/struct.LchValue.html" title="struct deltae::color::LchValue">LchValue</a></h4><a href="#method.round_to-1" class="anchor"></a><a class="srclink" href="../src/deltae/round.rs.html#35-41" title="goto source code">[src]</a></div></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Round-2" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="trait.Round.html" title="trait deltae::Round">Round</a> for <a class="struct" href="color/struct.XyzValue.html" title="struct deltae::color::XyzValue">XyzValue</a></h3><a href="#impl-Round-2" class="anchor"></a><a class="srclink" href="../src/deltae/round.rs.html#44-52" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.round_to-2" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.round_to" class="fnname">round_to</a>(self, places: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i32.html">i32</a>) -> <a class="struct" href="color/struct.XyzValue.html" title="struct deltae::color::XyzValue">XyzValue</a></h4><a href="#method.round_to-2" class="anchor"></a><a class="srclink" href="../src/deltae/round.rs.html#45-51" title="goto source code">[src]</a></div></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Round-3" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="trait.Round.html" title="trait deltae::Round">Round</a> for <a class="struct" href="struct.DeltaE.html" title="struct deltae::DeltaE">DeltaE</a></h3><a href="#impl-Round-3" class="anchor"></a><a class="srclink" href="../src/deltae/round.rs.html#15-22" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.round_to-3" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.round_to" class="fnname">round_to</a>(self, places: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i32.html">i32</a>) -> Self</h4><a href="#method.round_to-3" class="anchor"></a><a class="srclink" href="../src/deltae/round.rs.html#16-21" title="goto source code">[src]</a></div></div></details></div><script type="text/javascript" src="../implementors/deltae/trait.Round.js" async></script></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="deltae" data-search-index-js="../search-index.js" data-search-js="../search.js"></div><script src="../main.js"></script></body></html> |
@@ -1,9 +0,7 @@ | ||
| <!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="API documentation for the Rust `Validate` trait in crate `deltae`."><meta name="keywords" content="rust, rustlang, rust-lang, Validate"><title>deltae::Validate - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../dark.css"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../deltae/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Trait Validate</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.validate">validate</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class='location'><a href='index.html'>deltae</a></p><script>window.sidebarCurrent = {name: 'Validate', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/deltae/validate.rs.html#4-7' title='goto source code'>[src]</a></span><span class='in-band'>Trait <a href='index.html'>deltae</a>::<wbr><a class="trait" href=''>Validate</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust trait'>pub trait Validate <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span>{ | ||
| fn <a href='#tymethod.validate' class='fnname'>validate</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a>>; | ||
| }</pre></div><div class='docblock'><p>Trait to validate whether a type has appropriate values</p> | ||
| </div> | ||
| <h2 id='required-methods' class='small-section-header'>Required methods<a href='#required-methods' class='anchor'></a></h2><div class='methods'><h3 id='tymethod.validate' class='method'><code id='validate.v'>fn <a href='#tymethod.validate' class='fnname'>validate</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a>></code></h3><div class='docblock'><p>Return <code>Err()</code> if the values are invalid</p> | ||
| </div></div><span class='loading-content'>Loading content...</span> | ||
| <h2 id='implementors' class='small-section-header'>Implementors<a href='#implementors' class='anchor'></a></h2><div class='item-list' id='implementors-list'><h3 id='impl-Validate' class='impl'><code class='in-band'>impl Validate for <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a href='#impl-Validate' class='anchor'></a><a class='srclink' href='../src/deltae/validate.rs.html#9-20' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.validate' class="method hidden"><code id='validate.v-1'>fn <a href='#method.validate' class='fnname'>validate</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a>></code><a class='srclink' href='../src/deltae/validate.rs.html#10-19' title='goto source code'>[src]</a></h4></div><h3 id='impl-Validate-1' class='impl'><code class='in-band'>impl Validate for <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a href='#impl-Validate-1' class='anchor'></a><a class='srclink' href='../src/deltae/validate.rs.html#22-33' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.validate-1' class="method hidden"><code id='validate.v-2'>fn <a href='#method.validate-1' class='fnname'>validate</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a>></code><a class='srclink' href='../src/deltae/validate.rs.html#23-32' title='goto source code'>[src]</a></h4></div><h3 id='impl-Validate-2' class='impl'><code class='in-band'>impl Validate for <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a href='#impl-Validate-2' class='anchor'></a><a class='srclink' href='../src/deltae/validate.rs.html#35-46' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.validate-2' class="method hidden"><code id='validate.v-3'>fn <a href='#method.validate-2' class='fnname'>validate</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a>></code><a class='srclink' href='../src/deltae/validate.rs.html#36-45' title='goto source code'>[src]</a></h4></div></div><span class='loading-content'>Loading content...</span><script type="text/javascript">window.inlined_types=new Set([]);</script><script type="text/javascript" async | ||
| src="../implementors/deltae/trait.Validate.js"> | ||
| </script></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "deltae";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html> | ||
| <!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="Trait to validate whether a type has appropriate values"><meta name="keywords" content="rust, rustlang, rust-lang, Validate"><title>Validate in deltae - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><script src="../crates.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg"> | ||
| <link rel="alternate icon" type="image/png" href="../favicon-16x16.png"> | ||
| <link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></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="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../deltae/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Trait Validate</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#required-methods">Required Methods</a></h3><div class="sidebar-links"><a href="#tymethod.validate">validate</a></div><h3 class="sidebar-title"><a href="#implementors">Implementors</a></h3></div><h2 class="location">Other items in<br><a href="index.html">deltae</a></h2><div id="sidebar-vars" data-name="Validate" data-ty="trait" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Trait <a href="index.html">deltae</a>::<wbr><a class="trait" href="#">Validate</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/deltae/validate.rs.html#4-7" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust trait">pub trait Validate <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span>{ | ||
| fn <a href="#tymethod.validate" class="fnname">validate</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, <a class="enum" href="color/enum.ValueError.html" title="enum deltae::color::ValueError">ValueError</a>>; | ||
| }</pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Trait to validate whether a type has appropriate values</p> | ||
| </div></details><h2 id="required-methods" class="small-section-header">Required methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle" open><summary><div id="tymethod.validate" class="method has-srclink"><h4 class="code-header">fn <a href="#tymethod.validate" class="fnname">validate</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, <a class="enum" href="color/enum.ValueError.html" title="enum deltae::color::ValueError">ValueError</a>></h4><a class="srclink" href="../src/deltae/validate.rs.html#6" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Return <code>Err()</code> if the values are invalid</p> | ||
| </div></details></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Validate" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="trait.Validate.html" title="trait deltae::Validate">Validate</a> for <a class="struct" href="color/struct.LabValue.html" title="struct deltae::color::LabValue">LabValue</a></h3><a href="#impl-Validate" class="anchor"></a><a class="srclink" href="../src/deltae/validate.rs.html#15-26" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.validate" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.validate" class="fnname">validate</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, <a class="enum" href="color/enum.ValueError.html" title="enum deltae::color::ValueError">ValueError</a>></h4><a href="#method.validate" class="anchor"></a><a class="srclink" href="../src/deltae/validate.rs.html#16-25" title="goto source code">[src]</a></div></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Validate-1" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="trait.Validate.html" title="trait deltae::Validate">Validate</a> for <a class="struct" href="color/struct.LchValue.html" title="struct deltae::color::LchValue">LchValue</a></h3><a href="#impl-Validate-1" class="anchor"></a><a class="srclink" href="../src/deltae/validate.rs.html#28-39" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.validate-1" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.validate" class="fnname">validate</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, <a class="enum" href="color/enum.ValueError.html" title="enum deltae::color::ValueError">ValueError</a>></h4><a href="#method.validate-1" class="anchor"></a><a class="srclink" href="../src/deltae/validate.rs.html#29-38" title="goto source code">[src]</a></div></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Validate-2" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="trait.Validate.html" title="trait deltae::Validate">Validate</a> for <a class="struct" href="color/struct.XyzValue.html" title="struct deltae::color::XyzValue">XyzValue</a></h3><a href="#impl-Validate-2" class="anchor"></a><a class="srclink" href="../src/deltae/validate.rs.html#41-52" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.validate-2" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.validate" class="fnname">validate</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, <a class="enum" href="color/enum.ValueError.html" title="enum deltae::color::ValueError">ValueError</a>></h4><a href="#method.validate-2" class="anchor"></a><a class="srclink" href="../src/deltae/validate.rs.html#42-51" title="goto source code">[src]</a></div></div></details></div><script type="text/javascript" src="../implementors/deltae/trait.Validate.js" async></script></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="deltae" data-search-index-js="../search-index.js" data-search-js="../search.js"></div><script src="../main.js"></script></body></html> |
@@ -5,2 +5,3 @@ <!DOCTYPE html> | ||
| <meta http-equiv="refresh" content="0;URL=../../deltae/trait.Validate.html"> | ||
| <title>Redirection</title> | ||
| </head> | ||
@@ -7,0 +8,0 @@ <body> |
@@ -1,1 +0,1 @@ | ||
| <?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'><svg height="128px" id="Layer_1" style="enable-background:new 0 0 128 128;" version="1.1" viewBox="-30 -20 176 176" width="128px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><line style="fill:none;stroke:#2F3435;stroke-width:12;stroke-linecap:square;stroke-miterlimit:10;" x1="111" x2="64" y1="40.5" y2="87.499"/><line style="fill:none;stroke:#2F3435;stroke-width:12;stroke-linecap:square;stroke-miterlimit:10;" x1="64" x2="17" y1="87.499" y2="40.5"/></g></svg> | ||
| <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="Layer_1" width="128" height="128" enable-background="new 0 0 128 128" version="1.1" viewBox="-30 -20 176 176" xml:space="preserve"><g><line x1="111" x2="64" y1="40.5" y2="87.499" fill="none" stroke="#2F3435" stroke-linecap="square" stroke-miterlimit="10" stroke-width="12"/><line x1="64" x2="17" y1="87.499" y2="40.5" fill="none" stroke="#2F3435" stroke-linecap="square" stroke-miterlimit="10" stroke-width="12"/></g></svg> |
| (function() {var implementors = {}; | ||
| implementors["deltae"] = [{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"deltae/struct.LabValue.html\" title=\"struct deltae::LabValue\">LabValue</a>",synthetic:false,types:["deltae::color::LabValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"deltae/struct.LchValue.html\" title=\"struct deltae::LchValue\">LchValue</a>",synthetic:false,types:["deltae::color::LchValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"deltae/struct.XyzValue.html\" title=\"struct deltae::XyzValue\">XyzValue</a>",synthetic:false,types:["deltae::color::XyzValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"deltae/struct.DeltaE.html\" title=\"struct deltae::DeltaE\">DeltaE</a>",synthetic:false,types:["deltae::DeltaE"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"enum\" href=\"deltae/enum.DEMethod.html\" title=\"enum deltae::DEMethod\">DEMethod</a>",synthetic:false,types:["deltae::DEMethod"]},]; | ||
| if (window.register_implementors) { | ||
| window.register_implementors(implementors); | ||
| } else { | ||
| window.pending_implementors = implementors; | ||
| } | ||
| })() | ||
| implementors["deltae"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"deltae/color/struct.LabValue.html\" title=\"struct deltae::color::LabValue\">LabValue</a>","synthetic":false,"types":["deltae::color::LabValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"deltae/color/struct.LchValue.html\" title=\"struct deltae::color::LchValue\">LchValue</a>","synthetic":false,"types":["deltae::color::LchValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"deltae/color/struct.XyzValue.html\" title=\"struct deltae::color::XyzValue\">XyzValue</a>","synthetic":false,"types":["deltae::color::XyzValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"deltae/struct.DeltaE.html\" title=\"struct deltae::DeltaE\">DeltaE</a>","synthetic":false,"types":["deltae::DeltaE"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"enum\" href=\"deltae/enum.DEMethod.html\" title=\"enum deltae::DEMethod\">DEMethod</a>","synthetic":false,"types":["deltae::DEMethod"]}]; | ||
| if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() |
| (function() {var implementors = {}; | ||
| implementors["deltae"] = [{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html\" title=\"trait core::cmp::Eq\">Eq</a> for <a class=\"enum\" href=\"deltae/enum.DEMethod.html\" title=\"enum deltae::DEMethod\">DEMethod</a>",synthetic:false,types:["deltae::DEMethod"]},]; | ||
| if (window.register_implementors) { | ||
| window.register_implementors(implementors); | ||
| } else { | ||
| window.pending_implementors = implementors; | ||
| } | ||
| })() | ||
| implementors["deltae"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/cmp/trait.Eq.html\" title=\"trait core::cmp::Eq\">Eq</a> for <a class=\"enum\" href=\"deltae/enum.DEMethod.html\" title=\"enum deltae::DEMethod\">DEMethod</a>","synthetic":false,"types":["deltae::DEMethod"]}]; | ||
| if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() |
| (function() {var implementors = {}; | ||
| implementors["deltae"] = [{text:"impl<T: <a class=\"trait\" href=\"deltae/trait.Delta.html\" title=\"trait deltae::Delta\">Delta</a> + <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a>> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a><T> for <a class=\"struct\" href=\"deltae/struct.LabValue.html\" title=\"struct deltae::LabValue\">LabValue</a> <span class=\"where fmt-newline\">where<br> <a class=\"struct\" href=\"deltae/struct.LabValue.html\" title=\"struct deltae::LabValue\">LabValue</a>: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><T>, </span>",synthetic:false,types:["deltae::color::LabValue"]},{text:"impl<T: <a class=\"trait\" href=\"deltae/trait.Delta.html\" title=\"trait deltae::Delta\">Delta</a> + <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a>> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a><T> for <a class=\"struct\" href=\"deltae/struct.LchValue.html\" title=\"struct deltae::LchValue\">LchValue</a> <span class=\"where fmt-newline\">where<br> <a class=\"struct\" href=\"deltae/struct.LchValue.html\" title=\"struct deltae::LchValue\">LchValue</a>: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><T>, </span>",synthetic:false,types:["deltae::color::LchValue"]},{text:"impl<T: <a class=\"trait\" href=\"deltae/trait.Delta.html\" title=\"trait deltae::Delta\">Delta</a> + <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a>> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a><T> for <a class=\"struct\" href=\"deltae/struct.XyzValue.html\" title=\"struct deltae::XyzValue\">XyzValue</a> <span class=\"where fmt-newline\">where<br> <a class=\"struct\" href=\"deltae/struct.XyzValue.html\" title=\"struct deltae::XyzValue\">XyzValue</a>: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><T>, </span>",synthetic:false,types:["deltae::color::XyzValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a><<a class=\"struct\" href=\"deltae/struct.DeltaE.html\" title=\"struct deltae::DeltaE\">DeltaE</a>> for <a class=\"struct\" href=\"deltae/struct.DeltaE.html\" title=\"struct deltae::DeltaE\">DeltaE</a>",synthetic:false,types:["deltae::DeltaE"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.f32.html\">f32</a>> for <a class=\"struct\" href=\"deltae/struct.DeltaE.html\" title=\"struct deltae::DeltaE\">DeltaE</a>",synthetic:false,types:["deltae::DeltaE"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a><<a class=\"enum\" href=\"deltae/enum.DEMethod.html\" title=\"enum deltae::DEMethod\">DEMethod</a>> for <a class=\"enum\" href=\"deltae/enum.DEMethod.html\" title=\"enum deltae::DEMethod\">DEMethod</a>",synthetic:false,types:["deltae::DEMethod"]},]; | ||
| if (window.register_implementors) { | ||
| window.register_implementors(implementors); | ||
| } else { | ||
| window.pending_implementors = implementors; | ||
| } | ||
| })() | ||
| implementors["deltae"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a><<a class=\"struct\" href=\"deltae/color/struct.LabValue.html\" title=\"struct deltae::color::LabValue\">LabValue</a>> for <a class=\"struct\" href=\"deltae/color/struct.LabValue.html\" title=\"struct deltae::color::LabValue\">LabValue</a>","synthetic":false,"types":["deltae::color::LabValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a><<a class=\"struct\" href=\"deltae/color/struct.LchValue.html\" title=\"struct deltae::color::LchValue\">LchValue</a>> for <a class=\"struct\" href=\"deltae/color/struct.LchValue.html\" title=\"struct deltae::color::LchValue\">LchValue</a>","synthetic":false,"types":["deltae::color::LchValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a><<a class=\"struct\" href=\"deltae/color/struct.XyzValue.html\" title=\"struct deltae::color::XyzValue\">XyzValue</a>> for <a class=\"struct\" href=\"deltae/color/struct.XyzValue.html\" title=\"struct deltae::color::XyzValue\">XyzValue</a>","synthetic":false,"types":["deltae::color::XyzValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.f32.html\">f32</a>> for <a class=\"struct\" href=\"deltae/struct.DeltaE.html\" title=\"struct deltae::DeltaE\">DeltaE</a>","synthetic":false,"types":["deltae::DeltaE"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a><<a class=\"struct\" href=\"deltae/struct.DeltaE.html\" title=\"struct deltae::DeltaE\">DeltaE</a>> for <a class=\"struct\" href=\"deltae/struct.DeltaE.html\" title=\"struct deltae::DeltaE\">DeltaE</a>","synthetic":false,"types":["deltae::DeltaE"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a><<a class=\"enum\" href=\"deltae/enum.DEMethod.html\" title=\"enum deltae::DEMethod\">DEMethod</a>> for <a class=\"enum\" href=\"deltae/enum.DEMethod.html\" title=\"enum deltae::DEMethod\">DEMethod</a>","synthetic":false,"types":["deltae::DEMethod"]}]; | ||
| if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() |
| (function() {var implementors = {}; | ||
| implementors["deltae"] = [{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a><<a class=\"struct\" href=\"deltae/struct.DeltaE.html\" title=\"struct deltae::DeltaE\">DeltaE</a>> for <a class=\"struct\" href=\"deltae/struct.DeltaE.html\" title=\"struct deltae::DeltaE\">DeltaE</a>",synthetic:false,types:["deltae::DeltaE"]},]; | ||
| if (window.register_implementors) { | ||
| window.register_implementors(implementors); | ||
| } else { | ||
| window.pending_implementors = implementors; | ||
| } | ||
| })() | ||
| implementors["deltae"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a><<a class=\"struct\" href=\"deltae/struct.DeltaE.html\" title=\"struct deltae::DeltaE\">DeltaE</a>> for <a class=\"struct\" href=\"deltae/struct.DeltaE.html\" title=\"struct deltae::DeltaE\">DeltaE</a>","synthetic":false,"types":["deltae::DeltaE"]}]; | ||
| if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() |
| (function() {var implementors = {}; | ||
| implementors["deltae"] = [{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"deltae/struct.LchValue.html\" title=\"struct deltae::LchValue\">LchValue</a>> for <a class=\"struct\" href=\"deltae/struct.LabValue.html\" title=\"struct deltae::LabValue\">LabValue</a>",synthetic:false,types:["deltae::color::LabValue"]},{text:"impl<'_> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><&'_ <a class=\"struct\" href=\"deltae/struct.LchValue.html\" title=\"struct deltae::LchValue\">LchValue</a>> for <a class=\"struct\" href=\"deltae/struct.LabValue.html\" title=\"struct deltae::LabValue\">LabValue</a>",synthetic:false,types:["deltae::color::LabValue"]},{text:"impl<'_> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><&'_ <a class=\"struct\" href=\"deltae/struct.LabValue.html\" title=\"struct deltae::LabValue\">LabValue</a>> for <a class=\"struct\" href=\"deltae/struct.LabValue.html\" title=\"struct deltae::LabValue\">LabValue</a>",synthetic:false,types:["deltae::color::LabValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"deltae/struct.XyzValue.html\" title=\"struct deltae::XyzValue\">XyzValue</a>> for <a class=\"struct\" href=\"deltae/struct.LabValue.html\" title=\"struct deltae::LabValue\">LabValue</a>",synthetic:false,types:["deltae::color::LabValue"]},{text:"impl<'_> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><&'_ <a class=\"struct\" href=\"deltae/struct.XyzValue.html\" title=\"struct deltae::XyzValue\">XyzValue</a>> for <a class=\"struct\" href=\"deltae/struct.LabValue.html\" title=\"struct deltae::LabValue\">LabValue</a>",synthetic:false,types:["deltae::color::LabValue"]},{text:"impl<'_> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><&'_ <a class=\"struct\" href=\"deltae/struct.LchValue.html\" title=\"struct deltae::LchValue\">LchValue</a>> for <a class=\"struct\" href=\"deltae/struct.LchValue.html\" title=\"struct deltae::LchValue\">LchValue</a>",synthetic:false,types:["deltae::color::LchValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"deltae/struct.LabValue.html\" title=\"struct deltae::LabValue\">LabValue</a>> for <a class=\"struct\" href=\"deltae/struct.LchValue.html\" title=\"struct deltae::LchValue\">LchValue</a>",synthetic:false,types:["deltae::color::LchValue"]},{text:"impl<'_> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><&'_ <a class=\"struct\" href=\"deltae/struct.LabValue.html\" title=\"struct deltae::LabValue\">LabValue</a>> for <a class=\"struct\" href=\"deltae/struct.LchValue.html\" title=\"struct deltae::LchValue\">LchValue</a>",synthetic:false,types:["deltae::color::LchValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"deltae/struct.XyzValue.html\" title=\"struct deltae::XyzValue\">XyzValue</a>> for <a class=\"struct\" href=\"deltae/struct.LchValue.html\" title=\"struct deltae::LchValue\">LchValue</a>",synthetic:false,types:["deltae::color::LchValue"]},{text:"impl<'_> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><&'_ <a class=\"struct\" href=\"deltae/struct.XyzValue.html\" title=\"struct deltae::XyzValue\">XyzValue</a>> for <a class=\"struct\" href=\"deltae/struct.LchValue.html\" title=\"struct deltae::LchValue\">LchValue</a>",synthetic:false,types:["deltae::color::LchValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"deltae/struct.LabValue.html\" title=\"struct deltae::LabValue\">LabValue</a>> for <a class=\"struct\" href=\"deltae/struct.XyzValue.html\" title=\"struct deltae::XyzValue\">XyzValue</a>",synthetic:false,types:["deltae::color::XyzValue"]},{text:"impl<'_> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><&'_ <a class=\"struct\" href=\"deltae/struct.XyzValue.html\" title=\"struct deltae::XyzValue\">XyzValue</a>> for <a class=\"struct\" href=\"deltae/struct.XyzValue.html\" title=\"struct deltae::XyzValue\">XyzValue</a>",synthetic:false,types:["deltae::color::XyzValue"]},{text:"impl<'_> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><&'_ <a class=\"struct\" href=\"deltae/struct.LabValue.html\" title=\"struct deltae::LabValue\">LabValue</a>> for <a class=\"struct\" href=\"deltae/struct.XyzValue.html\" title=\"struct deltae::XyzValue\">XyzValue</a>",synthetic:false,types:["deltae::color::XyzValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"deltae/struct.LchValue.html\" title=\"struct deltae::LchValue\">LchValue</a>> for <a class=\"struct\" href=\"deltae/struct.XyzValue.html\" title=\"struct deltae::XyzValue\">XyzValue</a>",synthetic:false,types:["deltae::color::XyzValue"]},{text:"impl<'_> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><&'_ <a class=\"struct\" href=\"deltae/struct.LchValue.html\" title=\"struct deltae::LchValue\">LchValue</a>> for <a class=\"struct\" href=\"deltae/struct.XyzValue.html\" title=\"struct deltae::XyzValue\">XyzValue</a>",synthetic:false,types:["deltae::color::XyzValue"]},]; | ||
| if (window.register_implementors) { | ||
| window.register_implementors(implementors); | ||
| } else { | ||
| window.pending_implementors = implementors; | ||
| } | ||
| })() | ||
| implementors["deltae"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"deltae/color/struct.LchValue.html\" title=\"struct deltae::color::LchValue\">LchValue</a>> for <a class=\"struct\" href=\"deltae/color/struct.LabValue.html\" title=\"struct deltae::color::LabValue\">LabValue</a>","synthetic":false,"types":["deltae::color::LabValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><&'_ <a class=\"struct\" href=\"deltae/color/struct.LchValue.html\" title=\"struct deltae::color::LchValue\">LchValue</a>> for <a class=\"struct\" href=\"deltae/color/struct.LabValue.html\" title=\"struct deltae::color::LabValue\">LabValue</a>","synthetic":false,"types":["deltae::color::LabValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><&'_ <a class=\"struct\" href=\"deltae/color/struct.LabValue.html\" title=\"struct deltae::color::LabValue\">LabValue</a>> for <a class=\"struct\" href=\"deltae/color/struct.LabValue.html\" title=\"struct deltae::color::LabValue\">LabValue</a>","synthetic":false,"types":["deltae::color::LabValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"deltae/color/struct.XyzValue.html\" title=\"struct deltae::color::XyzValue\">XyzValue</a>> for <a class=\"struct\" href=\"deltae/color/struct.LabValue.html\" title=\"struct deltae::color::LabValue\">LabValue</a>","synthetic":false,"types":["deltae::color::LabValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><&'_ <a class=\"struct\" href=\"deltae/color/struct.XyzValue.html\" title=\"struct deltae::color::XyzValue\">XyzValue</a>> for <a class=\"struct\" href=\"deltae/color/struct.LabValue.html\" title=\"struct deltae::color::LabValue\">LabValue</a>","synthetic":false,"types":["deltae::color::LabValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"deltae/color/struct.LabValue.html\" title=\"struct deltae::color::LabValue\">LabValue</a>> for <a class=\"struct\" href=\"deltae/color/struct.LchValue.html\" title=\"struct deltae::color::LchValue\">LchValue</a>","synthetic":false,"types":["deltae::color::LchValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><&'_ <a class=\"struct\" href=\"deltae/color/struct.LabValue.html\" title=\"struct deltae::color::LabValue\">LabValue</a>> for <a class=\"struct\" href=\"deltae/color/struct.LchValue.html\" title=\"struct deltae::color::LchValue\">LchValue</a>","synthetic":false,"types":["deltae::color::LchValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"deltae/color/struct.XyzValue.html\" title=\"struct deltae::color::XyzValue\">XyzValue</a>> for <a class=\"struct\" href=\"deltae/color/struct.LchValue.html\" title=\"struct deltae::color::LchValue\">LchValue</a>","synthetic":false,"types":["deltae::color::LchValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><&'_ <a class=\"struct\" href=\"deltae/color/struct.XyzValue.html\" title=\"struct deltae::color::XyzValue\">XyzValue</a>> for <a class=\"struct\" href=\"deltae/color/struct.LchValue.html\" title=\"struct deltae::color::LchValue\">LchValue</a>","synthetic":false,"types":["deltae::color::LchValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"deltae/color/struct.LabValue.html\" title=\"struct deltae::color::LabValue\">LabValue</a>> for <a class=\"struct\" href=\"deltae/color/struct.XyzValue.html\" title=\"struct deltae::color::XyzValue\">XyzValue</a>","synthetic":false,"types":["deltae::color::XyzValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><&'_ <a class=\"struct\" href=\"deltae/color/struct.LabValue.html\" title=\"struct deltae::color::LabValue\">LabValue</a>> for <a class=\"struct\" href=\"deltae/color/struct.XyzValue.html\" title=\"struct deltae::color::XyzValue\">XyzValue</a>","synthetic":false,"types":["deltae::color::XyzValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"deltae/color/struct.LchValue.html\" title=\"struct deltae::color::LchValue\">LchValue</a>> for <a class=\"struct\" href=\"deltae/color/struct.XyzValue.html\" title=\"struct deltae::color::XyzValue\">XyzValue</a>","synthetic":false,"types":["deltae::color::XyzValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><&'_ <a class=\"struct\" href=\"deltae/color/struct.LchValue.html\" title=\"struct deltae::color::LchValue\">LchValue</a>> for <a class=\"struct\" href=\"deltae/color/struct.XyzValue.html\" title=\"struct deltae::color::XyzValue\">XyzValue</a>","synthetic":false,"types":["deltae::color::XyzValue"]}]; | ||
| if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() |
| (function() {var implementors = {}; | ||
| implementors["deltae"] = [{text:"impl<'_> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a><&'_ <a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.array.html\">[</a><a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.f32.html\">f32</a><a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.array.html\">; 3]</a>> for <a class=\"struct\" href=\"deltae/struct.LabValue.html\" title=\"struct deltae::LabValue\">LabValue</a>",synthetic:false,types:["deltae::color::LabValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.tuple.html\">(</a><a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.f32.html\">f32</a>, <a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.f32.html\">f32</a>, <a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.f32.html\">f32</a><a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.tuple.html\">)</a>> for <a class=\"struct\" href=\"deltae/struct.LabValue.html\" title=\"struct deltae::LabValue\">LabValue</a>",synthetic:false,types:["deltae::color::LabValue"]},{text:"impl<'_> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a><&'_ <a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.tuple.html\">(</a><a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.f32.html\">f32</a>, <a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.f32.html\">f32</a>, <a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.f32.html\">f32</a><a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.tuple.html\">)</a>> for <a class=\"struct\" href=\"deltae/struct.LabValue.html\" title=\"struct deltae::LabValue\">LabValue</a>",synthetic:false,types:["deltae::color::LabValue"]},{text:"impl<'_> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a><&'_ <a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.array.html\">[</a><a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.f32.html\">f32</a><a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.array.html\">; 3]</a>> for <a class=\"struct\" href=\"deltae/struct.LchValue.html\" title=\"struct deltae::LchValue\">LchValue</a>",synthetic:false,types:["deltae::color::LchValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.tuple.html\">(</a><a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.f32.html\">f32</a>, <a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.f32.html\">f32</a>, <a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.f32.html\">f32</a><a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.tuple.html\">)</a>> for <a class=\"struct\" href=\"deltae/struct.LchValue.html\" title=\"struct deltae::LchValue\">LchValue</a>",synthetic:false,types:["deltae::color::LchValue"]},{text:"impl<'_> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a><&'_ <a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.tuple.html\">(</a><a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.f32.html\">f32</a>, <a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.f32.html\">f32</a>, <a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.f32.html\">f32</a><a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.tuple.html\">)</a>> for <a class=\"struct\" href=\"deltae/struct.LchValue.html\" title=\"struct deltae::LchValue\">LchValue</a>",synthetic:false,types:["deltae::color::LchValue"]},{text:"impl<'_> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a><&'_ <a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.array.html\">[</a><a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.f32.html\">f32</a><a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.array.html\">; 3]</a>> for <a class=\"struct\" href=\"deltae/struct.XyzValue.html\" title=\"struct deltae::XyzValue\">XyzValue</a>",synthetic:false,types:["deltae::color::XyzValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.tuple.html\">(</a><a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.f32.html\">f32</a>, <a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.f32.html\">f32</a>, <a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.f32.html\">f32</a><a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.tuple.html\">)</a>> for <a class=\"struct\" href=\"deltae/struct.XyzValue.html\" title=\"struct deltae::XyzValue\">XyzValue</a>",synthetic:false,types:["deltae::color::XyzValue"]},{text:"impl<'_> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a><&'_ <a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.tuple.html\">(</a><a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.f32.html\">f32</a>, <a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.f32.html\">f32</a>, <a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.f32.html\">f32</a><a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.tuple.html\">)</a>> for <a class=\"struct\" href=\"deltae/struct.XyzValue.html\" title=\"struct deltae::XyzValue\">XyzValue</a>",synthetic:false,types:["deltae::color::XyzValue"]},]; | ||
| if (window.register_implementors) { | ||
| window.register_implementors(implementors); | ||
| } else { | ||
| window.pending_implementors = implementors; | ||
| } | ||
| })() | ||
| implementors["deltae"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a><&'_ <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.array.html\">[</a><a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.f32.html\">f32</a><a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.array.html\">; 3]</a>> for <a class=\"struct\" href=\"deltae/color/struct.LabValue.html\" title=\"struct deltae::color::LabValue\">LabValue</a>","synthetic":false,"types":["deltae::color::LabValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.tuple.html\">(</a><a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.f32.html\">f32</a>, <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.f32.html\">f32</a>, <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.f32.html\">f32</a><a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.tuple.html\">)</a>> for <a class=\"struct\" href=\"deltae/color/struct.LabValue.html\" title=\"struct deltae::color::LabValue\">LabValue</a>","synthetic":false,"types":["deltae::color::LabValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a><&'_ <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.tuple.html\">(</a><a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.f32.html\">f32</a>, <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.f32.html\">f32</a>, <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.f32.html\">f32</a><a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.tuple.html\">)</a>> for <a class=\"struct\" href=\"deltae/color/struct.LabValue.html\" title=\"struct deltae::color::LabValue\">LabValue</a>","synthetic":false,"types":["deltae::color::LabValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a><&'_ <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.array.html\">[</a><a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.f32.html\">f32</a><a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.array.html\">; 3]</a>> for <a class=\"struct\" href=\"deltae/color/struct.LchValue.html\" title=\"struct deltae::color::LchValue\">LchValue</a>","synthetic":false,"types":["deltae::color::LchValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.tuple.html\">(</a><a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.f32.html\">f32</a>, <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.f32.html\">f32</a>, <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.f32.html\">f32</a><a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.tuple.html\">)</a>> for <a class=\"struct\" href=\"deltae/color/struct.LchValue.html\" title=\"struct deltae::color::LchValue\">LchValue</a>","synthetic":false,"types":["deltae::color::LchValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a><&'_ <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.tuple.html\">(</a><a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.f32.html\">f32</a>, <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.f32.html\">f32</a>, <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.f32.html\">f32</a><a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.tuple.html\">)</a>> for <a class=\"struct\" href=\"deltae/color/struct.LchValue.html\" title=\"struct deltae::color::LchValue\">LchValue</a>","synthetic":false,"types":["deltae::color::LchValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a><&'_ <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.array.html\">[</a><a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.f32.html\">f32</a><a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.array.html\">; 3]</a>> for <a class=\"struct\" href=\"deltae/color/struct.XyzValue.html\" title=\"struct deltae::color::XyzValue\">XyzValue</a>","synthetic":false,"types":["deltae::color::XyzValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.tuple.html\">(</a><a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.f32.html\">f32</a>, <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.f32.html\">f32</a>, <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.f32.html\">f32</a><a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.tuple.html\">)</a>> for <a class=\"struct\" href=\"deltae/color/struct.XyzValue.html\" title=\"struct deltae::color::XyzValue\">XyzValue</a>","synthetic":false,"types":["deltae::color::XyzValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a><&'_ <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.tuple.html\">(</a><a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.f32.html\">f32</a>, <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.f32.html\">f32</a>, <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.f32.html\">f32</a><a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.tuple.html\">)</a>> for <a class=\"struct\" href=\"deltae/color/struct.XyzValue.html\" title=\"struct deltae::color::XyzValue\">XyzValue</a>","synthetic":false,"types":["deltae::color::XyzValue"]}]; | ||
| if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() |
| (function() {var implementors = {}; | ||
| implementors["deltae"] = [{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"deltae/struct.LabValue.html\" title=\"struct deltae::LabValue\">LabValue</a>",synthetic:false,types:["deltae::color::LabValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"deltae/struct.LchValue.html\" title=\"struct deltae::LchValue\">LchValue</a>",synthetic:false,types:["deltae::color::LchValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"deltae/struct.XyzValue.html\" title=\"struct deltae::XyzValue\">XyzValue</a>",synthetic:false,types:["deltae::color::XyzValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"enum\" href=\"deltae/enum.DEMethod.html\" title=\"enum deltae::DEMethod\">DEMethod</a>",synthetic:false,types:["deltae::DEMethod"]},]; | ||
| if (window.register_implementors) { | ||
| window.register_implementors(implementors); | ||
| } else { | ||
| window.pending_implementors = implementors; | ||
| } | ||
| })() | ||
| implementors["deltae"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"deltae/color/struct.LabValue.html\" title=\"struct deltae::color::LabValue\">LabValue</a>","synthetic":false,"types":["deltae::color::LabValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"deltae/color/struct.LchValue.html\" title=\"struct deltae::color::LchValue\">LchValue</a>","synthetic":false,"types":["deltae::color::LchValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"deltae/color/struct.XyzValue.html\" title=\"struct deltae::color::XyzValue\">XyzValue</a>","synthetic":false,"types":["deltae::color::XyzValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"enum\" href=\"deltae/enum.DEMethod.html\" title=\"enum deltae::DEMethod\">DEMethod</a>","synthetic":false,"types":["deltae::DEMethod"]}]; | ||
| if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() |
| (function() {var implementors = {}; | ||
| implementors["deltae"] = [{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"deltae/struct.LabValue.html\" title=\"struct deltae::LabValue\">LabValue</a>",synthetic:false,types:["deltae::color::LabValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"deltae/struct.LchValue.html\" title=\"struct deltae::LchValue\">LchValue</a>",synthetic:false,types:["deltae::color::LchValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"deltae/struct.XyzValue.html\" title=\"struct deltae::XyzValue\">XyzValue</a>",synthetic:false,types:["deltae::color::XyzValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"enum\" href=\"deltae/enum.ValueError.html\" title=\"enum deltae::ValueError\">ValueError</a>",synthetic:false,types:["deltae::color::ValueError"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"deltae/struct.DeltaE.html\" title=\"struct deltae::DeltaE\">DeltaE</a>",synthetic:false,types:["deltae::DeltaE"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"enum\" href=\"deltae/enum.DEMethod.html\" title=\"enum deltae::DEMethod\">DEMethod</a>",synthetic:false,types:["deltae::DEMethod"]},]; | ||
| if (window.register_implementors) { | ||
| window.register_implementors(implementors); | ||
| } else { | ||
| window.pending_implementors = implementors; | ||
| } | ||
| })() | ||
| implementors["deltae"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"deltae/color/struct.LabValue.html\" title=\"struct deltae::color::LabValue\">LabValue</a>","synthetic":false,"types":["deltae::color::LabValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"deltae/color/struct.LchValue.html\" title=\"struct deltae::color::LchValue\">LchValue</a>","synthetic":false,"types":["deltae::color::LchValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"deltae/color/struct.XyzValue.html\" title=\"struct deltae::color::XyzValue\">XyzValue</a>","synthetic":false,"types":["deltae::color::XyzValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"enum\" href=\"deltae/color/enum.ValueError.html\" title=\"enum deltae::color::ValueError\">ValueError</a>","synthetic":false,"types":["deltae::color::ValueError"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"deltae/struct.DeltaE.html\" title=\"struct deltae::DeltaE\">DeltaE</a>","synthetic":false,"types":["deltae::DeltaE"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"enum\" href=\"deltae/enum.DEMethod.html\" title=\"enum deltae::DEMethod\">DEMethod</a>","synthetic":false,"types":["deltae::DEMethod"]}]; | ||
| if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() |
| (function() {var implementors = {}; | ||
| implementors["deltae"] = [{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"struct\" href=\"deltae/struct.LabValue.html\" title=\"struct deltae::LabValue\">LabValue</a>",synthetic:false,types:["deltae::color::LabValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"struct\" href=\"deltae/struct.LchValue.html\" title=\"struct deltae::LchValue\">LchValue</a>",synthetic:false,types:["deltae::color::LchValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"struct\" href=\"deltae/struct.XyzValue.html\" title=\"struct deltae::XyzValue\">XyzValue</a>",synthetic:false,types:["deltae::color::XyzValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"enum\" href=\"deltae/enum.ValueError.html\" title=\"enum deltae::ValueError\">ValueError</a>",synthetic:false,types:["deltae::color::ValueError"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"struct\" href=\"deltae/struct.DeltaE.html\" title=\"struct deltae::DeltaE\">DeltaE</a>",synthetic:false,types:["deltae::DeltaE"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"enum\" href=\"deltae/enum.DEMethod.html\" title=\"enum deltae::DEMethod\">DEMethod</a>",synthetic:false,types:["deltae::DEMethod"]},]; | ||
| if (window.register_implementors) { | ||
| window.register_implementors(implementors); | ||
| } else { | ||
| window.pending_implementors = implementors; | ||
| } | ||
| })() | ||
| implementors["deltae"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"struct\" href=\"deltae/color/struct.LabValue.html\" title=\"struct deltae::color::LabValue\">LabValue</a>","synthetic":false,"types":["deltae::color::LabValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"struct\" href=\"deltae/color/struct.LchValue.html\" title=\"struct deltae::color::LchValue\">LchValue</a>","synthetic":false,"types":["deltae::color::LchValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"struct\" href=\"deltae/color/struct.XyzValue.html\" title=\"struct deltae::color::XyzValue\">XyzValue</a>","synthetic":false,"types":["deltae::color::XyzValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"enum\" href=\"deltae/color/enum.ValueError.html\" title=\"enum deltae::color::ValueError\">ValueError</a>","synthetic":false,"types":["deltae::color::ValueError"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"struct\" href=\"deltae/struct.DeltaE.html\" title=\"struct deltae::DeltaE\">DeltaE</a>","synthetic":false,"types":["deltae::DeltaE"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"enum\" href=\"deltae/enum.DEMethod.html\" title=\"enum deltae::DEMethod\">DEMethod</a>","synthetic":false,"types":["deltae::DEMethod"]}]; | ||
| if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() |
| (function() {var implementors = {}; | ||
| implementors["deltae"] = [{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"deltae/struct.LabValue.html\" title=\"struct deltae::LabValue\">LabValue</a>",synthetic:false,types:["deltae::color::LabValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"deltae/struct.LchValue.html\" title=\"struct deltae::LchValue\">LchValue</a>",synthetic:false,types:["deltae::color::LchValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"deltae/struct.XyzValue.html\" title=\"struct deltae::XyzValue\">XyzValue</a>",synthetic:false,types:["deltae::color::XyzValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"deltae/struct.DeltaE.html\" title=\"struct deltae::DeltaE\">DeltaE</a>",synthetic:false,types:["deltae::DeltaE"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"deltae/enum.DEMethod.html\" title=\"enum deltae::DEMethod\">DEMethod</a>",synthetic:false,types:["deltae::DEMethod"]},]; | ||
| if (window.register_implementors) { | ||
| window.register_implementors(implementors); | ||
| } else { | ||
| window.pending_implementors = implementors; | ||
| } | ||
| })() | ||
| implementors["deltae"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"deltae/color/struct.LabValue.html\" title=\"struct deltae::color::LabValue\">LabValue</a>","synthetic":false,"types":["deltae::color::LabValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"deltae/color/struct.LchValue.html\" title=\"struct deltae::color::LchValue\">LchValue</a>","synthetic":false,"types":["deltae::color::LchValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"deltae/color/struct.XyzValue.html\" title=\"struct deltae::color::XyzValue\">XyzValue</a>","synthetic":false,"types":["deltae::color::XyzValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"deltae/struct.DeltaE.html\" title=\"struct deltae::DeltaE\">DeltaE</a>","synthetic":false,"types":["deltae::DeltaE"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"deltae/enum.DEMethod.html\" title=\"enum deltae::DEMethod\">DEMethod</a>","synthetic":false,"types":["deltae::DEMethod"]}]; | ||
| if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() |
| (function() {var implementors = {}; | ||
| implementors["deltae"] = [{text:"impl Freeze for <a class=\"struct\" href=\"deltae/struct.LabValue.html\" title=\"struct deltae::LabValue\">LabValue</a>",synthetic:true,types:["deltae::color::LabValue"]},{text:"impl Freeze for <a class=\"struct\" href=\"deltae/struct.LchValue.html\" title=\"struct deltae::LchValue\">LchValue</a>",synthetic:true,types:["deltae::color::LchValue"]},{text:"impl Freeze for <a class=\"struct\" href=\"deltae/struct.XyzValue.html\" title=\"struct deltae::XyzValue\">XyzValue</a>",synthetic:true,types:["deltae::color::XyzValue"]},{text:"impl Freeze for <a class=\"struct\" href=\"deltae/struct.DeltaE.html\" title=\"struct deltae::DeltaE\">DeltaE</a>",synthetic:true,types:["deltae::DeltaE"]},{text:"impl Freeze for <a class=\"enum\" href=\"deltae/enum.ValueError.html\" title=\"enum deltae::ValueError\">ValueError</a>",synthetic:true,types:["deltae::color::ValueError"]},{text:"impl Freeze for <a class=\"enum\" href=\"deltae/enum.DEMethod.html\" title=\"enum deltae::DEMethod\">DEMethod</a>",synthetic:true,types:["deltae::DEMethod"]},]; | ||
| if (window.register_implementors) { | ||
| window.register_implementors(implementors); | ||
| } else { | ||
| window.pending_implementors = implementors; | ||
| } | ||
| })() | ||
| implementors["deltae"] = [{"text":"impl Freeze for <a class=\"struct\" href=\"deltae/color/struct.LabValue.html\" title=\"struct deltae::color::LabValue\">LabValue</a>","synthetic":true,"types":["deltae::color::LabValue"]},{"text":"impl Freeze for <a class=\"struct\" href=\"deltae/color/struct.LchValue.html\" title=\"struct deltae::color::LchValue\">LchValue</a>","synthetic":true,"types":["deltae::color::LchValue"]},{"text":"impl Freeze for <a class=\"struct\" href=\"deltae/color/struct.XyzValue.html\" title=\"struct deltae::color::XyzValue\">XyzValue</a>","synthetic":true,"types":["deltae::color::XyzValue"]},{"text":"impl Freeze for <a class=\"enum\" href=\"deltae/color/enum.ValueError.html\" title=\"enum deltae::color::ValueError\">ValueError</a>","synthetic":true,"types":["deltae::color::ValueError"]},{"text":"impl Freeze for <a class=\"struct\" href=\"deltae/struct.DeltaE.html\" title=\"struct deltae::DeltaE\">DeltaE</a>","synthetic":true,"types":["deltae::DeltaE"]},{"text":"impl Freeze for <a class=\"enum\" href=\"deltae/enum.DEMethod.html\" title=\"enum deltae::DEMethod\">DEMethod</a>","synthetic":true,"types":["deltae::DEMethod"]}]; | ||
| if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() |
| (function() {var implementors = {}; | ||
| implementors["deltae"] = [{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"deltae/struct.LabValue.html\" title=\"struct deltae::LabValue\">LabValue</a>",synthetic:true,types:["deltae::color::LabValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"deltae/struct.LchValue.html\" title=\"struct deltae::LchValue\">LchValue</a>",synthetic:true,types:["deltae::color::LchValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"deltae/struct.XyzValue.html\" title=\"struct deltae::XyzValue\">XyzValue</a>",synthetic:true,types:["deltae::color::XyzValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"deltae/struct.DeltaE.html\" title=\"struct deltae::DeltaE\">DeltaE</a>",synthetic:true,types:["deltae::DeltaE"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"enum\" href=\"deltae/enum.ValueError.html\" title=\"enum deltae::ValueError\">ValueError</a>",synthetic:true,types:["deltae::color::ValueError"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"enum\" href=\"deltae/enum.DEMethod.html\" title=\"enum deltae::DEMethod\">DEMethod</a>",synthetic:true,types:["deltae::DEMethod"]},]; | ||
| if (window.register_implementors) { | ||
| window.register_implementors(implementors); | ||
| } else { | ||
| window.pending_implementors = implementors; | ||
| } | ||
| })() | ||
| implementors["deltae"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"deltae/color/struct.LabValue.html\" title=\"struct deltae::color::LabValue\">LabValue</a>","synthetic":true,"types":["deltae::color::LabValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"deltae/color/struct.LchValue.html\" title=\"struct deltae::color::LchValue\">LchValue</a>","synthetic":true,"types":["deltae::color::LchValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"deltae/color/struct.XyzValue.html\" title=\"struct deltae::color::XyzValue\">XyzValue</a>","synthetic":true,"types":["deltae::color::XyzValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"enum\" href=\"deltae/color/enum.ValueError.html\" title=\"enum deltae::color::ValueError\">ValueError</a>","synthetic":true,"types":["deltae::color::ValueError"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"deltae/struct.DeltaE.html\" title=\"struct deltae::DeltaE\">DeltaE</a>","synthetic":true,"types":["deltae::DeltaE"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"enum\" href=\"deltae/enum.DEMethod.html\" title=\"enum deltae::DEMethod\">DEMethod</a>","synthetic":true,"types":["deltae::DEMethod"]}]; | ||
| if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() |
| (function() {var implementors = {}; | ||
| implementors["deltae"] = [{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"deltae/struct.LabValue.html\" title=\"struct deltae::LabValue\">LabValue</a>",synthetic:true,types:["deltae::color::LabValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"deltae/struct.LchValue.html\" title=\"struct deltae::LchValue\">LchValue</a>",synthetic:true,types:["deltae::color::LchValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"deltae/struct.XyzValue.html\" title=\"struct deltae::XyzValue\">XyzValue</a>",synthetic:true,types:["deltae::color::XyzValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"deltae/struct.DeltaE.html\" title=\"struct deltae::DeltaE\">DeltaE</a>",synthetic:true,types:["deltae::DeltaE"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"enum\" href=\"deltae/enum.ValueError.html\" title=\"enum deltae::ValueError\">ValueError</a>",synthetic:true,types:["deltae::color::ValueError"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"enum\" href=\"deltae/enum.DEMethod.html\" title=\"enum deltae::DEMethod\">DEMethod</a>",synthetic:true,types:["deltae::DEMethod"]},]; | ||
| if (window.register_implementors) { | ||
| window.register_implementors(implementors); | ||
| } else { | ||
| window.pending_implementors = implementors; | ||
| } | ||
| })() | ||
| implementors["deltae"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"deltae/color/struct.LabValue.html\" title=\"struct deltae::color::LabValue\">LabValue</a>","synthetic":true,"types":["deltae::color::LabValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"deltae/color/struct.LchValue.html\" title=\"struct deltae::color::LchValue\">LchValue</a>","synthetic":true,"types":["deltae::color::LchValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"deltae/color/struct.XyzValue.html\" title=\"struct deltae::color::XyzValue\">XyzValue</a>","synthetic":true,"types":["deltae::color::XyzValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"enum\" href=\"deltae/color/enum.ValueError.html\" title=\"enum deltae::color::ValueError\">ValueError</a>","synthetic":true,"types":["deltae::color::ValueError"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"deltae/struct.DeltaE.html\" title=\"struct deltae::DeltaE\">DeltaE</a>","synthetic":true,"types":["deltae::DeltaE"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"enum\" href=\"deltae/enum.DEMethod.html\" title=\"enum deltae::DEMethod\">DEMethod</a>","synthetic":true,"types":["deltae::DEMethod"]}]; | ||
| if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() |
| (function() {var implementors = {}; | ||
| implementors["deltae"] = [{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"deltae/struct.LabValue.html\" title=\"struct deltae::LabValue\">LabValue</a>",synthetic:true,types:["deltae::color::LabValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"deltae/struct.LchValue.html\" title=\"struct deltae::LchValue\">LchValue</a>",synthetic:true,types:["deltae::color::LchValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"deltae/struct.XyzValue.html\" title=\"struct deltae::XyzValue\">XyzValue</a>",synthetic:true,types:["deltae::color::XyzValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"deltae/struct.DeltaE.html\" title=\"struct deltae::DeltaE\">DeltaE</a>",synthetic:true,types:["deltae::DeltaE"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"enum\" href=\"deltae/enum.ValueError.html\" title=\"enum deltae::ValueError\">ValueError</a>",synthetic:true,types:["deltae::color::ValueError"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"enum\" href=\"deltae/enum.DEMethod.html\" title=\"enum deltae::DEMethod\">DEMethod</a>",synthetic:true,types:["deltae::DEMethod"]},]; | ||
| if (window.register_implementors) { | ||
| window.register_implementors(implementors); | ||
| } else { | ||
| window.pending_implementors = implementors; | ||
| } | ||
| })() | ||
| implementors["deltae"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"deltae/color/struct.LabValue.html\" title=\"struct deltae::color::LabValue\">LabValue</a>","synthetic":true,"types":["deltae::color::LabValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"deltae/color/struct.LchValue.html\" title=\"struct deltae::color::LchValue\">LchValue</a>","synthetic":true,"types":["deltae::color::LchValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"deltae/color/struct.XyzValue.html\" title=\"struct deltae::color::XyzValue\">XyzValue</a>","synthetic":true,"types":["deltae::color::XyzValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"enum\" href=\"deltae/color/enum.ValueError.html\" title=\"enum deltae::color::ValueError\">ValueError</a>","synthetic":true,"types":["deltae::color::ValueError"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"deltae/struct.DeltaE.html\" title=\"struct deltae::DeltaE\">DeltaE</a>","synthetic":true,"types":["deltae::DeltaE"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"enum\" href=\"deltae/enum.DEMethod.html\" title=\"enum deltae::DEMethod\">DEMethod</a>","synthetic":true,"types":["deltae::DEMethod"]}]; | ||
| if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() |
| (function() {var implementors = {}; | ||
| implementors["deltae"] = []; | ||
| if (window.register_implementors) { | ||
| window.register_implementors(implementors); | ||
| } else { | ||
| window.pending_implementors = implementors; | ||
| } | ||
| })() | ||
| if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() |
| (function() {var implementors = {}; | ||
| implementors["deltae"] = []; | ||
| if (window.register_implementors) { | ||
| window.register_implementors(implementors); | ||
| } else { | ||
| window.pending_implementors = implementors; | ||
| } | ||
| })() | ||
| if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() |
| (function() {var implementors = {}; | ||
| implementors["deltae"] = []; | ||
| if (window.register_implementors) { | ||
| window.register_implementors(implementors); | ||
| } else { | ||
| window.pending_implementors = implementors; | ||
| } | ||
| })() | ||
| if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() |
| (function() {var implementors = {}; | ||
| implementors["deltae"] = [{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/error/trait.Error.html\" title=\"trait std::error::Error\">Error</a> for <a class=\"enum\" href=\"deltae/enum.ValueError.html\" title=\"enum deltae::ValueError\">ValueError</a>",synthetic:false,types:["deltae::color::ValueError"]},]; | ||
| if (window.register_implementors) { | ||
| window.register_implementors(implementors); | ||
| } else { | ||
| window.pending_implementors = implementors; | ||
| } | ||
| })() | ||
| implementors["deltae"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/error/trait.Error.html\" title=\"trait std::error::Error\">Error</a> for <a class=\"enum\" href=\"deltae/color/enum.ValueError.html\" title=\"enum deltae::color::ValueError\">ValueError</a>","synthetic":false,"types":["deltae::color::ValueError"]}]; | ||
| if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() |
| (function() {var implementors = {}; | ||
| implementors["deltae"] = [{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html\" title=\"trait std::panic::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"deltae/struct.LabValue.html\" title=\"struct deltae::LabValue\">LabValue</a>",synthetic:true,types:["deltae::color::LabValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html\" title=\"trait std::panic::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"deltae/struct.LchValue.html\" title=\"struct deltae::LchValue\">LchValue</a>",synthetic:true,types:["deltae::color::LchValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html\" title=\"trait std::panic::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"deltae/struct.XyzValue.html\" title=\"struct deltae::XyzValue\">XyzValue</a>",synthetic:true,types:["deltae::color::XyzValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html\" title=\"trait std::panic::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"deltae/struct.DeltaE.html\" title=\"struct deltae::DeltaE\">DeltaE</a>",synthetic:true,types:["deltae::DeltaE"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html\" title=\"trait std::panic::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"enum\" href=\"deltae/enum.ValueError.html\" title=\"enum deltae::ValueError\">ValueError</a>",synthetic:true,types:["deltae::color::ValueError"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html\" title=\"trait std::panic::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"enum\" href=\"deltae/enum.DEMethod.html\" title=\"enum deltae::DEMethod\">DEMethod</a>",synthetic:true,types:["deltae::DEMethod"]},]; | ||
| if (window.register_implementors) { | ||
| window.register_implementors(implementors); | ||
| } else { | ||
| window.pending_implementors = implementors; | ||
| } | ||
| })() | ||
| implementors["deltae"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html\" title=\"trait std::panic::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"deltae/color/struct.LabValue.html\" title=\"struct deltae::color::LabValue\">LabValue</a>","synthetic":true,"types":["deltae::color::LabValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html\" title=\"trait std::panic::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"deltae/color/struct.LchValue.html\" title=\"struct deltae::color::LchValue\">LchValue</a>","synthetic":true,"types":["deltae::color::LchValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html\" title=\"trait std::panic::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"deltae/color/struct.XyzValue.html\" title=\"struct deltae::color::XyzValue\">XyzValue</a>","synthetic":true,"types":["deltae::color::XyzValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html\" title=\"trait std::panic::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"enum\" href=\"deltae/color/enum.ValueError.html\" title=\"enum deltae::color::ValueError\">ValueError</a>","synthetic":true,"types":["deltae::color::ValueError"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html\" title=\"trait std::panic::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"deltae/struct.DeltaE.html\" title=\"struct deltae::DeltaE\">DeltaE</a>","synthetic":true,"types":["deltae::DeltaE"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html\" title=\"trait std::panic::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"enum\" href=\"deltae/enum.DEMethod.html\" title=\"enum deltae::DEMethod\">DEMethod</a>","synthetic":true,"types":["deltae::DEMethod"]}]; | ||
| if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() |
| (function() {var implementors = {}; | ||
| implementors["deltae"] = [{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html\" title=\"trait std::panic::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"deltae/struct.LabValue.html\" title=\"struct deltae::LabValue\">LabValue</a>",synthetic:true,types:["deltae::color::LabValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html\" title=\"trait std::panic::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"deltae/struct.LchValue.html\" title=\"struct deltae::LchValue\">LchValue</a>",synthetic:true,types:["deltae::color::LchValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html\" title=\"trait std::panic::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"deltae/struct.XyzValue.html\" title=\"struct deltae::XyzValue\">XyzValue</a>",synthetic:true,types:["deltae::color::XyzValue"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html\" title=\"trait std::panic::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"deltae/struct.DeltaE.html\" title=\"struct deltae::DeltaE\">DeltaE</a>",synthetic:true,types:["deltae::DeltaE"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html\" title=\"trait std::panic::UnwindSafe\">UnwindSafe</a> for <a class=\"enum\" href=\"deltae/enum.ValueError.html\" title=\"enum deltae::ValueError\">ValueError</a>",synthetic:true,types:["deltae::color::ValueError"]},{text:"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html\" title=\"trait std::panic::UnwindSafe\">UnwindSafe</a> for <a class=\"enum\" href=\"deltae/enum.DEMethod.html\" title=\"enum deltae::DEMethod\">DEMethod</a>",synthetic:true,types:["deltae::DEMethod"]},]; | ||
| if (window.register_implementors) { | ||
| window.register_implementors(implementors); | ||
| } else { | ||
| window.pending_implementors = implementors; | ||
| } | ||
| })() | ||
| implementors["deltae"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html\" title=\"trait std::panic::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"deltae/color/struct.LabValue.html\" title=\"struct deltae::color::LabValue\">LabValue</a>","synthetic":true,"types":["deltae::color::LabValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html\" title=\"trait std::panic::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"deltae/color/struct.LchValue.html\" title=\"struct deltae::color::LchValue\">LchValue</a>","synthetic":true,"types":["deltae::color::LchValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html\" title=\"trait std::panic::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"deltae/color/struct.XyzValue.html\" title=\"struct deltae::color::XyzValue\">XyzValue</a>","synthetic":true,"types":["deltae::color::XyzValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html\" title=\"trait std::panic::UnwindSafe\">UnwindSafe</a> for <a class=\"enum\" href=\"deltae/color/enum.ValueError.html\" title=\"enum deltae::color::ValueError\">ValueError</a>","synthetic":true,"types":["deltae::color::ValueError"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html\" title=\"trait std::panic::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"deltae/struct.DeltaE.html\" title=\"struct deltae::DeltaE\">DeltaE</a>","synthetic":true,"types":["deltae::DeltaE"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html\" title=\"trait std::panic::UnwindSafe\">UnwindSafe</a> for <a class=\"enum\" href=\"deltae/enum.DEMethod.html\" title=\"enum deltae::DEMethod\">DEMethod</a>","synthetic":true,"types":["deltae::DEMethod"]}]; | ||
| if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() |
@@ -1,1 +0,1 @@ | ||
| body{background-color:white;color:black;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){color:black;}h1.fqn{border-bottom-color:#D5D5D5;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){border-bottom-color:#DDDDDD;}.in-band{background-color:white;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#F5F5F5;}pre{background-color:#F5F5F5;}.sidebar{background-color:#F1F1F1;}.sidebar .current{background-color:#fff;}.source .sidebar{background-color:#fff;}.sidebar .location{border-color:#000;background-color:#fff;color:#333;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#F5F5F5;}.line-numbers span{color:#c67e2d;}.line-numbers .line-highlighted{background-color:#f6fdb0 !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#ddd;}.docblock table,.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#4E4C4C;}.content .highlighted{color:#000 !important;background-color:#ccc;}.content .highlighted a,.content .highlighted span{color:#000 !important;}.content .highlighted.trait{background-color:#c7b6ff;}.content .highlighted.traitalias{background-color:#c7b6ff;}.content .highlighted.mod,.content .highlighted.externcrate{background-color:#afc6e4;}.content .highlighted.enum{background-color:#b4d1b9;}.content .highlighted.struct{background-color:#e7b1a0;}.content .highlighted.union{background-color:#b7bd49;}.content .highlighted.fn,.content .highlighted.method,.content .highlighted.tymethod{background-color:#c6afb3;}.content .highlighted.type{background-color:#ffc891;}.content .highlighted.foreigntype{background-color:#f5c4ff;}.content .highlighted.attr,.content .highlighted.derive,.content .highlighted.macro{background-color:#8ce488;}.content .highlighted.constant,.content .highlighted.static{background-color:#c3e0ff;}.content .highlighted.primitive{background-color:#9aecff;}.content .highlighted.keyword{background-color:#f99650;}.content span.enum,.content a.enum,.block a.current.enum{color:#508157;}.content span.struct,.content a.struct,.block a.current.struct{color:#ad448e;}.content span.type,.content a.type,.block a.current.type{color:#ba5d00;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#cd00e2;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#068000;}.content span.union,.content a.union,.block a.current.union{color:#767b27;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#546e8a;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#2c8093;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#4d76ae;}.content span.trait,.content a.trait,.block a.current.trait{color:#7c5af3;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#6841f1;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#9a6e31;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#de5249;}pre.rust .comment{color:#8E908C;}pre.rust .doccomment{color:#4D4D4C;}nav{border-bottom-color:#e0e0e0;}nav.main .current{border-top-color:#000;border-bottom-color:#000;}nav.main .separator{border:1px solid #000;}a{color:#000;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.stability a{color:#3873AD;}.stab.internal a{color:#304FFE;}a.test-arrow{color:#f5f5f5;}.collapse-toggle{color:#999;}#crate-search{color:#555;background-color:white;border-color:#e0e0e0;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input{color:#555;background-color:white;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input:focus{border-color:#66afe9;}#crate-search+.search-input:focus{box-shadow:0 0 8px #078dd8;}.module-item .stab{color:#000;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;}.stab.internal{background:#FFB9B3;border-color:#B71C1C;}.stab.deprecated{background:#F3DFFF;border-color:#7F0087;}.stab.portability{background:#C4ECFF;border-color:#7BA5DB;}.stab.portability>code{color:#000;}#help>div{background:#e9e9e9;border-color:#bfbfbf;}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:black;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#8959A8;}pre.rust .kw-2,pre.rust .prelude-ty{color:#4271AE;}pre.rust .number,pre.rust .string{color:#718C00;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#C82829;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#B76514;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#c7c7c7;}a.test-arrow{background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label{color:#999;}:target>code,:target>.in-band{background:#FDFFD3;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.4);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.4);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.3);}.information>.compile_fail:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.3);}.information>.ignore:hover{color:rgba(255,142,0,1);}.search-failed a{color:#0089ff;}.tooltip .tooltiptext{background-color:black;color:#fff;}.tooltip .tooltiptext::after{border-color:transparent black transparent transparent;}.important-traits .tooltip .tooltiptext{background-color:white;color:black;border-color:black;}#titles>div:not(.selected){background-color:#e6e6e6;border-top-color:#e6e6e6;}#titles>div:hover,#titles>div.selected{border-top-color:#0089ff;}#titles>div>div.count{color:#888;}.modal{background-color:rgba(0,0,0,0.3);}.modal-content{background-color:#eee;border-color:#999;}.modal-content>.close{background-color:#eee;border-color:#999;}.modal-content>.close:hover{background-color:#ff1f1f;color:white;}.modal-content>.whiter{background-color:#eee;}.modal-content>.close:hover+.whiter{background-color:#ff1f1f;}@media (max-width:700px){.sidebar-menu{background-color:#F1F1F1;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#F1F1F1;border-right-color:#000;}#sidebar-filler{background-color:#F1F1F1;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu{border-color:#e0e0e0;background-color:#fff;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus{border-color:#717171;}#theme-choices{border-color:#ccc;background-color:#fff;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#eee;}@media (max-width:700px){#theme-picker{background:#fff;}}#all-types{background-color:#fff;}#all-types:hover{background-color:#f9f9f9;}.search-results td span.alias{color:#000;}.search-results td span.grey{color:#999;}#sidebar-toggle{background-color:#F1F1F1;}#sidebar-toggle:hover{background-color:#E0E0E0;}#source-sidebar{background-color:#F1F1F1;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#E0E0E0;}div.files>.selected{background-color:#fff;} | ||
| body{background-color:white;color:black;}h1,h2,h3,h4{color:black;}h1.fqn{border-bottom-color:#D5D5D5;}h2,h3,h4{border-bottom-color:#DDDDDD;}.in-band{background-color:white;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#F5F5F5;}pre,.rustdoc.source .example-wrap{background-color:#F5F5F5;}.sidebar{background-color:#F1F1F1;}*{scrollbar-color:rgba(36,37,39,0.6) #e6e6e6;}.sidebar{scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;}.logo-container.rust-logo>img{}::-webkit-scrollbar-track{background-color:#ecebeb;}::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar::-webkit-scrollbar-track{background-color:#dcdcdc;}.sidebar::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar .current{background-color:#fff;}.source .sidebar{background-color:#fff;}.sidebar .location{border-color:#000;background-color:#fff;color:#333;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#F5F5F5;}.line-numbers span{color:#c67e2d;}.line-numbers .line-highlighted{background-color:#f6fdb0 !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#ddd;}.docblock table,.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#4E4C4C;}.search-results a:hover{background-color:#ddd;}.search-results a:focus{color:#000 !important;background-color:#ccc;}.search-results a:focus span{color:#000 !important;}a.result-trait:focus{background-color:#c7b6ff;}a.result-traitalias:focus{background-color:#c7b6ff;}a.result-mod:focus,a.result-externcrate:focus{background-color:#afc6e4;}a.result-enum:focus{background-color:#b4d1b9;}a.result-struct:focus{background-color:#e7b1a0;}a.result-union:focus{background-color:#b7bd49;}a.result-fn:focus,a.result-method:focus,a.result-tymethod:focus{background-color:#c6afb3;}a.result-type:focus{background-color:#ffc891;}a.result-foreigntype:focus{background-color:#f5c4ff;}a.result-attr:focus,a.result-derive:focus,a.result-macro:focus{background-color:#8ce488;}a.result-constant:focus,a.result-static:focus{background-color:#c3e0ff;}a.result-primitive:focus{background-color:#9aecff;}a.result-keyword:focus{background-color:#f99650;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#508157;}.content span.struct,.content a.struct,.block a.current.struct{color:#ad448e;}.content span.type,.content a.type,.block a.current.type{color:#ba5d00;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#cd00e2;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#068000;}.content span.union,.content a.union,.block a.current.union{color:#767b27;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#546e8a;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#2c8093;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#4d76ae;}.content span.trait,.content a.trait,.block a.current.trait{color:#7c5af3;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#6841f1;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#9a6e31;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#de5249;}pre.rust .comment{color:#8E908C;}pre.rust .doccomment{color:#4D4D4C;}nav:not(.sidebar){border-bottom-color:#e0e0e0;}nav.main .current{border-top-color:#000;border-bottom-color:#000;}nav.main .separator{border:1px solid #000;}a{color:#000;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#3873AD;}a.test-arrow{color:#f5f5f5;}details.rustdoc-toggle>summary.hideme>span,details.rustdoc-toggle>summary::before,details.undocumented>summary::before{color:#999;}#crate-search{color:#555;background-color:white;border-color:#e0e0e0;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input{color:#555;background-color:white;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input:focus{border-color:#66afe9;}.search-input:disabled{background-color:#e6e6e6;}#crate-search+.search-input:focus{box-shadow:0 0 8px #078dd8;}.module-item .stab,.import-item .stab{color:#000;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;}.stab.deprecated{background:#ffc4c4;border-color:#db7b7b;}.stab.portability{background:#F3DFFF;border-color:#b07bdb;}.stab.portability>code{background:none;}#help>div{background:#e9e9e9;border-color:#bfbfbf;}#help>div>span{border-bottom-color:#bfbfbf;}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:black;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#8959A8;}pre.rust .kw-2,pre.rust .prelude-ty{color:#4271AE;}pre.rust .number,pre.rust .string{color:#718C00;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#C82829;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#B76514;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#c7c7c7;}a.test-arrow{background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label,.code-attribute{color:#999;}:target,:target>*{background:#FDFFD3;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.5);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.5);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#0089ff;}.tooltip::after{background-color:#000;color:#fff;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#eee;border-color:#999;}.notable-traits-tooltiptext .notable{border-bottom-color:#DDDDDD;}#titles>button:not(.selected){background-color:#e6e6e6;border-top-color:#e6e6e6;}#titles>button:hover,#titles>button.selected{background-color:#ffffff;border-top-color:#0089ff;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-menu{background-color:#F1F1F1;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#F1F1F1;border-right-color:#000;}#sidebar-filler{background-color:#F1F1F1;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,#help-button{border-color:#e0e0e0;background-color:#fff;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,#help-button:hover,#help-button:focus{border-color:#717171;}#copy-path{color:#999;}#copy-path>img{filter:invert(50%);}#copy-path:hover>img{filter:invert(35%);}#theme-choices{border-color:#ccc;background-color:#fff;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#eee;}@media (max-width:700px){#theme-picker{background:#fff;}}#all-types{background-color:#fff;}#all-types:hover{background-color:#f9f9f9;}.search-results .result-name span.alias{color:#000;}.search-results .result-name span.grey{color:#999;}#sidebar-toggle{background-color:#F1F1F1;}#sidebar-toggle:hover{background-color:#E0E0E0;}#source-sidebar{background-color:#F1F1F1;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#E0E0E0;}div.files>.selected{background-color:#fff;}.setting-line>.title{border-bottom-color:#D5D5D5;} |
+8
-1
@@ -1,1 +0,8 @@ | ||
| if(!String.prototype.startsWith){String.prototype.startsWith=function(searchString,position){position=position||0;return this.indexOf(searchString,position)===position}}if(!String.prototype.endsWith){String.prototype.endsWith=function(suffix,length){var l=length||this.length;return this.indexOf(suffix,l-suffix.length)!==-1}}if(!DOMTokenList.prototype.add){DOMTokenList.prototype.add=function(className){if(className&&!hasClass(this,className)){if(this.className&&this.className.length>0){this.className+=" "+className}else{this.className=className}}}}if(!DOMTokenList.prototype.remove){DOMTokenList.prototype.remove=function(className){if(className&&this.className){this.className=(" "+this.className+" ").replace(" "+className+" "," ").trim()}}}(function(){"use strict";var itemTypes=["mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","primitive","associatedtype","constant","associatedconstant","union","foreigntype","keyword","existential","attr","derive","traitalias"];var search_input=document.getElementsByClassName("search-input")[0];var currentTab=0;var titleBeforeSearch=document.title;function getPageId(){var id=document.location.href.split("#")[1];if(id){return id.split("?")[0].split("&")[0]}return null}function showSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){addClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];if(sidebar){addClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(!filler){var div=document.createElement("div");div.id="sidebar-filler";sidebar.appendChild(div)}}var themePicker=document.getElementsByClassName("theme-picker");if(themePicker&&themePicker.length>0){themePicker[0].style.display="none"}}function hideSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){removeClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(filler){filler.remove()}document.getElementsByTagName("body")[0].style.marginTop="";var themePicker=document.getElementsByClassName("theme-picker");if(themePicker&&themePicker.length>0){themePicker[0].style.display=null}}var TY_PRIMITIVE=itemTypes.indexOf("primitive");var TY_KEYWORD=itemTypes.indexOf("keyword");onEachLazy(document.getElementsByClassName("js-only"),function(e){removeClass(e,"js-only")});function getQueryStringParams(){var params={};window.location.search.substring(1).split("&").map(function(s){var pair=s.split("=");params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}var main=document.getElementById("main");function highlightSourceLines(ev){hideSidebar();var elem;var search=document.getElementById("search");var i,from,to,match=window.location.hash.match(/^#?(\d+)(?:-(\d+))?$/);if(match){from=parseInt(match[1],10);to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to<from){var tmp=to;to=from;from=tmp}elem=document.getElementById(from);if(!elem){return}if(ev===null){var x=document.getElementById(from);if(x){x.scrollIntoView()}}onEachLazy(document.getElementsByClassName("line-numbers"),function(e){onEachLazy(e.getElementsByTagName("span"),function(i_e){removeClass(i_e,"line-highlighted")})});for(i=from;i<=to;++i){elem=document.getElementById(i);if(!elem){break}addClass(elem,"line-highlighted")}}else if(ev!==null&&search&&!hasClass(search,"hidden")&&ev.newURL){addClass(search,"hidden");removeClass(main,"hidden");var hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(hash,"","?search=#"+hash)}elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}}function expandSection(id){var elem=document.getElementById(id);if(elem&&isHidden(elem)){var h3=elem.parentNode.previousElementSibling;if(h3&&h3.tagName!=="H3"){h3=h3.previousElementSibling}if(h3){var collapses=h3.getElementsByClassName("collapse-toggle");if(collapses.length>0){collapseDocs(collapses[0],"show")}}}}highlightSourceLines(null);window.onhashchange=highlightSourceLines;function getVirtualKey(ev){if("key"in ev&&typeof ev.key!="undefined"){return ev.key}var c=ev.charCode||ev.keyCode;if(c==27){return"Escape"}return String.fromCharCode(c)}function displayHelp(display,ev,help){if(display===true){if(hasClass(help,"hidden")){ev.preventDefault();removeClass(help,"hidden");addClass(document.body,"blur")}}else if(hasClass(help,"hidden")===false){ev.preventDefault();addClass(help,"hidden");removeClass(document.body,"blur")}}function handleEscape(ev,help){hideModal();var search=document.getElementById("search");if(hasClass(help,"hidden")===false){displayHelp(false,ev,help)}else if(hasClass(search,"hidden")===false){ev.preventDefault();addClass(search,"hidden");removeClass(main,"hidden");document.title=titleBeforeSearch}defocusSearchBar()}function handleShortcut(ev){if(ev.ctrlKey||ev.altKey||ev.metaKey){return}var help=document.getElementById("help");if(document.activeElement.tagName==="INPUT"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev,help);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev,help);break;case"s":case"S":displayHelp(false,ev,help);hideModal();ev.preventDefault();focusSearchBar();break;case"+":case"-":ev.preventDefault();toggleAllDocs();break;case"?":if(ev.shiftKey){hideModal();displayHelp(true,ev,help)}break}}}function findParentElement(elem,tagName){do{if(elem&&elem.tagName===tagName){return elem}elem=elem.parentNode}while(elem);return null}document.onkeypress=handleShortcut;document.onkeydown=handleShortcut;document.onclick=function(ev){if(hasClass(ev.target,"collapse-toggle")){collapseDocs(ev.target,"toggle")}else if(hasClass(ev.target.parentNode,"collapse-toggle")){collapseDocs(ev.target.parentNode,"toggle")}else if(ev.target.tagName==="SPAN"&&hasClass(ev.target.parentNode,"line-numbers")){var prev_id=0;var set_fragment=function(name){if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);window.hashchange()}else{location.replace("#"+name)}};var cur_id=parseInt(ev.target.id,10);if(ev.shiftKey&&prev_id){if(prev_id>cur_id){var tmp=prev_id;prev_id=cur_id;cur_id=tmp}set_fragment(prev_id+"-"+cur_id)}else{prev_id=cur_id;set_fragment(cur_id)}}else if(hasClass(document.getElementById("help"),"hidden")===false){addClass(document.getElementById("help"),"hidden");removeClass(document.body,"blur")}else{var a=findParentElement(ev.target,"A");if(a&&a.hash){expandSection(a.hash.replace(/^#/,""))}}};var x=document.getElementsByClassName("version-selector");if(x.length>0){x[0].onchange=function(){var i,match,url=document.location.href,stripped="",len=rootPath.match(/\.\.\//g).length+1;for(i=0;i<len;++i){match=url.match(/\/[^\/]*$/);if(i<len-1){stripped=match[0]+stripped}url=url.substring(0,url.length-match[0].length)}url+="/"+document.getElementsByClassName("version-selector")[0].value+stripped;document.location.href=url}}var levenshtein_row2=[];function levenshtein(s1,s2){if(s1===s2){return 0}var s1_len=s1.length,s2_len=s2.length;if(s1_len&&s2_len){var i1=0,i2=0,a,b,c,c2,row=levenshtein_row2;while(i1<s1_len){row[i1]=++i1}while(i2<s2_len){c2=s2.charCodeAt(i2);a=i2;++i2;b=i2;for(i1=0;i1<s1_len;++i1){c=a+(s1.charCodeAt(i1)!==c2?1:0);a=row[i1];b=b<a?(b<c?b+1:c):(a<c?a+1:c);row[i1]=b}}return b}return s1_len+s2_len}function initSearch(rawSearchIndex){var currentResults,index,searchIndex;var MAX_LEV_DISTANCE=3;var MAX_RESULTS=200;var GENERICS_DATA=1;var NAME=0;var INPUTS_DATA=0;var OUTPUT_DATA=1;var params=getQueryStringParams();if(search_input.value===""){search_input.value=params.search||""}function execQuery(query,searchWords,filterCrates){function itemTypeFromName(typename){var length=itemTypes.length;for(var i=0;i<length;++i){if(itemTypes[i]===typename){return i}}return-1}var valLower=query.query.toLowerCase(),val=valLower,typeFilter=itemTypeFromName(query.type),results={},results_in_args={},results_returned={},split=valLower.split("::");var length=split.length;for(var z=0;z<length;++z){if(split[z]===""){split.splice(z,1);z-=1}}function transformResults(results,isType){var out=[];var length=results.length;for(var i=0;i<length;++i){if(results[i].id>-1){var obj=searchIndex[results[i].id];obj.lev=results[i].lev;if(isType!==true||obj.type){var res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=obj.displayPath+obj.name;obj.fullPath+="|"+obj.ty;obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}}return out}function sortResults(results,isType){var ar=[];for(var entry in results){if(results.hasOwnProperty(entry)){ar.push(results[entry])}}results=ar;var i;var nresults=results.length;for(i=0;i<nresults;++i){results[i].word=searchWords[results[i].id];results[i].item=searchIndex[results[i].id]||{}}if(results.length===0){return[]}results.sort(function(aaa,bbb){var a,b;a=(aaa.lev);b=(bbb.lev);if(a!==b){return a-b}a=(aaa.item.crate!==window.currentCrate);b=(bbb.item.crate!==window.currentCrate);if(a!==b){return a-b}a=(aaa.word!==valLower);b=(bbb.word!==valLower);if(a!==b){return a-b}a=aaa.word.length;b=bbb.word.length;if(a!==b){return a-b}a=aaa.word;b=bbb.word;if(a!==b){return(a>b?+1:-1)}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}if((aaa.item.ty===TY_PRIMITIVE&&bbb.item.ty!==TY_KEYWORD)||(aaa.item.ty===TY_KEYWORD&&bbb.item.ty!==TY_PRIMITIVE)){return-1}if((bbb.item.ty===TY_PRIMITIVE&&aaa.item.ty!==TY_PRIMITIVE)||(bbb.item.ty===TY_KEYWORD&&aaa.item.ty!==TY_KEYWORD)){return 1}a=(aaa.item.desc==="");b=(bbb.item.desc==="");if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});var length=results.length;for(i=0;i<length;++i){var result=results[i];if(result.dontValidate){continue}var name=result.item.name.toLowerCase(),path=result.item.path.toLowerCase(),parent=result.item.parent;if(isType!==true&&validateResult(name,path,split,parent)===false){result.id=-1}}return transformResults(results)}function extractGenerics(val){val=val.toLowerCase();if(val.indexOf("<")!==-1){var values=val.substring(val.indexOf("<")+1,val.lastIndexOf(">"));return{name:val.substring(0,val.indexOf("<")),generics:values.split(/\s*,\s*/),}}return{name:val,generics:[],}}function checkGenerics(obj,val){var lev_distance=MAX_LEV_DISTANCE+1;if(val.generics.length>0){if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>=val.generics.length){var elems=obj[GENERICS_DATA].slice(0);var total=0;var done=0;var vlength=val.generics.length;for(var y=0;y<vlength;++y){var lev={pos:-1,lev:MAX_LEV_DISTANCE+1};var elength=elems.length;for(var x=0;x<elength;++x){var tmp_lev=levenshtein(elems[x],val.generics[y]);if(tmp_lev<lev.lev){lev.lev=tmp_lev;lev.pos=x}}if(lev.pos!==-1){elems.splice(lev.pos,1);lev_distance=Math.min(lev.lev,lev_distance);total+=lev.lev;done+=1}else{return MAX_LEV_DISTANCE+1}}return Math.ceil(total/done)}}return MAX_LEV_DISTANCE+1}function checkType(obj,val,literalSearch){var lev_distance=MAX_LEV_DISTANCE+1;var x;if(obj[NAME]===val.name){if(literalSearch===true){if(val.generics&&val.generics.length!==0){if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>=val.generics.length){var elems=obj[GENERICS_DATA].slice(0);var allFound=true;for(var y=0;allFound===true&&y<val.generics.length;++y){allFound=false;for(x=0;allFound===false&&x<elems.length;++x){allFound=elems[x]===val.generics[y]}if(allFound===true){elems.splice(x-1,1)}}if(allFound===true){return true}}else{return false}}return true}if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length!==0){var tmp_lev=checkGenerics(obj,val);if(tmp_lev<=MAX_LEV_DISTANCE){return tmp_lev}}else{return 0}}if(literalSearch===true){if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>0){var length=obj[GENERICS_DATA].length;for(x=0;x<length;++x){if(obj[GENERICS_DATA][x]===val.name){return true}}}return false}lev_distance=Math.min(levenshtein(obj[NAME],val.name),lev_distance);if(lev_distance<=MAX_LEV_DISTANCE){lev_distance=Math.ceil((checkGenerics(obj,val)+lev_distance)/2)}else if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>0){var olength=obj[GENERICS_DATA].length;for(x=0;x<olength;++x){lev_distance=Math.min(levenshtein(obj[GENERICS_DATA][x],val.name),lev_distance)}}return lev_distance+1}function findArg(obj,val,literalSearch){var lev_distance=MAX_LEV_DISTANCE+1;if(obj&&obj.type&&obj.type[INPUTS_DATA]&&obj.type[INPUTS_DATA].length>0){var length=obj.type[INPUTS_DATA].length;for(var i=0;i<length;i++){var tmp=checkType(obj.type[INPUTS_DATA][i],val,literalSearch);if(literalSearch===true&&tmp===true){return true}lev_distance=Math.min(tmp,lev_distance);if(lev_distance===0){return 0}}}return literalSearch===true?false:lev_distance}function checkReturned(obj,val,literalSearch){var lev_distance=MAX_LEV_DISTANCE+1;if(obj&&obj.type&&obj.type.length>OUTPUT_DATA){var ret=obj.type[OUTPUT_DATA];if(!obj.type[OUTPUT_DATA].length){ret=[ret]}for(var x=0;x<ret.length;++x){var r=ret[x];if(typeof r==="string"){r=[r]}var tmp=checkType(r,val,literalSearch);if(literalSearch===true){if(tmp===true){return true}continue}lev_distance=Math.min(tmp,lev_distance);if(lev_distance===0){return 0}}}return literalSearch===true?false:lev_distance}function checkPath(contains,lastElem,ty){if(contains.length===0){return 0}var ret_lev=MAX_LEV_DISTANCE+1;var path=ty.path.split("::");if(ty.parent&&ty.parent.name){path.push(ty.parent.name.toLowerCase())}var length=path.length;var clength=contains.length;if(clength>length){return MAX_LEV_DISTANCE+1}for(var i=0;i<length;++i){if(i+clength>length){break}var lev_total=0;var aborted=false;for(var x=0;x<clength;++x){var lev=levenshtein(path[i+x],contains[x]);if(lev>MAX_LEV_DISTANCE){aborted=true;break}lev_total+=lev}if(aborted===false){ret_lev=Math.min(ret_lev,Math.round(lev_total/clength))}}return ret_lev}function typePassesFilter(filter,type){if(filter<0)return true;if(filter===type)return true;var name=itemTypes[type];switch(itemTypes[filter]){case"constant":return(name=="associatedconstant");case"fn":return(name=="method"||name=="tymethod");case"type":return(name=="primitive"||name=="keyword")}return false}function generateId(ty){if(ty.parent&&ty.parent.name){return itemTypes[ty.ty]+ty.path+ty.parent.name+ty.name}return itemTypes[ty.ty]+ty.path+ty.name}var nSearchWords=searchWords.length;var i;var ty;var fullId;var returned;var in_args;if((val.charAt(0)==="\""||val.charAt(0)==="'")&&val.charAt(val.length-1)===val.charAt(0)){val=extractGenerics(val.substr(1,val.length-2));for(i=0;i<nSearchWords;++i){if(filterCrates!==undefined&&searchIndex[i].crate!==filterCrates){continue}in_args=findArg(searchIndex[i],val,true);returned=checkReturned(searchIndex[i],val,true);ty=searchIndex[i];fullId=generateId(ty);if(searchWords[i]===val.name){if(typePassesFilter(typeFilter,searchIndex[i].ty)&&results[fullId]===undefined){results[fullId]={id:i,index:-1}}}else if((in_args===true||returned===true)&&typePassesFilter(typeFilter,searchIndex[i].ty)){if(in_args===true||returned===true){if(in_args===true){results_in_args[fullId]={id:i,index:-1,dontValidate:true,}}if(returned===true){results_returned[fullId]={id:i,index:-1,dontValidate:true,}}}else{results[fullId]={id:i,index:-1,dontValidate:true,}}}}query.inputs=[val];query.output=val;query.search=val}else if(val.search("->")>-1){var trimmer=function(s){return s.trim()};var parts=val.split("->").map(trimmer);var input=parts[0];var inputs=input.split(",").map(trimmer).sort();for(i=0;i<inputs.length;++i){inputs[i]=extractGenerics(inputs[i])}var output=extractGenerics(parts[1]);for(i=0;i<nSearchWords;++i){if(filterCrates!==undefined&&searchIndex[i].crate!==filterCrates){continue}var type=searchIndex[i].type;ty=searchIndex[i];if(!type){continue}fullId=generateId(ty);var typeOutput=type.length>OUTPUT_DATA?type[OUTPUT_DATA].name:"";returned=checkReturned(ty,output,true);if(output.name==="*"||returned===true){in_args=false;var is_module=false;if(input==="*"){is_module=true}else{var allFound=true;for(var it=0;allFound===true&&it<inputs.length;it++){allFound=checkType(type,inputs[it],true)}in_args=allFound}if(in_args===true){results_in_args[fullId]={id:i,index:-1,dontValidate:true,}}if(returned===true){results_returned[fullId]={id:i,index:-1,dontValidate:true,}}if(is_module===true){results[fullId]={id:i,index:-1,dontValidate:true,}}}}query.inputs=inputs.map(function(input){return input.name});query.output=output.name}else{query.inputs=[val];query.output=val;query.search=val;val=val.replace(/\_/g,"");var valGenerics=extractGenerics(val);var paths=valLower.split("::");var j;for(j=0;j<paths.length;++j){if(paths[j]===""){paths.splice(j,1);j-=1}}val=paths[paths.length-1];var contains=paths.slice(0,paths.length>1?paths.length-1:1);for(j=0;j<nSearchWords;++j){var lev;var lev_distance;ty=searchIndex[j];if(!ty||(filterCrates!==undefined&&ty.crate!==filterCrates)){continue}var lev_distance;var lev_add=0;if(paths.length>1){lev=checkPath(contains,paths[paths.length-1],ty);if(lev>MAX_LEV_DISTANCE){continue}else if(lev>0){lev_add=1}}returned=MAX_LEV_DISTANCE+1;in_args=MAX_LEV_DISTANCE+1;var index=-1;lev=MAX_LEV_DISTANCE+1;fullId=generateId(ty);if(searchWords[j].indexOf(split[i])>-1||searchWords[j].indexOf(val)>-1||searchWords[j].replace(/_/g,"").indexOf(val)>-1){if(typePassesFilter(typeFilter,ty.ty)&&results[fullId]===undefined){index=searchWords[j].replace(/_/g,"").indexOf(val)}}if((lev=levenshtein(searchWords[j],val))<=MAX_LEV_DISTANCE){if(typePassesFilter(typeFilter,ty.ty)===false){lev=MAX_LEV_DISTANCE+1}else{lev+=1}}if((in_args=findArg(ty,valGenerics))<=MAX_LEV_DISTANCE){if(typePassesFilter(typeFilter,ty.ty)===false){in_args=MAX_LEV_DISTANCE+1}}if((returned=checkReturned(ty,valGenerics))<=MAX_LEV_DISTANCE){if(typePassesFilter(typeFilter,ty.ty)===false){returned=MAX_LEV_DISTANCE+1}}lev+=lev_add;if(lev>0&&val.length>3&&searchWords[j].indexOf(val)>-1){if(val.length<6){lev-=1}else{lev=0}}if(in_args<=MAX_LEV_DISTANCE){if(results_in_args[fullId]===undefined){results_in_args[fullId]={id:j,index:index,lev:in_args,}}results_in_args[fullId].lev=Math.min(results_in_args[fullId].lev,in_args)}if(returned<=MAX_LEV_DISTANCE){if(results_returned[fullId]===undefined){results_returned[fullId]={id:j,index:index,lev:returned,}}results_returned[fullId].lev=Math.min(results_returned[fullId].lev,returned)}if(index!==-1||lev<=MAX_LEV_DISTANCE){if(index!==-1&&paths.length<2){lev=0}else if(searchWords[j]===val){lev=-1}if(results[fullId]===undefined){results[fullId]={id:j,index:index,lev:lev,}}results[fullId].lev=Math.min(results[fullId].lev,lev)}}}var ret={"in_args":sortResults(results_in_args,true),"returned":sortResults(results_returned,true),"others":sortResults(results),};if(ALIASES&&ALIASES[window.currentCrate]&&ALIASES[window.currentCrate][query.raw]){var aliases=ALIASES[window.currentCrate][query.raw];for(i=0;i<aliases.length;++i){aliases[i].is_alias=true;aliases[i].alias=query.raw;aliases[i].path=aliases[i].p;var res=buildHrefAndPath(aliases[i]);aliases[i].displayPath=pathSplitter(res[0]);aliases[i].fullPath=aliases[i].displayPath+aliases[i].name;aliases[i].href=res[1];ret.others.unshift(aliases[i]);if(ret.others.length>MAX_RESULTS){ret.others.pop()}}}return ret}function validateResult(name,path,keys,parent){for(var i=0;i<keys.length;++i){if(!(name.indexOf(keys[i])>-1||path.indexOf(keys[i])>-1||(parent!==undefined&&parent.name.toLowerCase().indexOf(keys[i])>-1)||levenshtein(name,keys[i])<=MAX_LEV_DISTANCE)){return false}}return true}function getQuery(raw){var matches,type,query;query=raw;matches=query.match(/^(fn|mod|struct|enum|trait|type|const|macro)\s*:\s*/i);if(matches){type=matches[1].replace(/^const$/,"constant");query=query.substring(matches[0].length)}return{raw:raw,query:query,type:type,id:query+type}}function initSearchNav(){var hoverTimeout;var click_func=function(e){var el=e.target;while(el.tagName!=="TR"){el=el.parentNode}var dst=e.target.getElementsByTagName("a");if(dst.length<1){return}dst=dst[0];if(window.location.pathname===dst.pathname){addClass(document.getElementById("search"),"hidden");removeClass(main,"hidden");document.location.href=dst.href}};var mouseover_func=function(e){var el=e.target;while(el.tagName!=="TR"){el=el.parentNode}clearTimeout(hoverTimeout);hoverTimeout=setTimeout(function(){onEachLazy(document.getElementsByClassName("search-results"),function(e){onEachLazy(e.getElementsByClassName("result"),function(i_e){removeClass(i_e,"highlighted")})});addClass(el,"highlighted")},20)};onEachLazy(document.getElementsByClassName("search-results"),function(e){onEachLazy(e.getElementsByClassName("result"),function(i_e){i_e.onclick=click_func;i_e.onmouseover=mouseover_func})});search_input.onkeydown=function(e){var actives=[[],[],[]];var current=0;onEachLazy(document.getElementById("results").childNodes,function(e){onEachLazy(e.getElementsByClassName("highlighted"),function(e){actives[current].push(e)});current+=1});if(e.which===38){if(!actives[currentTab].length||!actives[currentTab][0].previousElementSibling){return}addClass(actives[currentTab][0].previousElementSibling,"highlighted");removeClass(actives[currentTab][0],"highlighted")}else if(e.which===40){if(!actives[currentTab].length){var results=document.getElementById("results").childNodes;if(results.length>0){var res=results[currentTab].getElementsByClassName("result");if(res.length>0){addClass(res[0],"highlighted")}}}else if(actives[currentTab][0].nextElementSibling){addClass(actives[currentTab][0].nextElementSibling,"highlighted");removeClass(actives[currentTab][0],"highlighted")}}else if(e.which===13){if(actives[currentTab].length){document.location.href=actives[currentTab][0].getElementsByTagName("a")[0].href}}else if(e.which===9){if(e.shiftKey){printTab(currentTab>0?currentTab-1:2)}else{printTab(currentTab>1?0:currentTab+1)}e.preventDefault()}else if(e.which===16){}else if(e.which===27){removeClass(actives[currentTab][0],"highlighted");search_input.value="";defocusSearchBar()}else if(actives[currentTab].length>0){removeClass(actives[currentTab][0],"highlighted")}}}function buildHrefAndPath(item){var displayPath;var href;var type=itemTypes[item.ty];var name=item.name;if(type==="mod"){displayPath=item.path+"::";href=rootPath+item.path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="primitive"||type==="keyword"){displayPath="";href=rootPath+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=rootPath+name+"/index.html"}else if(item.parent!==undefined){var myparent=item.parent;var anchor="#"+type+"."+name;var parentType=itemTypes[myparent.ty];if(parentType==="primitive"){displayPath=myparent.name+"::"}else{displayPath=item.path+"::"+myparent.name+"::"}href=rootPath+item.path.replace(/::/g,"/")+"/"+parentType+"."+myparent.name+".html"+anchor}else{displayPath=item.path+"::";href=rootPath+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href]}function escape(content){var h1=document.createElement("h1");h1.textContent=content;return h1.innerHTML}function pathSplitter(path){var tmp="<span>"+path.replace(/::/g,"::</span><span>");if(tmp.endsWith("<span>")){return tmp.slice(0,tmp.length-6)}return tmp}function addTab(array,query,display){var extraStyle="";if(display===false){extraStyle=" style=\"display: none;\""}var output="";var duplicates={};var length=0;if(array.length>0){output="<table class=\"search-results\""+extraStyle+">";array.forEach(function(item){var name,type;name=item.name;type=itemTypes[item.ty];if(item.is_alias!==true){if(duplicates[item.fullPath]){return}duplicates[item.fullPath]=true}length+=1;output+="<tr class=\""+type+" result\"><td>"+"<a href=\""+item.href+"\">"+(item.is_alias===true?("<span class=\"alias\"><b>"+item.alias+" </b></span><span "+"class=\"grey\"><i> - see </i></span>"):"")+item.displayPath+"<span class=\""+type+"\">"+name+"</span></a></td><td>"+"<a href=\""+item.href+"\">"+"<span class=\"desc\">"+escape(item.desc)+" </span></a></td></tr>"});output+="</table>"}else{output="<div class=\"search-failed\""+extraStyle+">No results :(<br/>"+"Try on <a href=\"https://duckduckgo.com/?q="+encodeURIComponent("rust "+query.query)+"\">DuckDuckGo</a>?<br/><br/>"+"Or try looking in one of these:<ul><li>The <a "+"href=\"https://doc.rust-lang.org/reference/index.html\">Rust Reference</a> "+" for technical details about the language.</li><li><a "+"href=\"https://doc.rust-lang.org/rust-by-example/index.html\">Rust By "+"Example</a> for expository code examples.</a></li><li>The <a "+"href=\"https://doc.rust-lang.org/book/index.html\">Rust Book</a> for "+"introductions to language features and the language itself.</li><li><a "+"href=\"https://docs.rs\">Docs.rs</a> for documentation of crates released on"+" <a href=\"https://crates.io/\">crates.io</a>.</li></ul></div>"}return[output,length]}function makeTabHeader(tabNb,text,nbElems){if(currentTab===tabNb){return"<div class=\"selected\">"+text+" <div class=\"count\">("+nbElems+")</div></div>"}return"<div>"+text+" <div class=\"count\">("+nbElems+")</div></div>"}function showResults(results){if(results.others.length===1&&getCurrentValue("rustdoc-go-to-only-result")==="true"){var elem=document.createElement("a");elem.href=results.others[0].href;elem.style.display="none";document.body.appendChild(elem);elem.click()}var query=getQuery(search_input.value);currentResults=query.id;var ret_others=addTab(results.others,query);var ret_in_args=addTab(results.in_args,query,false);var ret_returned=addTab(results.returned,query,false);var output="<h1>Results for "+escape(query.query)+(query.type?" (type: "+escape(query.type)+")":"")+"</h1>"+"<div id=\"titles\">"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"</div><div id=\"results\">"+ret_others[0]+ret_in_args[0]+ret_returned[0]+"</div>";addClass(main,"hidden");var search=document.getElementById("search");removeClass(search,"hidden");search.innerHTML=output;var tds=search.getElementsByTagName("td");var td_width=0;if(tds.length>0){td_width=tds[0].offsetWidth}var width=search.offsetWidth-40-td_width;onEachLazy(search.getElementsByClassName("desc"),function(e){e.style.width=width+"px"});initSearchNav();var elems=document.getElementById("titles").childNodes;elems[0].onclick=function(){printTab(0)};elems[1].onclick=function(){printTab(1)};elems[2].onclick=function(){printTab(2)};printTab(currentTab)}function execSearch(query,searchWords,filterCrates){function getSmallest(arrays,positions,notDuplicates){var start=null;for(var it=0;it<positions.length;++it){if(arrays[it].length>positions[it]&&(start===null||start>arrays[it][positions[it]].lev)&&!notDuplicates[arrays[it][positions[it]].fullPath]){start=arrays[it][positions[it]].lev}}return start}function mergeArrays(arrays){var ret=[];var positions=[];var notDuplicates={};for(var x=0;x<arrays.length;++x){positions.push(0)}while(ret.length<MAX_RESULTS){var smallest=getSmallest(arrays,positions,notDuplicates);if(smallest===null){break}for(x=0;x<arrays.length&&ret.length<MAX_RESULTS;++x){if(arrays[x].length>positions[x]&&arrays[x][positions[x]].lev===smallest&&!notDuplicates[arrays[x][positions[x]].fullPath]){ret.push(arrays[x][positions[x]]);notDuplicates[arrays[x][positions[x]].fullPath]=true;positions[x]+=1}}}return ret}var queries=query.raw.split(",");var results={"in_args":[],"returned":[],"others":[],};for(var i=0;i<queries.length;++i){query=queries[i].trim();if(query.length!==0){var tmp=execQuery(getQuery(query),searchWords,filterCrates);results.in_args.push(tmp.in_args);results.returned.push(tmp.returned);results.others.push(tmp.others)}}if(queries.length>1){return{"in_args":mergeArrays(results.in_args),"returned":mergeArrays(results.returned),"others":mergeArrays(results.others),}}else{return{"in_args":results.in_args[0],"returned":results.returned[0],"others":results.others[0],}}}function getFilterCrates(){var elem=document.getElementById("crate-search");if(elem&&elem.value!=="All crates"&&rawSearchIndex.hasOwnProperty(elem.value)){return elem.value}return undefined}function search(e,forced){var params=getQueryStringParams();var query=getQuery(search_input.value.trim());if(e){e.preventDefault()}if(query.query.length===0){return}if(forced!==true&&query.id===currentResults){if(query.query.length>0){putBackSearch(search_input)}return}document.title="Results for "+query.query+" - Rust";if(browserSupportsHistoryApi()){if(!history.state&&!params.search){history.pushState(query,"","?search="+encodeURIComponent(query.raw))}else{history.replaceState(query,"","?search="+encodeURIComponent(query.raw))}}var filterCrates=getFilterCrates();showResults(execSearch(query,index,filterCrates),filterCrates)}function buildIndex(rawSearchIndex){searchIndex=[];var searchWords=[];var i;for(var crate in rawSearchIndex){if(!rawSearchIndex.hasOwnProperty(crate)){continue}searchWords.push(crate);searchIndex.push({crate:crate,ty:1,name:crate,path:"",desc:rawSearchIndex[crate].doc,type:null,});var items=rawSearchIndex[crate].i;var paths=rawSearchIndex[crate].p;var len=paths.length;for(i=0;i<len;++i){paths[i]={ty:paths[i][0],name:paths[i][1]}}len=items.length;var lastPath="";for(i=0;i<len;++i){var rawRow=items[i];var row={crate:crate,ty:rawRow[0],name:rawRow[1],path:rawRow[2]||lastPath,desc:rawRow[3],parent:paths[rawRow[4]],type:rawRow[5]};searchIndex.push(row);if(typeof row.name==="string"){var word=row.name.toLowerCase();searchWords.push(word)}else{searchWords.push("")}lastPath=row.path}}return searchWords}function startSearch(){var searchTimeout;var callback=function(){clearTimeout(searchTimeout);if(search_input.value.length===0){if(browserSupportsHistoryApi()){history.replaceState("",window.currentCrate+" - Rust","?search=")}if(hasClass(main,"content")){removeClass(main,"hidden")}var search_c=document.getElementById("search");if(hasClass(search_c,"content")){addClass(search_c,"hidden")}}else{searchTimeout=setTimeout(search,500)}};search_input.onkeyup=callback;search_input.oninput=callback;document.getElementsByClassName("search-form")[0].onsubmit=function(e){e.preventDefault();clearTimeout(searchTimeout);search()};search_input.onchange=function(e){clearTimeout(searchTimeout);setTimeout(search,0)};search_input.onpaste=search_input.onchange;var selectCrate=document.getElementById('crate-search');if(selectCrate){selectCrate.onchange=function(){search(undefined,true)}}if(browserSupportsHistoryApi()){var previousTitle=document.title;window.onpopstate=function(e){var params=getQueryStringParams();if(!params.search){if(hasClass(main,"content")){removeClass(main,"hidden")}var search_c=document.getElementById("search");if(hasClass(search_c,"content")){addClass(search_c,"hidden")}}document.title=previousTitle;currentResults=null;if(params.search){search_input.value=params.search}else{search_input.value=""}search()}}search()}index=buildIndex(rawSearchIndex);startSearch();if(rootPath==="../"||rootPath==="./"){var sidebar=document.getElementsByClassName("sidebar-elems")[0];if(sidebar){var div=document.createElement("div");div.className="block crate";div.innerHTML="<h3>Crates</h3>";var ul=document.createElement("ul");div.appendChild(ul);var crates=[];for(var crate in rawSearchIndex){if(!rawSearchIndex.hasOwnProperty(crate)){continue}crates.push(crate)}crates.sort();for(var i=0;i<crates.length;++i){var klass="crate";if(rootPath!=="./"&&crates[i]===window.currentCrate){klass+=" current"}var link=document.createElement("a");link.href=rootPath+crates[i]+"/index.html";link.title=rawSearchIndex[crates[i]].doc;link.className=klass;link.textContent=crates[i];var li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}sidebar.appendChild(div)}}}window.initSearch=initSearch;function initSidebarItems(items){var sidebar=document.getElementsByClassName("sidebar-elems")[0];var current=window.sidebarCurrent;function block(shortty,longty){var filtered=items[shortty];if(!filtered){return}var div=document.createElement("div");div.className="block "+shortty;var h3=document.createElement("h3");h3.textContent=longty;div.appendChild(h3);var ul=document.createElement("ul");var length=filtered.length;for(var i=0;i<length;++i){var item=filtered[i];var name=item[0];var desc=item[1];var klass=shortty;if(name===current.name&&shortty===current.ty){klass+=" current"}var path;if(shortty==="mod"){path=name+"/index.html"}else{path=shortty+"."+name+".html"}var link=document.createElement("a");link.href=current.relpath+path;link.title=desc;link.className=klass;link.textContent=name;var li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}div.appendChild(ul);if(sidebar){sidebar.appendChild(div)}}block("primitive","Primitive Types");block("mod","Modules");block("macro","Macros");block("struct","Structs");block("enum","Enums");block("union","Unions");block("constant","Constants");block("static","Statics");block("trait","Traits");block("fn","Functions");block("type","Type Definitions");block("foreigntype","Foreign Types");block("keyword","Keywords");block("traitalias","Trait Aliases")}window.initSidebarItems=initSidebarItems;window.register_implementors=function(imp){var implementors=document.getElementById("implementors-list");var synthetic_implementors=document.getElementById("synthetic-implementors-list");var libs=Object.getOwnPropertyNames(imp);var llength=libs.length;for(var i=0;i<llength;++i){if(libs[i]===currentCrate){continue}var structs=imp[libs[i]];var slength=structs.length;struct_loop:for(var j=0;j<slength;++j){var struct=structs[j];var list=struct.synthetic?synthetic_implementors:implementors;if(struct.synthetic){var stlength=struct.types.length;for(var k=0;k<stlength;k++){if(window.inlined_types.has(struct.types[k])){continue struct_loop}window.inlined_types.add(struct.types[k])}}var code=document.createElement("code");code.innerHTML=struct.text;var x=code.getElementsByTagName("a");var xlength=x.length;for(var it=0;it<xlength;it++){var href=x[it].getAttribute("href");if(href&&href.indexOf("http")!==0){x[it].setAttribute("href",rootPath+href)}}var display=document.createElement("h3");addClass(display,"impl");display.innerHTML="<span class=\"in-band\"><table class=\"table-display\">"+"<tbody><tr><td><code>"+code.outerHTML+"</code></td><td></td></tr>"+"</tbody></table></span>";list.appendChild(display)}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}function labelForToggleButton(sectionIsCollapsed){if(sectionIsCollapsed){return"+"}return"\u2212"}function onEveryMatchingChild(elem,className,func){if(elem&&className&&func){var length=elem.childNodes.length;var nodes=elem.childNodes;for(var i=0;i<length;++i){if(hasClass(nodes[i],className)){func(nodes[i])}else{onEveryMatchingChild(nodes[i],className,func)}}}}function toggleAllDocs(pageId,fromAutoCollapse){var innerToggle=document.getElementById("toggle-all-docs");if(!innerToggle){return}if(hasClass(innerToggle,"will-expand")){updateLocalStorage("rustdoc-collapse","false");removeClass(innerToggle,"will-expand");onEveryMatchingChild(innerToggle,"inner",function(e){e.innerHTML=labelForToggleButton(false)});innerToggle.title="collapse all docs";if(fromAutoCollapse!==true){onEachLazy(document.getElementsByClassName("collapse-toggle"),function(e){collapseDocs(e,"show")})}}else{updateLocalStorage("rustdoc-collapse","true");addClass(innerToggle,"will-expand");onEveryMatchingChild(innerToggle,"inner",function(e){var parent=e.parentNode;var superParent=null;if(parent){superParent=parent.parentNode}if(!parent||!superParent||superParent.id!=="main"||hasClass(parent,"impl")===false){e.innerHTML=labelForToggleButton(true)}});innerToggle.title="expand all docs";if(fromAutoCollapse!==true){onEachLazy(document.getElementsByClassName("collapse-toggle"),function(e){var parent=e.parentNode;var superParent=null;if(parent){superParent=parent.parentNode}if(!parent||!superParent||superParent.id!=="main"||hasClass(parent,"impl")===false){collapseDocs(e,"hide",pageId)}})}}}function collapseDocs(toggle,mode,pageId){if(!toggle||!toggle.parentNode){return}function adjustToggle(arg){return function(e){if(hasClass(e,"toggle-label")){if(arg){e.style.display="inline-block"}else{e.style.display="none"}}if(hasClass(e,"inner")){e.innerHTML=labelForToggleButton(arg)}}}function implHider(addOrRemove,fullHide){return function(n){var is_method=hasClass(n,"method")||fullHide;if(is_method||hasClass(n,"type")){if(is_method===true){if(addOrRemove){addClass(n,"hidden-by-impl-hider")}else{removeClass(n,"hidden-by-impl-hider")}}var ns=n.nextElementSibling;while(true){if(ns&&(hasClass(ns,"docblock")||hasClass(ns,"stability"))){if(addOrRemove){addClass(ns,"hidden-by-impl-hider")}else{removeClass(ns,"hidden-by-impl-hider")}ns=ns.nextElementSibling;continue}break}}}}var relatedDoc;var action=mode;if(hasClass(toggle.parentNode,"impl")===false){relatedDoc=toggle.parentNode.nextElementSibling;if(hasClass(relatedDoc,"stability")){relatedDoc=relatedDoc.nextElementSibling}if(hasClass(relatedDoc,"docblock")||hasClass(relatedDoc,"sub-variant")){if(mode==="toggle"){if(hasClass(relatedDoc,"hidden-by-usual-hider")){action="show"}else{action="hide"}}if(action==="hide"){addClass(relatedDoc,"hidden-by-usual-hider");onEachLazy(toggle.childNodes,adjustToggle(true));addClass(toggle.parentNode,"collapsed")}else if(action==="show"){removeClass(relatedDoc,"hidden-by-usual-hider");removeClass(toggle.parentNode,"collapsed");onEachLazy(toggle.childNodes,adjustToggle(false))}}}else{var parentElem=toggle.parentNode;relatedDoc=parentElem;var docblock=relatedDoc.nextElementSibling;while(hasClass(relatedDoc,"impl-items")===false){relatedDoc=relatedDoc.nextElementSibling}if((!relatedDoc&&hasClass(docblock,"docblock")===false)||(pageId&&document.getElementById(pageId))){return}if(mode==="toggle"){if(hasClass(relatedDoc,"fns-now-collapsed")||hasClass(docblock,"hidden-by-impl-hider")){action="show"}else{action="hide"}}var dontApplyBlockRule=toggle.parentNode.parentNode.id!=="main";if(action==="show"){removeClass(relatedDoc,"fns-now-collapsed");removeClass(docblock,"hidden-by-usual-hider");onEachLazy(toggle.childNodes,adjustToggle(false,dontApplyBlockRule));onEachLazy(relatedDoc.childNodes,implHider(false,dontApplyBlockRule))}else if(action==="hide"){addClass(relatedDoc,"fns-now-collapsed");addClass(docblock,"hidden-by-usual-hider");onEachLazy(toggle.childNodes,adjustToggle(true,dontApplyBlockRule));onEachLazy(relatedDoc.childNodes,implHider(true,dontApplyBlockRule))}}}function collapser(e,collapse){var n=e.parentElement;if(n.id.match(/^impl(?:-\d+)?$/)===null){if(collapse||hasClass(n,"impl")){collapseDocs(e,"hide",pageId)}}}function autoCollapse(pageId,collapse){if(collapse){toggleAllDocs(pageId,true)}else if(getCurrentValue("rustdoc-trait-implementations")!=="false"){var impl_list=document.getElementById("implementations-list");if(impl_list!==null){onEachLazy(impl_list.getElementsByClassName("collapse-toggle"),function(e){collapser(e,collapse)})}var blanket_list=document.getElementById("blanket-implementations-list");if(blanket_list!==null){onEachLazy(blanket_list.getElementsByClassName("collapse-toggle"),function(e){collapser(e,collapse)})}}}var toggles=document.getElementById("toggle-all-docs");if(toggles){toggles.onclick=toggleAllDocs}function insertAfter(newNode,referenceNode){referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling)}function createSimpleToggle(sectionIsCollapsed){var toggle=document.createElement("a");toggle.href="javascript:void(0)";toggle.className="collapse-toggle";toggle.innerHTML="[<span class=\"inner\">"+labelForToggleButton(sectionIsCollapsed)+"</span>]";return toggle}var toggle=createSimpleToggle(false);var hideMethodDocs=getCurrentValue("rustdoc-method-docs")==="true";var pageId=getPageId();var func=function(e){var next=e.nextElementSibling;if(!next){return}if(hasClass(next,"docblock")===true||(hasClass(next,"stability")===true&&hasClass(next.nextElementSibling,"docblock")===true)){var newToggle=toggle.cloneNode(true);insertAfter(newToggle,e.childNodes[e.childNodes.length-1]);if(hideMethodDocs===true&&hasClass(e,"method")===true){collapseDocs(newToggle,"hide",pageId)}}};var funcImpl=function(e){var next=e.nextElementSibling;if(next&&hasClass(next,"docblock")){next=next.nextElementSibling}if(!next){return}if(next.getElementsByClassName("method").length>0&&hasClass(e,"impl")){insertAfter(toggle.cloneNode(true),e.childNodes[e.childNodes.length-1])}};onEachLazy(document.getElementsByClassName("method"),func);onEachLazy(document.getElementsByClassName("associatedconstant"),func);onEachLazy(document.getElementsByClassName("impl"),funcImpl);var impl_call=function(){};if(hideMethodDocs===true){impl_call=function(e,newToggle,pageId){if(e.id.match(/^impl(?:-\d+)?$/)===null){if(hasClass(e,"impl")===true){collapseDocs(newToggle,"hide",pageId)}}}}var newToggle=document.createElement("a");newToggle.href="javascript:void(0)";newToggle.className="collapse-toggle hidden-default collapsed";newToggle.innerHTML="[<span class=\"inner\">"+labelForToggleButton(true)+"</span>] Show hidden undocumented items";function toggleClicked(){if(hasClass(this,"collapsed")){removeClass(this,"collapsed");onEachLazy(this.parentNode.getElementsByClassName("hidden"),function(x){if(hasClass(x,"content")===false){removeClass(x,"hidden");addClass(x,"x")}},true);this.innerHTML="[<span class=\"inner\">"+labelForToggleButton(false)+"</span>] Hide undocumented items"}else{addClass(this,"collapsed");onEachLazy(this.parentNode.getElementsByClassName("x"),function(x){if(hasClass(x,"content")===false){addClass(x,"hidden");removeClass(x,"x")}},true);this.innerHTML="[<span class=\"inner\">"+labelForToggleButton(true)+"</span>] Show hidden undocumented items"}}onEachLazy(document.getElementsByClassName("impl-items"),function(e){onEachLazy(e.getElementsByClassName("associatedconstant"),func);var hiddenElems=e.getElementsByClassName("hidden");var needToggle=false;var hlength=hiddenElems.length;for(var i=0;i<hlength;++i){if(hasClass(hiddenElems[i],"content")===false&&hasClass(hiddenElems[i],"docblock")===false){needToggle=true;break}}if(needToggle===true){var inner_toggle=newToggle.cloneNode(true);inner_toggle.onclick=toggleClicked;e.insertBefore(inner_toggle,e.firstChild);impl_call(e.previousSibling,inner_toggle,pageId)}});function createToggle(otherMessage,fontSize,extraClass,show){var span=document.createElement("span");span.className="toggle-label";if(show){span.style.display="none"}if(!otherMessage){span.innerHTML=" Expand description"}else{span.innerHTML=otherMessage}if(fontSize){span.style.fontSize=fontSize}var mainToggle=toggle.cloneNode(true);mainToggle.appendChild(span);var wrapper=document.createElement("div");wrapper.className="toggle-wrapper";if(!show){addClass(wrapper,"collapsed");var inner=mainToggle.getElementsByClassName("inner");if(inner&&inner.length>0){inner[0].innerHTML="+"}}if(extraClass){addClass(wrapper,extraClass)}wrapper.appendChild(mainToggle);return wrapper}var showItemDeclarations=getCurrentValue("rustdoc-item-declarations")==="false";function buildToggleWrapper(e){if(hasClass(e,"autohide")){var wrap=e.previousElementSibling;if(wrap&&hasClass(wrap,"toggle-wrapper")){var inner_toggle=wrap.childNodes[0];var extra=e.childNodes[0].tagName==="H3";e.style.display="none";addClass(wrap,"collapsed");onEachLazy(inner_toggle.getElementsByClassName("inner"),function(e){e.innerHTML=labelForToggleButton(true)});onEachLazy(inner_toggle.getElementsByClassName("toggle-label"),function(e){e.style.display="inline-block";if(extra===true){i_e.innerHTML=" Show "+e.childNodes[0].innerHTML}})}}if(e.parentNode.id==="main"){var otherMessage="";var fontSize;var extraClass;if(hasClass(e,"type-decl")){fontSize="20px";otherMessage=" Show declaration";if(showItemDeclarations===false){extraClass="collapsed"}}else if(hasClass(e,"sub-variant")){otherMessage=" Show fields"}else if(hasClass(e,"non-exhaustive")){otherMessage=" This ";if(hasClass(e,"non-exhaustive-struct")){otherMessage+="struct"}else if(hasClass(e,"non-exhaustive-enum")){otherMessage+="enum"}else if(hasClass(e,"non-exhaustive-variant")){otherMessage+="enum variant"}else if(hasClass(e,"non-exhaustive-type")){otherMessage+="type"}otherMessage+=" is marked as non-exhaustive"}else if(hasClass(e.childNodes[0],"impl-items")){extraClass="marg-left"}e.parentNode.insertBefore(createToggle(otherMessage,fontSize,extraClass,hasClass(e,"type-decl")===false||showItemDeclarations===true),e);if(hasClass(e,"type-decl")===true&&showItemDeclarations===true){collapseDocs(e.previousSibling.childNodes[0],"toggle")}if(hasClass(e,"non-exhaustive")===true){collapseDocs(e.previousSibling.childNodes[0],"toggle")}}}onEachLazy(document.getElementsByClassName("docblock"),buildToggleWrapper);onEachLazy(document.getElementsByClassName("sub-variant"),buildToggleWrapper);function createToggleWrapper(tog){var span=document.createElement("span");span.className="toggle-label";span.style.display="none";span.innerHTML=" Expand attributes";tog.appendChild(span);var wrapper=document.createElement("div");wrapper.className="toggle-wrapper toggle-attributes";wrapper.appendChild(tog);return wrapper}var itemAttributesFunc=function(){};if(getCurrentValue("rustdoc-item-attributes")!=="false"){itemAttributesFunc=function(x){collapseDocs(x.previousSibling.childNodes[0],"toggle")}}var attributesToggle=createToggleWrapper(createSimpleToggle(false));onEachLazy(main.getElementsByClassName("attributes"),function(i_e){var attr_tog=attributesToggle.cloneNode(true);if(hasClass(i_e,"top-attr")===true){addClass(attr_tog,"top-attr")}i_e.parentNode.insertBefore(attr_tog,i_e);itemAttributesFunc(i_e)});var lineNumbersFunc=function(){};if(getCurrentValue("rustdoc-line-numbers")==="true"){lineNumbersFunc=function(x){var count=x.textContent.split("\n").length;var elems=[];for(var i=0;i<count;++i){elems.push(i+1)}var node=document.createElement("pre");addClass(node,"line-number");node.innerHTML=elems.join("\n");x.parentNode.insertBefore(node,x)}}onEachLazy(document.getElementsByClassName("rust-example-rendered"),function(e){if(hasClass(e,"compile_fail")){e.addEventListener("mouseover",function(event){this.parentElement.previousElementSibling.childNodes[0].style.color="#f00"});e.addEventListener("mouseout",function(event){this.parentElement.previousElementSibling.childNodes[0].style.color=""})}else if(hasClass(e,"ignore")){e.addEventListener("mouseover",function(event){this.parentElement.previousElementSibling.childNodes[0].style.color="#ff9200"});e.addEventListener("mouseout",function(event){this.parentElement.previousElementSibling.childNodes[0].style.color=""})}lineNumbersFunc(e)});function showModal(content){var modal=document.createElement("div");modal.id="important";addClass(modal,"modal");modal.innerHTML="<div class=\"modal-content\"><div class=\"close\" id=\"modal-close\">✕"+"</div><div class=\"whiter\"></div><span class=\"docblock\">"+content+"</span></div>";document.getElementsByTagName("body")[0].appendChild(modal);document.getElementById("modal-close").onclick=hideModal;modal.onclick=hideModal}function hideModal(){var modal=document.getElementById("important");if(modal){modal.parentNode.removeChild(modal)}}onEachLazy(document.getElementsByClassName("important-traits"),function(e){e.onclick=function(){showModal(e.lastElementChild.innerHTML)}});function printTab(nb){if(nb===0||nb===1||nb===2){currentTab=nb}var nb_copy=nb;onEachLazy(document.getElementById("titles").childNodes,function(elem){if(nb_copy===0){addClass(elem,"selected")}else{removeClass(elem,"selected")}nb_copy-=1});onEachLazy(document.getElementById("results").childNodes,function(elem){if(nb===0){elem.style.display=""}else{elem.style.display="none"}nb-=1})}function putBackSearch(search_input){if(search_input.value!==""){addClass(main,"hidden");removeClass(document.getElementById("search"),"hidden");if(browserSupportsHistoryApi()){history.replaceState(search_input.value,"","?search="+encodeURIComponent(search_input.value))}}}if(search_input){search_input.onfocus=function(){putBackSearch(this)}}var params=getQueryStringParams();if(params&¶ms.search){addClass(main,"hidden");var search=document.getElementById("search");removeClass(search,"hidden");search.innerHTML="<h3 style=\"text-align: center;\">Loading search results...</h3>"}var sidebar_menu=document.getElementsByClassName("sidebar-menu")[0];if(sidebar_menu){sidebar_menu.onclick=function(){var sidebar=document.getElementsByClassName("sidebar")[0];if(hasClass(sidebar,"mobile")===true){hideSidebar()}else{showSidebar()}}}window.onresize=function(){hideSidebar()};autoCollapse(getPageId(),getCurrentValue("rustdoc-collapse")==="true");if(window.location.hash&&window.location.hash.length>0){expandSection(window.location.hash.replace(/^#/,""))}if(main){onEachLazy(main.getElementsByClassName("loading-content"),function(e){e.remove()});onEachLazy(main.childNodes,function(e){if(e.tagName==="H2"||e.tagName==="H3"){var nextTagName=e.nextElementSibling.tagName;if(nextTagName=="H2"||nextTagName=="H3"){e.nextElementSibling.style.display="flex"}else{e.nextElementSibling.style.display="block"}}})}function addSearchOptions(crates){var elem=document.getElementById('crate-search');if(!elem){return}var crates_text=[];if(Object.keys(crates).length>1){for(var crate in crates){if(crates.hasOwnProperty(crate)){crates_text.push(crate)}}}crates_text.sort(function(a,b){var lower_a=a.toLowerCase();var lower_b=b.toLowerCase();if(lower_a<lower_b){return-1}else if(lower_a>lower_b){return 1}return 0});for(var i=0;i<crates_text.length;++i){var option=document.createElement("option");option.value=crates_text[i];option.innerText=crates_text[i];elem.appendChild(option)}}window.addSearchOptions=addSearchOptions}());function focusSearchBar(){document.getElementsByClassName("search-input")[0].focus()}function defocusSearchBar(){document.getElementsByClassName("search-input")[0].blur()} | ||
| if(!String.prototype.startsWith){String.prototype.startsWith=function(searchString,position){position=position||0;return this.indexOf(searchString,position)===position}}if(!String.prototype.endsWith){String.prototype.endsWith=function(suffix,length){var l=length||this.length;return this.indexOf(suffix,l-suffix.length)!==-1}}if(!DOMTokenList.prototype.add){DOMTokenList.prototype.add=function(className){if(className&&!hasClass(this,className)){if(this.className&&this.className.length>0){this.className+=" "+className}else{this.className=className}}}}if(!DOMTokenList.prototype.remove){DOMTokenList.prototype.remove=function(className){if(className&&this.className){this.className=(" "+this.className+" ").replace(" "+className+" "," ").trim()}}}(function(){var rustdocVars=document.getElementById("rustdoc-vars");if(rustdocVars){window.rootPath=rustdocVars.attributes["data-root-path"].value;window.currentCrate=rustdocVars.attributes["data-current-crate"].value;window.searchJS=rustdocVars.attributes["data-search-js"].value;window.searchIndexJS=rustdocVars.attributes["data-search-index-js"].value}var sidebarVars=document.getElementById("sidebar-vars");if(sidebarVars){window.sidebarCurrent={name:sidebarVars.attributes["data-name"].value,ty:sidebarVars.attributes["data-ty"].value,relpath:sidebarVars.attributes["data-relpath"].value,}}}());function getVirtualKey(ev){if("key"in ev&&typeof ev.key!="undefined"){return ev.key}var c=ev.charCode||ev.keyCode;if(c==27){return"Escape"}return String.fromCharCode(c)}var THEME_PICKER_ELEMENT_ID="theme-picker";var THEMES_ELEMENT_ID="theme-choices";function getThemesElement(){return document.getElementById(THEMES_ELEMENT_ID)}function getThemePickerElement(){return document.getElementById(THEME_PICKER_ELEMENT_ID)}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}function showThemeButtonState(){var themePicker=getThemePickerElement();var themeChoices=getThemesElement();themeChoices.style.display="block";themePicker.style.borderBottomRightRadius="0";themePicker.style.borderBottomLeftRadius="0"}function hideThemeButtonState(){var themePicker=getThemePickerElement();var themeChoices=getThemesElement();themeChoices.style.display="none";themePicker.style.borderBottomRightRadius="3px";themePicker.style.borderBottomLeftRadius="3px"}(function(){var themeChoices=getThemesElement();var themePicker=getThemePickerElement();var availableThemes=["ayu","dark","light"];function switchThemeButtonState(){if(themeChoices.style.display==="block"){hideThemeButtonState()}else{showThemeButtonState()}}function handleThemeButtonsBlur(e){var active=document.activeElement;var related=e.relatedTarget;if(active.id!==THEME_PICKER_ELEMENT_ID&&(!active.parentNode||active.parentNode.id!==THEMES_ELEMENT_ID)&&(!related||(related.id!==THEME_PICKER_ELEMENT_ID&&(!related.parentNode||related.parentNode.id!==THEMES_ELEMENT_ID)))){hideThemeButtonState()}}themePicker.onclick=switchThemeButtonState;themePicker.onblur=handleThemeButtonsBlur;availableThemes.forEach(function(item){var but=document.createElement("button");but.textContent=item;but.onclick=function(){switchTheme(window.currentTheme,window.mainTheme,item,true);useSystemTheme(false)};but.onblur=handleThemeButtonsBlur;themeChoices.appendChild(but)})}());(function(){"use strict";window.searchState={loadingText:"Loading search results...",input:document.getElementsByClassName("search-input")[0],outputElement:function(){return document.getElementById("search")},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:function(){if(searchState.timeout!==null){clearTimeout(searchState.timeout);searchState.timeout=null}},focus:function(){searchState.input.focus()},defocus:function(){searchState.input.blur()},showResults:function(search){if(search===null||typeof search==='undefined'){search=searchState.outputElement()}addClass(main,"hidden");removeClass(search,"hidden");searchState.mouseMovedAfterSearch=false;document.title=searchState.title},hideResults:function(search){if(search===null||typeof search==='undefined'){search=searchState.outputElement()}addClass(search,"hidden");removeClass(main,"hidden");document.title=searchState.titleBeforeSearch;if(searchState.browserSupportsHistoryApi()){history.replaceState("",window.currentCrate+" - Rust",getNakedUrl()+window.location.hash)}},getQueryStringParams:function(){var params={};window.location.search.substring(1).split("&").map(function(s){var pair=s.split("=");params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params},putBackSearch:function(search_input){var search=searchState.outputElement();if(search_input.value!==""&&hasClass(search,"hidden")){searchState.showResults(search);if(searchState.browserSupportsHistoryApi()){var extra="?search="+encodeURIComponent(search_input.value);history.replaceState(search_input.value,"",getNakedUrl()+extra+window.location.hash)}document.title=searchState.title}},browserSupportsHistoryApi:function(){return window.history&&typeof window.history.pushState==="function"},setup:function(){var search_input=searchState.input;if(!searchState.input){return}function loadScript(url){var script=document.createElement('script');script.src=url;document.head.append(script)}var searchLoaded=false;function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(window.searchJS);loadScript(window.searchIndexJS)}}search_input.addEventListener("focus",function(){searchState.putBackSearch(this);search_input.origPlaceholder=searchState.input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});search_input.addEventListener("blur",function(){search_input.placeholder=searchState.input.origPlaceholder});search_input.removeAttribute('disabled');searchState.addCrateDropdown(window.ALL_CRATES);var params=searchState.getQueryStringParams();if(params.search!==undefined){var search=searchState.outputElement();search.innerHTML="<h3 style=\"text-align: center;\">"+searchState.loadingText+"</h3>";searchState.showResults(search);loadSearch()}},addCrateDropdown:function(crates){var elem=document.getElementById("crate-search");if(!elem){return}var savedCrate=getSettingValue("saved-filter-crate");for(var i=0,len=crates.length;i<len;++i){var option=document.createElement("option");option.value=crates[i];option.innerText=crates[i];elem.appendChild(option);if(crates[i]===savedCrate){elem.value=savedCrate}}},};function getPageId(){if(window.location.hash){var tmp=window.location.hash.replace(/^#/,"");if(tmp.length>0){return tmp}}return null}function showSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){addClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];if(sidebar){addClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(!filler){var div=document.createElement("div");div.id="sidebar-filler";sidebar.appendChild(div)}}}function hideSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){removeClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(filler){filler.remove()}document.getElementsByTagName("body")[0].style.marginTop=""}var toggleAllDocsId="toggle-all-docs";var main=document.getElementById("main");var savedHash="";function handleHashes(ev){var elem;var search=searchState.outputElement();if(ev!==null&&search&&!hasClass(search,"hidden")&&ev.newURL){searchState.hideResults(search);var hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(searchState.browserSupportsHistoryApi()){history.replaceState(hash,"",getNakedUrl()+window.location.search+"#"+hash)}elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}if(savedHash!==window.location.hash){savedHash=window.location.hash;if(savedHash.length===0){return}expandSection(savedHash.slice(1))}}function onHashChange(ev){hideSidebar();handleHashes(ev)}function openParentDetails(elem){while(elem){if(elem.tagName==="DETAILS"){elem.open=true}elem=elem.parentNode}}function expandSection(id){openParentDetails(document.getElementById(id))}function getHelpElement(build){if(build){buildHelperPopup()}return document.getElementById("help")}function displayHelp(display,ev,help){if(display){help=help?help:getHelpElement(true);if(hasClass(help,"hidden")){ev.preventDefault();removeClass(help,"hidden");addClass(document.body,"blur")}}else{help=help?help:getHelpElement(false);if(help&&!hasClass(help,"hidden")){ev.preventDefault();addClass(help,"hidden");removeClass(document.body,"blur")}}}function handleEscape(ev){var help=getHelpElement(false);var search=searchState.outputElement();if(help&&!hasClass(help,"hidden")){displayHelp(false,ev,help)}else if(search&&!hasClass(search,"hidden")){searchState.clearInputTimeout();ev.preventDefault();searchState.hideResults(search)}searchState.defocus();hideThemeButtonState()}var disableShortcuts=getSettingValue("disable-shortcuts")==="true";function handleShortcut(ev){if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts){return}if(document.activeElement.tagName==="INPUT"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":displayHelp(false,ev);ev.preventDefault();searchState.focus();break;case"+":case"-":ev.preventDefault();toggleAllDocs();break;case"?":displayHelp(true,ev);break;case"t":case"T":displayHelp(false,ev);ev.preventDefault();var themePicker=getThemePickerElement();themePicker.click();themePicker.focus();break;default:if(getThemePickerElement().parentNode.contains(ev.target)){handleThemeKeyDown(ev)}}}}function handleThemeKeyDown(ev){var active=document.activeElement;var themes=getThemesElement();switch(getVirtualKey(ev)){case"ArrowUp":ev.preventDefault();if(active.previousElementSibling&&ev.target.id!==THEME_PICKER_ELEMENT_ID){active.previousElementSibling.focus()}else{showThemeButtonState();themes.lastElementChild.focus()}break;case"ArrowDown":ev.preventDefault();if(active.nextElementSibling&&ev.target.id!==THEME_PICKER_ELEMENT_ID){active.nextElementSibling.focus()}else{showThemeButtonState();themes.firstElementChild.focus()}break;case"Enter":case"Return":case"Space":if(ev.target.id===THEME_PICKER_ELEMENT_ID&&themes.style.display==="none"){ev.preventDefault();showThemeButtonState();themes.firstElementChild.focus()}break;case"Home":ev.preventDefault();themes.firstElementChild.focus();break;case"End":ev.preventDefault();themes.lastElementChild.focus();break}}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);(function(){var x=document.getElementsByClassName("version-selector");if(x.length>0){x[0].onchange=function(){var i,match,url=document.location.href,stripped="",len=window.rootPath.match(/\.\.\//g).length+1;for(i=0;i<len;++i){match=url.match(/\/[^/]*$/);if(i<len-1){stripped=match[0]+stripped}url=url.substring(0,url.length-match[0].length)}var selectedVersion=document.getElementsByClassName("version-selector")[0].value;url+="/"+selectedVersion+stripped;document.location.href=url}}}());window.initSidebarItems=function(items){var sidebar=document.getElementsByClassName("sidebar-elems")[0];var current=window.sidebarCurrent;function addSidebarCrates(crates){if(!hasClass(document.body,"crate")){return}var div=document.createElement("div");div.className="block crate";div.innerHTML="<h3>Crates</h3>";var ul=document.createElement("ul");div.appendChild(ul);for(var i=0;i<crates.length;++i){var klass="crate";if(window.rootPath!=="./"&&crates[i]===window.currentCrate){klass+=" current"}var link=document.createElement("a");link.href=window.rootPath+crates[i]+"/index.html";link.className=klass;link.textContent=crates[i];var li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}sidebar.appendChild(div)}function block(shortty,longty){var filtered=items[shortty];if(!filtered){return}var div=document.createElement("div");div.className="block "+shortty;var h3=document.createElement("h3");h3.textContent=longty;div.appendChild(h3);var ul=document.createElement("ul");for(var i=0,len=filtered.length;i<len;++i){var item=filtered[i];var name=item[0];var desc=item[1];var klass=shortty;if(name===current.name&&shortty===current.ty){klass+=" current"}var path;if(shortty==="mod"){path=name+"/index.html"}else{path=shortty+"."+name+".html"}var link=document.createElement("a");link.href=current.relpath+path;link.title=desc;link.className=klass;link.textContent=name;var li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}div.appendChild(ul);sidebar.appendChild(div)}if(sidebar){var isModule=hasClass(document.body,"mod");if(!isModule){block("primitive","Primitive Types");block("mod","Modules");block("macro","Macros");block("struct","Structs");block("enum","Enums");block("union","Unions");block("constant","Constants");block("static","Statics");block("trait","Traits");block("fn","Functions");block("type","Type Definitions");block("foreigntype","Foreign Types");block("keyword","Keywords");block("traitalias","Trait Aliases")}addSidebarCrates(window.ALL_CRATES)}};window.register_implementors=function(imp){var implementors=document.getElementById("implementors-list");var synthetic_implementors=document.getElementById("synthetic-implementors-list");if(synthetic_implementors){var inlined_types=new Set();onEachLazy(synthetic_implementors.getElementsByClassName("impl"),function(el){var aliases=el.getAttribute("data-aliases");if(!aliases){return}aliases.split(",").forEach(function(alias){inlined_types.add(alias)})})}var libs=Object.getOwnPropertyNames(imp);for(var i=0,llength=libs.length;i<llength;++i){if(libs[i]===window.currentCrate){continue}var structs=imp[libs[i]];struct_loop:for(var j=0,slength=structs.length;j<slength;++j){var struct=structs[j];var list=struct.synthetic?synthetic_implementors:implementors;if(struct.synthetic){for(var k=0,stlength=struct.types.length;k<stlength;k++){if(inlined_types.has(struct.types[k])){continue struct_loop}inlined_types.add(struct.types[k])}}var code=document.createElement("h3");code.innerHTML=struct.text;addClass(code,"code-header");addClass(code,"in-band");onEachLazy(code.getElementsByTagName("a"),function(elem){var href=elem.getAttribute("href");if(href&&href.indexOf("http")!==0){elem.setAttribute("href",window.rootPath+href)}});var display=document.createElement("h3");addClass(display,"impl");display.innerHTML="<span class=\"in-band\"><table class=\"table-display\">"+"<tbody><tr><td><code>"+code.outerHTML+"</code></td><td></td></tr>"+"</tbody></table></span>";list.appendChild(display)}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}function labelForToggleButton(sectionIsCollapsed){if(sectionIsCollapsed){return"+"}return"\u2212"}function toggleAllDocs(){var innerToggle=document.getElementById(toggleAllDocsId);if(!innerToggle){return}var sectionIsCollapsed=false;if(hasClass(innerToggle,"will-expand")){removeClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("rustdoc-toggle"),function(e){if(!hasClass(e,"type-contents-toggle")){e.open=true}});innerToggle.title="collapse all docs"}else{addClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("rustdoc-toggle"),function(e){if(e.parentNode.id!=="main"||(!hasClass(e,"implementors-toggle")&&!hasClass(e,"type-contents-toggle"))){e.open=false}});sectionIsCollapsed=true;innerToggle.title="expand all docs"}innerToggle.children[0].innerText=labelForToggleButton(sectionIsCollapsed)}function insertAfter(newNode,referenceNode){referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling)}(function(){var toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}var hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";var hideImplementors=getSettingValue("auto-collapse-implementors")!=="false";var hideImplementations=getSettingValue("auto-hide-trait-implementations")!=="false";var hideLargeItemContents=getSettingValue("auto-hide-large-items")!=="false";function openImplementors(id){var list=document.getElementById(id);if(list!==null){onEachLazy(list.getElementsByClassName("implementors-toggle"),function(e){e.open=true})}}if(!hideImplementations){openImplementors("trait-implementations-list");openImplementors("blanket-implementations-list")}if(!hideImplementors){openImplementors("implementors-list")}onEachLazy(document.getElementsByClassName("rustdoc-toggle"),function(e){if(!hideLargeItemContents&&hasClass(e,"type-contents-toggle")){e.open=true}if(hideMethodDocs&&hasClass(e,"method-toggle")){e.open=false}});var pageId=getPageId();if(pageId!==null){expandSection(pageId)}}());(function(){var lineNumbersFunc=function(){};if(getSettingValue("line-numbers")==="true"){lineNumbersFunc=function(x){var count=x.textContent.split("\n").length;var elems=[];for(var i=0;i<count;++i){elems.push(i+1)}var node=document.createElement("pre");addClass(node,"line-number");node.innerHTML=elems.join("\n");x.parentNode.insertBefore(node,x)}}onEachLazy(document.getElementsByClassName("rust-example-rendered"),function(e){if(hasClass(e,"compile_fail")){e.addEventListener("mouseover",function(){this.parentElement.previousElementSibling.childNodes[0].style.color="#f00"});e.addEventListener("mouseout",function(){this.parentElement.previousElementSibling.childNodes[0].style.color=""})}else if(hasClass(e,"ignore")){e.addEventListener("mouseover",function(){this.parentElement.previousElementSibling.childNodes[0].style.color="#ff9200"});e.addEventListener("mouseout",function(){this.parentElement.previousElementSibling.childNodes[0].style.color=""})}lineNumbersFunc(e)})}());function handleClick(id,f){var elem=document.getElementById(id);if(elem){elem.addEventListener("click",f)}}handleClick("help-button",function(ev){displayHelp(true,ev)});onEachLazy(document.getElementsByTagName("a"),function(el){if(el.hash){el.addEventListener("click",function(){expandSection(el.hash.slice(1))})}});onEachLazy(document.getElementsByClassName("notable-traits"),function(e){e.onclick=function(){this.getElementsByClassName('notable-traits-tooltiptext')[0].classList.toggle("force-tooltip")}});var sidebar_menu=document.getElementsByClassName("sidebar-menu")[0];if(sidebar_menu){sidebar_menu.onclick=function(){var sidebar=document.getElementsByClassName("sidebar")[0];if(hasClass(sidebar,"mobile")){hideSidebar()}else{showSidebar()}}}var buildHelperPopup=function(){var popup=document.createElement("aside");addClass(popup,"hidden");popup.id="help";popup.addEventListener("click",function(ev){if(ev.target===popup){displayHelp(false,ev)}});var book_info=document.createElement("span");book_info.innerHTML="You can find more information in \ | ||
| <a href=\"https://doc.rust-lang.org/rustdoc/\">the rustdoc book</a>.";var container=document.createElement("div");var shortcuts=[["?","Show this help dialog"],["S","Focus the search field"],["T","Focus the theme picker menu"],["↑","Move up in search results"],["↓","Move down in search results"],["← / →","Switch result tab (when results focused)"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(function(x){return"<dt>"+x[0].split(" ").map(function(y,index){return(index&1)===0?"<kbd>"+y+"</kbd>":" "+y+" "}).join("")+"</dt><dd>"+x[1]+"</dd>"}).join("");var div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="<h2>Keyboard Shortcuts</h2><dl>"+shortcuts+"</dl></div>";var infos=["Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to \ | ||
| restrict the search to a given item kind.","Accepted kinds are: <code>fn</code>, <code>mod</code>, <code>struct</code>, \ | ||
| <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, \ | ||
| and <code>const</code>.","Search functions by type signature (e.g., <code>vec -> usize</code> or \ | ||
| <code>* -> vec</code>)","Search multiple things at once by splitting your query with comma (e.g., \ | ||
| <code>str,u8</code> or <code>String,struct:Vec,test</code>)","You can look for items with an exact name by putting double quotes around \ | ||
| your request: <code>\"string\"</code>","Look for items inside another one by searching for a path: <code>vec::Vec</code>",].map(function(x){return"<p>"+x+"</p>"}).join("");var div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="<h2>Search Tricks</h2>"+infos;container.appendChild(book_info);container.appendChild(div_shortcuts);container.appendChild(div_infos);popup.appendChild(container);insertAfter(popup,searchState.outputElement());buildHelperPopup=function(){}};onHashChange(null);window.addEventListener("hashchange",onHashChange);searchState.setup()}());(function(){var reset_button_timeout=null;window.copy_path=function(but){var parent=but.parentElement;var path=[];onEach(parent.childNodes,function(child){if(child.tagName==='A'){path.push(child.textContent)}});var el=document.createElement('textarea');el.value='use '+path.join('::')+';';el.setAttribute('readonly','');el.style.position='absolute';el.style.left='-9999px';document.body.appendChild(el);el.select();document.execCommand('copy');document.body.removeChild(el);but.children[0].style.display='none';var tmp;if(but.childNodes.length<2){tmp=document.createTextNode('✓');but.appendChild(tmp)}else{onEachLazy(but.childNodes,function(e){if(e.nodeType===Node.TEXT_NODE){tmp=e;return true}});tmp.textContent='✓'}if(reset_button_timeout!==null){window.clearTimeout(reset_button_timeout)}function reset_button(){tmp.textContent='';reset_button_timeout=null;but.children[0].style.display=""}reset_button_timeout=window.setTimeout(reset_button,1000)}}()) |
@@ -1,2 +0,2 @@ | ||
| /*! normalize.css v3.0.0 | MIT License | git.io/normalize */ | ||
| /*! normalize.css v3.0.0 | MIT License | git.io/normalize */ | ||
| html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0} |
@@ -1,1 +0,1 @@ | ||
| #main>h2+div,#main>h2+h3,#main>h3+div{display:block;}.loading-content{display:none;} | ||
| #main .attributes{margin-left:0 !important;}#copy-path{display:none;} |
@@ -1,1 +0,1 @@ | ||
| @font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular.woff") format('woff');}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium.woff") format('woff');}@font-face {font-family:'Source Serif Pro';font-style:normal;font-weight:400;src:local('Source Serif Pro'),url("SourceSerifPro-Regular.ttf.woff") format('woff');}@font-face {font-family:'Source Serif Pro';font-style:italic;font-weight:400;src:local('Source Serif Pro Italic'),url("SourceSerifPro-It.ttf.woff") format('woff');}@font-face {font-family:'Source Serif Pro';font-style:normal;font-weight:700;src:local('Source Serif Pro Bold'),url("SourceSerifPro-Bold.ttf.woff") format('woff');}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular.woff") format('woff');}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold.woff") format('woff');}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}body{font:16px/1.4 "Source Serif Pro",serif;margin:0;position:relative;padding:10px 15px 20px 15px;-webkit-font-feature-settings:"kern","liga";-moz-font-feature-settings:"kern","liga";font-feature-settings:"kern","liga";}h1{font-size:1.5em;}h2{font-size:1.4em;}h3{font-size:1.3em;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod):not(.important),h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant){font-weight:500;margin:20px 0 15px 0;padding-bottom:6px;}h1.fqn{border-bottom:1px dashed;margin-top:0;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant){border-bottom:1px solid;}h3.impl,h3.method,h4.method,h3.type,h4.type,h4.associatedconstant{flex-basis:100%;font-weight:600;margin-top:16px;margin-bottom:10px;position:relative;}h3.impl,h3.method,h3.type{padding-left:15px;}h1,h2,h3,h4,.sidebar,a.source,.search-input,.content table :not(code)>a,.collapse-toggle,div.item-list .out-of-band,#source-sidebar,#sidebar-toggle{font-family:"Fira Sans",sans-serif;}ol,ul{padding-left:25px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.6em;}p{margin:0 0 .6em 0;}summary{outline:none;}code,pre{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.1em;}.docblock pre code,.docblock-short pre code,.docblock code.spotlight{padding:0;}.docblock code.spotlight :last-child{padding-bottom:0.6em;}pre{padding:14px;}.source .content pre{padding:20px;}img{max-width:100%;}li{position:relative;}.source .content{margin-top:50px;max-width:none;overflow:visible;margin-left:0px;min-width:70em;}nav.sub{font-size:16px;text-transform:uppercase;}.sidebar{width:200px;position:fixed;left:0;top:0;height:100vh;overflow:auto;}.sidebar .block>ul>li{margin-right:-10px;}.content,nav{max-width:960px;}.js-only,.hidden{display:none !important;}.logo-container{height:100px;width:100px;position:relative;margin:20px auto;display:block;margin-top:10px;}.logo-container>img{max-width:100px;max-height:100px;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:block;}.sidebar .location{border:1px solid;font-size:17px;margin:30px 10px 20px 10px;text-align:center;word-wrap:break-word;}.sidebar .version{font-size:15px;text-align:center;border-bottom:1px solid;overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;}.location:empty{border:none;}.location a:first-child{font-weight:500;}.block{padding:0;margin-bottom:14px;}.block h2,.block h3{margin-top:0;margin-bottom:8px;text-align:center;}.block ul,.block li{margin:0 10px;padding:0;list-style:none;}.block a{display:block;text-overflow:ellipsis;overflow:hidden;line-height:15px;padding:7px 5px;font-size:14px;font-weight:300;transition:border 500ms ease-out;}.sidebar-title{border-top:1px solid;border-bottom:1px solid;text-align:center;font-size:17px;margin-bottom:5px;}.sidebar-links{margin-bottom:15px;}.sidebar-links>a{padding-left:10px;width:100%;}.sidebar-menu{display:none;}.content{padding:15px 0;}.source .content pre.rust{white-space:pre;overflow:auto;padding-left:0;}.rustdoc:not(.source) .example-wrap{display:inline-flex;margin-bottom:10px;}.example-wrap{width:100%;}.example-wrap>pre.line-number{overflow:initial;border:1px solid;border-top-left-radius:5px;border-bottom-left-radius:5px;padding:13px 8px;text-align:right;}.rustdoc:not(.source) .example-wrap>pre.rust{width:100%;overflow-x:auto;}.rustdoc:not(.source) .example-wrap>pre{margin:0;}#search{margin-left:230px;position:relative;}#results{position:absolute;right:0;left:0;overflow:auto;}#results>table{width:100%;table-layout:fixed;}.content pre.line-numbers{float:left;border:none;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.line-numbers span{cursor:pointer;}.docblock-short p{display:inline;}.docblock-short.nowrap{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}.docblock-short p{overflow:hidden;text-overflow:ellipsis;margin:0;}.docblock-short code{white-space:pre-wrap;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom:1px solid;}#main>.docblock h1{font-size:1.3em;}#main>.docblock h2{font-size:1.15em;}#main>.docblock h3,#main>.docblock h4,#main>.docblock h5{font-size:1em;}#main>h2+div,#main>h2+h3,#main>h3+div{display:none;flex-wrap:wrap;}.docblock h1{font-size:1em;}.docblock h2{font-size:0.95em;}.docblock h3,.docblock h4,.docblock h5{font-size:0.9em;}.docblock{margin-left:24px;position:relative;}.content .out-of-band{float:right;font-size:23px;margin:0px;padding:0px;font-weight:normal;}h3.impl>.out-of-band{font-size:21px;}h4.method>.out-of-band{font-size:19px;}h4>code,h3>code,.invisible>code{max-width:calc(100% - 41px);display:block;}.invisible{width:100%;display:inline-block;}.content .in-band{margin:0px;padding:0px;}.in-band>code{display:inline-block;}#main{position:relative;}#main>.since{top:inherit;font-family:"Fira Sans",sans-serif;}.content table:not(.table-display){border-spacing:0 5px;}.content td{vertical-align:top;}.content td:first-child{padding-right:20px;}.content td p:first-child{margin-top:0;}.content td h1,.content td h2{margin-left:0;font-size:1.1em;}.content tr:first-child td{border-top:0;}.docblock table{margin:.5em 0;width:calc(100% - 2px);border:1px dashed;}.docblock table td{padding:.5em;border:1px dashed;}.docblock table th{padding:.5em;text-align:left;border:1px solid;}.fields+table{margin-bottom:1em;}.content .item-list{list-style-type:none;padding:0;}.content .multi-column{-moz-column-count:5;-moz-column-gap:2.5em;-webkit-column-count:5;-webkit-column-gap:2.5em;column-count:5;column-gap:2.5em;}.content .multi-column li{width:100%;display:inline-block;}.content .method{font-size:1em;position:relative;}.content .method .where,.content .fn .where,.content .where.fmt-newline{display:block;font-size:0.8em;}.content .methods>div:not(.important-traits){margin-left:40px;margin-bottom:15px;}.content .docblock>.impl-items{margin-left:20px;margin-top:-34px;}.content .docblock>.impl-items>h4{border-bottom:0;}.content .docblock>.impl-items .table-display{margin:0;}.content .docblock>.impl-items table td{padding:0;}.toggle-wrapper.marg-left>.collapse-toggle{left:-24px;}.content .docblock>.impl-items .table-display,.impl-items table td{border:none;}.content .stability code{font-size:90%;}.content .stability{position:relative;margin-left:33px;margin-top:-13px;}.sub-variant>div>.stability{margin-top:initial;}.content .stability::before{content:'˪';font-size:30px;position:absolute;top:-9px;left:-13px;}.content .impl-items .method,.content .impl-items>.type,.impl-items>.associatedconstant{margin-left:20px;}.content .impl-items .docblock,.content .impl-items .stability{margin-bottom:.6em;}.content .impl-items>.stability{margin-left:40px;}.methods>.stability,.content .impl-items>.stability{margin-top:-8px;}.impl-items{flex-basis:100%;}#main>.stability{margin-top:0;}nav{border-bottom:1px solid;padding-bottom:10px;margin-bottom:10px;}nav.main{padding:20px 0;text-align:center;}nav.main .current{border-top:1px solid;border-bottom:1px solid;}nav.main .separator{border:1px solid;display:inline-block;height:23px;margin:0 20px;}nav.sum{text-align:right;}nav.sub form{display:inline;}nav.sub,.content{margin-left:230px;}a{text-decoration:none;background:transparent;}.small-section-header:hover>.anchor{display:initial;}.in-band:hover>.anchor{display:inline-block;position:absolute;}.anchor{display:none;position:absolute;left:-7px;}.anchor.field{left:-5px;}.small-section-header>.anchor{left:-28px;padding-right:10px;}.anchor:before{content:'\2002\00a7\2002';}.docblock a:not(.srclink):not(.test-arrow):hover,.docblock-short a:not(.srclink):not(.test-arrow):hover,.stability a{text-decoration:underline;}.invisible>.srclink,h4>code+.srclink{position:absolute;top:0;right:0;font-size:17px;font-weight:normal;}.block a.current.crate{font-weight:500;}.search-container{position:relative;}.search-container>div{display:inline-flex;width:calc(100% - 34px);}#crate-search{margin-top:5px;padding:6px;padding-right:19px;flex:none;border:0;border-right:0;border-radius:4px 0 0 4px;outline:none;cursor:pointer;border-right:1px solid;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;text-overflow:"";background-repeat:no-repeat;background-color:transparent;background-size:20px;background-position:calc(100% - 1px) 56%;}.search-container>.top-button{position:absolute;right:0;top:10px;}.search-input{-moz-box-sizing:border-box !important;box-sizing:border-box !important;outline:none;border:none;border-radius:1px;margin-top:5px;padding:10px 16px;font-size:17px;transition:border-color 300ms ease;transition:border-radius 300ms ease-in-out;transition:box-shadow 300ms ease-in-out;width:100%;}#crate-search+.search-input{border-radius:0 1px 1px 0;width:calc(100% - 32px);}.search-input:focus{border-radius:2px;border:0;outline:0;}.search-results .desc{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:block;}.search-results a{display:block;}.content .search-results td:first-child{padding-right:0;width:50%;}.content .search-results td:first-child a{padding-right:10px;}.content .search-results td:first-child a:after{clear:both;content:"";display:block;}.content .search-results td:first-child a span{float:left;}tr.result span.primitive::after{content:' (primitive type)';font-style:italic;}tr.result span.keyword::after{content:' (keyword)';font-style:italic;}body.blur>:not(#help){filter:blur(8px);-webkit-filter:blur(8px);opacity:.7;}#help{width:100%;height:100vh;position:fixed;top:0;left:0;display:flex;justify-content:center;align-items:center;}#help>div{flex:0 0 auto;box-shadow:0 0 6px rgba(0,0,0,.2);width:550px;height:auto;border:1px solid;}#help dt{float:left;clear:left;display:block;}#help dd{margin:5px 35px;}#help .infos{padding-left:0;}#help h1,#help h2{margin-top:0;}#help>div div{width:50%;float:left;padding:20px;padding-left:17px;}.stab{display:table;border-width:1px;border-style:solid;padding:3px;margin-bottom:5px;font-size:90%;}.stab p{display:inline;}.stab summary{display:list-item;}.stab .emoji{font-size:1.5em;}.module-item .stab{border-radius:3px;display:inline-block;font-size:80%;line-height:1.2;margin-bottom:0;margin-right:.3em;padding:2px;vertical-align:text-bottom;}.module-item.unstable{opacity:0.65;}.since{font-weight:normal;font-size:initial;position:absolute;right:0;top:0;}.impl-items .since,.impl .since{flex-grow:0;padding-left:12px;padding-right:2px;position:initial;}.impl-items .srclink,.impl .srclink{flex-grow:0;font-size:17px;font-weight:normal;}.impl-items code,.impl code{flex-grow:1;}.impl-items h4,h4.impl,h3.impl{display:flex;flex-basis:100%;font-size:16px;margin-bottom:12px;justify-content:space-between;}.variants_table{width:100%;}.variants_table tbody tr td:first-child{width:1%;}td.summary-column{width:100%;}.summary{padding-right:0px;}pre.rust .question-mark{font-weight:bold;}a.test-arrow{display:inline-block;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:130%;top:5px;right:5px;}a.test-arrow:hover{text-decoration:none;}.section-header:hover a:before{position:absolute;left:-25px;padding-right:10px;content:'\2002\00a7\2002';}.section-header:hover a{text-decoration:none;}.section-header a{color:inherit;}.collapse-toggle{font-weight:300;position:absolute;left:-23px;top:0;}h3>.collapse-toggle,h4>.collapse-toggle{font-size:0.8em;top:5px;}.toggle-wrapper>.collapse-toggle{left:-24px;margin-top:0px;}.toggle-wrapper{position:relative;margin-top:0;}.toggle-wrapper.collapsed{height:25px;transition:height .2s;margin-bottom:.6em;}.collapse-toggle>.inner{display:inline-block;width:1.2ch;text-align:center;}.collapse-toggle.hidden-default{position:relative;margin-left:20px;}.since+.srclink{display:table-cell;padding-left:10px;}.item-spacer{width:100%;height:12px;}.out-of-band>span.since{position:initial;font-size:20px;margin-right:5px;}.toggle-wrapper>.collapse-toggle{left:0;}.variant+.toggle-wrapper+.docblock>p{margin-top:5px;}.sub-variant,.sub-variant>h3{margin-top:1px !important;}#main>.sub-variant>h3{font-size:15px;margin-left:25px;margin-bottom:5px;}.sub-variant>div{margin-left:20px;margin-bottom:10px;}.sub-variant>div>span{display:block;position:relative;}.toggle-label{display:inline-block;margin-left:4px;margin-top:3px;}.enum>.toggle-wrapper+.docblock,.struct>.toggle-wrapper+.docblock{margin-left:30px;margin-bottom:20px;margin-top:5px;}.docblock>.section-header:first-child{margin-left:15px;margin-top:0;}.docblock>.section-header:first-child:hover>a:before{left:-10px;}.enum>.collapsed,.struct>.collapsed{margin-bottom:25px;}#main>.variant,#main>.structfield{display:block;}.attributes{display:block;margin-top:0px !important;margin-right:0px;margin-bottom:0px !important;margin-left:30px;}.toggle-attributes.collapsed{margin-bottom:0;}.impl-items>.toggle-attributes{margin-left:20px;}.impl-items .attributes{font-weight:500;}:target>code{opacity:1;}.information{position:absolute;left:-20px;margin-top:7px;z-index:1;}.tooltip{position:relative;display:inline-block;cursor:pointer;}.tooltip .tooltiptext{width:120px;display:none;text-align:center;padding:5px 3px;border-radius:6px;margin-left:5px;top:-5px;left:105%;z-index:10;}.tooltip:hover .tooltiptext{display:inline;}.tooltip .tooltiptext::after{content:" ";position:absolute;top:50%;left:11px;margin-top:-5px;border-width:5px;border-style:solid;}.important-traits .tooltip .tooltiptext{border:1px solid;}pre.rust{position:relative;tab-width:4;-moz-tab-width:4;}.search-failed{text-align:center;margin-top:20px;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#titles{height:35px;}#titles>div{float:left;width:33.3%;text-align:center;font-size:18px;cursor:pointer;border-top:2px solid;}#titles>div:not(:last-child){margin-right:1px;width:calc(33.3% - 1px);}#titles>div>div.count{display:inline-block;font-size:16px;}.important-traits{cursor:pointer;z-index:2;}h4>.important-traits{position:absolute;left:-44px;top:2px;}#all-types{text-align:center;border:1px solid;margin:0 10px;margin-bottom:10px;display:block;border-radius:7px;}#all-types>p{margin:5px 0;}#sidebar-toggle{position:fixed;top:30px;left:300px;z-index:10;padding:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;cursor:pointer;font-weight:bold;transition:left .5s;font-size:1.2em;border:1px solid;border-left:0;}#source-sidebar{position:fixed;top:0;bottom:0;left:0;width:300px;z-index:1;overflow:auto;transition:left .5s;border-right:1px solid;}#source-sidebar>.title{font-size:1.5em;text-align:center;border-bottom:1px solid;margin-bottom:6px;}.theme-picker{position:absolute;left:211px;top:19px;}.theme-picker button{outline:none;}#settings-menu{position:absolute;right:0;top:10px;outline:none;}#theme-picker,#settings-menu{padding:4px;width:27px;height:29px;border:1px solid;border-radius:3px;cursor:pointer;}#theme-choices{display:none;position:absolute;left:0;top:28px;border:1px solid;border-radius:3px;z-index:1;cursor:pointer;}#theme-choices>button{border:none;width:100%;padding:4px;text-align:center;background:rgba(0,0,0,0);}#theme-choices>button:not(:first-child){border-top:1px solid;}@media (max-width:700px){body{padding-top:0px;}.rustdoc>.sidebar{height:45px;min-height:40px;margin:0;margin-left:-15px;padding:0 15px;position:static;z-index:11;}.sidebar>.location{float:right;margin:0px;margin-top:2px;padding:3px 10px 1px 10px;min-height:39px;background:inherit;text-align:left;font-size:24px;}.sidebar .location:empty{padding:0;}.sidebar .logo-container{width:35px;height:35px;margin-top:5px;margin-bottom:5px;float:left;margin-left:50px;}.sidebar .logo-container>img{max-width:35px;max-height:35px;}.sidebar-menu{position:fixed;z-index:10;font-size:2rem;cursor:pointer;width:45px;left:0;text-align:center;display:block;border-bottom:1px solid;border-right:1px solid;height:45px;}.rustdoc.source>.sidebar>.sidebar-menu{display:none;}.sidebar-elems{position:fixed;z-index:1;left:0;top:45px;bottom:0;overflow-y:auto;border-right:1px solid;display:none;}.sidebar>.block.version{border-bottom:none;margin-top:12px;}nav.sub{width:calc(100% - 32px);float:right;}.content{margin-left:0px;}#main{margin-top:45px;padding:0;}.content .in-band{width:100%;}.content h4>.out-of-band{position:inherit;}.toggle-wrapper>.collapse-toggle{left:0px;}.toggle-wrapper{height:1.5em;}#search{margin-left:0;}.content .impl-items .method,.content .impl-items>.type,.impl-items>.associatedconstant{display:flex;}.anchor{display:none !important;}h1.fqn{overflow:initial;}.theme-picker{left:10px;top:54px;z-index:1;}h4>.important-traits{position:absolute;left:-22px;top:24px;}#titles>div>div.count{float:left;width:100%;}#titles{height:50px;}.sidebar.mobile{position:fixed;width:100%;margin-left:0;background-color:rgba(0,0,0,0);height:100%;}.sidebar{width:calc(100% + 30px);}.show-it{display:block;width:246px;}.show-it>.block.items{margin:8px 0;}.show-it>.block.items>ul{margin:0;}.show-it>.block.items>ul>li{text-align:center;margin:2px 0;}.show-it>.block.items>ul>li>a{font-size:21px;}#sidebar-filler{position:fixed;left:45px;width:calc(100% - 45px);top:0;height:45px;z-index:-1;border-bottom:1px solid;}.collapse-toggle{left:-20px;}.impl>.collapse-toggle{left:-10px;}#all-types{margin:10px;}#sidebar-toggle{top:100px;width:30px;font-size:1.5rem;text-align:center;padding:0;}#source-sidebar{z-index:11;}#main>.line-numbers{margin-top:0;}}@media print{nav.sub,.content .out-of-band,.collapse-toggle{display:none;}}@media (max-width:416px){#titles{height:73px;}#titles>div{height:73px;}}.modal{position:fixed;width:100vw;height:100vh;z-index:10000;top:0;left:0;}.modal-content{display:block;max-width:60%;min-width:200px;padding:8px;top:40%;position:absolute;left:50%;transform:translate(-50%,-40%);border:1px solid;border-radius:4px;border-top-right-radius:0;}.modal-content>.docblock{margin:0;}h3.important{margin:0;margin-bottom:13px;font-size:19px;}.modal-content>.docblock>code.content{margin:0;padding:0;font-size:20px;}.modal-content>.close{position:absolute;font-weight:900;right:-25px;top:-1px;font-size:18px;width:25px;padding-right:2px;border-top-right-radius:5px;border-bottom-right-radius:5px;text-align:center;border:1px solid;border-right:0;cursor:pointer;}.modal-content>.whiter{height:25px;position:absolute;width:3px;right:-2px;top:0px;}#main>div.important-traits{position:absolute;left:-24px;margin-top:16px;}.content>.methods>.method>div.important-traits{position:absolute;font-weight:400;left:-42px;margin-top:2px;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px;border-radius:3px;box-shadow:inset 0 -1px 0;cursor:default;}.hidden-by-impl-hider,.hidden-by-usual-hider{display:none !important;}#implementations-list>h3>span.in-band{width:100%;}.table-display{width:100%;border:0;border-collapse:collapse;border-spacing:0;font-size:16px;}.table-display tr td:first-child{padding-right:0;}.table-display tr td:last-child{float:right;}.table-display .out-of-band{position:relative;font-size:19px;display:block;}#implementors-list>.impl-items .table-display .out-of-band{font-size:17px;}.table-display td:hover .anchor{display:block;top:2px;left:-5px;}#main>ul{padding-left:10px;}#main>ul>li{list-style:none;}.non-exhaustive{margin-bottom:1em;}div.children{padding-left:27px;display:none;}div.name{cursor:pointer;position:relative;margin-left:16px;}div.files>a{display:block;padding:0 3px;}div.files>a:hover,div.name:hover{background-color:#a14b4b;}div.name.expand+.children{display:block;}div.name::before{content:"\25B6";padding-left:4px;font-size:0.7em;position:absolute;left:-16px;top:4px;}div.name.expand::before{transform:rotate(90deg);left:-15px;top:2px;}.type-decl>pre>.toggle-wrapper.toggle-attributes.top-attr{margin-left:0 !important;}.type-decl>pre>.docblock.attributes.top-attr{margin-left:1.8em !important;}.type-decl>pre>.toggle-attributes{margin-left:2.2em;}.type-decl>pre>.docblock.attributes{margin-left:4em;} | ||
| @font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular.woff2") format("woff2"),url("FiraSans-Regular.woff") format('woff');font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium.woff2") format("woff2"),url("FiraSans-Medium.woff") format('woff');font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular.ttf.woff") format('woff');font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:italic;font-weight:400;src:local('Source Serif 4 Italic'),url("SourceSerif4-It.ttf.woff") format('woff');font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:700;src:local('Source Serif 4 Bold'),url("SourceSerif4-Bold.ttf.woff") format('woff');font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular.ttf.woff") format('woff');font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It.ttf.woff") format('woff');font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold.ttf.woff") format('woff');font-display:swap;}@font-face {font-family:'Noto Sans KR';src:url("noto-sans-kr-v13-korean-regular.woff") format("woff");font-display:swap;unicode-range:U+A960-A97F,U+AC00-D7AF,U+D7B0-D7FF;}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}html{content:"";}@media (prefers-color-scheme:light){html{content:"light";}}@media (prefers-color-scheme:dark){html{content:"dark";}}body{font:16px/1.4 "Source Serif 4","Noto Sans KR",serif;margin:0;position:relative;padding:10px 15px 20px 15px;-webkit-font-feature-settings:"kern","liga";-moz-font-feature-settings:"kern","liga";font-feature-settings:"kern","liga";}h1{font-size:1.5em;}h2{font-size:1.4em;}h3{font-size:1.3em;}h1,h2,h3,h4{font-weight:500;margin:20px 0 15px 0;padding-bottom:6px;}h1.fqn{display:flex;border-bottom:1px dashed;margin-top:0;padding-left:1px;}h1.fqn>.in-band>a:hover{text-decoration:underline;}#main>h2,#main>h3,#main>h4{border-bottom:1px solid;}h3.code-header,h4.code-header{font-size:1em;font-weight:600;border:none;padding:0;margin:0;}.impl,.impl-items .method,.methods .method,.impl-items .type,.methods .type,.impl-items .associatedconstant,.methods .associatedconstant,.impl-items .associatedtype,.methods .associatedtype{flex-basis:100%;font-weight:600;margin-top:16px;margin-bottom:10px;position:relative;}.impl,.method.trait-impl,.type.trait-impl,.associatedconstant.trait-impl,.associatedtype.trait-impl{padding-left:15px;}div.impl-items>div{padding-left:0;}h1,h2,h3,h4,.sidebar,a.source,.search-input,.search-results .result-name,.content table td:first-child>a,div.item-list .out-of-band,span.since,#source-sidebar,#sidebar-toggle,details.rustdoc-toggle>summary::before,details.undocumented>summary::before,div.impl-items>div:not(.docblock):not(.item-info),.content ul.crate a.crate,a.srclink,#main>ul.docblock>li>a{font-family:"Fira Sans",Arial,sans-serif;}.content ul.crate a.crate{font-size:16px/1.6;}ol,ul{padding-left:25px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.6em;}p{margin:0 0 .6em 0;}summary{outline:none;}td,th{padding:0;}table{border-collapse:collapse;}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0;}details:not(.rustdoc-toggle) summary{margin-bottom:.6em;}code,pre,a.test-arrow,.code-header{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.1em;}.docblock pre code,.docblock-short pre code{padding:0;padding-right:1ex;}pre{padding:14px;}.source .content pre{padding:20px;}img{max-width:100%;}li{position:relative;}.source .content{margin-top:50px;max-width:none;overflow:visible;margin-left:0px;}nav.sub{font-size:16px;text-transform:uppercase;}.sidebar{width:200px;position:fixed;left:0;top:0;bottom:0;overflow:auto;}*{scrollbar-width:initial;}.sidebar{scrollbar-width:thin;}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;}.sidebar .block>ul>li{margin-right:-10px;}.content,nav{max-width:960px;}.hidden{display:none !important;}.logo-container{height:100px;width:100px;position:relative;margin:20px auto;display:block;margin-top:10px;}.logo-container>img{max-width:100px;max-height:100px;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:block;}.sidebar .location{border:1px solid;font-size:17px;margin:30px 10px 20px 10px;text-align:center;word-wrap:break-word;font-weight:inherit;padding:0;}.sidebar .version{font-size:15px;text-align:center;border-bottom:1px solid;overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;}.location:empty{border:none;}.location a:first-of-type{font-weight:500;}.location a:hover{text-decoration:underline;}.block{padding:0;margin-bottom:14px;}.block h2,.block h3{text-align:center;}.block ul,.block li{margin:0 10px;padding:0;list-style:none;}.block a{display:block;text-overflow:ellipsis;overflow:hidden;line-height:15px;padding:7px 5px;font-size:14px;font-weight:300;transition:border 500ms ease-out;}.sidebar-title{border-top:1px solid;border-bottom:1px solid;text-align:center;font-size:17px;margin-bottom:5px;font-weight:inherit;padding:0;}.sidebar-links{margin-bottom:15px;}.sidebar-links>a{padding-left:10px;width:100%;}.sidebar-menu{display:none;}.content{padding:15px 0;}.source .content pre.rust{white-space:pre;overflow:auto;padding-left:0;}.rustdoc .example-wrap{display:inline-flex;margin-bottom:10px;}.example-wrap{position:relative;width:100%;}.example-wrap>pre.line-number{overflow:initial;border:1px solid;padding:13px 8px;text-align:right;border-top-left-radius:5px;border-bottom-left-radius:5px;}.rustdoc:not(.source) .example-wrap>pre.rust{width:100%;overflow-x:auto;}.rustdoc .example-wrap>pre{margin:0;}#search{margin-left:230px;position:relative;}#results>table{width:100%;table-layout:fixed;}.content>.example-wrap pre.line-numbers{position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.line-numbers span{cursor:pointer;}.docblock-short{overflow-wrap:anywhere;}.docblock-short p{display:inline;}.docblock-short p{overflow:hidden;text-overflow:ellipsis;margin:0;}.docblock>:not(pre)>code,.docblock-short>:not(pre)>code{white-space:pre-wrap;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom:1px solid;}.top-doc .docblock h1{font-size:1.3em;}.top-doc .docblock h2{font-size:1.15em;}.top-doc .docblock h3,.top-doc .docblock h4,.top-doc .docblock h5{font-size:1em;}.docblock h1{font-size:1em;}.docblock h2{font-size:0.95em;}.docblock h3,.docblock h4,.docblock h5{font-size:0.9em;}.docblock{margin-left:24px;position:relative;}.content .out-of-band{flex-grow:0;text-align:right;font-size:23px;margin:0px;padding:0 0 0 12px;font-weight:normal;}.method>.code-header,.trait-impl>.code-header,.invisible>.code-header{max-width:calc(100% - 41px);display:block;flex-grow:1;}.invisible{width:100%;display:inline-block;}.content .in-band{flex-grow:1;margin:0px;padding:0px;}.in-band>code,.in-band>.code-header{display:inline-block;}#main{position:relative;}#main>.since{top:inherit;font-family:"Fira Sans",Arial,sans-serif;}.content table:not(.table-display){border-spacing:0 5px;}.content td{vertical-align:top;}.content td:first-child{padding-right:20px;}.content td p:first-child{margin-top:0;}.content td h1,.content td h2{margin-left:0;font-size:1.1em;}.content tr:first-child td{border-top:0;}.docblock table{margin:.5em 0;width:calc(100% - 2px);border:1px dashed;}.docblock table td{padding:.5em;border:1px dashed;}.docblock table th{padding:.5em;text-align:left;border:1px solid;}.fields+table{margin-bottom:1em;}.content .item-list{list-style-type:none;padding:0;}.content .multi-column{-moz-column-count:5;-moz-column-gap:2.5em;-webkit-column-count:5;-webkit-column-gap:2.5em;column-count:5;column-gap:2.5em;}.content .multi-column li{width:100%;display:inline-block;}.content>.methods>.method{font-size:1em;position:relative;}.content .method .where,.content .fn .where,.content .where.fmt-newline{display:block;font-size:0.8em;}.content .methods>div:not(.notable-traits):not(.method){margin-left:40px;margin-bottom:15px;}.content .docblock>.impl-items{margin-left:20px;margin-top:-34px;}.content .docblock>.impl-items .table-display{margin:0;}.content .docblock>.impl-items table td{padding:0;}.content .docblock>.impl-items .table-display,.impl-items table td{border:none;}.content .item-info code{font-size:90%;}.content .item-info{position:relative;margin-left:33px;margin-top:-6px;}.sub-variant>div>.item-info{margin-top:initial;}.content .item-info::before{content:'⬑';font-size:25px;position:absolute;top:0px;left:-19px;}.content .impl-items .method,.content .impl-items>.type,.impl-items>.associatedconstant,.impl-items>.associatedtype,.content .impl-items details>summary>.type,.impl-items details>summary>.associatedconstant,.impl-items details>summary>.associatedtype{margin-left:20px;}.content .impl-items .docblock,.content .impl-items .item-info{margin-bottom:.6em;}.content .impl-items>.item-info{margin-left:40px;}.methods>.item-info,.content .impl-items>.item-info{margin-top:-8px;}.impl-items{flex-basis:100%;}#main>.item-info{margin-top:0;}nav:not(.sidebar){border-bottom:1px solid;padding-bottom:10px;margin-bottom:10px;}nav.main{padding:20px 0;text-align:center;}nav.main .current{border-top:1px solid;border-bottom:1px solid;}nav.main .separator{border:1px solid;display:inline-block;height:23px;margin:0 20px;}nav.sum{text-align:right;}nav.sub form{display:inline;}nav.sub,.content{margin-left:230px;}a{text-decoration:none;background:transparent;}.small-section-header:hover>.anchor{display:initial;}.in-band:hover>.anchor,.impl:hover>.anchor,.method.trait-impl:hover>.anchor,.type.trait-impl:hover>.anchor,.associatedconstant.trait-impl:hover>.anchor,.associatedtype.trait-impl:hover>.anchor{display:inline-block;position:absolute;}.anchor{display:none;position:absolute;left:-7px;}.anchor.field{left:-5px;}.small-section-header>.anchor{left:-28px;padding-right:10px;}.anchor:before{content:'\2002\00a7\2002';}.docblock a:not(.srclink):not(.test-arrow):hover,.docblock-short a:not(.srclink):not(.test-arrow):hover,.item-info a{text-decoration:underline;}.invisible>.srclink,.method>.code-header+.srclink{position:absolute;top:0;right:0;font-size:17px;font-weight:normal;}.block a.current.crate{font-weight:500;}.search-container{position:relative;}.search-container>div{display:inline-flex;width:calc(100% - 63px);}#crate-search{min-width:115px;margin-top:5px;padding:6px;padding-right:19px;flex:none;border:0;border-right:0;border-radius:4px 0 0 4px;outline:none;cursor:pointer;border-right:1px solid;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;text-overflow:"";background-repeat:no-repeat;background-color:transparent;background-size:20px;background-position:calc(100% - 1px) 56%;}.search-container>.top-button{position:absolute;right:0;top:10px;}.search-input{-moz-box-sizing:border-box !important;box-sizing:border-box !important;outline:none;border:none;border-radius:1px;margin-top:5px;padding:10px 16px;font-size:17px;transition:border-color 300ms ease;transition:border-radius 300ms ease-in-out;transition:box-shadow 300ms ease-in-out;width:100%;}#crate-search+.search-input{border-radius:0 1px 1px 0;width:calc(100% - 32px);}.search-input:focus{border-radius:2px;border:0;outline:0;}.search-results{display:none;padding-bottom:2em;}.search-results.active{display:block;clear:both;}.search-results .desc>span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:block;}.search-results>a{display:block;width:100%;margin-left:2px;margin-right:2px;border-bottom:1px solid #aaa3;}.search-results>a>div{display:flex;flex-flow:row wrap;}.search-results .result-name,.search-results div.desc,.search-results .result-description{width:50%;}.search-results .result-name{padding-right:1em;}.search-results .result-name>span{display:inline-block;margin:0;font-weight:normal;}body.blur>:not(#help){filter:blur(8px);-webkit-filter:blur(8px);opacity:.7;}#help{width:100%;height:100vh;position:fixed;top:0;left:0;display:flex;justify-content:center;align-items:center;}#help>div{flex:0 0 auto;box-shadow:0 0 6px rgba(0,0,0,.2);width:550px;height:auto;border:1px solid;}#help dt{float:left;clear:left;display:block;margin-right:0.5rem;}#help>div>span{text-align:center;display:block;margin:10px 0;font-size:18px;border-bottom:1px solid #ccc;padding-bottom:4px;margin-bottom:6px;}#help dd{margin:5px 35px;}#help .infos{padding-left:0;}#help h1,#help h2{margin-top:0;}#help>div div{width:50%;float:left;padding:0 20px 20px 17px;;}.stab{display:table;border-width:1px;border-style:solid;padding:3px;margin-bottom:5px;font-size:90%;}.stab p{display:inline;}.stab summary{display:list-item;}.stab .emoji{font-size:1.5em;}.emoji{text-shadow:1px 0 0 black,-1px 0 0 black,0 1px 0 black,0 -1px 0 black;}.module-item .stab,.import-item .stab{border-radius:3px;display:inline-block;font-size:80%;line-height:1.2;margin-bottom:0;margin-right:.3em;padding:2px;vertical-align:text-bottom;}.module-item.unstable,.import-item.unstable{opacity:0.65;}.since{font-weight:normal;font-size:initial;position:absolute;right:0;top:0;}.impl-items .since,.impl .since,.methods .since{flex-grow:0;padding-left:12px;padding-right:6px;position:initial;}.impl-items .srclink,.impl .srclink,.methods .srclink{flex-grow:0;font-size:17px;font-weight:normal;}.impl-items code,.impl code,.methods code{flex-grow:1;}.has-srclink{display:flex;flex-basis:100%;font-size:16px;margin-bottom:12px;justify-content:space-between;}.variants_table{width:100%;}.variants_table tbody tr td:first-child{width:1%;}td.summary-column{width:100%;}.summary{padding-right:0px;}pre.rust .question-mark{font-weight:bold;}a.test-arrow{display:inline-block;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:130%;top:5px;right:5px;z-index:1;}a.test-arrow:hover{text-decoration:none;}.section-header:hover a:before{position:absolute;left:-25px;padding-right:10px;content:'\2002\00a7\2002';}.section-header:hover a{text-decoration:none;}.section-header a{color:inherit;}.code-attribute{font-weight:300;}.since+.srclink{display:table-cell;padding-left:10px;}.item-spacer{width:100%;height:12px;}.out-of-band>span.since{position:initial;font-size:20px;margin-right:5px;}.sub-variant,.sub-variant>h3{margin-top:0px !important;padding-top:1px;}#main>details>.sub-variant>h3{font-size:15px;margin-left:25px;margin-bottom:5px;}.sub-variant>div{margin-left:20px;margin-bottom:10px;}.sub-variant>div>span{display:block;position:relative;}.toggle-label{display:inline-block;margin-left:4px;margin-top:3px;}.docblock>.section-header:first-child{margin-left:15px;margin-top:0;}.docblock>.section-header:first-child:hover>a:before{left:-10px;}#main>.variant,#main>.structfield{display:block;}:target>code,:target>.code-header{opacity:1;}.information{position:absolute;left:-25px;margin-top:7px;z-index:1;}.tooltip{position:relative;display:inline-block;cursor:pointer;}.tooltip::after{display:none;text-align:center;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;font-size:16px;}.tooltip.ignore::after{content:"This example is not tested";}.tooltip.compile_fail::after{content:"This example deliberately fails to compile";}.tooltip.should_panic::after{content:"This example panics";}.tooltip.edition::after{content:"This code runs with edition " attr(data-edition);}.tooltip::before{content:" ";position:absolute;top:50%;left:16px;margin-top:-5px;border-width:5px;border-style:solid;display:none;}.tooltip:hover::before,.tooltip:hover::after{display:inline;}.tooltip.compile_fail,.tooltip.should_panic,.tooltip.ignore{font-weight:bold;font-size:20px;}.notable-traits-tooltip{display:inline-block;cursor:pointer;}.notable-traits:hover .notable-traits-tooltiptext,.notable-traits .notable-traits-tooltiptext.force-tooltip{display:inline-block;}.notable-traits .notable-traits-tooltiptext{display:none;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;z-index:10;font-size:16px;cursor:default;position:absolute;border:1px solid;}.notable-traits-tooltip::after{content:"\00a0\00a0\00a0";}.notable-traits .notable,.notable-traits .docblock{margin:0;}.notable-traits .notable{margin:0;margin-bottom:13px;font-size:19px;font-weight:600;}.notable-traits .docblock code.content{margin:0;padding:0;font-size:20px;}pre.rust.rust-example-rendered{position:relative;}pre.rust{tab-size:4;-moz-tab-size:4;}.search-failed{text-align:center;margin-top:20px;display:none;}.search-failed.active{display:block;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#titles{height:35px;}#titles>button{float:left;width:33.3%;text-align:center;font-size:18px;cursor:pointer;border:0;border-top:2px solid;}#titles>button:not(:last-child){margin-right:1px;width:calc(33.3% - 1px);}#titles>button>div.count{display:inline-block;font-size:16px;}.notable-traits{cursor:pointer;z-index:2;margin-left:5px;}#all-types{text-align:center;border:1px solid;margin:0 10px;margin-bottom:10px;display:block;border-radius:7px;}#all-types>p{margin:5px 0;}#sidebar-toggle{position:fixed;top:30px;left:300px;z-index:10;padding:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;cursor:pointer;font-weight:bold;transition:left .5s;font-size:1.2em;border:1px solid;border-left:0;}#source-sidebar{position:fixed;top:0;bottom:0;left:0;width:300px;z-index:1;overflow:auto;transition:left .5s;border-right:1px solid;}#source-sidebar>.title{font-size:1.5em;text-align:center;border-bottom:1px solid;margin-bottom:6px;}.theme-picker{position:absolute;left:211px;top:19px;}.theme-picker button{outline:none;}#settings-menu,#help-button{position:absolute;top:10px;}#settings-menu{right:0;outline:none;}#theme-picker,#settings-menu,#help-button,#copy-path{padding:4px;width:27px;height:29px;border:1px solid;border-radius:3px;cursor:pointer;}#help-button{right:30px;font-family:"Fira Sans",Arial,sans-serif;text-align:center;font-size:17px;padding-top:2px;}#copy-path{background:initial;margin-left:10px;padding:0;padding-left:2px;border:0;}#theme-choices{display:none;position:absolute;left:0;top:28px;border:1px solid;border-radius:3px;z-index:1;cursor:pointer;}#theme-choices>button{border:none;width:100%;padding:4px 8px;text-align:center;background:rgba(0,0,0,0);}#theme-choices>button:not(:first-child){border-top:1px solid;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px;border-radius:3px;box-shadow:inset 0 -1px 0;cursor:default;}.hidden-by-impl-hider,.hidden-by-usual-hider{display:none !important;}#implementations-list>h3>span.in-band{width:100%;}.table-display{width:100%;border:0;border-collapse:collapse;border-spacing:0;font-size:16px;}.table-display tr td:first-child{padding-right:0;}.table-display tr td:last-child{float:right;}.table-display .out-of-band{position:relative;font-size:19px;display:block;}#implementors-list>.impl-items .table-display .out-of-band{font-size:17px;}.table-display td:hover .anchor{display:block;top:2px;left:-5px;}#main>ul{padding-left:10px;}#main>ul>li{list-style:none;}.non-exhaustive{margin-bottom:1em;}div.children{padding-left:27px;display:none;}div.name{cursor:pointer;position:relative;margin-left:16px;}div.files>a{display:block;padding:0 3px;}div.files>a:hover,div.name:hover{background-color:#a14b4b;}div.name.expand+.children{display:block;}div.name::before{content:"\25B6";padding-left:4px;font-size:0.7em;position:absolute;left:-16px;top:4px;}div.name.expand::before{transform:rotate(90deg);left:-15px;top:2px;}details.rustdoc-toggle>summary.hideme{cursor:pointer;}details.rustdoc-toggle>summary,details.undocumented>summary{list-style:none;}details.rustdoc-toggle>summary::-webkit-details-marker,details.rustdoc-toggle>summary::marker,details.undocumented>summary::-webkit-details-marker,details.undocumented>summary::marker{display:none;}details.rustdoc-toggle>summary.hideme>span{margin-left:9px;}details.rustdoc-toggle>summary::before{content:"[+]";font-weight:300;font-size:0.8em;letter-spacing:1px;cursor:pointer;}details.rustdoc-toggle.top-doc>summary,details.rustdoc-toggle.top-doc>summary::before,details.rustdoc-toggle.non-exhaustive>summary,details.rustdoc-toggle.non-exhaustive>summary::before{font-family:'Fira Sans';font-size:16px;}details.non-exhaustive{margin-bottom:8px;}details.rustdoc-toggle>summary.hideme::before{position:relative;}details.rustdoc-toggle>summary:not(.hideme)::before{position:absolute;left:-23px;top:3px;}.impl-items>details.rustdoc-toggle>summary:not(.hideme)::before,.undocumented>details.rustdoc-toggle>summary:not(.hideme)::before{position:absolute;left:-2px;}details.rustdoc-toggle[open] >summary.hideme{position:absolute;}details.rustdoc-toggle,details.undocumented{position:relative;}details.rustdoc-toggle[open] >summary.hideme>span{display:none;}details.rustdoc-toggle[open] >summary::before{content:"[−]";display:inline;}details.undocumented>summary::before{content:"[+] Show hidden undocumented items";cursor:pointer;font-size:16px;font-weight:300;}details.undocumented[open] >summary::before{content:"[−] Hide undocumented items";}@media (min-width:701px){.docblock>.information:first-child>.tooltip{margin-top:16px;}}@media (max-width:700px){body{padding-top:0px;}.rustdoc>.sidebar{height:45px;min-height:40px;margin:0;margin-left:-15px;padding:0 15px;position:static;z-index:11;}.sidebar>.location{float:right;margin:0px;margin-top:2px;padding:3px 10px 1px 10px;min-height:39px;background:inherit;text-align:left;font-size:24px;}.sidebar .location:empty{padding:0;}.sidebar .logo-container{width:35px;height:35px;margin-top:5px;margin-bottom:5px;float:left;margin-left:50px;}.sidebar .logo-container>img{max-width:35px;max-height:35px;}.sidebar-menu{position:fixed;z-index:10;font-size:2rem;cursor:pointer;width:45px;left:0;text-align:center;display:block;border-bottom:1px solid;border-right:1px solid;height:45px;}.rustdoc.source>.sidebar>.sidebar-menu{display:none;}.sidebar-elems{position:fixed;z-index:1;top:45px;bottom:0;width:246px;left:-246px;overflow-y:auto;border-right:1px solid;}.sidebar>.block.version{border-bottom:none;margin-top:12px;margin-bottom:0;}nav.sub{width:calc(100% - 32px);float:right;}.content{margin-left:0px;}#main,#search{margin-top:45px;padding:0;}#search{margin-left:0;}.content .impl-items .method,.content .impl-items>.type,.impl-items>.associatedconstant,.impl-items>.associatedtype{display:flex;}.anchor{display:none !important;}.theme-picker{left:10px;top:54px;z-index:1;}.notable-traits{position:absolute;left:-22px;top:24px;}#titles>button>div.count{float:left;width:100%;}#titles{height:50px;}.sidebar.mobile{position:fixed;width:100%;margin-left:0;background-color:rgba(0,0,0,0);height:100%;}.sidebar.mobile>div.version{overflow:hidden;max-height:33px;}.sidebar{width:calc(100% + 30px);}.show-it{left:0;}.show-it>.block.items{margin:8px 0;}.show-it>.block.items>ul{margin:0;}.show-it>.block.items>ul>li{text-align:center;margin:2px 0;}.show-it>.block.items>ul>li>a{font-size:21px;}#sidebar-filler{position:fixed;left:45px;width:calc(100% - 45px);top:0;height:45px;z-index:-1;border-bottom:1px solid;}#main>details.rustdoc-toggle>summary::before,#main>div>details.rustdoc-toggle>summary::before{left:-11px;}#all-types{margin:10px;}#sidebar-toggle{top:100px;width:30px;font-size:1.5rem;text-align:center;padding:0;}#source-sidebar{z-index:11;}#main>.line-numbers{margin-top:0;}.notable-traits .notable-traits-tooltiptext{left:0;top:100%;}#help-button{display:none;}.search-container>div{width:calc(100% - 32px);}.search-results>a{border-bottom:1px solid #aaa9;padding:5px 0px;}.search-results .result-name,.search-results div.desc,.search-results .result-description{width:100%;}.search-results div.desc,.search-results .result-description{padding-left:2em;}}@media print{nav.sub,.content .out-of-band{display:none;}}@media (max-width:464px){#titles,#titles>button{height:73px;}#main,#search{margin-top:100px;}#main>table:not(.table-display) td{word-break:break-word;width:50%;}.search-container>div{display:block;width:calc(100% - 37px);}#crate-search{width:100%;border-radius:4px;border:0;}#crate-search+.search-input{width:calc(100% + 71px);margin-left:-36px;}#theme-picker,#settings-menu{padding:5px;width:31px;height:31px;}#theme-picker{margin-top:-2px;}#settings-menu{top:7px;}.docblock{margin-left:12px;}} |
@@ -1,6 +0,4 @@ | ||
| var N=null,E="",T="t",U="u",searchIndex={}; | ||
| var R=["deltae","labvalue","valueresult","lchvalue","round_to","to_vec","xyzvalue","to_lab","result","to_string","to_owned","clone_into","try_from","borrow_mut","try_into","deltae::color","type_id","string","borrow","typeid","demethod","default","formatter","from_str","DEMethod","LabValue","LchValue","XyzValue","ValueError","Calculate Delta E (color difference) between two colors in…","Parse a value from a string","The associated error which can be returned from parsing.","Parses a string `s` to return a value of this type.","Manipulate and convert CIE L*a*b* and Lch colors.","OutOfBounds","BadFormat","ValueResult","New `LabValue` from 3 `f64`s","Convert `LabValue` to `LchValue`","hue_radians","Round `LabValue` to nearest decimal places.","Returns an array of [L, a, b]","Returns a `Vec<f64>` of [L, a, b]","New `LchValue` from 3 `f64`s","Convert `LchValue` to `LabValue`","Round `LchValue` to nearest decimal places.","Returns an array of [L, c, h]","Returns a `Vec<f64>` of [L, c, h]","New `XyzValue` from 3 `f64`s","New `DeltaE` from `LabValues` and `DEMethod`.","Round `DeltaE` value and its components to nearest decimal…","Parse `DeltaE` from `&str`'s","New `LabValue` from `&str`","New `LchValue` from `&str`","New `XyzValue` from `&str`","Parse `DEMethod` from `&str`. Always returns `Ok()`.…","description","Lightness","CIE94 DeltaE implementation, weighted with a tolerance for…","valueerror","validate","ordering","Calculate DeltaE between 2 types ``` use deltae::*;","Validate","DE1994T"]; | ||
| searchIndex["deltae"]={"doc":R[29],"i":[[3,R[25],R[0],"CIEL*a*b*",N,N],[12,"l",E,R[57],0,N],[12,"a",E,"Green - Magenta",0,N],[12,"b",E,"Blue - Yellow",0,N],[3,R[26],E,"Lch: Luminance, Chroma, Hue",N,N],[12,"l",E,R[57],1,N],[12,"c",E,"Chroma",1,N],[12,"h",E,"Hue (in degrees)",1,N],[3,R[27],E,"XYZ",N,N],[12,"x",E,"X Value",2,N],[12,"y",E,"Y Value",2,N],[12,"z",E,"Z Value",2,N],[3,"DeltaE",E,"The measured difference between two colors",N,N],[12,"method",E,"The mathematical method used for calculating color…",3,N],[12,"value",E,"The calculated value",3,N],[4,R[28],E,"Value validation Error type",N,N],[13,R[34],E,"The value is outside the acceptable range",4,N],[13,R[35],E,"The value is formatted incorrectly",4,N],[4,R[24],E,"The most common DeltaE methods",N,N],[13,"DE2000",E,"The default DeltaE method",5,N],[13,"DECMC",E,"An implementation of DeltaE with tolerances for Lightness…",5,N],[13,"DE1994G",E,R[58],5,N],[13,R[64],E,R[58],5,N],[13,"DE1976",E,"The original DeltaE implementation, a basic euclidian…",5,N],[11,"new",E,"Returns a result of a LabValue from 3 `f32`s. Will return…",0,[[["f32"]],[[R[59]],[R[8],[R[1],R[59]]],[R[1]]]]],[11,"new",E,"Returns a result of an LchValue from 3 `f32`s. Will return…",1,[[["f32"]],[[R[8],[R[3],R[59]]],[R[3]],[R[59]]]]],[11,R[39],E,"Returns the Hue as radians rather than degrees",1,[[["self"]],["f32"]]],[11,"new",E,"Returns a result of an XyzValue from 3 `f32`s. Will return…",2,[[["f32"]],[[R[59]],[R[6]],[R[8],[R[6],R[59]]]]]],[17,"DECMC1",E,"DeltaE CMC (1:1)",N,N],[17,"DECMC2",E,"DeltaE CMC (2:1)",N,N],[8,"Delta",E,"Trait to determine color difference between various types.…",N,N],[11,"delta",E,R[62],6,[[[R[20]],["into",[R[1]]],[R[1]]],[R[0]]]],[8,"Round",E,"Trait for rounding values to a number of decimal places",N,N],[10,R[4],E,"Rounds the value to a number of decimal places",7,[[["i32"]],["self"]]],[8,R[63],E,"Trait to validate whether a type has appropriate values",N,N],[10,R[60],E,"Return `Err()` if the values are invalid",8,[[],[[R[59]],[R[8],[R[59]]]]]],[11,"new",E,"New `DeltaE` from colors and `DEMethod`.",3,[[["a"],[R[20]],["b"]],[R[0]]]],[11,"from",E,E,0,[[[T]],[T]]],[11,R[9],E,E,0,[[["self"]],[R[17]]]],[11,R[10],E,E,0,[[["self"]],[T]]],[11,R[11],E,E,0,[[["self"],[T]]]],[11,"into",E,E,0,[[],[U]]],[11,R[12],E,E,0,[[[U]],[R[8]]]],[11,R[14],E,E,0,[[],[R[8]]]],[11,R[18],E,E,0,[[["self"]],[T]]],[11,R[13],E,E,0,[[["self"]],[T]]],[11,R[16],E,E,0,[[["self"]],[R[19]]]],[11,"from",E,E,1,[[[T]],[T]]],[11,R[9],E,E,1,[[["self"]],[R[17]]]],[11,R[10],E,E,1,[[["self"]],[T]]],[11,R[11],E,E,1,[[["self"],[T]]]],[11,"into",E,E,1,[[],[U]]],[11,R[12],E,E,1,[[[U]],[R[8]]]],[11,R[14],E,E,1,[[],[R[8]]]],[11,R[18],E,E,1,[[["self"]],[T]]],[11,R[13],E,E,1,[[["self"]],[T]]],[11,R[16],E,E,1,[[["self"]],[R[19]]]],[11,"from",E,E,2,[[[T]],[T]]],[11,R[9],E,E,2,[[["self"]],[R[17]]]],[11,R[10],E,E,2,[[["self"]],[T]]],[11,R[11],E,E,2,[[["self"],[T]]]],[11,"into",E,E,2,[[],[U]]],[11,R[12],E,E,2,[[[U]],[R[8]]]],[11,R[14],E,E,2,[[],[R[8]]]],[11,R[18],E,E,2,[[["self"]],[T]]],[11,R[13],E,E,2,[[["self"]],[T]]],[11,R[16],E,E,2,[[["self"]],[R[19]]]],[11,"from",E,E,3,[[[T]],[T]]],[11,R[9],E,E,3,[[["self"]],[R[17]]]],[11,R[10],E,E,3,[[["self"]],[T]]],[11,R[11],E,E,3,[[["self"],[T]]]],[11,"into",E,E,3,[[],[U]]],[11,R[12],E,E,3,[[[U]],[R[8]]]],[11,R[14],E,E,3,[[],[R[8]]]],[11,R[18],E,E,3,[[["self"]],[T]]],[11,R[13],E,E,3,[[["self"]],[T]]],[11,R[16],E,E,3,[[["self"]],[R[19]]]],[11,"from",E,E,4,[[[T]],[T]]],[11,R[9],E,E,4,[[["self"]],[R[17]]]],[11,"into",E,E,4,[[],[U]]],[11,R[12],E,E,4,[[[U]],[R[8]]]],[11,R[14],E,E,4,[[],[R[8]]]],[11,R[18],E,E,4,[[["self"]],[T]]],[11,R[13],E,E,4,[[["self"]],[T]]],[11,R[16],E,E,4,[[["self"]],[R[19]]]],[11,"from",E,E,5,[[[T]],[T]]],[11,R[9],E,E,5,[[["self"]],[R[17]]]],[11,R[10],E,E,5,[[["self"]],[T]]],[11,R[11],E,E,5,[[["self"],[T]]]],[11,"into",E,E,5,[[],[U]]],[11,R[12],E,E,5,[[[U]],[R[8]]]],[11,R[14],E,E,5,[[],[R[8]]]],[11,R[18],E,E,5,[[["self"]],[T]]],[11,R[13],E,E,5,[[["self"]],[T]]],[11,R[16],E,E,5,[[["self"]],[R[19]]]],[11,R[4],E,E,3,[[["i32"]],["self"]]],[11,R[4],E,E,0,[[["i32"]],[R[1]]]],[11,R[4],E,E,1,[[["i32"]],[R[3]]]],[11,R[4],E,E,2,[[["i32"]],[R[6]]]],[11,R[60],E,E,0,[[],[[R[59]],[R[8],[R[59]]]]]],[11,R[60],E,E,1,[[],[[R[59]],[R[8],[R[59]]]]]],[11,R[60],E,E,2,[[],[[R[59]],[R[8],[R[59]]]]]],[11,"from",E,E,0,[[[R[3]]],[R[1]]]],[11,"from",E,E,0,[[[R[3]]],[R[1]]]],[11,"from",E,E,0,[[[R[1]]],[R[1]]]],[11,"from",E,E,0,[[[R[6]]],[R[1]]]],[11,"from",E,E,0,[[[R[6]]],[R[1]]]],[11,"from",E,E,1,[[[R[3]]],[R[3]]]],[11,"from",E,E,1,[[[R[1]]],[R[3]]]],[11,"from",E,E,1,[[[R[1]]],[R[3]]]],[11,"from",E,E,1,[[[R[6]]],[R[3]]]],[11,"from",E,E,1,[[[R[6]]],[R[3]]]],[11,"from",E,E,2,[[[R[1]]],[R[6]]]],[11,"from",E,E,2,[[[R[6]]],[R[6]]]],[11,"from",E,E,2,[[[R[1]]],[R[6]]]],[11,"from",E,E,2,[[[R[3]]],[R[6]]]],[11,"from",E,E,2,[[[R[3]]],[R[6]]]],[11,"partial_cmp",E,E,3,[[["self"]],[[R[61]],["option",[R[61]]]]]],[11,R[21],E,E,0,[[],[R[1]]]],[11,R[21],E,E,1,[[],[R[3]]]],[11,R[21],E,E,2,[[],[R[6]]]],[11,R[21],E,E,5,[[],[R[20]]]],[11,"clone",E,E,0,[[["self"]],[R[1]]]],[11,"clone",E,E,1,[[["self"]],[R[3]]]],[11,"clone",E,E,2,[[["self"]],[R[6]]]],[11,"clone",E,E,3,[[["self"]],[R[0]]]],[11,"clone",E,E,5,[[["self"]],[R[20]]]],[11,"eq",E,E,0,[[["self"],[T]],["bool"]]],[11,"eq",E,E,1,[[["self"],[T]],["bool"]]],[11,"eq",E,E,2,[[["self"],[T]],["bool"]]],[11,"eq",E,E,3,[[["self"],[R[0]]],["bool"]]],[11,"ne",E,E,3,[[["self"],[R[0]]],["bool"]]],[11,"eq",E,E,3,[[["self"],["f32"]],["bool"]]],[11,"eq",E,E,5,[[["self"],[R[20]]],["bool"]]],[11,"ne",E,E,5,[[["self"],[R[20]]],["bool"]]],[11,"fmt",E,E,0,[[["self"],[R[22]]],[R[8]]]],[11,"fmt",E,E,1,[[["self"],[R[22]]],[R[8]]]],[11,"fmt",E,E,2,[[["self"],[R[22]]],[R[8]]]],[11,"fmt",E,E,4,[[["self"],[R[22]]],[R[8]]]],[11,"fmt",E,E,3,[[["self"],[R[22]]],[R[8]]]],[11,"fmt",E,E,5,[[["self"],[R[22]]],[R[8]]]],[11,"fmt",E,E,0,[[["self"],[R[22]]],[R[8]]]],[11,"fmt",E,E,1,[[["self"],[R[22]]],[R[8]]]],[11,"fmt",E,E,2,[[["self"],[R[22]]],[R[8]]]],[11,"fmt",E,E,4,[[["self"],[R[22]]],[R[8]]]],[11,"fmt",E,E,3,[[["self"],[R[22]]],[R[8]]]],[11,"fmt",E,E,5,[[["self"],[R[22]]],[R[8]]]],[11,R[23],E,E,5,[[["str"]],[[R[20]],[R[8],[R[20]]]]]],[11,R[23],E,E,0,[[["str"]],[[R[59]],[R[8],[R[1],R[59]]],[R[1]]]]],[11,R[23],E,E,1,[[["str"]],[[R[8],[R[3],R[59]]],[R[3]],[R[59]]]]],[11,R[23],E,E,2,[[["str"]],[[R[59]],[R[6]],[R[8],[R[6],R[59]]]]]],[11,R[12],E,E,0,[[],[[R[59]],[R[8],[R[1],R[59]]],[R[1]]]]],[11,R[12],E,E,0,[[],[[R[59]],[R[8],[R[1],R[59]]],[R[1]]]]],[11,R[12],E,E,0,[[],[[R[59]],[R[8],[R[1],R[59]]],[R[1]]]]],[11,R[12],E,E,1,[[],[[R[8],[R[3],R[59]]],[R[3]],[R[59]]]]],[11,R[12],E,E,1,[[],[[R[8],[R[3],R[59]]],[R[3]],[R[59]]]]],[11,R[12],E,E,1,[[],[[R[8],[R[3],R[59]]],[R[3]],[R[59]]]]],[11,R[12],E,E,2,[[],[[R[59]],[R[6]],[R[8],[R[6],R[59]]]]]],[11,R[12],E,E,2,[[],[[R[59]],[R[6]],[R[8],[R[6],R[59]]]]]],[11,R[12],E,E,2,[[],[[R[59]],[R[6]],[R[8],[R[6],R[59]]]]]],[11,R[56],E,E,4,[[["self"]],["str"]]],[11,"delta",E,R[62],6,[[[R[20]],["into",[R[1]]],[R[1]]],[R[0]]]]],"p":[[3,R[25]],[3,R[26]],[3,R[27]],[3,"DeltaE"],[4,R[28]],[4,R[24]],[8,"Delta"],[8,"Round"],[8,R[63]]]}; | ||
| searchIndex[R[0]]={"doc":R[29],"i":[[8,"FromStr",R[0],R[30],N,N],[16,"Err",E,R[31],0,N],[10,R[23],E,R[32],0,[[["str"]],[R[8]]]],[3,"DeltaE",E,E,N,N],[12,"method",E,E,1,N],[12,"value",E,E,1,N],[12,"color0",E,E,1,N],[12,"color1",E,E,1,N],[4,R[24],E,E,N,N],[13,"DE2000",E,E,2,N],[13,"DE1994",E,E,2,N],[13,R[64],E,E,2,N],[13,"DE1976",E,E,2,N],[13,"DECMC1",E,E,2,N],[13,"DECMC2",E,E,2,N],[0,"color",E,R[33],N,N],[3,R[25],R[15],E,N,N],[12,"l",E,E,3,N],[12,"a",E,E,3,N],[12,"b",E,E,3,N],[3,R[26],E,E,N,N],[12,"l",E,E,4,N],[12,"c",E,E,4,N],[12,"h",E,E,4,N],[3,R[27],E,E,N,N],[12,"x",E,E,5,N],[12,"y",E,E,5,N],[12,"z",E,E,5,N],[4,R[28],E,E,N,N],[13,R[34],E,E,6,N],[13,R[35],E,E,6,N],[6,R[36],E,E,N,N],[11,"new",E,R[37],3,[[["f64"],["f64"],["f64"]],[R[2],[R[1]]]]],[11,"to_lch",E,R[38],3,[[["self"]],[R[3]]]],[11,"chroma",E,E,3,[[["self"]],["f64"]]],[11,"hue",E,E,3,[[["self"]],["f64"]]],[11,R[39],E,E,3,[[["self"]],["f64"]]],[11,"to_xyz",E,E,3,[[["self"]],[R[6]]]],[11,R[4],E,R[40],3,[[["self"],["i32"]],[R[1]]]],[11,"to_a",E,R[41],3,N],[11,R[5],E,R[42],3,[[["self"]],["vec",["f64"]]]],[11,"new",E,R[43],4,[[["f64"],["f64"],["f64"]],[R[2],[R[3]]]]],[11,R[7],E,R[44],4,[[["self"]],[R[1]]]],[11,R[4],E,R[45],4,[[["self"],["i32"]],[R[3]]]],[11,"to_a",E,R[46],4,N],[11,R[5],E,R[47],4,[[["self"]],["vec",["f64"]]]],[11,"new",E,R[48],5,[[["f64"],["f64"],["f64"]],[R[2],[R[6]]]]],[11,R[7],E,E,5,[[["self"]],[R[1]]]],[11,R[4],E,E,5,[[["self"],["i32"]],[R[6]]]],[11,"new",R[0],R[49],1,[[[R[1]],[R[1]],[R[20]]],[R[0]]]],[11,R[4],E,R[50],1,[[["self"],["i32"]],["self"]]],[11,"from",E,R[51],1,[[["str"],["str"],["str"]],[R[2],[R[0]]]]],[11,R[9],E,E,1,[[["self"]],[R[17]]]],[11,"from",E,E,1,[[[T]],[T]]],[11,"into",E,E,1,[[["self"]],[U]]],[11,R[10],E,E,1,[[["self"]],[T]]],[11,R[11],E,E,1,N],[11,R[12],E,E,1,[[[U]],[R[8]]]],[11,R[18],E,E,1,[[["self"]],[T]]],[11,R[16],E,E,1,[[["self"]],[R[19]]]],[11,R[13],E,E,1,[[["self"]],[T]]],[11,R[14],E,E,1,[[["self"]],[R[8]]]],[11,R[9],E,E,2,[[["self"]],[R[17]]]],[11,"from",E,E,2,[[[T]],[T]]],[11,"into",E,E,2,[[["self"]],[U]]],[11,R[10],E,E,2,[[["self"]],[T]]],[11,R[11],E,E,2,N],[11,R[12],E,E,2,[[[U]],[R[8]]]],[11,R[18],E,E,2,[[["self"]],[T]]],[11,R[16],E,E,2,[[["self"]],[R[19]]]],[11,R[13],E,E,2,[[["self"]],[T]]],[11,R[14],E,E,2,[[["self"]],[R[8]]]],[11,R[9],R[15],E,3,[[["self"]],[R[17]]]],[11,"from",E,E,3,[[[T]],[T]]],[11,"into",E,E,3,[[["self"]],[U]]],[11,R[10],E,E,3,[[["self"]],[T]]],[11,R[11],E,E,3,N],[11,R[12],E,E,3,[[[U]],[R[8]]]],[11,R[18],E,E,3,[[["self"]],[T]]],[11,R[16],E,E,3,[[["self"]],[R[19]]]],[11,R[13],E,E,3,[[["self"]],[T]]],[11,R[14],E,E,3,[[["self"]],[R[8]]]],[11,R[9],E,E,4,[[["self"]],[R[17]]]],[11,"from",E,E,4,[[[T]],[T]]],[11,"into",E,E,4,[[["self"]],[U]]],[11,R[10],E,E,4,[[["self"]],[T]]],[11,R[11],E,E,4,N],[11,R[12],E,E,4,[[[U]],[R[8]]]],[11,R[18],E,E,4,[[["self"]],[T]]],[11,R[16],E,E,4,[[["self"]],[R[19]]]],[11,R[13],E,E,4,[[["self"]],[T]]],[11,R[14],E,E,4,[[["self"]],[R[8]]]],[11,R[9],E,E,5,[[["self"]],[R[17]]]],[11,"from",E,E,5,[[[T]],[T]]],[11,"into",E,E,5,[[["self"]],[U]]],[11,R[10],E,E,5,[[["self"]],[T]]],[11,R[11],E,E,5,N],[11,R[12],E,E,5,[[[U]],[R[8]]]],[11,R[18],E,E,5,[[["self"]],[T]]],[11,R[16],E,E,5,[[["self"]],[R[19]]]],[11,R[13],E,E,5,[[["self"]],[T]]],[11,R[14],E,E,5,[[["self"]],[R[8]]]],[11,R[9],E,E,6,[[["self"]],[R[17]]]],[11,"from",E,E,6,[[[T]],[T]]],[11,"into",E,E,6,[[["self"]],[U]]],[11,R[12],E,E,6,[[[U]],[R[8]]]],[11,R[18],E,E,6,[[["self"]],[T]]],[11,R[16],E,E,6,[[["self"]],[R[19]]]],[11,R[13],E,E,6,[[["self"]],[T]]],[11,R[14],E,E,6,[[["self"]],[R[8]]]],[11,"eq",E,E,3,[[["self"],[R[1]]],["bool"]]],[11,"ne",E,E,3,[[["self"],[R[1]]],["bool"]]],[11,"eq",E,E,4,[[["self"],[R[3]]],["bool"]]],[11,"ne",E,E,4,[[["self"],[R[3]]],["bool"]]],[11,"eq",E,E,5,[[["self"],[R[6]]],["bool"]]],[11,"ne",E,E,5,[[["self"],[R[6]]],["bool"]]],[11,"eq",R[0],E,1,[[["self"],[R[0]]],["bool"]]],[11,"ne",E,E,1,[[["self"],[R[0]]],["bool"]]],[11,"eq",E,E,2,[[["self"],[R[20]]],["bool"]]],[11,R[21],R[15],E,3,[[],[R[1]]]],[11,R[21],E,E,4,[[],[R[3]]]],[11,R[21],E,E,5,[[],[R[6]]]],[11,R[21],R[0],E,2,[[],[R[20]]]],[11,"clone",R[15],E,3,[[["self"]],[R[1]]]],[11,"clone",E,E,4,[[["self"]],[R[3]]]],[11,"clone",E,E,5,[[["self"]],[R[6]]]],[11,"clone",R[0],E,1,[[["self"]],[R[0]]]],[11,"clone",E,E,2,[[["self"]],[R[20]]]],[11,"fmt",R[15],E,3,[[["self"],[R[22]]],[R[8]]]],[11,"fmt",E,E,4,[[["self"],[R[22]]],[R[8]]]],[11,"fmt",E,E,5,[[["self"],[R[22]]],[R[8]]]],[11,"fmt",E,E,6,[[["self"],[R[22]]],[R[8]]]],[11,"fmt",R[0],E,1,[[["self"],[R[22]]],[R[8]]]],[11,"fmt",E,E,2,[[["self"],[R[22]]],[R[8]]]],[11,"fmt",R[15],E,3,[[["self"],[R[22]]],[R[8]]]],[11,"fmt",E,E,4,[[["self"],[R[22]]],[R[8]]]],[11,"fmt",E,E,5,[[["self"],[R[22]]],[R[8]]]],[11,"fmt",E,E,6,[[["self"],[R[22]]],[R[8]]]],[11,"fmt",R[0],E,1,[[["self"],[R[22]]],[R[8]]]],[11,"fmt",E,E,2,[[["self"],[R[22]]],[R[8]]]],[11,R[23],R[15],R[52],3,[[["str"]],[R[2],[R[1]]]]],[11,R[23],E,R[53],4,[[["str"]],[R[2],[R[3]]]]],[11,R[23],E,R[54],5,[[["str"]],[R[2],[R[6]]]]],[11,R[23],R[0],R[55],2,[[["str"]],[R[8],[R[20]]]]],[11,R[56],R[15],E,6,[[["self"]],["str"]]]],"p":[[8,"FromStr"],[3,"DeltaE"],[4,R[24]],[3,R[25]],[3,R[26]],[3,R[27]],[4,R[28]]]}; | ||
| searchIndex[r_aa]={"doc":R[29],"i":[[8,r_Ga,r_aa,R[30],N,N],[16,"Err",E,R[31],0,N],[10,r_Ea,E,R[32],0,[[[r_Fa]],[r_ka]]],[3,r_Ha,E,E,N,N],[12,"method",E,E,1,N],[12,"value",E,E,1,N],[12,"color0",E,E,1,N],[12,"color1",E,E,1,N],[4,r_Ia,E,E,N,N],[13,"DE2000",E,E,2,N],[13,"DE1994",E,E,2,N],[13,R[64],E,E,2,N],[13,"DE1976",E,E,2,N],[13,"DECMC1",E,E,2,N],[13,"DECMC2",E,E,2,N],[0,"color",E,R[33],N,N],[3,r_Ja,r_wa,E,N,N],[12,"l",E,E,3,N],[12,"a",E,E,3,N],[12,"b",E,E,3,N],[3,r_Ka,E,E,N,N],[12,"l",E,E,4,N],[12,"c",E,E,4,N],[12,"h",E,E,4,N],[3,r_La,E,E,N,N],[12,"x",E,E,5,N],[12,"y",E,E,5,N],[12,"z",E,E,5,N],[4,r_Ma,E,E,N,N],[13,R[34],E,E,6,N],[13,R[35],E,E,6,N],[6,R[36],E,E,N,N],[11,"new",E,R[37],3,[[[r_ca],[r_ca],[r_ca]],[r_ea,[r_da]]]],[11,"to_lch",E,R[38],3,[[[r_ba]],[r_fa]]],[11,"chroma",E,E,3,[[[r_ba]],[r_ca]]],[11,"hue",E,E,3,[[[r_ba]],[r_ca]]],[11,R[39],E,E,3,[[[r_ba]],[r_ca]]],[11,"to_xyz",E,E,3,[[[r_ba]],[r_ia]]],[11,r_ga,E,R[40],3,[[[r_ba],["i32"]],[r_da]]],[11,"to_a",E,R[41],3,N],[11,r_ha,E,R[42],3,[[[r_ba]],["vec",[r_ca]]]],[11,"new",E,R[43],4,[[[r_ca],[r_ca],[r_ca]],[r_ea,[r_fa]]]],[11,r_ja,E,R[44],4,[[[r_ba]],[r_da]]],[11,r_ga,E,R[45],4,[[[r_ba],["i32"]],[r_fa]]],[11,"to_a",E,R[46],4,N],[11,r_ha,E,R[47],4,[[[r_ba]],["vec",[r_ca]]]],[11,"new",E,R[48],5,[[[r_ca],[r_ca],[r_ca]],[r_ea,[r_ia]]]],[11,r_ja,E,E,5,[[[r_ba]],[r_da]]],[11,r_ga,E,E,5,[[[r_ba],["i32"]],[r_ia]]],[11,"new",r_aa,R[49],1,[[[r_da],[r_da],[r_za]],[r_aa]]],[11,r_ga,E,R[50],1,[[[r_ba],["i32"]],[r_ba]]],[11,r_na,E,R[51],1,[[[r_Fa],[r_Fa],[r_Fa]],[r_ea,[r_aa]]]],[11,r_la,E,E,1,[[[r_ba]],[r_ma]]],[11,r_na,E,E,1,[[[T]],[T]]],[11,r_xa,E,E,1,[[[r_ba]],[U]]],[11,r_oa,E,E,1,[[[r_ba]],[T]]],[11,r_pa,E,E,1,N],[11,r_qa,E,E,1,[[[U]],[r_ka]]],[11,r_ra,E,E,1,[[[r_ba]],[T]]],[11,r_sa,E,E,1,[[[r_ba]],[r_ka]]],[11,r_ta,E,E,1,[[[r_ba]],[T]]],[11,r_ua,E,E,1,[[[r_ba]],[r_va]]],[11,r_la,E,E,2,[[[r_ba]],[r_ma]]],[11,r_na,E,E,2,[[[T]],[T]]],[11,r_xa,E,E,2,[[[r_ba]],[U]]],[11,r_oa,E,E,2,[[[r_ba]],[T]]],[11,r_pa,E,E,2,N],[11,r_qa,E,E,2,[[[U]],[r_ka]]],[11,r_ra,E,E,2,[[[r_ba]],[T]]],[11,r_sa,E,E,2,[[[r_ba]],[r_ka]]],[11,r_ta,E,E,2,[[[r_ba]],[T]]],[11,r_ua,E,E,2,[[[r_ba]],[r_va]]],[11,r_la,r_wa,E,3,[[[r_ba]],[r_ma]]],[11,r_na,E,E,3,[[[T]],[T]]],[11,r_xa,E,E,3,[[[r_ba]],[U]]],[11,r_oa,E,E,3,[[[r_ba]],[T]]],[11,r_pa,E,E,3,N],[11,r_qa,E,E,3,[[[U]],[r_ka]]],[11,r_ra,E,E,3,[[[r_ba]],[T]]],[11,r_sa,E,E,3,[[[r_ba]],[r_ka]]],[11,r_ta,E,E,3,[[[r_ba]],[T]]],[11,r_ua,E,E,3,[[[r_ba]],[r_va]]],[11,r_la,E,E,4,[[[r_ba]],[r_ma]]],[11,r_na,E,E,4,[[[T]],[T]]],[11,r_xa,E,E,4,[[[r_ba]],[U]]],[11,r_oa,E,E,4,[[[r_ba]],[T]]],[11,r_pa,E,E,4,N],[11,r_qa,E,E,4,[[[U]],[r_ka]]],[11,r_ra,E,E,4,[[[r_ba]],[T]]],[11,r_sa,E,E,4,[[[r_ba]],[r_ka]]],[11,r_ta,E,E,4,[[[r_ba]],[T]]],[11,r_ua,E,E,4,[[[r_ba]],[r_va]]],[11,r_la,E,E,5,[[[r_ba]],[r_ma]]],[11,r_na,E,E,5,[[[T]],[T]]],[11,r_xa,E,E,5,[[[r_ba]],[U]]],[11,r_oa,E,E,5,[[[r_ba]],[T]]],[11,r_pa,E,E,5,N],[11,r_qa,E,E,5,[[[U]],[r_ka]]],[11,r_ra,E,E,5,[[[r_ba]],[T]]],[11,r_sa,E,E,5,[[[r_ba]],[r_ka]]],[11,r_ta,E,E,5,[[[r_ba]],[T]]],[11,r_ua,E,E,5,[[[r_ba]],[r_va]]],[11,r_la,E,E,6,[[[r_ba]],[r_ma]]],[11,r_na,E,E,6,[[[T]],[T]]],[11,r_xa,E,E,6,[[[r_ba]],[U]]],[11,r_qa,E,E,6,[[[U]],[r_ka]]],[11,r_ra,E,E,6,[[[r_ba]],[T]]],[11,r_sa,E,E,6,[[[r_ba]],[r_ka]]],[11,r_ta,E,E,6,[[[r_ba]],[T]]],[11,r_ua,E,E,6,[[[r_ba]],[r_va]]],[11,r_ya,E,E,3,[[],[r_da]]],[11,r_ya,E,E,4,[[],[r_fa]]],[11,r_ya,E,E,5,[[],[r_ia]]],[11,r_ya,r_aa,E,2,[[],[r_za]]],[11,r_Aa,r_wa,E,3,[[[r_ba]],[r_da]]],[11,r_Aa,E,E,4,[[[r_ba]],[r_fa]]],[11,r_Aa,E,E,5,[[[r_ba]],[r_ia]]],[11,r_Aa,r_aa,E,1,[[[r_ba]],[r_aa]]],[11,r_Aa,E,E,2,[[[r_ba]],[r_za]]],[11,"eq",r_wa,E,3,[[[r_ba],[r_da]],[r_Ba]]],[11,"ne",E,E,3,[[[r_ba],[r_da]],[r_Ba]]],[11,"eq",E,E,4,[[[r_ba],[r_fa]],[r_Ba]]],[11,"ne",E,E,4,[[[r_ba],[r_fa]],[r_Ba]]],[11,"eq",E,E,5,[[[r_ba],[r_ia]],[r_Ba]]],[11,"ne",E,E,5,[[[r_ba],[r_ia]],[r_Ba]]],[11,"eq",r_aa,E,1,[[[r_ba],[r_aa]],[r_Ba]]],[11,"ne",E,E,1,[[[r_ba],[r_aa]],[r_Ba]]],[11,"eq",E,E,2,[[[r_ba],[r_za]],[r_Ba]]],[11,r_Da,r_wa,E,3,[[[r_ba],[r_Ca]],[r_ka]]],[11,r_Da,E,E,4,[[[r_ba],[r_Ca]],[r_ka]]],[11,r_Da,E,E,5,[[[r_ba],[r_Ca]],[r_ka]]],[11,r_Da,E,E,6,[[[r_ba],[r_Ca]],[r_ka]]],[11,r_Da,r_aa,E,1,[[[r_ba],[r_Ca]],[r_ka]]],[11,r_Da,E,E,2,[[[r_ba],[r_Ca]],[r_ka]]],[11,r_Da,r_wa,E,3,[[[r_ba],[r_Ca]],[r_ka]]],[11,r_Da,E,E,4,[[[r_ba],[r_Ca]],[r_ka]]],[11,r_Da,E,E,5,[[[r_ba],[r_Ca]],[r_ka]]],[11,r_Da,E,E,6,[[[r_ba],[r_Ca]],[r_ka]]],[11,r_Da,r_aa,E,1,[[[r_ba],[r_Ca]],[r_ka]]],[11,r_Da,E,E,2,[[[r_ba],[r_Ca]],[r_ka]]],[11,r_Ea,r_wa,R[52],3,[[[r_Fa]],[r_ea,[r_da]]]],[11,r_Ea,E,R[53],4,[[[r_Fa]],[r_ea,[r_fa]]]],[11,r_Ea,E,R[54],5,[[[r_Fa]],[r_ea,[r_ia]]]],[11,r_Ea,r_aa,R[55],2,[[[r_Fa]],[r_ka,[r_za]]]],[11,R[56],r_wa,E,6,[[[r_ba]],[r_Fa]]]],"p":[[8,r_Ga],[3,r_Ha],[4,r_Ia],[3,r_Ja],[3,r_Ka],[3,r_La],[4,r_Ma]]}; | ||
| initSearch(searchIndex);addSearchOptions(searchIndex); | ||
| var searchIndex = JSON.parse('{\ | ||
| "deltae":{"doc":"Calculate Delta E (color difference) between two colors …","t":[13,13,13,13,13,17,17,4,8,3,8,8,14,11,11,11,11,11,11,11,11,0,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,10,11,11,11,11,11,11,11,11,11,11,11,11,11,10,11,11,13,3,3,13,4,3,12,12,11,11,11,11,11,11,11,11,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,11,11,11,11,12,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,8,8,11,10],"n":["DE1976","DE1994G","DE1994T","DE2000","DECMC","DECMC1","DECMC2","DEMethod","Delta","DeltaE","Round","Validate","assert_delta_eq","borrow","borrow","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","color","default","delta","delta","eq","eq","eq","eq","fmt","fmt","fmt","fmt","from","from","from_str","into","into","method","ne","new","partial_cmp","reference","round_to","round_to","sample","to_owned","to_owned","to_string","to_string","tolerance","try_from","try_from","try_into","try_into","type_id","type_id","validate","value","with_method","BadFormat","LabValue","LchValue","OutOfBounds","ValueError","XyzValue","a","b","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","c","clone","clone","clone","clone_into","clone_into","clone_into","default","default","default","eq","eq","eq","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_str","from_str","from_str","h","hue_radians","into","into","into","into","l","l","ne","ne","ne","new","new","new","round_to","round_to","round_to","to_owned","to_owned","to_owned","to_string","to_string","to_string","to_string","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","validate","validate","validate","x","y","z","DeltaEq","Tolerance","delta_eq","tolerance"],"q":["deltae","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","deltae::color","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","deltae::eq","","",""],"d":["The original DeltaE implementation, a basic euclidian …","CIE94 DeltaE implementation, weighted with a tolerance …","CIE94 DeltaE implementation, weighted with a tolerance …","The default DeltaE method","An implementation of DeltaE with tolerances for Lightness …","DeltaE CMC (1:1)","DeltaE CMC (2:1)","The most common DeltaE methods","Trait to determine color difference between various types.…","The measured difference between two colors","Trait for rounding values to a number of decimal places","Trait to validate whether a type has appropriate values","Convenience macro for asserting two values are equivalent …","","","","","","","","","Manipulate and convert CIE L*a*b* and Lch colors.","","Calculate DeltaE between 2 types","Calculate DeltaE between 2 types","<code>Tolerance</code> and <code>DeltaEq</code> traits","","","","","","","","","","","","","Return a reference the [<code>DeltaE</code>] method used in the …","","New [<code>DeltaE</code>] from two colors and a [<code>DEMethod</code>].","","Return a reference to the reference [<code>LabValue</code>] used in …","Rounds the value to a number of decimal places","","Return a reference to the sample [<code>LabValue</code>] used in the …","","","","","","","","","","","","Return <code>Err()</code> if the values are invalid","Return a reference to the [<code>DeltaE</code>] value","Recalculate [<code>DeltaE</code>] with another [<code>DEMethod</code>]","The value is formatted incorrectly","CIEL*a*b*","Lch: Luminance, Chroma, Hue","The value is outside the acceptable range","Value validation Error type","CIE 1931 XYZ","Green - Magenta","Blue - Yellow","","","","","","","","","Chroma","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Hue (in degrees)","Returns the Hue as radians rather than degrees","","","","","Lightness","Lightness","","","","Returns a result of a LabValue from 3 <code>f32</code>s. Will return …","Returns a result of an LchValue from 3 <code>f32</code>s. Will return …","Returns a result of an XyzValue from 3 <code>f32</code>s. Will return …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","X Value","Y Value","Z Value","Trait to determine whether two values are within a …","Trait to define a tolerance value for the [<code>DeltaEq</code>] trait","Return true if the value is less than or equal to the […","Return a tolerance value"],"i":[1,1,1,1,1,0,0,0,0,0,0,0,0,2,1,2,1,2,1,2,1,0,1,3,3,0,2,2,1,2,2,1,1,2,1,1,2,1,2,1,2,2,2,4,2,2,2,1,2,1,2,2,1,2,1,2,1,5,2,2,6,0,0,6,0,0,7,7,7,8,9,6,7,8,9,6,8,7,8,9,7,8,9,7,8,9,7,8,9,7,7,8,8,9,9,6,6,7,7,7,7,7,7,8,8,8,8,8,9,9,9,9,9,6,7,8,9,8,8,7,8,9,6,7,8,7,8,9,7,8,9,7,8,9,7,8,9,7,8,9,6,7,7,7,7,8,8,8,8,9,9,9,9,6,7,8,9,6,7,8,9,6,7,8,9,9,9,9,0,0,10,11],"f":[null,null,null,null,null,null,null,null,null,null,null,null,null,[[]],[[]],[[]],[[]],[[],["deltae",3]],[[],["demethod",4]],[[]],[[]],null,[[],["demethod",4]],[[["into",8],["labvalue",3],["demethod",4]],["deltae",3]],[[["into",8],["labvalue",3],["demethod",4]],["deltae",3]],null,[[["f32",15]],["bool",15]],[[],["bool",15]],[[["demethod",4]],["bool",15]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[]],[[]],[[["str",15]],[["result",4],["demethod",4]]],[[]],[[]],[[],["demethod",4]],[[["demethod",4]],["bool",15]],[[["demethod",4]],["deltae",3]],[[],[["ordering",4],["option",4]]],[[],["labvalue",3]],[[["i32",15]]],[[["i32",15]]],[[],["labvalue",3]],[[]],[[]],[[],["string",3]],[[],["string",3]],[[],["f32",15]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[],["typeid",3]],[[],[["result",4],["valueerror",4]]],[[],["f32",15]],[[["demethod",4]]],null,null,null,null,null,null,null,null,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],null,[[],["labvalue",3]],[[],["lchvalue",3]],[[],["xyzvalue",3]],[[]],[[]],[[]],[[],["labvalue",3]],[[],["lchvalue",3]],[[],["xyzvalue",3]],[[["labvalue",3]],["bool",15]],[[["lchvalue",3]],["bool",15]],[[["xyzvalue",3]],["bool",15]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["lchvalue",3]],["labvalue",3]],[[]],[[["xyzvalue",3]],["labvalue",3]],[[["xyzvalue",3]],["labvalue",3]],[[["labvalue",3]],["labvalue",3]],[[["lchvalue",3]],["labvalue",3]],[[["xyzvalue",3]],["lchvalue",3]],[[["labvalue",3]],["lchvalue",3]],[[["labvalue",3]],["lchvalue",3]],[[["xyzvalue",3]],["lchvalue",3]],[[]],[[["lchvalue",3]],["xyzvalue",3]],[[["lchvalue",3]],["xyzvalue",3]],[[["labvalue",3]],["xyzvalue",3]],[[["labvalue",3]],["xyzvalue",3]],[[]],[[]],[[["str",15]],[["valueerror",4],["labvalue",3],["result",4]]],[[["str",15]],[["valueerror",4],["lchvalue",3],["result",4]]],[[["str",15]],[["valueerror",4],["result",4],["xyzvalue",3]]],null,[[],["f32",15]],[[]],[[]],[[]],[[]],null,null,[[["labvalue",3]],["bool",15]],[[["lchvalue",3]],["bool",15]],[[["xyzvalue",3]],["bool",15]],[[["f32",15]],[["valueerror",4],["labvalue",3],["result",4]]],[[["f32",15]],[["valueerror",4],["lchvalue",3],["result",4]]],[[["f32",15]],[["valueerror",4],["result",4],["xyzvalue",3]]],[[["i32",15]],["labvalue",3]],[[["i32",15]],["lchvalue",3]],[[["i32",15]],["xyzvalue",3]],[[]],[[]],[[]],[[],["string",3]],[[],["string",3]],[[],["string",3]],[[],["string",3]],[[],[["valueerror",4],["labvalue",3],["result",4]]],[[],["result",4]],[[],[["valueerror",4],["labvalue",3],["result",4]]],[[],[["valueerror",4],["labvalue",3],["result",4]]],[[],["result",4]],[[],[["valueerror",4],["lchvalue",3],["result",4]]],[[],[["valueerror",4],["lchvalue",3],["result",4]]],[[],[["valueerror",4],["lchvalue",3],["result",4]]],[[],["result",4]],[[],[["valueerror",4],["result",4],["xyzvalue",3]]],[[],[["valueerror",4],["result",4],["xyzvalue",3]]],[[],[["valueerror",4],["result",4],["xyzvalue",3]]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]],[[],[["result",4],["valueerror",4]]],[[],[["result",4],["valueerror",4]]],[[],[["result",4],["valueerror",4]]],null,null,null,null,null,[[["demethod",4],["tolerance",8]],["bool",15]],[[],["f32",15]]],"p":[[4,"DEMethod"],[3,"DeltaE"],[8,"Delta"],[8,"Round"],[8,"Validate"],[4,"ValueError"],[3,"LabValue"],[3,"LchValue"],[3,"XyzValue"],[8,"DeltaEq"],[8,"Tolerance"]]}\ | ||
| }'); | ||
| if (window.initSearch) {window.initSearch(searchIndex)}; |
@@ -1,1 +0,1 @@ | ||
| .setting-line{padding:5px;}.setting-line>div{max-width:calc(100% - 74px);display:inline-block;vertical-align:top;font-size:17px;padding-top:2px;}.toggle{position:relative;display:inline-block;width:45px;height:27px;margin-right:20px;}.toggle input{display:none;}.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.3s;transition:.3s;}.slider:before{position:absolute;content:"";height:19px;width:19px;left:4px;bottom:4px;background-color:white;-webkit-transition:.3s;transition:.3s;}input:checked+.slider{background-color:#2196F3;}input:focus+.slider{box-shadow:0 0 1px #2196F3;}input:checked+.slider:before{-webkit-transform:translateX(19px);-ms-transform:translateX(19px);transform:translateX(19px);} | ||
| .setting-line{padding:5px;position:relative;}.setting-line>div{display:inline-block;vertical-align:top;font-size:17px;padding-top:2px;}.setting-line>.title{font-size:19px;width:100%;max-width:none;border-bottom:1px solid;}.toggle{position:relative;display:inline-block;width:45px;height:27px;margin-right:20px;}.toggle input{opacity:0;position:absolute;}.select-wrapper{float:right;position:relative;height:27px;min-width:25%;}.select-wrapper select{appearance:none;-moz-appearance:none;-webkit-appearance:none;background:none;border:2px solid #ccc;padding-right:28px;width:100%;}.select-wrapper img{pointer-events:none;position:absolute;right:0;bottom:0;background:#ccc;height:100%;width:28px;padding:0px 4px;}.select-wrapper select option{color:initial;}.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.3s;transition:.3s;}.slider:before{position:absolute;content:"";height:19px;width:19px;left:4px;bottom:4px;background-color:white;-webkit-transition:.3s;transition:.3s;}input:checked+.slider{background-color:#2196F3;}input:focus+.slider{box-shadow:0 0 0 2px #0a84ff,0 0 0 6px rgba(10,132,255,0.3);}input:checked+.slider:before{-webkit-transform:translateX(19px);-ms-transform:translateX(19px);transform:translateX(19px);}.setting-line>.sub-settings{padding-left:42px;width:100%;display:block;} |
@@ -1,1 +0,4 @@ | ||
| <!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="Settings of Rustdoc"><meta name="keywords" content="rust, rustlang, rust-lang"><title>Rustdoc settings</title><link rel="stylesheet" type="text/css" href="./normalize.css"><link rel="stylesheet" type="text/css" href="./rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="./settings.css"><link rel="stylesheet" type="text/css" href="./dark.css"><link rel="stylesheet" type="text/css" href="./light.css" id="themeStyle"><script src="./storage.js"></script><noscript><link rel="stylesheet" href="./noscript.css"></noscript><link rel="shortcut icon" href="./favicon.ico"><style type="text/css">#crate-search{background-image:url("./down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='./deltae/index.html'><div class='logo-container'><img src='./rust-logo.png' alt='logo'></div></a><p class='location'>Settings</p><div class='sidebar-elems'></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="./brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="./theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><a id="settings-menu" href="./settings.html"><img src="./wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='in-band'>Rustdoc settings</span></h1><div class='settings'><div class='setting-line'><label class='toggle'><input type='checkbox' id='item-declarations' checked><span class='slider'></span></label><div>Auto-hide item declarations.</div></div><div class='setting-line'><label class='toggle'><input type='checkbox' id='item-attributes' checked><span class='slider'></span></label><div>Auto-hide item attributes.</div></div><div class='setting-line'><label class='toggle'><input type='checkbox' id='trait-implementations' checked><span class='slider'></span></label><div>Auto-hide trait implementations documentation</div></div><div class='setting-line'><label class='toggle'><input type='checkbox' id='method-docs' ><span class='slider'></span></label><div>Auto-hide item methods' documentation</div></div><div class='setting-line'><label class='toggle'><input type='checkbox' id='go-to-only-result' ><span class='slider'></span></label><div>Directly go to item in search if there is only one result</div></div><div class='setting-line'><label class='toggle'><input type='checkbox' id='line-numbers' ><span class='slider'></span></label><div>Show line numbers on code examples</div></div></div><script src='./settings.js'></script></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "./";window.currentCrate = "deltae";</script><script src="./aliases.js"></script><script src="./main.js"></script><script defer src="./search-index.js"></script></body></html> | ||
| <!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="Settings of Rustdoc"><meta name="keywords" content="rust, rustlang, rust-lang"><title>Rustdoc settings</title><link rel="stylesheet" type="text/css" href="./normalize.css"><link rel="stylesheet" type="text/css" href="./rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="./light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="./dark.css" disabled ><link rel="stylesheet" type="text/css" href="./ayu.css" disabled ><link rel="stylesheet" type="text/css" href="./settings.css" ><script id="default-settings"></script><script src="./storage.js"></script><script src="./crates.js"></script><noscript><link rel="stylesheet" href="./noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="./favicon.svg"> | ||
| <link rel="alternate icon" type="image/png" href="./favicon-16x16.png"> | ||
| <link rel="alternate icon" type="image/png" href="./favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("./down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='./deltae/index.html'><div class='logo-container rust-logo'><img src='./rust-logo.png' alt='logo'></div></a><h2 class="location">Settings</h2><div class="sidebar-elems"></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="./brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="./settings.html" title="settings"><img src="./wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Rustdoc settings</span></h1><div class="settings"><div class="setting-line"><div class="title">Theme preferences</div><div class="sub-settings"><div class="setting-line"><label class="toggle"><input type="checkbox" id="use-system-theme" checked><span class="slider"></span></label><div>Use system theme</div></div><div class="setting-line"><div>Preferred dark theme</div><label class="select-wrapper"><select id="preferred-dark-theme" autocomplete="off"><option value="light" >light</option><option value="dark" selected>dark</option><option value="ayu" >ayu</option></select><img src="./down-arrow.svg" alt="Select item"></label></div><div class="setting-line"><div>Preferred light theme</div><label class="select-wrapper"><select id="preferred-light-theme" autocomplete="off"><option value="light" selected>light</option><option value="dark" >dark</option><option value="ayu" >ayu</option></select><img src="./down-arrow.svg" alt="Select item"></label></div></div> | ||
| </div><div class="setting-line"><label class="toggle"><input type="checkbox" id="auto-hide-large-items" checked><span class="slider"></span></label><div>Auto-hide item contents for large items.</div></div><div class="setting-line"><label class="toggle"><input type="checkbox" id="auto-hide-method-docs" ><span class="slider"></span></label><div>Auto-hide item methods' documentation</div></div><div class="setting-line"><label class="toggle"><input type="checkbox" id="auto-hide-trait-implementations" checked><span class="slider"></span></label><div>Auto-hide trait implementation documentation</div></div><div class="setting-line"><label class="toggle"><input type="checkbox" id="auto-collapse-implementors" checked><span class="slider"></span></label><div>Auto-hide implementors of a trait</div></div><div class="setting-line"><label class="toggle"><input type="checkbox" id="go-to-only-result" ><span class="slider"></span></label><div>Directly go to item in search if there is only one result</div></div><div class="setting-line"><label class="toggle"><input type="checkbox" id="line-numbers" ><span class="slider"></span></label><div>Show line numbers on code examples</div></div><div class="setting-line"><label class="toggle"><input type="checkbox" id="disable-shortcuts" ><span class="slider"></span></label><div>Disable keyboard shortcuts</div></div></div><script src="./settings.js"></script></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="./" data-current-crate="deltae" data-search-index-js="./search-index.js" data-search-js="./search.js"></div><script src="./main.js"></script></body></html> |
@@ -1,1 +0,1 @@ | ||
| (function(){function changeSetting(settingName,isEnabled){updateLocalStorage('rustdoc-'+settingName,isEnabled)}function getSettingValue(settingName){return getCurrentValue('rustdoc-'+settingName)}function setEvents(){var elems=document.getElementsByClassName("slider");if(!elems||elems.length===0){return}for(var i=0;i<elems.length;++i){var toggle=elems[i].previousElementSibling;var settingId=toggle.id;var settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=function(){changeSetting(this.id,this.checked)}}}setEvents()})() | ||
| (function(){function changeSetting(settingName,value){updateLocalStorage("rustdoc-"+settingName,value);switch(settingName){case"preferred-dark-theme":case"preferred-light-theme":case"use-system-theme":updateSystemTheme();break}}function handleKey(ev){if(ev.ctrlKey||ev.altKey||ev.metaKey){return}switch(getVirtualKey(ev)){case"Enter":case"Return":case"Space":ev.target.checked=!ev.target.checked;ev.preventDefault();break}}function setEvents(){onEachLazy(document.getElementsByClassName("slider"),function(elem){var toggle=elem.previousElementSibling;var settingId=toggle.id;var settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=function(){changeSetting(this.id,this.checked)};toggle.onkeyup=handleKey;toggle.onkeyrelease=handleKey});onEachLazy(document.getElementsByClassName("select-wrapper"),function(elem){var select=elem.getElementsByTagName("select")[0];var settingId=select.id;var settingValue=getSettingValue(settingId);if(settingValue!==null){select.value=settingValue}select.onchange=function(){changeSetting(this.id,this.value)}})}window.addEventListener("DOMContentLoaded",setEvents)})() |
@@ -1,1 +0,1 @@ | ||
| function getCurrentFilePath(){var parts=window.location.pathname.split("/");var rootPathParts=window.rootPath.split("/");for(var i=0;i<rootPathParts.length;++i){if(rootPathParts[i]===".."){parts.pop()}}var file=window.location.pathname.substring(parts.join("/").length);if(file.startsWith("/")){file=file.substring(1)}return file.substring(0,file.length-5)}function createDirEntry(elem,parent,fullPath,currentFile,hasFoundFile){var name=document.createElement("div");name.className="name";fullPath+=elem["name"]+"/";name.onclick=function(){if(hasClass(this,"expand")){removeClass(this,"expand")}else{addClass(this,"expand")}};name.innerText=elem["name"];var children=document.createElement("div");children.className="children";var folders=document.createElement("div");folders.className="folders";if(elem.dirs){for(var i=0;i<elem.dirs.length;++i){if(createDirEntry(elem.dirs[i],folders,fullPath,currentFile,hasFoundFile)===true){addClass(name,"expand");hasFoundFile=true}}}children.appendChild(folders);var files=document.createElement("div");files.className="files";if(elem.files){for(i=0;i<elem.files.length;++i){var file=document.createElement("a");file.innerText=elem.files[i];file.href=window.rootPath+"src/"+fullPath+elem.files[i]+".html";if(hasFoundFile===false&¤tFile===fullPath+elem.files[i]){file.className="selected";addClass(name,"expand");hasFoundFile=true}files.appendChild(file)}}search.fullPath=fullPath;children.appendChild(files);parent.appendChild(name);parent.appendChild(children);return hasFoundFile===true&¤tFile.startsWith(fullPath)}function toggleSidebar(){var sidebar=document.getElementById("source-sidebar");var child=this.children[0].children[0];if(child.innerText===">"){sidebar.style.left="";this.style.left="";child.innerText="<";updateLocalStorage("rustdoc-source-sidebar-show","true")}else{sidebar.style.left="-300px";this.style.left="0";child.innerText=">";updateLocalStorage("rustdoc-source-sidebar-show","false")}}function createSidebarToggle(){var sidebarToggle=document.createElement("div");sidebarToggle.id="sidebar-toggle";sidebarToggle.onclick=toggleSidebar;var inner1=document.createElement("div");inner1.style.position="relative";var inner2=document.createElement("div");inner2.style.paddingTop="3px";if(getCurrentValue("rustdoc-source-sidebar-show")==="true"){inner2.innerText="<"}else{inner2.innerText=">";sidebarToggle.style.left="0"}inner1.appendChild(inner2);sidebarToggle.appendChild(inner1);return sidebarToggle}function createSourceSidebar(){if(window.rootPath.endsWith("/")===false){window.rootPath+="/"}var main=document.getElementById("main");var sidebarToggle=createSidebarToggle();main.insertBefore(sidebarToggle,main.firstChild);var sidebar=document.createElement("div");sidebar.id="source-sidebar";if(getCurrentValue("rustdoc-source-sidebar-show")!=="true"){sidebar.style.left="-300px"}var currentFile=getCurrentFilePath();var hasFoundFile=false;var title=document.createElement("div");title.className="title";title.innerText="Files";sidebar.appendChild(title);Object.keys(sourcesIndex).forEach(function(key){sourcesIndex[key].name=key;hasFoundFile=createDirEntry(sourcesIndex[key],sidebar,"",currentFile,hasFoundFile)});main.insertBefore(sidebar,main.firstChild)} | ||
| (function(){function getCurrentFilePath(){var parts=window.location.pathname.split("/");var rootPathParts=window.rootPath.split("/");for(var i=0,len=rootPathParts.length;i<len;++i){if(rootPathParts[i]===".."){parts.pop()}}var file=window.location.pathname.substring(parts.join("/").length);if(file.startsWith("/")){file=file.substring(1)}return file.substring(0,file.length-5)}function createDirEntry(elem,parent,fullPath,currentFile,hasFoundFile){var name=document.createElement("div");name.className="name";fullPath+=elem["name"]+"/";name.onclick=function(){if(hasClass(this,"expand")){removeClass(this,"expand")}else{addClass(this,"expand")}};name.innerText=elem["name"];var i,len;var children=document.createElement("div");children.className="children";var folders=document.createElement("div");folders.className="folders";if(elem.dirs){for(i=0,len=elem.dirs.length;i<len;++i){if(createDirEntry(elem.dirs[i],folders,fullPath,currentFile,hasFoundFile)){addClass(name,"expand");hasFoundFile=true}}}children.appendChild(folders);var files=document.createElement("div");files.className="files";if(elem.files){for(i=0,len=elem.files.length;i<len;++i){var file=document.createElement("a");file.innerText=elem.files[i];file.href=window.rootPath+"src/"+fullPath+elem.files[i]+".html";if(!hasFoundFile&¤tFile===fullPath+elem.files[i]){file.className="selected";addClass(name,"expand");hasFoundFile=true}files.appendChild(file)}}search.fullPath=fullPath;children.appendChild(files);parent.appendChild(name);parent.appendChild(children);return hasFoundFile&¤tFile.startsWith(fullPath)}function toggleSidebar(){var sidebar=document.getElementById("source-sidebar");var child=this.children[0].children[0];if(child.innerText===">"){sidebar.style.left="";this.style.left="";child.innerText="<";updateLocalStorage("rustdoc-source-sidebar-show","true")}else{sidebar.style.left="-300px";this.style.left="0";child.innerText=">";updateLocalStorage("rustdoc-source-sidebar-show","false")}}function createSidebarToggle(){var sidebarToggle=document.createElement("div");sidebarToggle.id="sidebar-toggle";sidebarToggle.onclick=toggleSidebar;var inner1=document.createElement("div");inner1.style.position="relative";var inner2=document.createElement("div");inner2.style.paddingTop="3px";if(getCurrentValue("rustdoc-source-sidebar-show")==="true"){inner2.innerText="<"}else{inner2.innerText=">";sidebarToggle.style.left="0"}inner1.appendChild(inner2);sidebarToggle.appendChild(inner1);return sidebarToggle}function createSourceSidebar(){if(!window.rootPath.endsWith("/")){window.rootPath+="/"}var main=document.getElementById("main");var sidebarToggle=createSidebarToggle();main.insertBefore(sidebarToggle,main.firstChild);var sidebar=document.createElement("div");sidebar.id="source-sidebar";if(getCurrentValue("rustdoc-source-sidebar-show")!=="true"){sidebar.style.left="-300px"}var currentFile=getCurrentFilePath();var hasFoundFile=false;var title=document.createElement("div");title.className="title";title.innerText="Files";sidebar.appendChild(title);Object.keys(sourcesIndex).forEach(function(key){sourcesIndex[key].name=key;hasFoundFile=createDirEntry(sourcesIndex[key],sidebar,"",currentFile,hasFoundFile)});main.insertBefore(sidebar,main.firstChild);var selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}}var lineNumbersRegex=/^#?(\d+)(?:-(\d+))?$/;function highlightSourceLines(scrollTo,match){if(typeof match==="undefined"){match=window.location.hash.match(lineNumbersRegex)}if(!match){return}var from=parseInt(match[1],10);var to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to<from){var tmp=to;to=from;from=tmp}var elem=document.getElementById(from);if(!elem){return}if(scrollTo){var x=document.getElementById(from);if(x){x.scrollIntoView()}}onEachLazy(document.getElementsByClassName("line-numbers"),function(e){onEachLazy(e.getElementsByTagName("span"),function(i_e){removeClass(i_e,"line-highlighted")})});for(var i=from;i<=to;++i){elem=document.getElementById(i);if(!elem){break}addClass(elem,"line-highlighted")}}var handleSourceHighlight=(function(){var prev_line_id=0;var set_fragment=function(name){var x=window.scrollX,y=window.scrollY;if(searchState.browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSourceLines(true)}else{location.replace("#"+name)}window.scrollTo(x,y)};return function(ev){var cur_line_id=parseInt(ev.target.id,10);ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){var tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());window.addEventListener("hashchange",function(){var match=window.location.hash.match(lineNumbersRegex);if(match){return highlightSourceLines(false,match)}});onEachLazy(document.getElementsByClassName("line-numbers"),function(el){el.addEventListener("click",handleSourceHighlight)});highlightSourceLines(true);window.createSourceSidebar=createSourceSidebar})() |
@@ -1,2 +0,4 @@ | ||
| <!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="Source to the Rust file `src/color.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>color.rs.html -- source</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc source"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../deltae/index.html'><div class='logo-container'><img src='../../rust-logo.png' alt='logo'></div></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><pre class="line-numbers"><span id="1"> 1</span> | ||
| <!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="Source of the Rust file `src/color.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>color.rs - source</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> | ||
| <link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> | ||
| <link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../deltae/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><div class="example-wrap"><pre class="line-numbers"><span id="1"> 1</span> | ||
| <span id="2"> 2</span> | ||
@@ -178,4 +180,3 @@ <span id="3"> 3</span> | ||
| <span id="177">177</span> | ||
| <span id="178">178</span> | ||
| </pre><div class="example-wrap"><pre class="rust "> | ||
| </pre><pre class="rust"> | ||
| <span class="doccomment">//! Manipulate and convert CIE L\*a\*b\* and Lch colors.</span> | ||
@@ -187,41 +188,36 @@ <span class="doccomment">//!</span> | ||
| <span class="doccomment">//! use deltae::*;</span> | ||
| <span class="doccomment">//! use std::str::FromStr;</span> | ||
| <span class="doccomment">//! use std::error::Error;</span> | ||
| <span class="doccomment">//!</span> | ||
| <span class="doccomment">//! fn main() -> Result<(), Box<dyn Error>> {</span> | ||
| <span class="doccomment">//! let lab0 = LabValue::from_str("95.08, -0.17, -10.81")?;</span> | ||
| <span class="doccomment">//! let lch0 = LchValue {</span> | ||
| <span class="doccomment">//! l: 95.08,</span> | ||
| <span class="doccomment">//! c: 10.811337,</span> | ||
| <span class="doccomment">//! h: 269.09903,</span> | ||
| <span class="doccomment">//! };</span> | ||
| <span class="doccomment">//! let lab0: LabValue = "95.08, -0.17, -10.81".parse().unwrap();</span> | ||
| <span class="doccomment">//! let lch0 = LchValue {</span> | ||
| <span class="doccomment">//! l: 95.08,</span> | ||
| <span class="doccomment">//! c: 10.811337,</span> | ||
| <span class="doccomment">//! h: 269.09903,</span> | ||
| <span class="doccomment">//! };</span> | ||
| <span class="doccomment">//!</span> | ||
| <span class="doccomment">//! assert_eq!(lab0, lch0);</span> | ||
| <span class="doccomment">//! assert!(lab0.delta_eq(&lch0, DE2000, 0.01));</span> | ||
| <span class="doccomment">//!</span> | ||
| <span class="doccomment">//! let lch0 = LchValue::from(lab0);</span> | ||
| <span class="doccomment">//! let lab2 = LabValue::from(lch0);</span> | ||
| <span class="doccomment">//! let lch0 = LchValue::from(lab0);</span> | ||
| <span class="doccomment">//! let lab2 = LabValue::from(lch0);</span> | ||
| <span class="doccomment">//!</span> | ||
| <span class="doccomment">//! println!("{}", lch0); // [L:89.73, c:7.2094, h:285.1157]</span> | ||
| <span class="doccomment">//! println!("{}", lch0); // [L:89.73, c:7.2094, h:285.1157]</span> | ||
| <span class="doccomment">//!</span> | ||
| <span class="doccomment">//! assert_eq!(lab0.round_to(4), lab2.round_to(4));</span> | ||
| <span class="doccomment">//!</span> | ||
| <span class="doccomment">//! Ok(())</span> | ||
| <span class="doccomment">//! }</span> | ||
| <span class="doccomment">//! assert_eq!(lab0.round_to(4), lab2.round_to(4));</span> | ||
| <span class="doccomment">//! ```</span> | ||
| <span class="kw">use</span> <span class="ident">std</span>::<span class="ident">fmt</span>; | ||
| <span class="kw">use</span> <span class="ident">std</span>::<span class="ident">error</span>::<span class="ident">Error</span>; | ||
| <span class="kw">use</span> <span class="ident">std::fmt</span>; | ||
| <span class="kw">use</span> <span class="ident">std::error::Error</span>; | ||
| <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">ValueResult</span>; | ||
| <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">validate</span>::<span class="ident">Validate</span>; | ||
| <span class="kw">use</span> <span class="kw">crate</span>::<span class="kw-2">*</span>; | ||
| <span class="doccomment">/// # CIEL\*a\*b\*</span> | ||
| <span class="doccomment">///</span> | ||
| <span class="doccomment">/// | `Value` | `Color` | `Range` |</span> | ||
| <span class="doccomment">/// |:-------:|:---------------------:|:----------------:|</span> | ||
| <span class="doccomment">/// | `L*` | `Light <---> Dark` | `0 <---> 100` |</span> | ||
| <span class="doccomment">/// | `a*` | `Green <---> Magenta` | `-128 <---> 128` |</span> | ||
| <span class="doccomment">/// | `b*` | `Blue <---> Yellow` | `-128 <---> 128` |</span> | ||
| <span class="doccomment">/// The [`LabValue`] is the key component in calculating [`DeltaE`]</span> | ||
| <span class="doccomment">///</span> | ||
| <span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>, <span class="ident">Clone</span>, <span class="ident">Copy</span>)]</span> | ||
| <span class="doccomment">/// | `Value` | `Color` | `Range` |</span> | ||
| <span class="doccomment">/// |:-------:|:---------------------:|:--------------------:|</span> | ||
| <span class="doccomment">/// | `L*` | `Light <---> Dark` | `0.0 <---> 100.0` |</span> | ||
| <span class="doccomment">/// | `a*` | `Green <---> Magenta` | `-128.0 <---> 128.0` |</span> | ||
| <span class="doccomment">/// | `b*` | `Blue <---> Yellow` | `-128.0 <---> 128.0` |</span> | ||
| <span class="doccomment">///</span> | ||
| <span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>, <span class="ident">Clone</span>, <span class="ident">Copy</span>, <span class="ident">PartialEq</span>)]</span> | ||
| <span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">LabValue</span> { | ||
@@ -238,4 +234,4 @@ <span class="doccomment">/// Lightness</span> | ||
| <span class="doccomment">/// Returns a result of a LabValue from 3 `f32`s.</span> | ||
| <span class="doccomment">/// Will return `Err()` if the values are out of range</span> | ||
| <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">l</span>: <span class="ident">f32</span>, <span class="ident">a</span>: <span class="ident">f32</span>, <span class="ident">b</span>: <span class="ident">f32</span>) <span class="op">-></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="ident">LabValue</span><span class="op">></span> { | ||
| <span class="doccomment">/// Will return `Err()` if the values are out of range as determined by the [`Validate`] trait.</span> | ||
| <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">l</span>: <span class="ident">f32</span>, <span class="ident">a</span>: <span class="ident">f32</span>, <span class="ident">b</span>: <span class="ident">f32</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="ident">LabValue</span><span class="op">></span> { | ||
| <span class="ident">LabValue</span> {<span class="ident">l</span>, <span class="ident">a</span>, <span class="ident">b</span>}.<span class="ident">validate</span>() | ||
@@ -246,3 +242,3 @@ } | ||
| <span class="kw">impl</span> <span class="ident">Default</span> <span class="kw">for</span> <span class="ident">LabValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">default</span>() <span class="op">-></span> <span class="ident">LabValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">default</span>() <span class="op">-</span><span class="op">></span> <span class="ident">LabValue</span> { | ||
| <span class="ident">LabValue</span> { <span class="ident">l</span>: <span class="number">0.0</span>, <span class="ident">a</span>: <span class="number">0.0</span>, <span class="ident">b</span>: <span class="number">0.0</span> } | ||
@@ -252,5 +248,5 @@ } | ||
| <span class="kw">impl</span> <span class="ident">fmt</span>::<span class="ident">Display</span> <span class="kw">for</span> <span class="ident">LabValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">fmt</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">f</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">fmt</span>::<span class="ident">Formatter</span>) <span class="op">-></span> <span class="ident">fmt</span>::<span class="prelude-ty">Result</span> { | ||
| <span class="macro">write</span><span class="macro">!</span>(<span class="ident">f</span>, <span class="string">"[L:{}, a:{}, b:{}]"</span>, <span class="self">self</span>.<span class="ident">l</span>, <span class="self">self</span>.<span class="ident">a</span>, <span class="self">self</span>.<span class="ident">b</span>) | ||
| <span class="kw">impl</span> <span class="ident">fmt::Display</span> <span class="kw">for</span> <span class="ident">LabValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">fmt</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">f</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">fmt::Formatter</span>) <span class="op">-</span><span class="op">></span> <span class="ident">fmt::Result</span> { | ||
| <span class="macro">write!</span>(<span class="ident">f</span>, <span class="string">"[L:{}, a:{}, b:{}]"</span>, <span class="self">self</span>.<span class="ident">l</span>, <span class="self">self</span>.<span class="ident">a</span>, <span class="self">self</span>.<span class="ident">b</span>) | ||
| } | ||
@@ -261,9 +257,9 @@ } | ||
| <span class="doccomment">///</span> | ||
| <span class="doccomment">/// | `Value` | `Color` | `Range` |</span> | ||
| <span class="doccomment">/// |:-------:|:--------------------------:|:------------------:|</span> | ||
| <span class="doccomment">/// | `L*` | `Light <---> Dark` | `0 <---> 100` |</span> | ||
| <span class="doccomment">/// | `c` | `Chroma (Amount of color)` | `0 <---> 181.0139` |</span> | ||
| <span class="doccomment">/// | `h` | `Hue (Degrees)` | `0 <---> 360°` |</span> | ||
| <span class="doccomment">/// | `Value` | `Color` | `Range` |</span> | ||
| <span class="doccomment">/// |:-------:|:--------------------------:|:----------------------:|</span> | ||
| <span class="doccomment">/// | `L*` | `Light <---> Dark` | `0.0 <---> 100.0` |</span> | ||
| <span class="doccomment">/// | `c` | `Chroma (Amount of color)` | `0.0 <---> 181.0139` |</span> | ||
| <span class="doccomment">/// | `h` | `Hue (Degrees)` | `0.0 <---> 360.0°` |</span> | ||
| <span class="doccomment">///</span> | ||
| <span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>, <span class="ident">Clone</span>, <span class="ident">Copy</span>)]</span> | ||
| <span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>, <span class="ident">Clone</span>, <span class="ident">Copy</span>, <span class="ident">PartialEq</span>)]</span> | ||
| <span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">LchValue</span> { | ||
@@ -280,4 +276,4 @@ <span class="doccomment">/// Lightness</span> | ||
| <span class="doccomment">/// Returns a result of an LchValue from 3 `f32`s.</span> | ||
| <span class="doccomment">/// Will return `Err()` if the values are out of range</span> | ||
| <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">l</span>: <span class="ident">f32</span>, <span class="ident">c</span>: <span class="ident">f32</span>, <span class="ident">h</span>: <span class="ident">f32</span>) <span class="op">-></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="ident">LchValue</span><span class="op">></span> { | ||
| <span class="doccomment">/// Will return `Err()` if the values are out of range as determined by the [`Validate`] trait.</span> | ||
| <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">l</span>: <span class="ident">f32</span>, <span class="ident">c</span>: <span class="ident">f32</span>, <span class="ident">h</span>: <span class="ident">f32</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="ident">LchValue</span><span class="op">></span> { | ||
| <span class="ident">LchValue</span> { <span class="ident">l</span>, <span class="ident">c</span>, <span class="ident">h</span> }.<span class="ident">validate</span>() | ||
@@ -287,3 +283,3 @@ } | ||
| <span class="doccomment">/// Returns the Hue as radians rather than degrees</span> | ||
| <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">hue_radians</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-></span> <span class="ident">f32</span> { | ||
| <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">hue_radians</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">f32</span> { | ||
| <span class="self">self</span>.<span class="ident">h</span>.<span class="ident">to_radians</span>() | ||
@@ -294,3 +290,3 @@ } | ||
| <span class="kw">impl</span> <span class="ident">Default</span> <span class="kw">for</span> <span class="ident">LchValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">default</span>() <span class="op">-></span> <span class="ident">LchValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">default</span>() <span class="op">-</span><span class="op">></span> <span class="ident">LchValue</span> { | ||
| <span class="ident">LchValue</span> { <span class="ident">l</span>: <span class="number">0.0</span>, <span class="ident">c</span>: <span class="number">0.0</span>, <span class="ident">h</span>: <span class="number">0.0</span> } | ||
@@ -300,17 +296,19 @@ } | ||
| <span class="kw">impl</span> <span class="ident">fmt</span>::<span class="ident">Display</span> <span class="kw">for</span> <span class="ident">LchValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">fmt</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">f</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">fmt</span>::<span class="ident">Formatter</span>) <span class="op">-></span> <span class="ident">fmt</span>::<span class="prelude-ty">Result</span> { | ||
| <span class="macro">write</span><span class="macro">!</span>(<span class="ident">f</span>, <span class="string">"[L:{}, c:{}, h:{}]"</span>, <span class="self">self</span>.<span class="ident">l</span>, <span class="self">self</span>.<span class="ident">c</span>, <span class="self">self</span>.<span class="ident">h</span>) | ||
| <span class="kw">impl</span> <span class="ident">fmt::Display</span> <span class="kw">for</span> <span class="ident">LchValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">fmt</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">f</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">fmt::Formatter</span>) <span class="op">-</span><span class="op">></span> <span class="ident">fmt::Result</span> { | ||
| <span class="macro">write!</span>(<span class="ident">f</span>, <span class="string">"[L:{}, c:{}, h:{}]"</span>, <span class="self">self</span>.<span class="ident">l</span>, <span class="self">self</span>.<span class="ident">c</span>, <span class="self">self</span>.<span class="ident">h</span>) | ||
| } | ||
| } | ||
| <span class="doccomment">/// # XYZ</span> | ||
| <span class="doccomment">/// # CIE 1931 XYZ</span> | ||
| <span class="doccomment">///</span> | ||
| <span class="doccomment">/// | `Value` | `Color` | `Range` |</span> | ||
| <span class="doccomment">/// |:-------:|:-------:|:-----------:|</span> | ||
| <span class="doccomment">/// | `X` | `Red` | `0 <---> 1` |</span> | ||
| <span class="doccomment">/// | `Y` | `Green` | `0 <---> 1` |</span> | ||
| <span class="doccomment">/// | `Z` | `Blue` | `0 <---> 1` |</span> | ||
| <span class="doccomment">/// Further Reading: [https://en.wikipedia.org/wiki/CIE_1931_color_space](https://en.wikipedia.org/wiki/CIE_1931_color_space)</span> | ||
| <span class="doccomment">///</span> | ||
| <span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>, <span class="ident">Clone</span>, <span class="ident">Copy</span>)]</span> | ||
| <span class="doccomment">/// | `Value` | `Color` | `Range` |</span> | ||
| <span class="doccomment">/// |:-------:|:-----------:|:---------------:|</span> | ||
| <span class="doccomment">/// | `X` | `RGB` | `0.0 <---> 1.0` |</span> | ||
| <span class="doccomment">/// | `Y` | `Luminance` | `0.0 <---> 1.0` |</span> | ||
| <span class="doccomment">/// | `Z` | `Blue` | `0.0 <---> 1.0` |</span> | ||
| <span class="doccomment">///</span> | ||
| <span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>, <span class="ident">Clone</span>, <span class="ident">Copy</span>, <span class="ident">PartialEq</span>)]</span> | ||
| <span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">XyzValue</span> { | ||
@@ -327,4 +325,4 @@ <span class="doccomment">/// X Value</span> | ||
| <span class="doccomment">/// Returns a result of an XyzValue from 3 `f32`s.</span> | ||
| <span class="doccomment">/// Will return `Err()` if the values are out of range</span> | ||
| <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">x</span>: <span class="ident">f32</span>, <span class="ident">y</span>: <span class="ident">f32</span>, <span class="ident">z</span>:<span class="ident">f32</span>) <span class="op">-></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="ident">XyzValue</span><span class="op">></span> { | ||
| <span class="doccomment">/// Will return `Err()` if the values are out of range as determined by the [`Validate`] trait.</span> | ||
| <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">x</span>: <span class="ident">f32</span>, <span class="ident">y</span>: <span class="ident">f32</span>, <span class="ident">z</span>:<span class="ident">f32</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="ident">XyzValue</span><span class="op">></span> { | ||
| <span class="ident">XyzValue</span> {<span class="ident">x</span>, <span class="ident">y</span>, <span class="ident">z</span>}.<span class="ident">validate</span>() | ||
@@ -335,3 +333,3 @@ } | ||
| <span class="kw">impl</span> <span class="ident">Default</span> <span class="kw">for</span> <span class="ident">XyzValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">default</span>() <span class="op">-></span> <span class="ident">XyzValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">default</span>() <span class="op">-</span><span class="op">></span> <span class="ident">XyzValue</span> { | ||
| <span class="ident">XyzValue</span> { <span class="ident">x</span>: <span class="number">0.0</span>, <span class="ident">y</span>: <span class="number">0.0</span>, <span class="ident">z</span>: <span class="number">0.0</span> } | ||
@@ -341,5 +339,5 @@ } | ||
| <span class="kw">impl</span> <span class="ident">fmt</span>::<span class="ident">Display</span> <span class="kw">for</span> <span class="ident">XyzValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">fmt</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">f</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">fmt</span>::<span class="ident">Formatter</span>) <span class="op">-></span> <span class="ident">fmt</span>::<span class="prelude-ty">Result</span> { | ||
| <span class="macro">write</span><span class="macro">!</span>(<span class="ident">f</span>, <span class="string">"[X:{}, Y:{}, Z:{}]"</span>, <span class="self">self</span>.<span class="ident">x</span>, <span class="self">self</span>.<span class="ident">y</span>, <span class="self">self</span>.<span class="ident">z</span>) | ||
| <span class="kw">impl</span> <span class="ident">fmt::Display</span> <span class="kw">for</span> <span class="ident">XyzValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">fmt</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">f</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">fmt::Formatter</span>) <span class="op">-</span><span class="op">></span> <span class="ident">fmt::Result</span> { | ||
| <span class="macro">write!</span>(<span class="ident">f</span>, <span class="string">"[X:{}, Y:{}, Z:{}]"</span>, <span class="self">self</span>.<span class="ident">x</span>, <span class="self">self</span>.<span class="ident">y</span>, <span class="self">self</span>.<span class="ident">z</span>) | ||
| } | ||
@@ -357,17 +355,19 @@ } | ||
| <span class="kw">impl</span> <span class="ident">fmt</span>::<span class="ident">Display</span> <span class="kw">for</span> <span class="ident">ValueError</span> { | ||
| <span class="kw">fn</span> <span class="ident">fmt</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">f</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">fmt</span>::<span class="ident">Formatter</span>) <span class="op">-></span> <span class="ident">fmt</span>::<span class="prelude-ty">Result</span> { | ||
| <span class="macro">write</span><span class="macro">!</span>(<span class="ident">f</span>, <span class="string">"{}"</span>, <span class="self">self</span>.<span class="ident">description</span>()) | ||
| <span class="kw">impl</span> <span class="ident">fmt::Display</span> <span class="kw">for</span> <span class="ident">ValueError</span> { | ||
| <span class="kw">fn</span> <span class="ident">fmt</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">f</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">fmt::Formatter</span>) <span class="op">-</span><span class="op">></span> <span class="ident">fmt::Result</span> { | ||
| <span class="macro">write!</span>(<span class="ident">f</span>, <span class="string">"{}"</span>, <span class="self">self</span>.<span class="ident">description</span>()) | ||
| } | ||
| } | ||
| <span class="kw">impl</span> <span class="ident">Error</span> <span class="kw">for</span> <span class="ident">ValueError</span> { | ||
| <span class="kw">fn</span> <span class="ident">description</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-></span> <span class="kw-2">&</span><span class="ident">str</span> { | ||
| <span class="kw">impl</span> <span class="ident">ValueError</span> { | ||
| <span class="kw">fn</span> <span class="ident">description</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="kw-2">&</span><span class="ident">str</span> { | ||
| <span class="kw">match</span> <span class="self">self</span> { | ||
| <span class="ident">ValueError</span>::<span class="ident">OutOfBounds</span> <span class="op">=></span> <span class="string">"Value is out of range!"</span>, | ||
| <span class="ident">ValueError</span>::<span class="ident">BadFormat</span> <span class="op">=></span> <span class="string">"Value is malformed!"</span>, | ||
| <span class="ident">ValueError::OutOfBounds</span> <span class="op">=</span><span class="op">></span> <span class="string">"Value is out of range!"</span>, | ||
| <span class="ident">ValueError::BadFormat</span> <span class="op">=</span><span class="op">></span> <span class="string">"Value is malformed!"</span>, | ||
| } | ||
| } | ||
| } | ||
| <span class="kw">impl</span> <span class="ident">Error</span> <span class="kw">for</span> <span class="ident">ValueError</span> {} | ||
| </pre></div> | ||
| </section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../../";window.currentCrate = "deltae";</script><script src="../../aliases.js"></script><script src="../../main.js"></script><script src="../../source-script.js"></script><script src="../../source-files.js"></script><script defer src="../../search-index.js"></script></body></html> | ||
| </section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="deltae" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script><script src="../../source-script.js"></script><script src="../../source-files.js"></script></body></html> |
@@ -1,2 +0,4 @@ | ||
| <!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="Source to the Rust file `src/convert.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>convert.rs.html -- source</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc source"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../deltae/index.html'><div class='logo-container'><img src='../../rust-logo.png' alt='logo'></div></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><pre class="line-numbers"><span id="1"> 1</span> | ||
| <!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="Source of the Rust file `src/convert.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>convert.rs - source</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> | ||
| <link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> | ||
| <link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../deltae/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><div class="example-wrap"><pre class="line-numbers"><span id="1"> 1</span> | ||
| <span id="2"> 2</span> | ||
@@ -326,22 +328,10 @@ <span id="3"> 3</span> | ||
| <span id="325">325</span> | ||
| <span id="326">326</span> | ||
| <span id="327">327</span> | ||
| <span id="328">328</span> | ||
| <span id="329">329</span> | ||
| <span id="330">330</span> | ||
| <span id="331">331</span> | ||
| <span id="332">332</span> | ||
| <span id="333">333</span> | ||
| <span id="334">334</span> | ||
| <span id="335">335</span> | ||
| <span id="336">336</span> | ||
| <span id="337">337</span> | ||
| </pre><div class="example-wrap"><pre class="rust "> | ||
| </pre><pre class="rust"> | ||
| <span class="kw">use</span> <span class="kw">super</span>::<span class="kw-2">*</span>; | ||
| <span class="kw">use</span> <span class="ident">std</span>::<span class="ident">convert</span>::<span class="ident">TryFrom</span>; | ||
| <span class="kw">use</span> <span class="ident">std</span>::<span class="ident">str</span>::<span class="ident">FromStr</span>; | ||
| <span class="kw">use</span> <span class="ident">std::convert::TryFrom</span>; | ||
| <span class="kw">use</span> <span class="ident">std::str::FromStr</span>; | ||
| <span class="comment">// To Lab /////////////////////////////////////////////////////////////////////</span> | ||
| <span class="kw">impl</span> <span class="ident">From</span><span class="op"><</span><span class="ident">LchValue</span><span class="op">></span> <span class="kw">for</span> <span class="ident">LabValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">lch</span>: <span class="ident">LchValue</span>) <span class="op">-></span> <span class="ident">LabValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">lch</span>: <span class="ident">LchValue</span>) <span class="op">-</span><span class="op">></span> <span class="ident">LabValue</span> { | ||
| <span class="ident">LabValue</span> { | ||
@@ -356,4 +346,4 @@ <span class="ident">l</span>: <span class="ident">lch</span>.<span class="ident">l</span>, | ||
| <span class="kw">impl</span> <span class="ident">From</span><span class="op"><</span><span class="kw-2">&</span><span class="ident">LchValue</span><span class="op">></span> <span class="kw">for</span> <span class="ident">LabValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">lch</span>: <span class="kw-2">&</span><span class="ident">LchValue</span>) <span class="op">-></span> <span class="ident">LabValue</span> { | ||
| <span class="ident">LabValue</span>::<span class="ident">from</span>(<span class="kw-2">*</span><span class="ident">lch</span>) | ||
| <span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">lch</span>: <span class="kw-2">&</span><span class="ident">LchValue</span>) <span class="op">-</span><span class="op">></span> <span class="ident">LabValue</span> { | ||
| <span class="ident">LabValue::from</span>(<span class="kw-2">*</span><span class="ident">lch</span>) | ||
| } | ||
@@ -363,3 +353,3 @@ } | ||
| <span class="kw">impl</span> <span class="ident">From</span><span class="op"><</span><span class="kw-2">&</span><span class="ident">LabValue</span><span class="op">></span> <span class="kw">for</span> <span class="ident">LabValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">lab</span>: <span class="kw-2">&</span><span class="ident">LabValue</span>) <span class="op">-></span> <span class="ident">LabValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">lab</span>: <span class="kw-2">&</span><span class="ident">LabValue</span>) <span class="op">-</span><span class="op">></span> <span class="ident">LabValue</span> { | ||
| <span class="kw-2">*</span><span class="ident">lab</span> | ||
@@ -370,3 +360,3 @@ } | ||
| <span class="kw">impl</span> <span class="ident">From</span><span class="op"><</span><span class="ident">XyzValue</span><span class="op">></span> <span class="kw">for</span> <span class="ident">LabValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">xyz</span>: <span class="ident">XyzValue</span>) <span class="op">-></span> <span class="ident">LabValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">xyz</span>: <span class="ident">XyzValue</span>) <span class="op">-</span><span class="op">></span> <span class="ident">LabValue</span> { | ||
| <span class="kw">let</span> <span class="ident">x</span> <span class="op">=</span> <span class="ident">xyz_to_lab_map</span>(<span class="ident">xyz</span>.<span class="ident">x</span> <span class="op">/</span> <span class="number">0.9642</span>); | ||
@@ -385,4 +375,4 @@ <span class="kw">let</span> <span class="ident">y</span> <span class="op">=</span> <span class="ident">xyz_to_lab_map</span>(<span class="ident">xyz</span>.<span class="ident">y</span>); | ||
| <span class="kw">impl</span> <span class="ident">From</span><span class="op"><</span><span class="kw-2">&</span><span class="ident">XyzValue</span><span class="op">></span> <span class="kw">for</span> <span class="ident">LabValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">xyz</span>: <span class="kw-2">&</span><span class="ident">XyzValue</span>) <span class="op">-></span> <span class="ident">LabValue</span> { | ||
| <span class="ident">LabValue</span>::<span class="ident">from</span>(<span class="kw-2">*</span><span class="ident">xyz</span>) | ||
| <span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">xyz</span>: <span class="kw-2">&</span><span class="ident">XyzValue</span>) <span class="op">-</span><span class="op">></span> <span class="ident">LabValue</span> { | ||
| <span class="ident">LabValue::from</span>(<span class="kw-2">*</span><span class="ident">xyz</span>) | ||
| } | ||
@@ -393,3 +383,3 @@ } | ||
| <span class="kw">type</span> <span class="ident">Error</span> <span class="op">=</span> <span class="ident">ValueError</span>; | ||
| <span class="kw">fn</span> <span class="ident">try_from</span>(<span class="ident">slice</span>: <span class="kw-2">&</span>[<span class="ident">f32</span>; <span class="number">3</span>]) <span class="op">-></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="ident">LabValue</span><span class="op">></span> { | ||
| <span class="kw">fn</span> <span class="ident">try_from</span>(<span class="ident">slice</span>: <span class="kw-2">&</span>[<span class="ident">f32</span>; <span class="number">3</span>]) <span class="op">-</span><span class="op">></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="ident">LabValue</span><span class="op">></span> { | ||
| <span class="ident">LabValue</span> { | ||
@@ -405,3 +395,3 @@ <span class="ident">l</span>: <span class="ident">slice</span>[<span class="number">0</span>], | ||
| <span class="kw">type</span> <span class="ident">Error</span> <span class="op">=</span> <span class="ident">ValueError</span>; | ||
| <span class="kw">fn</span> <span class="ident">try_from</span>(<span class="ident">tuple</span>: (<span class="ident">f32</span>, <span class="ident">f32</span>, <span class="ident">f32</span>)) <span class="op">-></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="ident">LabValue</span><span class="op">></span> { | ||
| <span class="kw">fn</span> <span class="ident">try_from</span>(<span class="ident">tuple</span>: (<span class="ident">f32</span>, <span class="ident">f32</span>, <span class="ident">f32</span>)) <span class="op">-</span><span class="op">></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="ident">LabValue</span><span class="op">></span> { | ||
| <span class="ident">LabValue</span> { | ||
@@ -417,3 +407,3 @@ <span class="ident">l</span>: <span class="ident">tuple</span>.<span class="number">0</span>, | ||
| <span class="kw">type</span> <span class="ident">Error</span> <span class="op">=</span> <span class="ident">ValueError</span>; | ||
| <span class="kw">fn</span> <span class="ident">try_from</span>(<span class="ident">tuple</span>: <span class="kw-2">&</span>(<span class="ident">f32</span>, <span class="ident">f32</span>, <span class="ident">f32</span>)) <span class="op">-></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="ident">LabValue</span><span class="op">></span> { | ||
| <span class="kw">fn</span> <span class="ident">try_from</span>(<span class="ident">tuple</span>: <span class="kw-2">&</span>(<span class="ident">f32</span>, <span class="ident">f32</span>, <span class="ident">f32</span>)) <span class="op">-</span><span class="op">></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="ident">LabValue</span><span class="op">></span> { | ||
| <span class="ident">LabValue</span> { | ||
@@ -428,10 +418,4 @@ <span class="ident">l</span>: <span class="ident">tuple</span>.<span class="number">0</span>, | ||
| <span class="comment">// To Lch /////////////////////////////////////////////////////////////////////</span> | ||
| <span class="kw">impl</span> <span class="ident">From</span><span class="op"><</span><span class="kw-2">&</span><span class="ident">LchValue</span><span class="op">></span> <span class="kw">for</span> <span class="ident">LchValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">lch</span>: <span class="kw-2">&</span><span class="ident">LchValue</span>) <span class="op">-></span> <span class="ident">LchValue</span> { | ||
| <span class="ident">LchValue</span>::<span class="ident">from</span>(<span class="kw-2">*</span><span class="ident">lch</span>) | ||
| } | ||
| } | ||
| <span class="kw">impl</span> <span class="ident">From</span><span class="op"><</span><span class="ident">LabValue</span><span class="op">></span> <span class="kw">for</span> <span class="ident">LchValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">lab</span>: <span class="ident">LabValue</span>) <span class="op">-></span> <span class="ident">LchValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">lab</span>: <span class="ident">LabValue</span>) <span class="op">-</span><span class="op">></span> <span class="ident">LchValue</span> { | ||
| <span class="ident">LchValue</span> { | ||
@@ -446,4 +430,4 @@ <span class="ident">l</span>: <span class="ident">lab</span>.<span class="ident">l</span>, | ||
| <span class="kw">impl</span> <span class="ident">From</span><span class="op"><</span><span class="kw-2">&</span><span class="ident">LabValue</span><span class="op">></span> <span class="kw">for</span> <span class="ident">LchValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">lab</span>: <span class="kw-2">&</span><span class="ident">LabValue</span>) <span class="op">-></span> <span class="ident">LchValue</span> { | ||
| <span class="ident">LchValue</span>::<span class="ident">from</span>(<span class="kw-2">*</span><span class="ident">lab</span>) | ||
| <span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">lab</span>: <span class="kw-2">&</span><span class="ident">LabValue</span>) <span class="op">-</span><span class="op">></span> <span class="ident">LchValue</span> { | ||
| <span class="ident">LchValue::from</span>(<span class="kw-2">*</span><span class="ident">lab</span>) | ||
| } | ||
@@ -453,4 +437,4 @@ } | ||
| <span class="kw">impl</span> <span class="ident">From</span><span class="op"><</span><span class="ident">XyzValue</span><span class="op">></span> <span class="kw">for</span> <span class="ident">LchValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">xyz</span>: <span class="ident">XyzValue</span>) <span class="op">-></span> <span class="ident">LchValue</span> { | ||
| <span class="ident">LchValue</span>::<span class="ident">from</span>(<span class="ident">LabValue</span>::<span class="ident">from</span>(<span class="ident">xyz</span>)) | ||
| <span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">xyz</span>: <span class="ident">XyzValue</span>) <span class="op">-</span><span class="op">></span> <span class="ident">LchValue</span> { | ||
| <span class="ident">LchValue::from</span>(<span class="ident">LabValue::from</span>(<span class="ident">xyz</span>)) | ||
| } | ||
@@ -460,4 +444,4 @@ } | ||
| <span class="kw">impl</span> <span class="ident">From</span><span class="op"><</span><span class="kw-2">&</span><span class="ident">XyzValue</span><span class="op">></span> <span class="kw">for</span> <span class="ident">LchValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">xyz</span>: <span class="kw-2">&</span><span class="ident">XyzValue</span>) <span class="op">-></span> <span class="ident">LchValue</span> { | ||
| <span class="ident">LchValue</span>::<span class="ident">from</span>(<span class="kw-2">*</span><span class="ident">xyz</span>) | ||
| <span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">xyz</span>: <span class="kw-2">&</span><span class="ident">XyzValue</span>) <span class="op">-</span><span class="op">></span> <span class="ident">LchValue</span> { | ||
| <span class="ident">LchValue::from</span>(<span class="kw-2">*</span><span class="ident">xyz</span>) | ||
| } | ||
@@ -468,3 +452,3 @@ } | ||
| <span class="kw">type</span> <span class="ident">Error</span> <span class="op">=</span> <span class="ident">ValueError</span>; | ||
| <span class="kw">fn</span> <span class="ident">try_from</span>(<span class="ident">slice</span>: <span class="kw-2">&</span>[<span class="ident">f32</span>; <span class="number">3</span>]) <span class="op">-></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="ident">LchValue</span><span class="op">></span> { | ||
| <span class="kw">fn</span> <span class="ident">try_from</span>(<span class="ident">slice</span>: <span class="kw-2">&</span>[<span class="ident">f32</span>; <span class="number">3</span>]) <span class="op">-</span><span class="op">></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="ident">LchValue</span><span class="op">></span> { | ||
| <span class="ident">LchValue</span> { | ||
@@ -480,3 +464,3 @@ <span class="ident">l</span>: <span class="ident">slice</span>[<span class="number">0</span>], | ||
| <span class="kw">type</span> <span class="ident">Error</span> <span class="op">=</span> <span class="ident">ValueError</span>; | ||
| <span class="kw">fn</span> <span class="ident">try_from</span>(<span class="ident">tuple</span>: (<span class="ident">f32</span>, <span class="ident">f32</span>, <span class="ident">f32</span>)) <span class="op">-></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="ident">LchValue</span><span class="op">></span> { | ||
| <span class="kw">fn</span> <span class="ident">try_from</span>(<span class="ident">tuple</span>: (<span class="ident">f32</span>, <span class="ident">f32</span>, <span class="ident">f32</span>)) <span class="op">-</span><span class="op">></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="ident">LchValue</span><span class="op">></span> { | ||
| <span class="ident">LchValue</span> { | ||
@@ -492,3 +476,3 @@ <span class="ident">l</span>: <span class="ident">tuple</span>.<span class="number">0</span>, | ||
| <span class="kw">type</span> <span class="ident">Error</span> <span class="op">=</span> <span class="ident">ValueError</span>; | ||
| <span class="kw">fn</span> <span class="ident">try_from</span>(<span class="ident">tuple</span>: <span class="kw-2">&</span>(<span class="ident">f32</span>, <span class="ident">f32</span>, <span class="ident">f32</span>)) <span class="op">-></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="ident">LchValue</span><span class="op">></span> { | ||
| <span class="kw">fn</span> <span class="ident">try_from</span>(<span class="ident">tuple</span>: <span class="kw-2">&</span>(<span class="ident">f32</span>, <span class="ident">f32</span>, <span class="ident">f32</span>)) <span class="op">-</span><span class="op">></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="ident">LchValue</span><span class="op">></span> { | ||
| <span class="ident">LchValue</span> { | ||
@@ -504,7 +488,7 @@ <span class="ident">l</span>: <span class="ident">tuple</span>.<span class="number">0</span>, | ||
| <span class="kw">impl</span> <span class="ident">From</span><span class="op"><</span><span class="ident">LabValue</span><span class="op">></span> <span class="kw">for</span> <span class="ident">XyzValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">lab</span>: <span class="ident">LabValue</span>) <span class="op">-></span> <span class="ident">XyzValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">lab</span>: <span class="ident">LabValue</span>) <span class="op">-</span><span class="op">></span> <span class="ident">XyzValue</span> { | ||
| <span class="kw">let</span> <span class="ident">fy</span> <span class="op">=</span> (<span class="ident">lab</span>.<span class="ident">l</span> <span class="op">+</span> <span class="number">16.0</span>) <span class="op">/</span> <span class="number">116.0</span>; | ||
| <span class="kw">let</span> <span class="ident">fx</span> <span class="op">=</span> (<span class="ident">lab</span>.<span class="ident">a</span> <span class="op">/</span> <span class="number">500.0</span>) <span class="op">+</span> <span class="ident">fy</span>; | ||
| <span class="kw">let</span> <span class="ident">fz</span> <span class="op">=</span> <span class="ident">fy</span> <span class="op">-</span> (<span class="ident">lab</span>.<span class="ident">b</span> <span class="op">/</span> <span class="number">200.0</span>); | ||
| <span class="kw">let</span> <span class="ident">xr</span> <span class="op">=</span> <span class="kw">if</span> <span class="ident">fx</span> <span class="op">></span> <span class="ident">CBRT_EPSILON</span> { | ||
| <span class="kw">let</span> <span class="ident">xr</span> <span class="op">=</span> <span class="kw">if</span> <span class="ident">fx</span> <span class="op">></span> <span class="ident">CBRT_EPSILON</span> <span class="kw">as</span> <span class="ident">f32</span> { | ||
| <span class="ident">fx</span>.<span class="ident">powi</span>(<span class="number">3</span>) | ||
@@ -519,3 +503,3 @@ } <span class="kw">else</span> { | ||
| }; | ||
| <span class="kw">let</span> <span class="ident">zr</span> <span class="op">=</span> <span class="kw">if</span> <span class="ident">fz</span> <span class="op">></span> <span class="ident">CBRT_EPSILON</span> { | ||
| <span class="kw">let</span> <span class="ident">zr</span> <span class="op">=</span> <span class="kw">if</span> <span class="ident">fz</span> <span class="op">></span> <span class="ident">CBRT_EPSILON</span> <span class="kw">as</span> <span class="ident">f32</span> { | ||
| <span class="ident">fz</span>.<span class="ident">powi</span>(<span class="number">3</span>) | ||
@@ -534,11 +518,5 @@ } <span class="kw">else</span> { | ||
| <span class="kw">impl</span> <span class="ident">From</span><span class="op"><</span><span class="kw-2">&</span><span class="ident">XyzValue</span><span class="op">></span> <span class="kw">for</span> <span class="ident">XyzValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">xyz</span>: <span class="kw-2">&</span><span class="ident">XyzValue</span>) <span class="op">-></span> <span class="ident">XyzValue</span> { | ||
| <span class="ident">XyzValue</span>::<span class="ident">from</span>(<span class="kw-2">*</span><span class="ident">xyz</span>) | ||
| } | ||
| } | ||
| <span class="kw">impl</span> <span class="ident">From</span><span class="op"><</span><span class="kw-2">&</span><span class="ident">LabValue</span><span class="op">></span> <span class="kw">for</span> <span class="ident">XyzValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">lab</span>: <span class="kw-2">&</span><span class="ident">LabValue</span>) <span class="op">-></span> <span class="ident">XyzValue</span> { | ||
| <span class="ident">XyzValue</span>::<span class="ident">from</span>(<span class="kw-2">*</span><span class="ident">lab</span>) | ||
| <span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">lab</span>: <span class="kw-2">&</span><span class="ident">LabValue</span>) <span class="op">-</span><span class="op">></span> <span class="ident">XyzValue</span> { | ||
| <span class="ident">XyzValue::from</span>(<span class="kw-2">*</span><span class="ident">lab</span>) | ||
| } | ||
@@ -548,4 +526,4 @@ } | ||
| <span class="kw">impl</span> <span class="ident">From</span><span class="op"><</span><span class="ident">LchValue</span><span class="op">></span> <span class="kw">for</span> <span class="ident">XyzValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">lch</span>: <span class="ident">LchValue</span>) <span class="op">-></span> <span class="ident">XyzValue</span> { | ||
| <span class="ident">XyzValue</span>::<span class="ident">from</span>(<span class="ident">LabValue</span>::<span class="ident">from</span>(<span class="ident">lch</span>)) | ||
| <span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">lch</span>: <span class="ident">LchValue</span>) <span class="op">-</span><span class="op">></span> <span class="ident">XyzValue</span> { | ||
| <span class="ident">XyzValue::from</span>(<span class="ident">LabValue::from</span>(<span class="ident">lch</span>)) | ||
| } | ||
@@ -555,4 +533,4 @@ } | ||
| <span class="kw">impl</span> <span class="ident">From</span><span class="op"><</span><span class="kw-2">&</span><span class="ident">LchValue</span><span class="op">></span> <span class="kw">for</span> <span class="ident">XyzValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">lch</span>: <span class="kw-2">&</span><span class="ident">LchValue</span>) <span class="op">-></span> <span class="ident">XyzValue</span> { | ||
| <span class="ident">XyzValue</span>::<span class="ident">from</span>(<span class="kw-2">*</span><span class="ident">lch</span>) | ||
| <span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">lch</span>: <span class="kw-2">&</span><span class="ident">LchValue</span>) <span class="op">-</span><span class="op">></span> <span class="ident">XyzValue</span> { | ||
| <span class="ident">XyzValue::from</span>(<span class="kw-2">*</span><span class="ident">lch</span>) | ||
| } | ||
@@ -563,3 +541,3 @@ } | ||
| <span class="kw">type</span> <span class="ident">Error</span> <span class="op">=</span> <span class="ident">ValueError</span>; | ||
| <span class="kw">fn</span> <span class="ident">try_from</span>(<span class="ident">slice</span>: <span class="kw-2">&</span>[<span class="ident">f32</span>; <span class="number">3</span>]) <span class="op">-></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="ident">XyzValue</span><span class="op">></span> { | ||
| <span class="kw">fn</span> <span class="ident">try_from</span>(<span class="ident">slice</span>: <span class="kw-2">&</span>[<span class="ident">f32</span>; <span class="number">3</span>]) <span class="op">-</span><span class="op">></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="ident">XyzValue</span><span class="op">></span> { | ||
| <span class="ident">XyzValue</span> { | ||
@@ -575,3 +553,3 @@ <span class="ident">x</span>: <span class="ident">slice</span>[<span class="number">0</span>], | ||
| <span class="kw">type</span> <span class="ident">Error</span> <span class="op">=</span> <span class="ident">ValueError</span>; | ||
| <span class="kw">fn</span> <span class="ident">try_from</span>(<span class="ident">tuple</span>: (<span class="ident">f32</span>, <span class="ident">f32</span>, <span class="ident">f32</span>)) <span class="op">-></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="ident">XyzValue</span><span class="op">></span> { | ||
| <span class="kw">fn</span> <span class="ident">try_from</span>(<span class="ident">tuple</span>: (<span class="ident">f32</span>, <span class="ident">f32</span>, <span class="ident">f32</span>)) <span class="op">-</span><span class="op">></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="ident">XyzValue</span><span class="op">></span> { | ||
| <span class="ident">XyzValue</span> { | ||
@@ -587,3 +565,3 @@ <span class="ident">x</span>: <span class="ident">tuple</span>.<span class="number">0</span>, | ||
| <span class="kw">type</span> <span class="ident">Error</span> <span class="op">=</span> <span class="ident">ValueError</span>; | ||
| <span class="kw">fn</span> <span class="ident">try_from</span>(<span class="ident">tuple</span>: <span class="kw-2">&</span>(<span class="ident">f32</span>, <span class="ident">f32</span>, <span class="ident">f32</span>)) <span class="op">-></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="ident">XyzValue</span><span class="op">></span> { | ||
| <span class="kw">fn</span> <span class="ident">try_from</span>(<span class="ident">tuple</span>: <span class="kw-2">&</span>(<span class="ident">f32</span>, <span class="ident">f32</span>, <span class="ident">f32</span>)) <span class="op">-</span><span class="op">></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="ident">XyzValue</span><span class="op">></span> { | ||
| <span class="ident">XyzValue</span> { | ||
@@ -599,13 +577,13 @@ <span class="ident">x</span>: <span class="ident">tuple</span>.<span class="number">0</span>, | ||
| <span class="kw">impl</span> <span class="ident">FromStr</span> <span class="kw">for</span> <span class="ident">DEMethod</span> { | ||
| <span class="kw">type</span> <span class="prelude-val">Err</span> <span class="op">=</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Error</span>; | ||
| <span class="kw">fn</span> <span class="ident">from_str</span>(<span class="ident">s</span>: <span class="kw-2">&</span><span class="ident">str</span>) <span class="op">-></span> <span class="prelude-ty">Result</span><span class="op"><</span><span class="ident">DEMethod</span>, <span class="self">Self</span>::<span class="prelude-val">Err</span><span class="op">></span> { | ||
| <span class="kw">type</span> <span class="prelude-val">Err</span> <span class="op">=</span> <span class="ident">std::io::Error</span>; | ||
| <span class="kw">fn</span> <span class="ident">from_str</span>(<span class="ident">s</span>: <span class="kw-2">&</span><span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Result</span><span class="op"><</span><span class="ident">DEMethod</span>, <span class="self">Self</span><span class="ident">::Err</span><span class="op">></span> { | ||
| <span class="kw">match</span> <span class="ident">s</span>.<span class="ident">to_lowercase</span>().<span class="ident">trim</span>() { | ||
| <span class="string">"de2000"</span> <span class="op">|</span> <span class="string">"de00"</span> <span class="op">|</span> <span class="string">"2000"</span> <span class="op">|</span> <span class="string">"00"</span> <span class="op">=></span> <span class="prelude-val">Ok</span>(<span class="ident">DEMethod</span>::<span class="ident">DE2000</span>), | ||
| <span class="string">"de1976"</span> <span class="op">|</span> <span class="string">"de76"</span> <span class="op">|</span> <span class="string">"1976"</span> <span class="op">|</span> <span class="string">"76"</span> <span class="op">=></span> <span class="prelude-val">Ok</span>(<span class="ident">DEMethod</span>::<span class="ident">DE1976</span>), | ||
| <span class="string">"de2000"</span> <span class="op">|</span> <span class="string">"de00"</span> <span class="op">|</span> <span class="string">"2000"</span> <span class="op">|</span> <span class="string">"00"</span> <span class="op">=</span><span class="op">></span> <span class="prelude-val">Ok</span>(<span class="ident">DEMethod::DE2000</span>), | ||
| <span class="string">"de1976"</span> <span class="op">|</span> <span class="string">"de76"</span> <span class="op">|</span> <span class="string">"1976"</span> <span class="op">|</span> <span class="string">"76"</span> <span class="op">=</span><span class="op">></span> <span class="prelude-val">Ok</span>(<span class="ident">DEMethod::DE1976</span>), | ||
| <span class="string">"de1994"</span> <span class="op">|</span> <span class="string">"de94"</span> <span class="op">|</span> <span class="string">"1994"</span> <span class="op">|</span> <span class="string">"94"</span> <span class="op">|</span> | ||
| <span class="string">"de1994g"</span> <span class="op">|</span> <span class="string">"de94g"</span> <span class="op">|</span> <span class="string">"1994g"</span> <span class="op">|</span> <span class="string">"94g"</span> <span class="op">=></span> <span class="prelude-val">Ok</span>(<span class="ident">DEMethod</span>::<span class="ident">DE1994G</span>), | ||
| <span class="string">"de1994t"</span> <span class="op">|</span> <span class="string">"de94t"</span> <span class="op">|</span> <span class="string">"1994t"</span> <span class="op">|</span> <span class="string">"94t"</span> <span class="op">=></span> <span class="prelude-val">Ok</span>(<span class="ident">DEMethod</span>::<span class="ident">DE1994T</span>), | ||
| <span class="string">"decmc"</span> <span class="op">|</span> <span class="string">"decmc1"</span><span class="op">|</span> <span class="string">"cmc1"</span> <span class="op">|</span> <span class="string">"cmc"</span> <span class="op">=></span> <span class="prelude-val">Ok</span>(<span class="ident">DEMethod</span>::<span class="ident">DECMC</span>(<span class="number">1.0</span>, <span class="number">1.0</span>)), | ||
| <span class="string">"decmc2"</span> <span class="op">|</span> <span class="string">"cmc2"</span> <span class="op">=></span> <span class="prelude-val">Ok</span>(<span class="ident">DEMethod</span>::<span class="ident">DECMC</span>(<span class="number">2.0</span>, <span class="number">1.0</span>)), | ||
| <span class="kw">_</span> <span class="op">=></span> <span class="prelude-val">Err</span>(<span class="ident">io</span>::<span class="ident">Error</span>::<span class="ident">from</span>(<span class="ident">io</span>::<span class="ident">ErrorKind</span>::<span class="ident">InvalidInput</span>)), | ||
| <span class="string">"de1994g"</span> <span class="op">|</span> <span class="string">"de94g"</span> <span class="op">|</span> <span class="string">"1994g"</span> <span class="op">|</span> <span class="string">"94g"</span> <span class="op">=</span><span class="op">></span> <span class="prelude-val">Ok</span>(<span class="ident">DEMethod::DE1994G</span>), | ||
| <span class="string">"de1994t"</span> <span class="op">|</span> <span class="string">"de94t"</span> <span class="op">|</span> <span class="string">"1994t"</span> <span class="op">|</span> <span class="string">"94t"</span> <span class="op">=</span><span class="op">></span> <span class="prelude-val">Ok</span>(<span class="ident">DEMethod::DE1994T</span>), | ||
| <span class="string">"decmc"</span> <span class="op">|</span> <span class="string">"decmc1"</span><span class="op">|</span> <span class="string">"cmc1"</span> <span class="op">|</span> <span class="string">"cmc"</span> <span class="op">=</span><span class="op">></span> <span class="prelude-val">Ok</span>(<span class="ident">DEMethod::DECMC</span>(<span class="number">1.0</span>, <span class="number">1.0</span>)), | ||
| <span class="string">"decmc2"</span> <span class="op">|</span> <span class="string">"cmc2"</span> <span class="op">=</span><span class="op">></span> <span class="prelude-val">Ok</span>(<span class="ident">DEMethod::DECMC</span>(<span class="number">2.0</span>, <span class="number">1.0</span>)), | ||
| <span class="kw">_</span> <span class="op">=</span><span class="op">></span> <span class="prelude-val">Err</span>(<span class="ident">io::Error::from</span>(<span class="ident">io::ErrorKind::InvalidInput</span>)), | ||
| } | ||
@@ -617,3 +595,3 @@ } | ||
| <span class="kw">type</span> <span class="prelude-val">Err</span> <span class="op">=</span> <span class="ident">ValueError</span>; | ||
| <span class="kw">fn</span> <span class="ident">from_str</span>(<span class="ident">s</span>: <span class="kw-2">&</span><span class="ident">str</span>) <span class="op">-></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="ident">LabValue</span><span class="op">></span> { | ||
| <span class="kw">fn</span> <span class="ident">from_str</span>(<span class="ident">s</span>: <span class="kw-2">&</span><span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="ident">LabValue</span><span class="op">></span> { | ||
| <span class="kw">let</span> <span class="ident">split</span> <span class="op">=</span> <span class="ident">parse_str_to_vecf32</span>(<span class="ident">s</span>, <span class="number">3</span>)<span class="question-mark">?</span>; | ||
@@ -631,3 +609,3 @@ | ||
| <span class="kw">type</span> <span class="prelude-val">Err</span> <span class="op">=</span> <span class="ident">ValueError</span>; | ||
| <span class="kw">fn</span> <span class="ident">from_str</span>(<span class="ident">s</span>: <span class="kw-2">&</span><span class="ident">str</span>) <span class="op">-></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="ident">LchValue</span><span class="op">></span> { | ||
| <span class="kw">fn</span> <span class="ident">from_str</span>(<span class="ident">s</span>: <span class="kw-2">&</span><span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="ident">LchValue</span><span class="op">></span> { | ||
| <span class="kw">let</span> <span class="ident">split</span> <span class="op">=</span> <span class="ident">parse_str_to_vecf32</span>(<span class="ident">s</span>, <span class="number">3</span>)<span class="question-mark">?</span>; | ||
@@ -645,3 +623,3 @@ | ||
| <span class="kw">type</span> <span class="prelude-val">Err</span> <span class="op">=</span> <span class="ident">ValueError</span>; | ||
| <span class="kw">fn</span> <span class="ident">from_str</span>(<span class="ident">s</span>: <span class="kw-2">&</span><span class="ident">str</span>) <span class="op">-></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="ident">XyzValue</span><span class="op">></span> { | ||
| <span class="kw">fn</span> <span class="ident">from_str</span>(<span class="ident">s</span>: <span class="kw-2">&</span><span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="ident">XyzValue</span><span class="op">></span> { | ||
| <span class="kw">let</span> <span class="ident">split</span> <span class="op">=</span> <span class="ident">parse_str_to_vecf32</span>(<span class="ident">s</span>, <span class="number">3</span>)<span class="question-mark">?</span>; | ||
@@ -661,5 +639,5 @@ | ||
| <span class="kw">const</span> <span class="ident">EPSILON</span>: <span class="ident">f32</span> <span class="op">=</span> <span class="number">216.0</span> <span class="op">/</span> <span class="number">24389.0</span>; <span class="comment">// CIE Standard: 0.008856</span> | ||
| <span class="kw">const</span> <span class="ident">CBRT_EPSILON</span>: <span class="ident">f32</span> <span class="op">=</span> <span class="number">0.20689655172413796</span>; | ||
| <span class="kw">const</span> <span class="ident">CBRT_EPSILON</span>: <span class="ident">f64</span> <span class="op">=</span> <span class="number">0.20689655172413796</span>; | ||
| <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">get_h_prime</span>(<span class="ident">a</span>: <span class="ident">f32</span>, <span class="ident">b</span>: <span class="ident">f32</span>) <span class="op">-></span> <span class="ident">f32</span> { | ||
| <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">get_h_prime</span>(<span class="ident">a</span>: <span class="ident">f32</span>, <span class="ident">b</span>: <span class="ident">f32</span>) <span class="op">-</span><span class="op">></span> <span class="ident">f32</span> { | ||
| <span class="kw">let</span> <span class="ident">h_prime</span> <span class="op">=</span> <span class="ident">b</span>.<span class="ident">atan2</span>(<span class="ident">a</span>).<span class="ident">to_degrees</span>(); | ||
@@ -675,7 +653,7 @@ <span class="kw">if</span> <span class="ident">h_prime</span> <span class="op"><</span> <span class="number">0.0</span> { | ||
| <span class="comment">// Split string by comma (92.5,33.5,-18.8).</span> | ||
| <span class="kw">fn</span> <span class="ident">parse_str_to_vecf32</span>(<span class="ident">s</span>: <span class="kw-2">&</span><span class="ident">str</span>, <span class="ident">length</span>: <span class="ident">usize</span>) <span class="op">-></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="ident">Vec</span><span class="op"><</span><span class="ident">f32</span><span class="op">>></span> { | ||
| <span class="kw">let</span> <span class="ident">collection</span>: <span class="ident">Vec</span><span class="op"><</span><span class="kw-2">&</span><span class="ident">str</span><span class="op">></span> <span class="op">=</span> <span class="ident">s</span>.<span class="ident">split</span>(<span class="string">","</span>).<span class="ident">collect</span>(); | ||
| <span class="kw">fn</span> <span class="ident">parse_str_to_vecf32</span>(<span class="ident">s</span>: <span class="kw-2">&</span><span class="ident">str</span>, <span class="ident">length</span>: <span class="ident">usize</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="ident">Vec</span><span class="op"><</span><span class="ident">f32</span><span class="op">></span><span class="op">></span> { | ||
| <span class="kw">let</span> <span class="ident">collection</span>: <span class="ident">Vec</span><span class="op"><</span><span class="kw-2">&</span><span class="ident">str</span><span class="op">></span> <span class="op">=</span> <span class="ident">s</span>.<span class="ident">split</span>(<span class="string">','</span>).<span class="ident">collect</span>(); | ||
| <span class="comment">// Allow extraneous whitespace ("92.5, 33.5, -18.8")</span> | ||
| <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">v</span>: <span class="ident">Vec</span><span class="op"><</span><span class="kw-2">&</span><span class="ident">str</span><span class="op">></span> <span class="op">=</span> <span class="ident">Vec</span>::<span class="ident">new</span>(); | ||
| <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">v</span>: <span class="ident">Vec</span><span class="op"><</span><span class="kw-2">&</span><span class="ident">str</span><span class="op">></span> <span class="op">=</span> <span class="ident">Vec::new</span>(); | ||
| <span class="kw">for</span> <span class="ident">item</span> <span class="kw">in</span> <span class="ident">collection</span>.<span class="ident">iter</span>() { | ||
@@ -690,4 +668,4 @@ <span class="kw">if</span> <span class="op">!</span><span class="ident">item</span>.<span class="ident">is_empty</span>() { | ||
| <span class="comment">// Check if it's the right number of items</span> | ||
| <span class="kw">if</span> <span class="ident">v</span>.<span class="ident">len</span>() <span class="op">!=</span> <span class="ident">length</span> <span class="op">||</span> <span class="ident">split</span>.<span class="ident">len</span>() <span class="op">!=</span> <span class="ident">length</span> { | ||
| <span class="kw">return</span> <span class="prelude-val">Err</span>(<span class="ident">ValueError</span>::<span class="ident">BadFormat</span>); | ||
| <span class="kw">if</span> <span class="ident">v</span>.<span class="ident">len</span>() <span class="op">!</span><span class="op">=</span> <span class="ident">length</span> <span class="op">|</span><span class="op">|</span> <span class="ident">split</span>.<span class="ident">len</span>() <span class="op">!</span><span class="op">=</span> <span class="ident">length</span> { | ||
| <span class="kw">return</span> <span class="prelude-val">Err</span>(<span class="ident">ValueError::BadFormat</span>); | ||
| } | ||
@@ -699,3 +677,3 @@ | ||
| <span class="attribute">#[<span class="ident">inline</span>]</span> | ||
| <span class="kw">fn</span> <span class="ident">xyz_to_lab_map</span>(<span class="ident">c</span>: <span class="ident">f32</span>) <span class="op">-></span> <span class="ident">f32</span> { | ||
| <span class="kw">fn</span> <span class="ident">xyz_to_lab_map</span>(<span class="ident">c</span>: <span class="ident">f32</span>) <span class="op">-</span><span class="op">></span> <span class="ident">f32</span> { | ||
| <span class="kw">if</span> <span class="ident">c</span> <span class="op">></span> <span class="ident">EPSILON</span> { | ||
@@ -708,2 +686,2 @@ <span class="ident">c</span>.<span class="ident">powf</span>(<span class="number">1.0</span><span class="op">/</span><span class="number">3.0</span>) | ||
| </pre></div> | ||
| </section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../../";window.currentCrate = "deltae";</script><script src="../../aliases.js"></script><script src="../../main.js"></script><script src="../../source-script.js"></script><script src="../../source-files.js"></script><script defer src="../../search-index.js"></script></body></html> | ||
| </section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="deltae" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script><script src="../../source-script.js"></script><script src="../../source-files.js"></script></body></html> |
@@ -1,2 +0,4 @@ | ||
| <!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="Source to the Rust file `src/delta.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>delta.rs.html -- source</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc source"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../deltae/index.html'><div class='logo-container'><img src='../../rust-logo.png' alt='logo'></div></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><pre class="line-numbers"><span id="1"> 1</span> | ||
| <!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="Source of the Rust file `src/delta.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>delta.rs - source</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> | ||
| <link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> | ||
| <link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../deltae/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><div class="example-wrap"><pre class="line-numbers"><span id="1"> 1</span> | ||
| <span id="2"> 2</span> | ||
@@ -175,12 +177,3 @@ <span id="3"> 3</span> | ||
| <span id="174">174</span> | ||
| <span id="175">175</span> | ||
| <span id="176">176</span> | ||
| <span id="177">177</span> | ||
| <span id="178">178</span> | ||
| <span id="179">179</span> | ||
| <span id="180">180</span> | ||
| <span id="181">181</span> | ||
| <span id="182">182</span> | ||
| <span id="183">183</span> | ||
| </pre><div class="example-wrap"><pre class="rust "> | ||
| </pre><pre class="rust"> | ||
| <span class="kw">use</span> <span class="kw">super</span>::<span class="kw-2">*</span>; | ||
@@ -190,3 +183,3 @@ | ||
| <span class="doccomment">/// As long as the type can be converted to Lab, we can calculate DeltaE.</span> | ||
| <span class="kw">pub</span> <span class="kw">trait</span> <span class="ident">Delta</span> <span class="kw">where</span> <span class="self">Self</span>: <span class="ident">Into</span><span class="op"><</span><span class="ident">LabValue</span><span class="op">></span> { | ||
| <span class="kw">pub</span> <span class="kw">trait</span> <span class="ident">Delta</span>: <span class="ident">Into</span><span class="op"><</span><span class="ident">LabValue</span><span class="op">></span> { | ||
| <span class="doccomment">/// Calculate DeltaE between 2 types</span> | ||
@@ -201,22 +194,23 @@ <span class="doccomment">/// ```</span> | ||
| <span class="doccomment">/// ```</span> | ||
| <span class="kw">fn</span> <span class="ident">delta</span><span class="op"><</span><span class="ident">L</span>: <span class="ident">Into</span><span class="op"><</span><span class="ident">LabValue</span><span class="op">>></span>(<span class="self">self</span>, <span class="ident">other</span>: <span class="ident">L</span>, <span class="ident">method</span>: <span class="ident">DEMethod</span>) <span class="op">-></span> <span class="ident">DeltaE</span> { | ||
| <span class="kw">let</span> <span class="ident">lab0</span>: <span class="ident">LabValue</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">into</span>(); | ||
| <span class="kw">let</span> <span class="ident">lab1</span>: <span class="ident">LabValue</span> <span class="op">=</span> <span class="ident">other</span>.<span class="ident">into</span>(); | ||
| <span class="attribute">#[<span class="ident">inline</span>]</span> | ||
| <span class="kw">fn</span> <span class="ident">delta</span><span class="op"><</span><span class="ident">L</span>: <span class="ident">Into</span><span class="op"><</span><span class="ident">LabValue</span><span class="op">></span><span class="op">></span>(<span class="self">self</span>, <span class="ident">other</span>: <span class="ident">L</span>, <span class="ident">method</span>: <span class="ident">DEMethod</span>) <span class="op">-</span><span class="op">></span> <span class="ident">DeltaE</span> { | ||
| <span class="kw">let</span> <span class="ident">reference</span>: <span class="ident">LabValue</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">into</span>(); | ||
| <span class="kw">let</span> <span class="ident">sample</span>: <span class="ident">LabValue</span> <span class="op">=</span> <span class="ident">other</span>.<span class="ident">into</span>(); | ||
| <span class="kw">let</span> <span class="ident">value</span> <span class="op">=</span> <span class="kw">match</span> <span class="ident">method</span> { | ||
| <span class="ident">DEMethod</span>::<span class="ident">DE1976</span> <span class="op">=></span> <span class="ident">delta_e_1976</span>(<span class="kw-2">&</span><span class="ident">lab0</span>, <span class="kw-2">&</span><span class="ident">lab1</span>), | ||
| <span class="ident">DEMethod</span>::<span class="ident">DE1994T</span> <span class="op">=></span> <span class="ident">delta_e_1994</span>(<span class="kw-2">&</span><span class="ident">lab0</span>, <span class="kw-2">&</span><span class="ident">lab1</span>, <span class="bool-val">true</span>), | ||
| <span class="ident">DEMethod</span>::<span class="ident">DE1994G</span> <span class="op">=></span> <span class="ident">delta_e_1994</span>(<span class="kw-2">&</span><span class="ident">lab0</span>, <span class="kw-2">&</span><span class="ident">lab1</span>, <span class="bool-val">false</span>), | ||
| <span class="ident">DEMethod</span>::<span class="ident">DE2000</span> <span class="op">=></span> <span class="ident">delta_e_2000</span>(<span class="kw-2">&</span><span class="ident">lab0</span>, <span class="kw-2">&</span><span class="ident">lab1</span>), | ||
| <span class="ident">DEMethod</span>::<span class="ident">DECMC</span>(<span class="ident">t_l</span>, <span class="ident">t_c</span>) <span class="op">=></span> <span class="ident">delta_e_cmc</span>(<span class="kw-2">&</span><span class="ident">lab0</span>, <span class="kw-2">&</span><span class="ident">lab1</span>, <span class="ident">t_l</span>, <span class="ident">t_c</span>), | ||
| <span class="ident">DEMethod::DE1976</span> <span class="op">=</span><span class="op">></span> <span class="ident">delta_e_1976</span>(<span class="kw-2">&</span><span class="ident">reference</span>, <span class="kw-2">&</span><span class="ident">sample</span>), | ||
| <span class="ident">DEMethod::DE1994T</span> <span class="op">=</span><span class="op">></span> <span class="ident">delta_e_1994</span>(<span class="kw-2">&</span><span class="ident">reference</span>, <span class="kw-2">&</span><span class="ident">sample</span>, <span class="bool-val">true</span>), | ||
| <span class="ident">DEMethod::DE1994G</span> <span class="op">=</span><span class="op">></span> <span class="ident">delta_e_1994</span>(<span class="kw-2">&</span><span class="ident">reference</span>, <span class="kw-2">&</span><span class="ident">sample</span>, <span class="bool-val">false</span>), | ||
| <span class="ident">DEMethod::DE2000</span> <span class="op">=</span><span class="op">></span> <span class="ident">delta_e_2000</span>(<span class="kw-2">&</span><span class="ident">reference</span>, <span class="kw-2">&</span><span class="ident">sample</span>), | ||
| <span class="ident">DEMethod::DECMC</span>(<span class="ident">t_l</span>, <span class="ident">t_c</span>) <span class="op">=</span><span class="op">></span> <span class="ident">delta_e_cmc</span>(<span class="kw-2">&</span><span class="ident">reference</span>, <span class="kw-2">&</span><span class="ident">sample</span>, <span class="ident">t_l</span>, <span class="ident">t_c</span>), | ||
| }; | ||
| <span class="ident">DeltaE</span> { <span class="ident">value</span>, <span class="ident">method</span> } | ||
| <span class="ident">DeltaE</span> { <span class="ident">value</span>, <span class="ident">method</span>, <span class="ident">reference</span>, <span class="ident">sample</span> } | ||
| } | ||
| } | ||
| <span class="kw">impl</span><span class="op"><</span><span class="ident">T</span>: <span class="ident">Into</span><span class="op"><</span><span class="ident">LabValue</span><span class="op">>></span> <span class="ident">Delta</span> <span class="kw">for</span> <span class="ident">T</span> {} | ||
| <span class="kw">impl</span><span class="op"><</span><span class="ident">T</span>: <span class="ident">Into</span><span class="op"><</span><span class="ident">LabValue</span><span class="op">></span><span class="op">></span> <span class="ident">Delta</span> <span class="kw">for</span> <span class="ident">T</span> {} | ||
| <span class="doccomment">/// DeltaE 1976. Basic euclidian distance formula.</span> | ||
| <span class="attribute">#[<span class="ident">inline</span>]</span> | ||
| <span class="kw">fn</span> <span class="ident">delta_e_1976</span>(<span class="ident">lab_0</span>: <span class="kw-2">&</span><span class="ident">LabValue</span>, <span class="ident">lab_1</span>: <span class="kw-2">&</span><span class="ident">LabValue</span>) <span class="op">-></span> <span class="ident">f32</span> { | ||
| <span class="kw">fn</span> <span class="ident">delta_e_1976</span>(<span class="ident">lab_0</span>: <span class="kw-2">&</span><span class="ident">LabValue</span>, <span class="ident">lab_1</span>: <span class="kw-2">&</span><span class="ident">LabValue</span>) <span class="op">-</span><span class="op">></span> <span class="ident">f32</span> { | ||
| ( (<span class="ident">lab_0</span>.<span class="ident">l</span> <span class="op">-</span> <span class="ident">lab_1</span>.<span class="ident">l</span>).<span class="ident">powi</span>(<span class="number">2</span>) <span class="op">+</span> (<span class="ident">lab_0</span>.<span class="ident">a</span> <span class="op">-</span> <span class="ident">lab_1</span>.<span class="ident">a</span>).<span class="ident">powi</span>(<span class="number">2</span>) <span class="op">+</span> (<span class="ident">lab_0</span>.<span class="ident">b</span> <span class="op">-</span> <span class="ident">lab_1</span>.<span class="ident">b</span>).<span class="ident">powi</span>(<span class="number">2</span>) ).<span class="ident">sqrt</span>() | ||
@@ -227,3 +221,3 @@ } | ||
| <span class="attribute">#[<span class="ident">inline</span>]</span> | ||
| <span class="kw">fn</span> <span class="ident">delta_e_1994</span>(<span class="ident">lab_0</span>: <span class="kw-2">&</span><span class="ident">LabValue</span>, <span class="ident">lab_1</span>: <span class="kw-2">&</span><span class="ident">LabValue</span>, <span class="ident">textiles</span>: <span class="ident">bool</span>) <span class="op">-></span> <span class="ident">f32</span> { | ||
| <span class="kw">fn</span> <span class="ident">delta_e_1994</span>(<span class="ident">lab_0</span>: <span class="kw-2">&</span><span class="ident">LabValue</span>, <span class="ident">lab_1</span>: <span class="kw-2">&</span><span class="ident">LabValue</span>, <span class="ident">textiles</span>: <span class="ident">bool</span>) <span class="op">-</span><span class="op">></span> <span class="ident">f32</span> { | ||
| <span class="kw">let</span> <span class="ident">delta_l</span> <span class="op">=</span> <span class="ident">lab_0</span>.<span class="ident">l</span> <span class="op">-</span> <span class="ident">lab_1</span>.<span class="ident">l</span>; | ||
@@ -238,4 +232,4 @@ <span class="kw">let</span> <span class="ident">chroma_0</span> <span class="op">=</span> (<span class="ident">lab_0</span>.<span class="ident">a</span>.<span class="ident">powi</span>(<span class="number">2</span>) <span class="op">+</span> <span class="ident">lab_0</span>.<span class="ident">b</span>.<span class="ident">powi</span>(<span class="number">2</span>)).<span class="ident">sqrt</span>(); | ||
| <span class="kw">let</span> (<span class="ident">kl</span>, <span class="ident">k1</span>, <span class="ident">k2</span>) <span class="op">=</span> <span class="kw">match</span> <span class="ident">textiles</span> { | ||
| <span class="bool-val">true</span> <span class="op">=></span> (<span class="number">2.0</span>, <span class="number">0.048</span>, <span class="number">0.014</span>), | ||
| <span class="bool-val">false</span> <span class="op">=></span> (<span class="number">1.0</span>, <span class="number">0.045</span>, <span class="number">0.015</span>), | ||
| <span class="bool-val">true</span> <span class="op">=</span><span class="op">></span> (<span class="number">2.0</span>, <span class="number">0.048</span>, <span class="number">0.014</span>), | ||
| <span class="bool-val">false</span> <span class="op">=</span><span class="op">></span> (<span class="number">1.0</span>, <span class="number">0.045</span>, <span class="number">0.015</span>), | ||
| }; | ||
@@ -247,6 +241,3 @@ | ||
| ( (<span class="ident">delta_l</span> <span class="op">/</span> <span class="ident">kl</span> <span class="op">*</span> <span class="ident">s_l</span>).<span class="ident">powi</span>(<span class="number">2</span>) | ||
| <span class="op">+</span> (<span class="ident">delta_chroma</span> <span class="op">/</span> <span class="ident">s_c</span>).<span class="ident">powi</span>(<span class="number">2</span>) | ||
| <span class="op">+</span> (<span class="ident">delta_hue</span> <span class="op">/</span> <span class="ident">s_h</span>).<span class="ident">powi</span>(<span class="number">2</span>) | ||
| ).<span class="ident">sqrt</span>() | ||
| ((<span class="ident">delta_l</span> <span class="op">/</span> <span class="ident">kl</span> <span class="op">*</span> <span class="ident">s_l</span>).<span class="ident">powi</span>(<span class="number">2</span>) <span class="op">+</span> (<span class="ident">delta_chroma</span> <span class="op">/</span> <span class="ident">s_c</span>).<span class="ident">powi</span>(<span class="number">2</span>) <span class="op">+</span> (<span class="ident">delta_hue</span> <span class="op">/</span> <span class="ident">s_h</span>).<span class="ident">powi</span>(<span class="number">2</span>)).<span class="ident">sqrt</span>() | ||
| } | ||
@@ -256,3 +247,3 @@ | ||
| <span class="attribute">#[<span class="ident">inline</span>]</span> | ||
| <span class="kw">fn</span> <span class="ident">delta_e_2000</span>(<span class="ident">lab_0</span>: <span class="kw-2">&</span><span class="ident">LabValue</span>, <span class="ident">lab_1</span>: <span class="kw-2">&</span><span class="ident">LabValue</span>) <span class="op">-></span> <span class="ident">f32</span> { | ||
| <span class="kw">fn</span> <span class="ident">delta_e_2000</span>(<span class="ident">lab_0</span>: <span class="kw-2">&</span><span class="ident">LabValue</span>, <span class="ident">lab_1</span>: <span class="kw-2">&</span><span class="ident">LabValue</span>) <span class="op">-</span><span class="op">></span> <span class="ident">f32</span> { | ||
| <span class="kw">let</span> <span class="ident">chroma_0</span> <span class="op">=</span> (<span class="ident">lab_0</span>.<span class="ident">a</span>.<span class="ident">powi</span>(<span class="number">2</span>) <span class="op">+</span> <span class="ident">lab_0</span>.<span class="ident">b</span>.<span class="ident">powi</span>(<span class="number">2</span>)).<span class="ident">sqrt</span>(); | ||
@@ -274,4 +265,4 @@ <span class="kw">let</span> <span class="ident">chroma_1</span> <span class="op">=</span> (<span class="ident">lab_1</span>.<span class="ident">a</span>.<span class="ident">powi</span>(<span class="number">2</span>) <span class="op">+</span> <span class="ident">lab_1</span>.<span class="ident">b</span>.<span class="ident">powi</span>(<span class="number">2</span>)).<span class="ident">sqrt</span>(); | ||
| <span class="kw">let</span> <span class="ident">h_prime_0</span> <span class="op">=</span> <span class="ident">convert</span>::<span class="ident">get_h_prime</span>(<span class="ident">a_prime_0</span>, <span class="ident">lab_0</span>.<span class="ident">b</span>); | ||
| <span class="kw">let</span> <span class="ident">h_prime_1</span> <span class="op">=</span> <span class="ident">convert</span>::<span class="ident">get_h_prime</span>(<span class="ident">a_prime_1</span>, <span class="ident">lab_1</span>.<span class="ident">b</span>); | ||
| <span class="kw">let</span> <span class="ident">h_prime_0</span> <span class="op">=</span> <span class="ident">convert::get_h_prime</span>(<span class="ident">a_prime_0</span>, <span class="ident">lab_0</span>.<span class="ident">b</span>); | ||
| <span class="kw">let</span> <span class="ident">h_prime_1</span> <span class="op">=</span> <span class="ident">convert::get_h_prime</span>(<span class="ident">a_prime_1</span>, <span class="ident">lab_1</span>.<span class="ident">b</span>); | ||
@@ -294,6 +285,6 @@ <span class="kw">let</span> <span class="ident">h_bar_prime</span> <span class="op">=</span> <span class="kw">if</span> (<span class="ident">h_prime_0</span> <span class="op">-</span> <span class="ident">h_prime_1</span>).<span class="ident">abs</span>() <span class="op">></span> <span class="number">180.0</span> { | ||
| <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">delta_h</span> <span class="op">=</span> <span class="ident">h_prime_1</span> <span class="op">-</span> <span class="ident">h_prime_0</span>; | ||
| <span class="kw">if</span> <span class="ident">delta_h</span> <span class="op">></span> <span class="number">180.0</span> <span class="op">&&</span> <span class="ident">h_prime_1</span> <span class="op"><=</span> <span class="ident">h_prime_0</span> { | ||
| <span class="ident">delta_h</span> <span class="op">+=</span> <span class="number">360.0</span>; | ||
| <span class="kw">if</span> <span class="ident">delta_h</span> <span class="op">></span> <span class="number">180.0</span> <span class="op">&&</span> <span class="ident">h_prime_1</span> <span class="op"><</span><span class="op">=</span> <span class="ident">h_prime_0</span> { | ||
| <span class="ident">delta_h</span> <span class="op">+</span><span class="op">=</span> <span class="number">360.0</span>; | ||
| } <span class="kw">else</span> <span class="kw">if</span> <span class="ident">delta_h</span> <span class="op">></span> <span class="number">180.0</span> { | ||
| <span class="ident">delta_h</span> <span class="op">-=</span> <span class="number">360.0</span>; | ||
| <span class="ident">delta_h</span> <span class="op">-</span><span class="op">=</span> <span class="number">360.0</span>; | ||
| }; | ||
@@ -320,3 +311,3 @@ | ||
| <span class="kw">let</span> <span class="ident">de2000</span> <span class="op">=</span> ( | ||
| ( | ||
| (<span class="ident">delta_l_prime</span><span class="op">/</span>(<span class="ident">k_l</span><span class="kw-2">*</span><span class="ident">s_l</span>)).<span class="ident">powi</span>(<span class="number">2</span>) | ||
@@ -326,5 +317,3 @@ <span class="op">+</span> (<span class="ident">delta_c_prime</span><span class="op">/</span>(<span class="ident">k_c</span><span class="kw-2">*</span><span class="ident">s_c</span>)).<span class="ident">powi</span>(<span class="number">2</span>) | ||
| <span class="op">+</span> (<span class="ident">r_t</span> <span class="op">*</span> (<span class="ident">delta_c_prime</span><span class="op">/</span>(<span class="ident">k_c</span><span class="kw-2">*</span><span class="ident">s_c</span>)) <span class="op">*</span> (<span class="ident">delta_h_prime</span><span class="op">/</span>(<span class="ident">k_h</span><span class="kw-2">*</span><span class="ident">s_h</span>))) | ||
| ).<span class="ident">sqrt</span>(); | ||
| <span class="ident">de2000</span> | ||
| ).<span class="ident">sqrt</span>() | ||
| } | ||
@@ -334,3 +323,3 @@ | ||
| <span class="attribute">#[<span class="ident">inline</span>]</span> | ||
| <span class="kw">fn</span> <span class="ident">delta_e_cmc</span>(<span class="ident">lab0</span>: <span class="kw-2">&</span><span class="ident">LabValue</span>, <span class="ident">lab1</span> :<span class="kw-2">&</span><span class="ident">LabValue</span>, <span class="ident">tolerance_l</span>: <span class="ident">f32</span>, <span class="ident">tolerance_c</span>: <span class="ident">f32</span>) <span class="op">-></span> <span class="ident">f32</span> { | ||
| <span class="kw">fn</span> <span class="ident">delta_e_cmc</span>(<span class="ident">lab0</span>: <span class="kw-2">&</span><span class="ident">LabValue</span>, <span class="ident">lab1</span>: <span class="kw-2">&</span><span class="ident">LabValue</span>, <span class="ident">tolerance_l</span>: <span class="ident">f32</span>, <span class="ident">tolerance_c</span>: <span class="ident">f32</span>) <span class="op">-</span><span class="op">></span> <span class="ident">f32</span> { | ||
| <span class="kw">let</span> <span class="ident">chroma_0</span> <span class="op">=</span> (<span class="ident">lab0</span>.<span class="ident">a</span>.<span class="ident">powi</span>(<span class="number">2</span>) <span class="op">+</span> <span class="ident">lab0</span>.<span class="ident">b</span>.<span class="ident">powi</span>(<span class="number">2</span>)).<span class="ident">sqrt</span>(); | ||
@@ -356,11 +345,7 @@ <span class="kw">let</span> <span class="ident">chroma_1</span> <span class="op">=</span> (<span class="ident">lab1</span>.<span class="ident">a</span>.<span class="ident">powi</span>(<span class="number">2</span>) <span class="op">+</span> <span class="ident">lab1</span>.<span class="ident">b</span>.<span class="ident">powi</span>(<span class="number">2</span>)).<span class="ident">sqrt</span>(); | ||
| <span class="kw">let</span> <span class="ident">h_1</span> <span class="op">=</span> <span class="kw">if</span> <span class="ident">h</span> <span class="op">>=</span> <span class="number">0.0</span> { | ||
| <span class="ident">h</span> | ||
| } <span class="kw">else</span> { | ||
| <span class="ident">h</span> <span class="op">+</span> <span class="number">360.0</span> | ||
| }; | ||
| <span class="kw">let</span> <span class="ident">h_1</span> <span class="op">=</span> <span class="kw">if</span> <span class="ident">h</span> <span class="op">></span><span class="op">=</span> <span class="number">0.0</span> { <span class="ident">h</span> } <span class="kw">else</span> { <span class="ident">h</span> <span class="op">+</span> <span class="number">360.0</span> }; | ||
| <span class="kw">let</span> <span class="ident">f</span> <span class="op">=</span> (<span class="ident">chroma_0</span>.<span class="ident">powi</span>(<span class="number">4</span>) <span class="op">/</span> (<span class="ident">chroma_0</span>.<span class="ident">powi</span>(<span class="number">4</span>) <span class="op">+</span> <span class="number">1900.0</span>)).<span class="ident">sqrt</span>(); | ||
| <span class="kw">let</span> <span class="ident">t</span> <span class="op">=</span> <span class="kw">if</span> <span class="number">164.0</span> <span class="op"><=</span> <span class="ident">h_1</span> <span class="op">&&</span> <span class="ident">h_1</span> <span class="op"><=</span> <span class="number">345.0</span> { | ||
| <span class="kw">let</span> <span class="ident">t</span> <span class="op">=</span> <span class="kw">if</span> (<span class="number">164.0</span>..<span class="number">345.0</span>).<span class="ident">contains</span>(<span class="kw-2">&</span><span class="ident">h_1</span>) { | ||
| <span class="number">0.56</span> <span class="op">+</span> (<span class="number">0.2</span> <span class="op">*</span> (<span class="ident">h_1</span> <span class="op">+</span> <span class="number">168.0</span>).<span class="ident">to_radians</span>().<span class="ident">cos</span>()).<span class="ident">abs</span>() | ||
@@ -373,11 +358,10 @@ } <span class="kw">else</span> { | ||
| <span class="kw">let</span> <span class="ident">decmc</span> <span class="op">=</span> ( | ||
| (<span class="ident">delta_l</span> <span class="op">/</span> (<span class="ident">tolerance_l</span> <span class="op">*</span> <span class="ident">s_l</span>)).<span class="ident">powi</span>(<span class="number">2</span>) <span class="op">+</span> | ||
| (<span class="ident">delta_c</span> <span class="op">/</span> (<span class="ident">tolerance_c</span> <span class="op">*</span> <span class="ident">s_c</span>)).<span class="ident">powi</span>(<span class="number">2</span>) <span class="op">+</span> | ||
| (<span class="ident">delta_h</span> <span class="op">/</span> <span class="ident">s_h</span>).<span class="ident">powi</span>(<span class="number">2</span>) | ||
| ).<span class="ident">sqrt</span>(); | ||
| <span class="ident">decmc</span> | ||
| ( | ||
| (<span class="ident">delta_l</span> <span class="op">/</span> (<span class="ident">tolerance_l</span> <span class="op">*</span> <span class="ident">s_l</span>)).<span class="ident">powi</span>(<span class="number">2</span>) | ||
| <span class="op">+</span> (<span class="ident">delta_c</span> <span class="op">/</span> (<span class="ident">tolerance_c</span> <span class="op">*</span> <span class="ident">s_c</span>)).<span class="ident">powi</span>(<span class="number">2</span>) | ||
| <span class="op">+</span> (<span class="ident">delta_h</span> <span class="op">/</span> <span class="ident">s_h</span>).<span class="ident">powi</span>(<span class="number">2</span>) | ||
| ) | ||
| .<span class="ident">sqrt</span>() | ||
| } | ||
| </pre></div> | ||
| </section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../../";window.currentCrate = "deltae";</script><script src="../../aliases.js"></script><script src="../../main.js"></script><script src="../../source-script.js"></script><script src="../../source-files.js"></script><script defer src="../../search-index.js"></script></body></html> | ||
| </section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="deltae" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script><script src="../../source-script.js"></script><script src="../../source-files.js"></script></body></html> |
@@ -1,57 +0,267 @@ | ||
| <!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="Source to the Rust file `src/eq.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>eq.rs.html -- source</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc source"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../deltae/index.html'><div class='logo-container'><img src='../../rust-logo.png' alt='logo'></div></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><pre class="line-numbers"><span id="1"> 1</span> | ||
| <span id="2"> 2</span> | ||
| <span id="3"> 3</span> | ||
| <span id="4"> 4</span> | ||
| <span id="5"> 5</span> | ||
| <span id="6"> 6</span> | ||
| <span id="7"> 7</span> | ||
| <span id="8"> 8</span> | ||
| <span id="9"> 9</span> | ||
| <span id="10">10</span> | ||
| <span id="11">11</span> | ||
| <span id="12">12</span> | ||
| <span id="13">13</span> | ||
| <span id="14">14</span> | ||
| <span id="15">15</span> | ||
| <span id="16">16</span> | ||
| <span id="17">17</span> | ||
| <span id="18">18</span> | ||
| <span id="19">19</span> | ||
| <span id="20">20</span> | ||
| <span id="21">21</span> | ||
| <span id="22">22</span> | ||
| <span id="23">23</span> | ||
| <span id="24">24</span> | ||
| <span id="25">25</span> | ||
| <span id="26">26</span> | ||
| <span id="27">27</span> | ||
| </pre><div class="example-wrap"><pre class="rust "> | ||
| <span class="doccomment">/// We can determine that two colors are equivalent if the Delta is less than</span> | ||
| <span class="doccomment">/// a certain value. Typically, two colors with a DE2000 value of less than 1.0</span> | ||
| <span class="doccomment">/// are considered indistinguishable.</span> | ||
| <!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="Source of the Rust file `src/eq.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>eq.rs - source</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> | ||
| <link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> | ||
| <link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../deltae/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><div class="example-wrap"><pre class="line-numbers"><span id="1"> 1</span> | ||
| <span id="2"> 2</span> | ||
| <span id="3"> 3</span> | ||
| <span id="4"> 4</span> | ||
| <span id="5"> 5</span> | ||
| <span id="6"> 6</span> | ||
| <span id="7"> 7</span> | ||
| <span id="8"> 8</span> | ||
| <span id="9"> 9</span> | ||
| <span id="10"> 10</span> | ||
| <span id="11"> 11</span> | ||
| <span id="12"> 12</span> | ||
| <span id="13"> 13</span> | ||
| <span id="14"> 14</span> | ||
| <span id="15"> 15</span> | ||
| <span id="16"> 16</span> | ||
| <span id="17"> 17</span> | ||
| <span id="18"> 18</span> | ||
| <span id="19"> 19</span> | ||
| <span id="20"> 20</span> | ||
| <span id="21"> 21</span> | ||
| <span id="22"> 22</span> | ||
| <span id="23"> 23</span> | ||
| <span id="24"> 24</span> | ||
| <span id="25"> 25</span> | ||
| <span id="26"> 26</span> | ||
| <span id="27"> 27</span> | ||
| <span id="28"> 28</span> | ||
| <span id="29"> 29</span> | ||
| <span id="30"> 30</span> | ||
| <span id="31"> 31</span> | ||
| <span id="32"> 32</span> | ||
| <span id="33"> 33</span> | ||
| <span id="34"> 34</span> | ||
| <span id="35"> 35</span> | ||
| <span id="36"> 36</span> | ||
| <span id="37"> 37</span> | ||
| <span id="38"> 38</span> | ||
| <span id="39"> 39</span> | ||
| <span id="40"> 40</span> | ||
| <span id="41"> 41</span> | ||
| <span id="42"> 42</span> | ||
| <span id="43"> 43</span> | ||
| <span id="44"> 44</span> | ||
| <span id="45"> 45</span> | ||
| <span id="46"> 46</span> | ||
| <span id="47"> 47</span> | ||
| <span id="48"> 48</span> | ||
| <span id="49"> 49</span> | ||
| <span id="50"> 50</span> | ||
| <span id="51"> 51</span> | ||
| <span id="52"> 52</span> | ||
| <span id="53"> 53</span> | ||
| <span id="54"> 54</span> | ||
| <span id="55"> 55</span> | ||
| <span id="56"> 56</span> | ||
| <span id="57"> 57</span> | ||
| <span id="58"> 58</span> | ||
| <span id="59"> 59</span> | ||
| <span id="60"> 60</span> | ||
| <span id="61"> 61</span> | ||
| <span id="62"> 62</span> | ||
| <span id="63"> 63</span> | ||
| <span id="64"> 64</span> | ||
| <span id="65"> 65</span> | ||
| <span id="66"> 66</span> | ||
| <span id="67"> 67</span> | ||
| <span id="68"> 68</span> | ||
| <span id="69"> 69</span> | ||
| <span id="70"> 70</span> | ||
| <span id="71"> 71</span> | ||
| <span id="72"> 72</span> | ||
| <span id="73"> 73</span> | ||
| <span id="74"> 74</span> | ||
| <span id="75"> 75</span> | ||
| <span id="76"> 76</span> | ||
| <span id="77"> 77</span> | ||
| <span id="78"> 78</span> | ||
| <span id="79"> 79</span> | ||
| <span id="80"> 80</span> | ||
| <span id="81"> 81</span> | ||
| <span id="82"> 82</span> | ||
| <span id="83"> 83</span> | ||
| <span id="84"> 84</span> | ||
| <span id="85"> 85</span> | ||
| <span id="86"> 86</span> | ||
| <span id="87"> 87</span> | ||
| <span id="88"> 88</span> | ||
| <span id="89"> 89</span> | ||
| <span id="90"> 90</span> | ||
| <span id="91"> 91</span> | ||
| <span id="92"> 92</span> | ||
| <span id="93"> 93</span> | ||
| <span id="94"> 94</span> | ||
| <span id="95"> 95</span> | ||
| <span id="96"> 96</span> | ||
| <span id="97"> 97</span> | ||
| <span id="98"> 98</span> | ||
| <span id="99"> 99</span> | ||
| <span id="100">100</span> | ||
| <span id="101">101</span> | ||
| <span id="102">102</span> | ||
| <span id="103">103</span> | ||
| <span id="104">104</span> | ||
| <span id="105">105</span> | ||
| <span id="106">106</span> | ||
| <span id="107">107</span> | ||
| <span id="108">108</span> | ||
| <span id="109">109</span> | ||
| <span id="110">110</span> | ||
| <span id="111">111</span> | ||
| <span id="112">112</span> | ||
| <span id="113">113</span> | ||
| <span id="114">114</span> | ||
| <span id="115">115</span> | ||
| <span id="116">116</span> | ||
| <span id="117">117</span> | ||
| <span id="118">118</span> | ||
| <span id="119">119</span> | ||
| <span id="120">120</span> | ||
| <span id="121">121</span> | ||
| <span id="122">122</span> | ||
| <span id="123">123</span> | ||
| <span id="124">124</span> | ||
| <span id="125">125</span> | ||
| <span id="126">126</span> | ||
| <span id="127">127</span> | ||
| <span id="128">128</span> | ||
| <span id="129">129</span> | ||
| <span id="130">130</span> | ||
| <span id="131">131</span> | ||
| </pre><pre class="rust"> | ||
| <span class="doccomment">//! ## `Tolerance` and `DeltaEq` traits</span> | ||
| <span class="doccomment">//!</span> | ||
| <span class="doccomment">//! This module deals with comparing two colors by [`DeltaE`] within a certain [`Tolerance`].</span> | ||
| <span class="doccomment">//!</span> | ||
| <span class="doccomment">//! See also: [`assert_delta_eq`]</span> | ||
| <span class="doccomment">//!</span> | ||
| <span class="doccomment">//! ### Implementing `Tolerance` and `DeltaEq`</span> | ||
| <span class="doccomment">//!</span> | ||
| <span class="doccomment">//! ```</span> | ||
| <span class="doccomment">//! use deltae::*;</span> | ||
| <span class="doccomment">//!</span> | ||
| <span class="doccomment">//! struct MyTolerance(f32);</span> | ||
| <span class="doccomment">//!</span> | ||
| <span class="doccomment">//! impl Tolerance for MyTolerance {</span> | ||
| <span class="doccomment">//! fn tolerance(self) -> f32 {</span> | ||
| <span class="doccomment">//! self.0</span> | ||
| <span class="doccomment">//! }</span> | ||
| <span class="doccomment">//! }</span> | ||
| <span class="doccomment">//!</span> | ||
| <span class="doccomment">//! #[derive(Copy, Clone)]</span> | ||
| <span class="doccomment">//! struct MyLab(f32, f32, f32);</span> | ||
| <span class="doccomment">//!</span> | ||
| <span class="doccomment">//! // Types that implement Into<Lab> also implement the Delta trait</span> | ||
| <span class="doccomment">//! impl From<MyLab> for LabValue {</span> | ||
| <span class="doccomment">//! fn from(mylab: MyLab) -> LabValue {</span> | ||
| <span class="doccomment">//! LabValue {</span> | ||
| <span class="doccomment">//! l: mylab.0,</span> | ||
| <span class="doccomment">//! a: mylab.1,</span> | ||
| <span class="doccomment">//! b: mylab.2,</span> | ||
| <span class="doccomment">//! }</span> | ||
| <span class="doccomment">//! }</span> | ||
| <span class="doccomment">//! }</span> | ||
| <span class="doccomment">//!</span> | ||
| <span class="doccomment">//! impl<D: Delta + Copy> DeltaEq<D> for MyLab {}</span> | ||
| <span class="doccomment">//!</span> | ||
| <span class="doccomment">//! let mylab = MyLab(89.73, 1.88, -6.96);</span> | ||
| <span class="doccomment">//! let lab = LabValue::new(89.73, 1.88, -6.96).unwrap();</span> | ||
| <span class="doccomment">//! let de2000 = mylab.delta(lab, DEMethod::DE2000);</span> | ||
| <span class="doccomment">//! assert!(mylab.delta_eq(&lab, DE1976, 0.0));</span> | ||
| <span class="doccomment">//! ```</span> | ||
| <span class="kw">use</span> <span class="kw">crate</span>::<span class="kw-2">*</span>; | ||
| <span class="doccomment">/// Trait to determine whether two values are within a certain tolerance of [`DeltaE`]. Types that</span> | ||
| <span class="doccomment">/// implement Into<[`LabValue`]> implicitly implement [`Delta`]. Types that implement [`Delta`] and</span> | ||
| <span class="doccomment">/// [`Copy`] may also implement DeltaEq for other types that also implement [`Delta`] and [`Copy`].</span> | ||
| <span class="doccomment">/// ```</span> | ||
| <span class="doccomment">/// use deltae::*;</span> | ||
| <span class="doccomment">///</span> | ||
| <span class="kw">use</span> <span class="kw">super</span>::<span class="kw-2">*</span>; | ||
| <span class="kw">use</span> <span class="kw">super</span>::<span class="ident">delta</span>::<span class="ident">Delta</span>; | ||
| <span class="doccomment">/// #[derive(Copy, Clone)]</span> | ||
| <span class="doccomment">/// struct MyLab(f32, f32, f32);</span> | ||
| <span class="doccomment">///</span> | ||
| <span class="doccomment">/// // Types that implement Into<Lab> implicitly implement the Delta trait</span> | ||
| <span class="doccomment">/// impl From<MyLab> for LabValue {</span> | ||
| <span class="doccomment">/// fn from(mylab: MyLab) -> LabValue {</span> | ||
| <span class="doccomment">/// LabValue {</span> | ||
| <span class="doccomment">/// l: mylab.0,</span> | ||
| <span class="doccomment">/// a: mylab.1,</span> | ||
| <span class="doccomment">/// b: mylab.2,</span> | ||
| <span class="doccomment">/// }</span> | ||
| <span class="doccomment">/// }</span> | ||
| <span class="doccomment">/// }</span> | ||
| <span class="doccomment">///</span> | ||
| <span class="doccomment">/// // Types that implement Delta and Copy may also implement DeltaEq for other types that also</span> | ||
| <span class="doccomment">/// // implement Delta and Copy</span> | ||
| <span class="doccomment">/// impl<D: Delta + Copy> DeltaEq<D> for MyLab {}</span> | ||
| <span class="doccomment">///</span> | ||
| <span class="doccomment">/// let mylab = MyLab(89.73, 1.88, -6.96);</span> | ||
| <span class="doccomment">/// let lab = LabValue::new(89.73, 1.88, -6.96).unwrap();</span> | ||
| <span class="doccomment">/// let de2000 = mylab.delta(lab, DEMethod::DE2000);</span> | ||
| <span class="doccomment">/// assert!(mylab.delta_eq(&lab, DE1976, 0.0));</span> | ||
| <span class="doccomment">/// ```</span> | ||
| <span class="kw">pub</span> <span class="kw">trait</span> <span class="ident">DeltaEq</span><span class="op"><</span><span class="ident">D</span>: <span class="ident">Delta</span> <span class="op">+</span> <span class="ident">Copy</span><span class="op">></span>: <span class="ident">Delta</span> <span class="op">+</span> <span class="ident">Copy</span> { | ||
| <span class="doccomment">/// Return true if the value is less than or equal to the [`Tolerance`]</span> | ||
| <span class="kw">fn</span> <span class="ident">delta_eq</span><span class="op"><</span><span class="ident">T</span>: <span class="ident">Tolerance</span><span class="op">></span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">other</span>: <span class="ident">D</span>, <span class="ident">method</span>: <span class="ident">DEMethod</span>, <span class="ident">tolerance</span>: <span class="ident">T</span>) <span class="op">-</span><span class="op">></span> <span class="ident">bool</span> { | ||
| <span class="self">self</span>.<span class="ident">delta</span>(<span class="ident">other</span>, <span class="ident">method</span>).<span class="ident">value</span>() <span class="op"><</span><span class="op">=</span> <span class="kw-2">&</span><span class="ident">tolerance</span>.<span class="ident">tolerance</span>() | ||
| } | ||
| } | ||
| <span class="kw">impl</span><span class="op"><</span><span class="ident">T</span>: <span class="ident">Delta</span> <span class="op">+</span> <span class="ident">Copy</span><span class="op">></span> <span class="ident">PartialEq</span><span class="op"><</span><span class="ident">T</span><span class="op">></span> <span class="kw">for</span> <span class="ident">LabValue</span> | ||
| <span class="kw">where</span> <span class="ident">LabValue</span>: <span class="ident">From</span><span class="op"><</span><span class="ident">T</span><span class="op">></span> { | ||
| <span class="kw">fn</span> <span class="ident">eq</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">other</span>: <span class="kw-2">&</span><span class="ident">T</span>) <span class="op">-></span> <span class="ident">bool</span> { | ||
| <span class="self">self</span>.<span class="ident">delta</span>(<span class="kw-2">*</span><span class="ident">other</span>, <span class="ident">DE2000</span>).<span class="ident">value</span> <span class="op"><</span> <span class="number">1.0</span> | ||
| <span class="doccomment">/// Convenience macro for asserting two values are equivalent within a tolerance</span> | ||
| <span class="doccomment">/// ```</span> | ||
| <span class="doccomment">/// use deltae::*;</span> | ||
| <span class="doccomment">///</span> | ||
| <span class="doccomment">/// let lab0 = LabValue::new(50.0, 0.0, 0.0).unwrap();</span> | ||
| <span class="doccomment">/// let lab1 = LabValue::new(50.1, 0.1, 0.1).unwrap();</span> | ||
| <span class="doccomment">///</span> | ||
| <span class="doccomment">/// // Assert that the difference between lab0 and lab1 is less than 1.0 DE2000</span> | ||
| <span class="doccomment">/// assert_delta_eq!(lab0, lab1, DE2000, 1.0);</span> | ||
| <span class="doccomment">/// ```</span> | ||
| <span class="attribute">#[<span class="ident">macro_export</span>]</span> | ||
| <span class="macro">macro_rules!</span> <span class="ident">assert_delta_eq</span> { | ||
| (<span class="macro-nonterminal">$</span><span class="macro-nonterminal">reference</span>:<span class="ident">expr</span>, <span class="macro-nonterminal">$</span><span class="macro-nonterminal">sample</span>:<span class="ident">expr</span>, <span class="macro-nonterminal">$</span><span class="macro-nonterminal">method</span>:<span class="ident">expr</span>, <span class="macro-nonterminal">$</span><span class="macro-nonterminal">tolerance</span>:<span class="ident">expr</span>) <span class="op">=</span><span class="op">></span> { | ||
| <span class="macro">assert!</span>(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">reference</span>.<span class="ident">delta_eq</span>(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">sample</span>, <span class="macro-nonterminal">$</span><span class="macro-nonterminal">method</span>, <span class="macro-nonterminal">$</span><span class="macro-nonterminal">tolerance</span>)) | ||
| }; | ||
| (<span class="macro-nonterminal">$</span><span class="macro-nonterminal">reference</span>:<span class="ident">expr</span>, <span class="macro-nonterminal">$</span><span class="macro-nonterminal">sample</span>:<span class="ident">expr</span>, <span class="macro-nonterminal">$</span><span class="macro-nonterminal">method</span>:<span class="ident">expr</span>, <span class="macro-nonterminal">$</span><span class="macro-nonterminal">tolerance</span>:<span class="ident">expr</span>, $(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">message</span>:<span class="ident">tt</span>)<span class="kw-2">*</span>) <span class="op">=</span><span class="op">></span> { | ||
| <span class="macro">assert!</span>(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">reference</span>.<span class="ident">delta_eq</span>(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">sample</span>, <span class="macro-nonterminal">$</span><span class="macro-nonterminal">method</span>, <span class="macro-nonterminal">$</span><span class="macro-nonterminal">tolerance</span>), $(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">message</span>)<span class="kw-2">*</span>) | ||
| }; | ||
| } | ||
| <span class="doccomment">/// Trait to define a tolerance value for the [`DeltaEq`] trait</span> | ||
| <span class="kw">pub</span> <span class="kw">trait</span> <span class="ident">Tolerance</span> { | ||
| <span class="doccomment">/// Return a tolerance value</span> | ||
| <span class="kw">fn</span> <span class="ident">tolerance</span>(<span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">f32</span>; | ||
| } | ||
| <span class="kw">impl</span> <span class="ident">Tolerance</span> <span class="kw">for</span> <span class="ident">f32</span> { | ||
| <span class="kw">fn</span> <span class="ident">tolerance</span>(<span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">f32</span> { | ||
| <span class="self">self</span> | ||
| } | ||
| } | ||
| <span class="kw">impl</span><span class="op"><</span><span class="ident">T</span>: <span class="ident">Delta</span> <span class="op">+</span> <span class="ident">Copy</span><span class="op">></span> <span class="ident">PartialEq</span><span class="op"><</span><span class="ident">T</span><span class="op">></span> <span class="kw">for</span> <span class="ident">LchValue</span> | ||
| <span class="kw">where</span> <span class="ident">LchValue</span>: <span class="ident">From</span><span class="op"><</span><span class="ident">T</span><span class="op">></span> { | ||
| <span class="kw">fn</span> <span class="ident">eq</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">other</span>: <span class="kw-2">&</span><span class="ident">T</span>) <span class="op">-></span> <span class="ident">bool</span> { | ||
| <span class="self">self</span>.<span class="ident">delta</span>(<span class="kw-2">*</span><span class="ident">other</span>, <span class="ident">DE2000</span>).<span class="ident">value</span> <span class="op"><</span> <span class="number">1.0</span> | ||
| <span class="kw">impl</span> <span class="ident">Tolerance</span> <span class="kw">for</span> <span class="ident">f64</span> { | ||
| <span class="kw">fn</span> <span class="ident">tolerance</span>(<span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">f32</span> { | ||
| <span class="self">self</span> <span class="kw">as</span> <span class="ident">f32</span> | ||
| } | ||
| } | ||
| <span class="kw">impl</span><span class="op"><</span><span class="ident">T</span>: <span class="ident">Delta</span> <span class="op">+</span> <span class="ident">Copy</span><span class="op">></span> <span class="ident">PartialEq</span><span class="op"><</span><span class="ident">T</span><span class="op">></span> <span class="kw">for</span> <span class="ident">XyzValue</span> | ||
| <span class="kw">where</span> <span class="ident">XyzValue</span>: <span class="ident">From</span><span class="op"><</span><span class="ident">T</span><span class="op">></span> { | ||
| <span class="kw">fn</span> <span class="ident">eq</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">other</span>: <span class="kw-2">&</span><span class="ident">T</span>) <span class="op">-></span> <span class="ident">bool</span> { | ||
| <span class="self">self</span>.<span class="ident">delta</span>(<span class="kw-2">*</span><span class="ident">other</span>, <span class="ident">DE2000</span>).<span class="ident">value</span> <span class="op"><</span> <span class="number">1.0</span> | ||
| <span class="kw">impl</span> <span class="ident">Tolerance</span> <span class="kw">for</span> <span class="ident">DeltaE</span> { | ||
| <span class="kw">fn</span> <span class="ident">tolerance</span>(<span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">f32</span> { | ||
| <span class="self">self</span>.<span class="ident">value</span> | ||
| } | ||
| } | ||
| <span class="macro">macro_rules!</span> <span class="ident">impl_delta_eq</span> { | ||
| (<span class="macro-nonterminal">$</span><span class="macro-nonterminal">t</span>:<span class="ident">ty</span>) <span class="op">=</span><span class="op">></span> { | ||
| <span class="kw">impl</span><span class="op"><</span><span class="ident">D</span>: <span class="ident">Delta</span> <span class="op">+</span> <span class="ident">Copy</span><span class="op">></span> <span class="ident">DeltaEq</span><span class="op"><</span><span class="ident">D</span><span class="op">></span> <span class="kw">for</span> <span class="macro-nonterminal">$</span><span class="macro-nonterminal">t</span> {} | ||
| } | ||
| } | ||
| <span class="macro">impl_delta_eq!</span>(<span class="ident">LabValue</span>); | ||
| <span class="macro">impl_delta_eq!</span>(<span class="ident">LchValue</span>); | ||
| <span class="macro">impl_delta_eq!</span>(<span class="ident">XyzValue</span>); | ||
| </pre></div> | ||
| </section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../../";window.currentCrate = "deltae";</script><script src="../../aliases.js"></script><script src="../../main.js"></script><script src="../../source-script.js"></script><script src="../../source-files.js"></script><script defer src="../../search-index.js"></script></body></html> | ||
| </section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="deltae" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script><script src="../../source-script.js"></script><script src="../../source-files.js"></script></body></html> |
@@ -1,2 +0,4 @@ | ||
| <!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="Source to the Rust file `src/lib.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>lib.rs.html -- source</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc source"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../deltae/index.html'><div class='logo-container'><img src='../../rust-logo.png' alt='logo'></div></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><pre class="line-numbers"><span id="1"> 1</span> | ||
| <!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="Source of the Rust file `src/lib.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>lib.rs - source</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> | ||
| <link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> | ||
| <link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../deltae/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><div class="example-wrap"><pre class="line-numbers"><span id="1"> 1</span> | ||
| <span id="2"> 2</span> | ||
@@ -162,3 +164,83 @@ <span id="3"> 3</span> | ||
| <span id="161">161</span> | ||
| </pre><div class="example-wrap"><pre class="rust "> | ||
| <span id="162">162</span> | ||
| <span id="163">163</span> | ||
| <span id="164">164</span> | ||
| <span id="165">165</span> | ||
| <span id="166">166</span> | ||
| <span id="167">167</span> | ||
| <span id="168">168</span> | ||
| <span id="169">169</span> | ||
| <span id="170">170</span> | ||
| <span id="171">171</span> | ||
| <span id="172">172</span> | ||
| <span id="173">173</span> | ||
| <span id="174">174</span> | ||
| <span id="175">175</span> | ||
| <span id="176">176</span> | ||
| <span id="177">177</span> | ||
| <span id="178">178</span> | ||
| <span id="179">179</span> | ||
| <span id="180">180</span> | ||
| <span id="181">181</span> | ||
| <span id="182">182</span> | ||
| <span id="183">183</span> | ||
| <span id="184">184</span> | ||
| <span id="185">185</span> | ||
| <span id="186">186</span> | ||
| <span id="187">187</span> | ||
| <span id="188">188</span> | ||
| <span id="189">189</span> | ||
| <span id="190">190</span> | ||
| <span id="191">191</span> | ||
| <span id="192">192</span> | ||
| <span id="193">193</span> | ||
| <span id="194">194</span> | ||
| <span id="195">195</span> | ||
| <span id="196">196</span> | ||
| <span id="197">197</span> | ||
| <span id="198">198</span> | ||
| <span id="199">199</span> | ||
| <span id="200">200</span> | ||
| <span id="201">201</span> | ||
| <span id="202">202</span> | ||
| <span id="203">203</span> | ||
| <span id="204">204</span> | ||
| <span id="205">205</span> | ||
| <span id="206">206</span> | ||
| <span id="207">207</span> | ||
| <span id="208">208</span> | ||
| <span id="209">209</span> | ||
| <span id="210">210</span> | ||
| <span id="211">211</span> | ||
| <span id="212">212</span> | ||
| <span id="213">213</span> | ||
| <span id="214">214</span> | ||
| <span id="215">215</span> | ||
| <span id="216">216</span> | ||
| <span id="217">217</span> | ||
| <span id="218">218</span> | ||
| <span id="219">219</span> | ||
| <span id="220">220</span> | ||
| <span id="221">221</span> | ||
| <span id="222">222</span> | ||
| <span id="223">223</span> | ||
| <span id="224">224</span> | ||
| <span id="225">225</span> | ||
| <span id="226">226</span> | ||
| <span id="227">227</span> | ||
| <span id="228">228</span> | ||
| <span id="229">229</span> | ||
| <span id="230">230</span> | ||
| <span id="231">231</span> | ||
| <span id="232">232</span> | ||
| <span id="233">233</span> | ||
| <span id="234">234</span> | ||
| <span id="235">235</span> | ||
| <span id="236">236</span> | ||
| <span id="237">237</span> | ||
| <span id="238">238</span> | ||
| <span id="239">239</span> | ||
| <span id="240">240</span> | ||
| <span id="241">241</span> | ||
| </pre><pre class="rust"> | ||
| <span class="attribute">#![<span class="ident">warn</span>(<span class="ident">missing_docs</span>)]</span> | ||
@@ -172,3 +254,2 @@ <span class="doccomment">//! Calculate [Delta E](http://www.colorwiki.com/wiki/Delta_E:_The_Color_Difference)</span> | ||
| <span class="doccomment">//! use std::error::Error;</span> | ||
| <span class="doccomment">//! use std::str::FromStr;</span> | ||
| <span class="doccomment">//! use deltae::*;</span> | ||
@@ -178,3 +259,3 @@ <span class="doccomment">//!</span> | ||
| <span class="doccomment">//! // Lab from a string</span> | ||
| <span class="doccomment">//! let lab0 = LabValue::from_str("89.73, 1.88, -6.96")?;</span> | ||
| <span class="doccomment">//! let lab0: LabValue = "89.73, 1.88, -6.96".parse()?;</span> | ||
| <span class="doccomment">//! // Lab directly from values</span> | ||
@@ -187,2 +268,20 @@ <span class="doccomment">//! let lab1 = LabValue {</span> | ||
| <span class="doccomment">//!</span> | ||
| <span class="doccomment">//! // Create your own Lab type</span> | ||
| <span class="doccomment">//! #[derive(Clone, Copy)]</span> | ||
| <span class="doccomment">//! struct MyLab(f32, f32, f32);</span> | ||
| <span class="doccomment">//!</span> | ||
| <span class="doccomment">//! // Types that implement Into<LabValue> also implement the Delta trait</span> | ||
| <span class="doccomment">//! impl From<MyLab> for LabValue {</span> | ||
| <span class="doccomment">//! fn from(mylab: MyLab) -> Self {</span> | ||
| <span class="doccomment">//! LabValue { l: mylab.0, a: mylab.1, b: mylab.2 }</span> | ||
| <span class="doccomment">//! }</span> | ||
| <span class="doccomment">//! }</span> | ||
| <span class="doccomment">//! let mylab = MyLab(95.08, -0.17, -10.81);</span> | ||
| <span class="doccomment">//!</span> | ||
| <span class="doccomment">//! // Implement DeltaEq for your own types</span> | ||
| <span class="doccomment">//! impl<D: Delta + Copy> DeltaEq<D> for MyLab {}</span> | ||
| <span class="doccomment">//!</span> | ||
| <span class="doccomment">//! // Assert that colors are equivalent within a tolerance</span> | ||
| <span class="doccomment">//! assert_delta_eq!(mylab, lab1, DE2000, 0.0, "mylab is not equal to lab1!");</span> | ||
| <span class="doccomment">//!</span> | ||
| <span class="doccomment">//! // Calculate DeltaE between two lab values</span> | ||
@@ -197,4 +296,5 @@ <span class="doccomment">//! let de0 = DeltaE::new(&lab0, &lab1, DE2000);</span> | ||
| <span class="doccomment">//! let xyz0 = XyzValue::from(lab1);</span> | ||
| <span class="doccomment">//! assert_eq!(lch0, lab0);</span> | ||
| <span class="doccomment">//! assert_eq!(xyz0, lab1);</span> | ||
| <span class="doccomment">//! // If DE2000 is less than 1.0, the colors are considered equivalent</span> | ||
| <span class="doccomment">//! assert!(lch0.delta_eq(&lab0, DE2000, 1.0));</span> | ||
| <span class="doccomment">//! assert!(xyz0.delta_eq(&lab1, DE2000, 1.0));</span> | ||
| <span class="doccomment">//!</span> | ||
@@ -207,3 +307,6 @@ <span class="doccomment">//! // Calculate DeltaE between different color types</span> | ||
| <span class="doccomment">//!</span> | ||
| <span class="doccomment">//! println!("{}\n{}\n{}\n{}\n{}\n{}\n{}\n",</span> | ||
| <span class="doccomment">//! // Recalculate DeltaE with different method</span> | ||
| <span class="doccomment">//! let de3 = de2.with_method(DE1976);</span> | ||
| <span class="doccomment">//!</span> | ||
| <span class="doccomment">//! println!("{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n",</span> | ||
| <span class="doccomment">//! lab0, // [L:89.73, a:1.88, b:-6.96]</span> | ||
@@ -216,2 +319,3 @@ <span class="doccomment">//! lab1, // [L:95.08, a:-0.17, b:-10.81]</span> | ||
| <span class="doccomment">//! de2, // 5.316937</span> | ||
| <span class="doccomment">//! de3, // 6.902717</span> | ||
| <span class="doccomment">//! );</span> | ||
@@ -223,6 +327,6 @@ <span class="doccomment">//!</span> | ||
| <span class="kw">mod</span> <span class="ident">color</span>; | ||
| <span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">color</span>; | ||
| <span class="kw">mod</span> <span class="ident">convert</span>; | ||
| <span class="kw">mod</span> <span class="ident">delta</span>; | ||
| <span class="kw">mod</span> <span class="ident">eq</span>; | ||
| <span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">eq</span>; | ||
| <span class="kw">mod</span> <span class="ident">round</span>; | ||
@@ -237,34 +341,86 @@ <span class="kw">mod</span> <span class="ident">validate</span>; | ||
| <span class="kw">pub</span> <span class="kw">use</span> <span class="ident">delta</span>::<span class="kw-2">*</span>; | ||
| <span class="kw">pub</span> <span class="kw">use</span> <span class="ident">eq</span>::<span class="kw-2">*</span>; | ||
| <span class="kw">pub</span> <span class="kw">use</span> <span class="ident">round</span>::<span class="kw-2">*</span>; | ||
| <span class="kw">pub</span> <span class="kw">use</span> <span class="ident">validate</span>::<span class="kw-2">*</span>; | ||
| <span class="kw">use</span> <span class="ident">std</span>::<span class="ident">fmt</span>; | ||
| <span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>; | ||
| <span class="kw">use</span> <span class="ident">std::fmt</span>; | ||
| <span class="kw">use</span> <span class="ident">std::io</span>; | ||
| <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">type</span> <span class="ident">ValueResult</span><span class="op"><</span><span class="ident">T</span><span class="op">></span> <span class="op">=</span> <span class="prelude-ty">Result</span><span class="op"><</span><span class="ident">T</span>, <span class="ident">color</span>::<span class="ident">ValueError</span><span class="op">></span>; | ||
| <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">type</span> <span class="ident">ValueResult</span><span class="op"><</span><span class="ident">T</span><span class="op">></span> <span class="op">=</span> <span class="prelude-ty">Result</span><span class="op"><</span><span class="ident">T</span>, <span class="ident">color::ValueError</span><span class="op">></span>; | ||
| <span class="doccomment">/// ## The measured difference between two colors</span> | ||
| <span class="doccomment">///</span> | ||
| <span class="doccomment">/// There are many different methods of calculating color difference.</span> | ||
| <span class="doccomment">/// Different methods have a specific purpose, mainly in determining the level</span> | ||
| <span class="doccomment">/// of tolerance for describing the difference between two colors.</span> | ||
| <span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>, <span class="ident">PartialEq</span>, <span class="ident">Clone</span>, <span class="ident">Copy</span>)]</span> | ||
| <span class="doccomment">/// There are many different methods of calculating color difference. Different methods have a</span> | ||
| <span class="doccomment">/// specific purpose, mainly in determining the level of tolerance for describing the difference</span> | ||
| <span class="doccomment">/// between two colors. Regardless of the [`DEMethod`] used, [`DeltaE`] is always calculated based on the</span> | ||
| <span class="doccomment">/// [`LabValue`]s of the two colors.</span> | ||
| <span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>, <span class="ident">Clone</span>, <span class="ident">Copy</span>)]</span> | ||
| <span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">DeltaE</span> { | ||
| <span class="doccomment">/// The mathematical method used for calculating color difference</span> | ||
| <span class="kw">pub</span> <span class="ident">method</span>: <span class="ident">DEMethod</span>, | ||
| <span class="doccomment">/// The calculated value</span> | ||
| <span class="kw">pub</span> <span class="ident">value</span>: <span class="ident">f32</span>, | ||
| <span class="ident">method</span>: <span class="ident">DEMethod</span>, | ||
| <span class="doccomment">/// The calculated Delta E value</span> | ||
| <span class="ident">value</span>: <span class="ident">f32</span>, | ||
| <span class="doccomment">/// The reference color</span> | ||
| <span class="ident">reference</span>: <span class="ident">LabValue</span>, | ||
| <span class="doccomment">/// The sample color</span> | ||
| <span class="ident">sample</span>: <span class="ident">LabValue</span>, | ||
| } | ||
| <span class="kw">impl</span> <span class="ident">DeltaE</span> { | ||
| <span class="doccomment">/// New `DeltaE` from colors and `DEMethod`.</span> | ||
| <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span><span class="op"><</span><span class="ident">A</span>, <span class="ident">B</span><span class="op">></span>(<span class="ident">a</span>: <span class="ident">A</span>, <span class="ident">b</span>: <span class="ident">B</span>, <span class="ident">method</span>: <span class="ident">DEMethod</span>) <span class="op">-></span> <span class="ident">DeltaE</span> | ||
| <span class="doccomment">/// New [`DeltaE`] from two colors and a [`DEMethod`].</span> | ||
| <span class="doccomment">/// ```</span> | ||
| <span class="doccomment">/// use deltae::{LabValue, DeltaE, DEMethod::DE2000};</span> | ||
| <span class="doccomment">///</span> | ||
| <span class="doccomment">/// let lab0 = LabValue::new(89.73, 1.88, -6.96).unwrap();</span> | ||
| <span class="doccomment">/// let lab1 = LabValue::new(95.08, -0.17, -10.81).unwrap();</span> | ||
| <span class="doccomment">/// let de0 = DeltaE::new(&lab0, &lab1, DE2000);</span> | ||
| <span class="doccomment">/// assert_eq!(de0, 5.316941);</span> | ||
| <span class="doccomment">/// ```</span> | ||
| <span class="attribute">#[<span class="ident">inline</span>]</span> | ||
| <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span><span class="op"><</span><span class="ident">A</span>, <span class="ident">B</span><span class="op">></span>(<span class="ident">a</span>: <span class="ident">A</span>, <span class="ident">b</span>: <span class="ident">B</span>, <span class="ident">method</span>: <span class="ident">DEMethod</span>) <span class="op">-</span><span class="op">></span> <span class="ident">DeltaE</span> | ||
| <span class="kw">where</span> <span class="ident">A</span>: <span class="ident">Delta</span>, <span class="ident">B</span>: <span class="ident">Delta</span> { | ||
| <span class="ident">a</span>.<span class="ident">delta</span>(<span class="ident">b</span>, <span class="ident">method</span>) | ||
| } | ||
| <span class="doccomment">/// Recalculate [`DeltaE`] with another [`DEMethod`]</span> | ||
| <span class="doccomment">/// ```</span> | ||
| <span class="doccomment">/// use deltae::{Delta, DeltaE, LabValue, DEMethod};</span> | ||
| <span class="doccomment">///</span> | ||
| <span class="doccomment">/// let lab0 = LabValue::new(89.73, 1.88, -6.96).unwrap();</span> | ||
| <span class="doccomment">/// let lab1 = LabValue::new(95.08, -0.17, -10.81).unwrap();</span> | ||
| <span class="doccomment">/// let de2000 = lab0.delta(lab1, DEMethod::DE2000);</span> | ||
| <span class="doccomment">/// let de1976 = de2000.with_method(DEMethod::DE1976);</span> | ||
| <span class="doccomment">/// assert_eq!(de1976, 6.902716);</span> | ||
| <span class="doccomment">/// ```</span> | ||
| <span class="attribute">#[<span class="ident">inline</span>]</span> | ||
| <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">with_method</span>(<span class="self">self</span>, <span class="ident">method</span>: <span class="ident">DEMethod</span>) <span class="op">-</span><span class="op">></span> <span class="self">Self</span> { | ||
| <span class="self">self</span>.<span class="ident">reference</span>.<span class="ident">delta</span>(<span class="self">self</span>.<span class="ident">sample</span>, <span class="ident">method</span>) | ||
| } | ||
| <span class="doccomment">/// Return a reference the [`DeltaE`] method used in the calculation</span> | ||
| <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">method</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="kw-2">&</span><span class="ident">DEMethod</span> { | ||
| <span class="kw-2">&</span><span class="self">self</span>.<span class="ident">method</span> | ||
| } | ||
| <span class="doccomment">/// Return a reference to the [`DeltaE`] value</span> | ||
| <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">value</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="kw-2">&</span><span class="ident">f32</span> { | ||
| <span class="kw-2">&</span><span class="self">self</span>.<span class="ident">value</span> | ||
| } | ||
| <span class="doccomment">/// Return a reference to the reference [`LabValue`] used in the calculation. A reference color</span> | ||
| <span class="doccomment">/// is the base color to which the sample color is being compared.</span> | ||
| <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">reference</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="kw-2">&</span><span class="ident">LabValue</span> { | ||
| <span class="kw-2">&</span><span class="self">self</span>.<span class="ident">reference</span> | ||
| } | ||
| <span class="doccomment">/// Return a reference to the sample [`LabValue`] used in the calculation. A sample color is</span> | ||
| <span class="doccomment">/// the color being compared to the reference color.</span> | ||
| <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">sample</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="kw-2">&</span><span class="ident">LabValue</span> { | ||
| <span class="kw-2">&</span><span class="self">self</span>.<span class="ident">sample</span> | ||
| } | ||
| } | ||
| <span class="kw">impl</span> <span class="ident">fmt</span>::<span class="ident">Display</span> <span class="kw">for</span> <span class="ident">DeltaE</span> { | ||
| <span class="kw">fn</span> <span class="ident">fmt</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">f</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">fmt</span>::<span class="ident">Formatter</span>) <span class="op">-></span> <span class="ident">fmt</span>::<span class="prelude-ty">Result</span> { | ||
| <span class="macro">write</span><span class="macro">!</span>(<span class="ident">f</span>, <span class="string">"{}"</span>, <span class="kw-2">&</span><span class="self">self</span>.<span class="ident">value</span>) | ||
| <span class="kw">impl</span> <span class="ident">fmt::Display</span> <span class="kw">for</span> <span class="ident">DeltaE</span> { | ||
| <span class="kw">fn</span> <span class="ident">fmt</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">f</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">fmt::Formatter</span>) <span class="op">-</span><span class="op">></span> <span class="ident">fmt::Result</span> { | ||
| <span class="macro">write!</span>(<span class="ident">f</span>, <span class="string">"{}"</span>, <span class="kw-2">&</span><span class="self">self</span>.<span class="ident">value</span>) | ||
| } | ||
@@ -274,7 +430,13 @@ } | ||
| <span class="kw">impl</span> <span class="ident">PartialEq</span><span class="op"><</span><span class="ident">f32</span><span class="op">></span> <span class="kw">for</span> <span class="ident">DeltaE</span> { | ||
| <span class="kw">fn</span> <span class="ident">eq</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">f</span>: <span class="kw-2">&</span><span class="ident">f32</span>) <span class="op">-></span> <span class="ident">bool</span> { | ||
| <span class="self">self</span>.<span class="ident">value</span> <span class="op">==</span> <span class="kw-2">*</span><span class="ident">f</span> | ||
| <span class="kw">fn</span> <span class="ident">eq</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">f</span>: <span class="kw-2">&</span><span class="ident">f32</span>) <span class="op">-</span><span class="op">></span> <span class="ident">bool</span> { | ||
| <span class="kw-2">&</span><span class="self">self</span>.<span class="ident">value</span> <span class="op">=</span><span class="op">=</span> <span class="ident">f</span> | ||
| } | ||
| } | ||
| <span class="kw">impl</span> <span class="ident">PartialEq</span> <span class="kw">for</span> <span class="ident">DeltaE</span> { | ||
| <span class="kw">fn</span> <span class="ident">eq</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">other</span>: <span class="kw-2">&</span><span class="self">Self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">bool</span> { | ||
| <span class="self">self</span>.<span class="ident">value</span> <span class="op">=</span><span class="op">=</span> <span class="ident">other</span>.<span class="ident">value</span> | ||
| } | ||
| } | ||
| <span class="doccomment">/// One should be careful when ordering DeltaE. A `DE2000:1.0` value is not</span> | ||
@@ -284,3 +446,3 @@ <span class="doccomment">/// necessarily the same amount of color difference as a amount of color</span> | ||
| <span class="kw">impl</span> <span class="ident">PartialOrd</span> <span class="kw">for</span> <span class="ident">DeltaE</span> { | ||
| <span class="kw">fn</span> <span class="ident">partial_cmp</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">other</span>: <span class="kw-2">&</span><span class="self">Self</span>) <span class="op">-></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">std</span>::<span class="ident">cmp</span>::<span class="ident">Ordering</span><span class="op">></span> { | ||
| <span class="kw">fn</span> <span class="ident">partial_cmp</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">other</span>: <span class="kw-2">&</span><span class="self">Self</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">std::cmp::Ordering</span><span class="op">></span> { | ||
| <span class="self">self</span>.<span class="ident">value</span>.<span class="ident">partial_cmp</span>(<span class="kw-2">&</span><span class="ident">other</span>.<span class="ident">value</span>) | ||
@@ -313,20 +475,20 @@ } | ||
| <span class="kw">impl</span> <span class="ident">Default</span> <span class="kw">for</span> <span class="ident">DEMethod</span> { | ||
| <span class="kw">fn</span> <span class="ident">default</span>() <span class="op">-></span> <span class="ident">DEMethod</span> { | ||
| <span class="ident">DEMethod</span>::<span class="ident">DE2000</span> | ||
| <span class="kw">fn</span> <span class="ident">default</span>() <span class="op">-</span><span class="op">></span> <span class="ident">DEMethod</span> { | ||
| <span class="ident">DEMethod::DE2000</span> | ||
| } | ||
| } | ||
| <span class="kw">impl</span> <span class="ident">fmt</span>::<span class="ident">Display</span> <span class="kw">for</span> <span class="ident">DEMethod</span> { | ||
| <span class="kw">fn</span> <span class="ident">fmt</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">f</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">fmt</span>::<span class="ident">Formatter</span>) <span class="op">-></span> <span class="ident">fmt</span>::<span class="prelude-ty">Result</span> { | ||
| <span class="kw">impl</span> <span class="ident">fmt::Display</span> <span class="kw">for</span> <span class="ident">DEMethod</span> { | ||
| <span class="kw">fn</span> <span class="ident">fmt</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">f</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">fmt::Formatter</span>) <span class="op">-</span><span class="op">></span> <span class="ident">fmt::Result</span> { | ||
| <span class="kw">match</span> <span class="self">self</span> { | ||
| <span class="ident">DECMC</span>(<span class="ident">tl</span>, <span class="ident">tc</span>) <span class="op">=></span> { | ||
| <span class="kw">if</span> (<span class="ident">tl</span>, <span class="ident">tc</span>) <span class="op">==</span> (<span class="kw-2">&</span><span class="number">1.0</span>, <span class="kw-2">&</span><span class="number">1.0</span>) { | ||
| <span class="macro">write</span><span class="macro">!</span>(<span class="ident">f</span>, <span class="string">"DECMC1"</span>) | ||
| } <span class="kw">else</span> <span class="kw">if</span> (<span class="ident">tl</span>, <span class="ident">tc</span>) <span class="op">==</span> (<span class="kw-2">&</span><span class="number">2.0</span>, <span class="kw-2">&</span><span class="number">1.0</span>) { | ||
| <span class="macro">write</span><span class="macro">!</span>(<span class="ident">f</span>, <span class="string">"DECMC2"</span>) | ||
| <span class="ident">DECMC</span>(<span class="ident">tl</span>, <span class="ident">tc</span>) <span class="op">=</span><span class="op">></span> { | ||
| <span class="kw">if</span> (<span class="ident">tl</span>, <span class="ident">tc</span>) <span class="op">=</span><span class="op">=</span> (<span class="kw-2">&</span><span class="number">1.0</span>, <span class="kw-2">&</span><span class="number">1.0</span>) { | ||
| <span class="macro">write!</span>(<span class="ident">f</span>, <span class="string">"DECMC1"</span>) | ||
| } <span class="kw">else</span> <span class="kw">if</span> (<span class="ident">tl</span>, <span class="ident">tc</span>) <span class="op">=</span><span class="op">=</span> (<span class="kw-2">&</span><span class="number">2.0</span>, <span class="kw-2">&</span><span class="number">1.0</span>) { | ||
| <span class="macro">write!</span>(<span class="ident">f</span>, <span class="string">"DECMC2"</span>) | ||
| } <span class="kw">else</span> { | ||
| <span class="macro">write</span><span class="macro">!</span>(<span class="ident">f</span>, <span class="string">"DECMC({:0.2}:{:0.2})"</span>, <span class="ident">tl</span>, <span class="ident">tc</span>) | ||
| <span class="macro">write!</span>(<span class="ident">f</span>, <span class="string">"DECMC({:0.2}:{:0.2})"</span>, <span class="ident">tl</span>, <span class="ident">tc</span>) | ||
| } | ||
| } | ||
| <span class="kw">_</span> <span class="op">=></span> <span class="macro">write</span><span class="macro">!</span>(<span class="ident">f</span>, <span class="string">"{:?}"</span>, <span class="self">self</span>) | ||
| <span class="kw">_</span> <span class="op">=</span><span class="op">></span> <span class="macro">write!</span>(<span class="ident">f</span>, <span class="string">"{:?}"</span>, <span class="self">self</span>) | ||
| } | ||
@@ -337,2 +499,2 @@ } | ||
| </pre></div> | ||
| </section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../../";window.currentCrate = "deltae";</script><script src="../../aliases.js"></script><script src="../../main.js"></script><script src="../../source-script.js"></script><script src="../../source-files.js"></script><script defer src="../../search-index.js"></script></body></html> | ||
| </section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="deltae" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script><script src="../../source-script.js"></script><script src="../../source-files.js"></script></body></html> |
@@ -1,2 +0,4 @@ | ||
| <!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="Source to the Rust file `src/round.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>round.rs.html -- source</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc source"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../deltae/index.html'><div class='logo-container'><img src='../../rust-logo.png' alt='logo'></div></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><pre class="line-numbers"><span id="1"> 1</span> | ||
| <!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="Source of the Rust file `src/round.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>round.rs - source</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> | ||
| <link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> | ||
| <link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../deltae/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><div class="example-wrap"><pre class="line-numbers"><span id="1"> 1</span> | ||
| <span id="2"> 2</span> | ||
@@ -57,3 +59,8 @@ <span id="3"> 3</span> | ||
| <span id="56">56</span> | ||
| </pre><div class="example-wrap"><pre class="rust "> | ||
| <span id="57">57</span> | ||
| <span id="58">58</span> | ||
| <span id="59">59</span> | ||
| <span id="60">60</span> | ||
| <span id="61">61</span> | ||
| </pre><pre class="rust"> | ||
| <span class="kw">use</span> <span class="kw">super</span>::<span class="kw-2">*</span>; | ||
@@ -64,7 +71,7 @@ | ||
| <span class="doccomment">/// Rounds the value to a number of decimal places</span> | ||
| <span class="kw">fn</span> <span class="ident">round_to</span>(<span class="self">self</span>, <span class="ident">places</span>: <span class="ident">i32</span>) <span class="op">-></span> <span class="self">Self</span>; | ||
| <span class="kw">fn</span> <span class="ident">round_to</span>(<span class="self">self</span>, <span class="ident">places</span>: <span class="ident">i32</span>) <span class="op">-</span><span class="op">></span> <span class="self">Self</span>; | ||
| } | ||
| <span class="comment">// Round an f32 to a number of decimal places</span> | ||
| <span class="kw">fn</span> <span class="ident">round_to</span>(<span class="ident">val</span>: <span class="ident">f32</span>, <span class="ident">places</span>: <span class="ident">i32</span>) <span class="op">-></span> <span class="ident">f32</span> { | ||
| <span class="kw">fn</span> <span class="ident">round_to</span>(<span class="ident">val</span>: <span class="ident">f32</span>, <span class="ident">places</span>: <span class="ident">i32</span>) <span class="op">-</span><span class="op">></span> <span class="ident">f32</span> { | ||
| <span class="kw">let</span> <span class="ident">mult</span> <span class="op">=</span> <span class="number">10_f32</span>.<span class="ident">powi</span>(<span class="ident">places</span>); | ||
@@ -75,5 +82,7 @@ (<span class="ident">val</span> <span class="op">*</span> <span class="ident">mult</span>).<span class="ident">round</span>() <span class="op">/</span> <span class="ident">mult</span> | ||
| <span class="kw">impl</span> <span class="ident">Round</span> <span class="kw">for</span> <span class="ident">DeltaE</span> { | ||
| <span class="kw">fn</span> <span class="ident">round_to</span>(<span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">places</span>: <span class="ident">i32</span>) <span class="op">-></span> <span class="self">Self</span> { | ||
| <span class="self">self</span>.<span class="ident">value</span> <span class="op">=</span> <span class="ident">round_to</span>(<span class="self">self</span>.<span class="ident">value</span>, <span class="ident">places</span>); | ||
| <span class="self">self</span> | ||
| <span class="kw">fn</span> <span class="ident">round_to</span>(<span class="self">self</span>, <span class="ident">places</span>: <span class="ident">i32</span>) <span class="op">-</span><span class="op">></span> <span class="self">Self</span> { | ||
| <span class="self">Self</span> { | ||
| <span class="ident">value</span>: <span class="ident">round_to</span>(<span class="self">self</span>.<span class="ident">value</span>, <span class="ident">places</span>), | ||
| ..<span class="self">self</span> | ||
| } | ||
| } | ||
@@ -83,7 +92,8 @@ } | ||
| <span class="kw">impl</span> <span class="ident">Round</span> <span class="kw">for</span> <span class="ident">LabValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">round_to</span>(<span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">places</span>: <span class="ident">i32</span>) <span class="op">-></span> <span class="ident">LabValue</span> { | ||
| <span class="self">self</span>.<span class="ident">l</span> <span class="op">=</span> <span class="ident">round_to</span>(<span class="self">self</span>.<span class="ident">l</span>, <span class="ident">places</span>); | ||
| <span class="self">self</span>.<span class="ident">a</span> <span class="op">=</span> <span class="ident">round_to</span>(<span class="self">self</span>.<span class="ident">a</span>, <span class="ident">places</span>); | ||
| <span class="self">self</span>.<span class="ident">b</span> <span class="op">=</span> <span class="ident">round_to</span>(<span class="self">self</span>.<span class="ident">b</span>, <span class="ident">places</span>); | ||
| <span class="self">self</span> | ||
| <span class="kw">fn</span> <span class="ident">round_to</span>(<span class="self">self</span>, <span class="ident">places</span>: <span class="ident">i32</span>) <span class="op">-</span><span class="op">></span> <span class="ident">LabValue</span> { | ||
| <span class="self">Self</span> { | ||
| <span class="ident">l</span>: <span class="ident">round_to</span>(<span class="self">self</span>.<span class="ident">l</span>, <span class="ident">places</span>), | ||
| <span class="ident">a</span>: <span class="ident">round_to</span>(<span class="self">self</span>.<span class="ident">a</span>, <span class="ident">places</span>), | ||
| <span class="ident">b</span>: <span class="ident">round_to</span>(<span class="self">self</span>.<span class="ident">b</span>, <span class="ident">places</span>), | ||
| } | ||
| } | ||
@@ -93,7 +103,8 @@ } | ||
| <span class="kw">impl</span> <span class="ident">Round</span> <span class="kw">for</span> <span class="ident">LchValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">round_to</span>(<span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">places</span>: <span class="ident">i32</span>) <span class="op">-></span> <span class="ident">LchValue</span> { | ||
| <span class="self">self</span>.<span class="ident">l</span> <span class="op">=</span> <span class="ident">round_to</span>(<span class="self">self</span>.<span class="ident">l</span>, <span class="ident">places</span>); | ||
| <span class="self">self</span>.<span class="ident">c</span> <span class="op">=</span> <span class="ident">round_to</span>(<span class="self">self</span>.<span class="ident">c</span>, <span class="ident">places</span>); | ||
| <span class="self">self</span>.<span class="ident">h</span> <span class="op">=</span> <span class="ident">round_to</span>(<span class="self">self</span>.<span class="ident">h</span>, <span class="ident">places</span>); | ||
| <span class="self">self</span> | ||
| <span class="kw">fn</span> <span class="ident">round_to</span>(<span class="self">self</span>, <span class="ident">places</span>: <span class="ident">i32</span>) <span class="op">-</span><span class="op">></span> <span class="ident">LchValue</span> { | ||
| <span class="self">Self</span> { | ||
| <span class="ident">l</span>: <span class="ident">round_to</span>(<span class="self">self</span>.<span class="ident">l</span>, <span class="ident">places</span>), | ||
| <span class="ident">c</span>: <span class="ident">round_to</span>(<span class="self">self</span>.<span class="ident">c</span>, <span class="ident">places</span>), | ||
| <span class="ident">h</span>: <span class="ident">round_to</span>(<span class="self">self</span>.<span class="ident">h</span>, <span class="ident">places</span>), | ||
| } | ||
| } | ||
@@ -103,7 +114,8 @@ } | ||
| <span class="kw">impl</span> <span class="ident">Round</span> <span class="kw">for</span> <span class="ident">XyzValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">round_to</span>(<span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">places</span>: <span class="ident">i32</span>) <span class="op">-></span> <span class="ident">XyzValue</span> { | ||
| <span class="self">self</span>.<span class="ident">x</span> <span class="op">=</span> <span class="ident">round_to</span>(<span class="self">self</span>.<span class="ident">x</span>, <span class="ident">places</span>); | ||
| <span class="self">self</span>.<span class="ident">y</span> <span class="op">=</span> <span class="ident">round_to</span>(<span class="self">self</span>.<span class="ident">y</span>, <span class="ident">places</span>); | ||
| <span class="self">self</span>.<span class="ident">z</span> <span class="op">=</span> <span class="ident">round_to</span>(<span class="self">self</span>.<span class="ident">z</span>, <span class="ident">places</span>); | ||
| <span class="self">self</span> | ||
| <span class="kw">fn</span> <span class="ident">round_to</span>(<span class="self">self</span>, <span class="ident">places</span>: <span class="ident">i32</span>) <span class="op">-</span><span class="op">></span> <span class="ident">XyzValue</span> { | ||
| <span class="self">Self</span> { | ||
| <span class="ident">x</span>: <span class="ident">round_to</span>(<span class="self">self</span>.<span class="ident">x</span>, <span class="ident">places</span>), | ||
| <span class="ident">y</span>: <span class="ident">round_to</span>(<span class="self">self</span>.<span class="ident">y</span>, <span class="ident">places</span>), | ||
| <span class="ident">z</span>: <span class="ident">round_to</span>(<span class="self">self</span>.<span class="ident">z</span>, <span class="ident">places</span>), | ||
| } | ||
| } | ||
@@ -115,8 +127,8 @@ } | ||
| <span class="kw">let</span> <span class="ident">val</span> <span class="op">=</span> <span class="number">1.234567890</span>; | ||
| <span class="kw">let</span> <span class="ident">rnd</span> <span class="op">=</span> <span class="ident">round</span>::<span class="ident">round_to</span>(<span class="ident">val</span>, <span class="number">4</span>); | ||
| <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">rnd</span>, <span class="number">1.2346</span>); | ||
| <span class="macro">assert_ne</span><span class="macro">!</span>(<span class="ident">rnd</span>, <span class="ident">val</span>); | ||
| <span class="kw">let</span> <span class="ident">rnd</span> <span class="op">=</span> <span class="ident">round::round_to</span>(<span class="ident">val</span>, <span class="number">4</span>); | ||
| <span class="macro">assert_eq!</span>(<span class="ident">rnd</span>, <span class="number">1.2346</span>); | ||
| <span class="macro">assert_ne!</span>(<span class="ident">rnd</span>, <span class="ident">val</span>); | ||
| } | ||
| </pre></div> | ||
| </section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../../";window.currentCrate = "deltae";</script><script src="../../aliases.js"></script><script src="../../main.js"></script><script src="../../source-script.js"></script><script src="../../source-files.js"></script><script defer src="../../search-index.js"></script></body></html> | ||
| </section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="deltae" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script><script src="../../source-script.js"></script><script src="../../source-files.js"></script></body></html> |
@@ -1,2 +0,4 @@ | ||
| <!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="Source to the Rust file `src/validate.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>validate.rs.html -- source</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc source"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../deltae/index.html'><div class='logo-container'><img src='../../rust-logo.png' alt='logo'></div></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><pre class="line-numbers"><span id="1"> 1</span> | ||
| <!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="Source of the Rust file `src/validate.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>validate.rs - source</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> | ||
| <link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> | ||
| <link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../deltae/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><div class="example-wrap"><pre class="line-numbers"><span id="1"> 1</span> | ||
| <span id="2"> 2</span> | ||
@@ -47,3 +49,9 @@ <span id="3"> 3</span> | ||
| <span id="46">46</span> | ||
| </pre><div class="example-wrap"><pre class="rust "> | ||
| <span id="47">47</span> | ||
| <span id="48">48</span> | ||
| <span id="49">49</span> | ||
| <span id="50">50</span> | ||
| <span id="51">51</span> | ||
| <span id="52">52</span> | ||
| </pre><pre class="rust"> | ||
| <span class="kw">use</span> <span class="kw">super</span>::<span class="kw-2">*</span>; | ||
@@ -54,14 +62,20 @@ | ||
| <span class="doccomment">/// Return `Err()` if the values are invalid</span> | ||
| <span class="kw">fn</span> <span class="ident">validate</span>(<span class="self">self</span>) <span class="op">-></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="self">Self</span><span class="op">></span>; | ||
| <span class="kw">fn</span> <span class="ident">validate</span>(<span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="self">Self</span><span class="op">></span>; | ||
| } | ||
| <span class="kw">const</span> <span class="ident">RANGE_PCT</span>: <span class="ident">std::ops::RangeInclusive</span><span class="op"><</span><span class="ident">f32</span><span class="op">></span> <span class="op">=</span> <span class="number">0.0</span>..<span class="op">=</span><span class="number">100.0</span>; | ||
| <span class="kw">const</span> <span class="ident">RANGE_I8</span>: <span class="ident">std::ops::RangeInclusive</span><span class="op"><</span><span class="ident">f32</span><span class="op">></span> <span class="op">=</span> <span class="op">-</span><span class="number">128.0</span>..<span class="op">=</span><span class="number">128.0</span>; | ||
| <span class="kw">const</span> <span class="ident">RANGE_CHROMA</span>: <span class="ident">std::ops::RangeInclusive</span><span class="op"><</span><span class="ident">f32</span><span class="op">></span> <span class="op">=</span> <span class="number">0.0</span>..<span class="op">=</span><span class="number">181.01933</span>; | ||
| <span class="kw">const</span> <span class="ident">RANGE_360</span>: <span class="ident">std::ops::RangeInclusive</span><span class="op"><</span><span class="ident">f32</span><span class="op">></span> <span class="op">=</span> <span class="number">0.0</span>..<span class="op">=</span><span class="number">360.0</span>; | ||
| <span class="kw">const</span> <span class="ident">RANGE_01</span>: <span class="ident">std::ops::RangeInclusive</span><span class="op"><</span><span class="ident">f32</span><span class="op">></span> <span class="op">=</span> <span class="number">0.0</span>..<span class="op">=</span><span class="number">1.0</span>; | ||
| <span class="kw">impl</span> <span class="ident">Validate</span> <span class="kw">for</span> <span class="ident">LabValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">validate</span>(<span class="self">self</span>) <span class="op">-></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="self">Self</span><span class="op">></span> { | ||
| <span class="kw">if</span> <span class="self">self</span>.<span class="ident">l</span> <span class="op"><</span> <span class="number">0.0</span> <span class="op">||</span> <span class="self">self</span>.<span class="ident">l</span> <span class="op">></span> <span class="number">100.0</span> <span class="op">||</span> | ||
| <span class="self">self</span>.<span class="ident">a</span> <span class="op"><</span> <span class="op">-</span><span class="number">128.0</span> <span class="op">||</span> <span class="self">self</span>.<span class="ident">a</span> <span class="op">></span> <span class="number">128.0</span> <span class="op">||</span> | ||
| <span class="self">self</span>.<span class="ident">b</span> <span class="op"><</span> <span class="op">-</span><span class="number">128.0</span> <span class="op">||</span> <span class="self">self</span>.<span class="ident">b</span> <span class="op">></span> <span class="number">128.0</span> | ||
| <span class="kw">fn</span> <span class="ident">validate</span>(<span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="self">Self</span><span class="op">></span> { | ||
| <span class="kw">if</span> <span class="ident">RANGE_PCT</span>.<span class="ident">contains</span>(<span class="kw-2">&</span><span class="self">self</span>.<span class="ident">l</span>) | ||
| <span class="op">&&</span> <span class="ident">RANGE_I8</span>.<span class="ident">contains</span>(<span class="kw-2">&</span><span class="self">self</span>.<span class="ident">a</span>) | ||
| <span class="op">&&</span> <span class="ident">RANGE_I8</span>.<span class="ident">contains</span>(<span class="kw-2">&</span><span class="self">self</span>.<span class="ident">b</span>) | ||
| { | ||
| <span class="prelude-val">Err</span>(<span class="ident">ValueError</span>::<span class="ident">OutOfBounds</span>) | ||
| <span class="prelude-val">Ok</span>(<span class="self">self</span>) | ||
| } <span class="kw">else</span> { | ||
| <span class="prelude-val">Ok</span>(<span class="self">self</span>) | ||
| <span class="prelude-val">Err</span>(<span class="ident">ValueError::OutOfBounds</span>) | ||
| } | ||
@@ -72,10 +86,10 @@ } | ||
| <span class="kw">impl</span> <span class="ident">Validate</span> <span class="kw">for</span> <span class="ident">LchValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">validate</span>(<span class="self">self</span>) <span class="op">-></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="self">Self</span><span class="op">></span> { | ||
| <span class="kw">if</span> <span class="self">self</span>.<span class="ident">l</span> <span class="op"><</span> <span class="number">0.0</span> <span class="op">||</span> <span class="self">self</span>.<span class="ident">l</span> <span class="op">></span> <span class="number">100.0</span> <span class="op">||</span> | ||
| <span class="self">self</span>.<span class="ident">c</span> <span class="op"><</span> <span class="number">0.0</span> <span class="op">||</span> <span class="self">self</span>.<span class="ident">c</span> <span class="op">></span> (<span class="number">128_f32</span>.<span class="ident">powi</span>(<span class="number">2</span>) <span class="op">+</span> <span class="number">128_f32</span>.<span class="ident">powi</span>(<span class="number">2</span>)).<span class="ident">sqrt</span>() <span class="op">||</span> | ||
| <span class="self">self</span>.<span class="ident">h</span> <span class="op"><</span> <span class="number">0.0</span> <span class="op">||</span> <span class="self">self</span>.<span class="ident">h</span> <span class="op">></span> <span class="number">360.0</span> | ||
| <span class="kw">fn</span> <span class="ident">validate</span>(<span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="self">Self</span><span class="op">></span> { | ||
| <span class="kw">if</span> <span class="ident">RANGE_PCT</span>.<span class="ident">contains</span>(<span class="kw-2">&</span><span class="self">self</span>.<span class="ident">l</span>) | ||
| <span class="op">&&</span> <span class="ident">RANGE_CHROMA</span>.<span class="ident">contains</span>(<span class="kw-2">&</span><span class="self">self</span>.<span class="ident">c</span>) | ||
| <span class="op">&&</span> <span class="ident">RANGE_360</span>.<span class="ident">contains</span>(<span class="kw-2">&</span><span class="self">self</span>.<span class="ident">h</span>) | ||
| { | ||
| <span class="prelude-val">Err</span>(<span class="ident">ValueError</span>::<span class="ident">OutOfBounds</span>) | ||
| <span class="prelude-val">Ok</span>(<span class="self">self</span>) | ||
| } <span class="kw">else</span> { | ||
| <span class="prelude-val">Ok</span>(<span class="self">self</span>) | ||
| <span class="prelude-val">Err</span>(<span class="ident">ValueError::OutOfBounds</span>) | ||
| } | ||
@@ -86,10 +100,10 @@ } | ||
| <span class="kw">impl</span> <span class="ident">Validate</span> <span class="kw">for</span> <span class="ident">XyzValue</span> { | ||
| <span class="kw">fn</span> <span class="ident">validate</span>(<span class="self">self</span>) <span class="op">-></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="self">Self</span><span class="op">></span> { | ||
| <span class="kw">if</span> <span class="self">self</span>.<span class="ident">x</span> <span class="op"><</span> <span class="number">0.0</span> <span class="op">||</span> <span class="self">self</span>.<span class="ident">x</span> <span class="op">></span> <span class="number">1.0</span> <span class="op">||</span> | ||
| <span class="self">self</span>.<span class="ident">y</span> <span class="op"><</span> <span class="number">0.0</span> <span class="op">||</span> <span class="self">self</span>.<span class="ident">y</span> <span class="op">></span> <span class="number">1.0</span> <span class="op">||</span> | ||
| <span class="self">self</span>.<span class="ident">z</span> <span class="op"><</span> <span class="number">0.0</span> <span class="op">||</span> <span class="self">self</span>.<span class="ident">z</span> <span class="op">></span> <span class="number">1.0</span> | ||
| <span class="kw">fn</span> <span class="ident">validate</span>(<span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ValueResult</span><span class="op"><</span><span class="self">Self</span><span class="op">></span> { | ||
| <span class="kw">if</span> <span class="ident">RANGE_01</span>.<span class="ident">contains</span>(<span class="kw-2">&</span><span class="self">self</span>.<span class="ident">x</span>) | ||
| <span class="op">&&</span> <span class="ident">RANGE_01</span>.<span class="ident">contains</span>(<span class="kw-2">&</span><span class="self">self</span>.<span class="ident">y</span>) | ||
| <span class="op">&&</span> <span class="ident">RANGE_01</span>.<span class="ident">contains</span>(<span class="kw-2">&</span><span class="self">self</span>.<span class="ident">z</span>) | ||
| { | ||
| <span class="prelude-val">Err</span>(<span class="ident">ValueError</span>::<span class="ident">OutOfBounds</span>) | ||
| <span class="prelude-val">Ok</span>(<span class="self">self</span>) | ||
| } <span class="kw">else</span> { | ||
| <span class="prelude-val">Ok</span>(<span class="self">self</span>) | ||
| <span class="prelude-val">Err</span>(<span class="ident">ValueError::OutOfBounds</span>) | ||
| } | ||
@@ -99,2 +113,2 @@ } | ||
| </pre></div> | ||
| </section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../../";window.currentCrate = "deltae";</script><script src="../../aliases.js"></script><script src="../../main.js"></script><script src="../../source-script.js"></script><script src="../../source-files.js"></script><script defer src="../../search-index.js"></script></body></html> | ||
| </section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="deltae" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script><script src="../../source-script.js"></script><script src="../../source-files.js"></script></body></html> |
@@ -1,1 +0,1 @@ | ||
| var resourcesSuffix="";var currentTheme=document.getElementById("themeStyle");var mainTheme=document.getElementById("mainThemeStyle");var savedHref=[];function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(!elem||!elem.classList){return}elem.classList.add(className)}function removeClass(elem,className){if(!elem||!elem.classList){return}elem.classList.remove(className)}function isHidden(elem){return elem.offsetParent===null}function onEach(arr,func,reversed){if(arr&&arr.length>0&&func){var length=arr.length;if(reversed!==true){for(var i=0;i<length;++i){if(func(arr[i])===true){return true}}}else{for(var i=length-1;i>=0;--i){if(func(arr[i])===true){return true}}}}return false}function onEachLazy(lazyArray,func,reversed){return onEach(Array.prototype.slice.call(lazyArray),func,reversed)}function usableLocalStorage(){if(typeof(Storage)==="undefined"){return false}try{return window.localStorage!==null&&window.localStorage!==undefined}catch(err){return false}}function updateLocalStorage(name,value){if(usableLocalStorage()){localStorage[name]=value}else{}}function getCurrentValue(name){if(usableLocalStorage()&&localStorage[name]!==undefined){return localStorage[name]}return null}function switchTheme(styleElem,mainStyleElem,newTheme){var fullBasicCss="rustdoc"+resourcesSuffix+".css";var fullNewTheme=newTheme+resourcesSuffix+".css";var newHref=mainStyleElem.href.replace(fullBasicCss,fullNewTheme);if(styleElem.href===newHref){return}var found=false;if(savedHref.length===0){onEachLazy(document.getElementsByTagName("link"),function(el){savedHref.push(el.href)})}onEach(savedHref,function(el){if(el===newHref){found=true;return true}});if(found===true){styleElem.href=newHref;updateLocalStorage("rustdoc-theme",newTheme)}}switchTheme(currentTheme,mainTheme,getCurrentValue("rustdoc-theme")||"light") | ||
| var resourcesSuffix="";var darkThemes=["dark","ayu"];window.currentTheme=document.getElementById("themeStyle");window.mainTheme=document.getElementById("mainThemeStyle");var settingsDataset=(function(){var settingsElement=document.getElementById("default-settings");if(settingsElement===null){return null}var dataset=settingsElement.dataset;if(dataset===undefined){return null}return dataset})();function getSettingValue(settingName){var current=getCurrentValue('rustdoc-'+settingName);if(current!==null){return current}if(settingsDataset!==null){var def=settingsDataset[settingName.replace(/-/g,'_')];if(def!==undefined){return def}}return null}var localStoredTheme=getSettingValue("theme");var savedHref=[];function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(!elem||!elem.classList){return}elem.classList.add(className)}function removeClass(elem,className){if(!elem||!elem.classList){return}elem.classList.remove(className)}function onEach(arr,func,reversed){if(arr&&arr.length>0&&func){var length=arr.length;var i;if(reversed){for(i=length-1;i>=0;--i){if(func(arr[i])){return true}}}else{for(i=0;i<length;++i){if(func(arr[i])){return true}}}}return false}function onEachLazy(lazyArray,func,reversed){return onEach(Array.prototype.slice.call(lazyArray),func,reversed)}function hasOwnPropertyRustdoc(obj,property){return Object.prototype.hasOwnProperty.call(obj,property)}function updateLocalStorage(name,value){try{window.localStorage.setItem(name,value)}catch(e){}}function getCurrentValue(name){try{return window.localStorage.getItem(name)}catch(e){return null}}function switchTheme(styleElem,mainStyleElem,newTheme,saveTheme){var fullBasicCss="rustdoc"+resourcesSuffix+".css";var fullNewTheme=newTheme+resourcesSuffix+".css";var newHref=mainStyleElem.href.replace(fullBasicCss,fullNewTheme);if(saveTheme){updateLocalStorage("rustdoc-theme",newTheme)}if(styleElem.href===newHref){return}var found=false;if(savedHref.length===0){onEachLazy(document.getElementsByTagName("link"),function(el){savedHref.push(el.href)})}onEach(savedHref,function(el){if(el===newHref){found=true;return true}});if(found){styleElem.href=newHref}}function useSystemTheme(value){if(value===undefined){value=true}updateLocalStorage("rustdoc-use-system-theme",value);var toggle=document.getElementById("use-system-theme");if(toggle&&toggle instanceof HTMLInputElement){toggle.checked=value}}var updateSystemTheme=(function(){if(!window.matchMedia){return function(){var cssTheme=getComputedStyle(document.documentElement).getPropertyValue('content');switchTheme(window.currentTheme,window.mainTheme,JSON.parse(cssTheme)||"light",true)}}var mql=window.matchMedia("(prefers-color-scheme: dark)");function handlePreferenceChange(mql){if(getSettingValue("use-system-theme")!=="false"){var lightTheme=getSettingValue("preferred-light-theme")||"light";var darkTheme=getSettingValue("preferred-dark-theme")||"dark";if(mql.matches){switchTheme(window.currentTheme,window.mainTheme,darkTheme,true)}else{switchTheme(window.currentTheme,window.mainTheme,lightTheme,true)}}}mql.addListener(handlePreferenceChange);return function(){handlePreferenceChange(mql)}})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("rustdoc-preferred-dark-theme",localStoredTheme)}updateSystemTheme()}else{switchTheme(window.currentTheme,window.mainTheme,getSettingValue("theme")||"light",false)} |
@@ -1,1 +0,1 @@ | ||
| <?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'><svg enable-background="new 0 0 27.434 29.5" height="29.5px" id="Capa_1" version="1.1" viewBox="0 0 27.434 29.5" width="27.434px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><path d="M27.315,18.389c-0.165-0.604-0.509-1.113-0.981-1.459c-0.042-0.144-0.083-0.429-0.015-0.761l0.037-0.177v-0.182V14.8 c0-1.247-0.006-1.277-0.048-1.472c-0.076-0.354-0.035-0.653,0.007-0.803c0.477-0.346,0.828-0.861,0.996-1.476 c0.261-0.956,0.076-2.091-0.508-3.114l-0.591-1.032c-0.746-1.307-1.965-2.119-3.182-2.119c-0.378,0-0.75,0.081-1.085,0.235 c-0.198-0.025-0.554-0.15-0.855-0.389l-0.103-0.082l-0.114-0.065l-1.857-1.067L18.92,3.36l-0.105-0.044 c-0.376-0.154-0.658-0.41-0.768-0.556C17.918,1.172,16.349,0,14.296,0H13.14c-2.043,0-3.608,1.154-3.749,2.721 C9.277,2.862,8.999,3.104,8.633,3.25l-0.1,0.039L8.439,3.341L6.495,4.406L6.363,4.479L6.245,4.573 C5.936,4.82,5.596,4.944,5.416,4.977c-0.314-0.139-0.66-0.21-1.011-0.21c-1.198,0-2.411,0.819-3.165,2.139L0.65,7.938 c-0.412,0.72-0.642,1.521-0.644,2.258c-0.003,0.952,0.362,1.756,1.013,2.256c0.034,0.155,0.061,0.448-0.016,0.786 c-0.038,0.168-0.062,0.28-0.062,1.563c0,1.148,0,1.148,0.015,1.262l0.009,0.073l0.017,0.073c0.073,0.346,0.045,0.643,0.011,0.802 C0.348,17.512-0.01,18.314,0,19.268c0.008,0.729,0.238,1.523,0.648,2.242l0.589,1.031c0.761,1.331,1.967,2.159,3.15,2.159 c0.324,0,0.645-0.064,0.938-0.187c0.167,0.038,0.492,0.156,0.813,0.416l0.11,0.088l0.124,0.07l2.045,1.156l0.102,0.057l0.107,0.043 c0.364,0.147,0.646,0.381,0.766,0.521c0.164,1.52,1.719,2.634,3.745,2.634h1.155c2.037,0,3.598-1.134,3.747-2.675 c0.117-0.145,0.401-0.393,0.774-0.549l0.111-0.047l0.105-0.062l1.96-1.159l0.105-0.062l0.097-0.075 c0.309-0.246,0.651-0.371,0.832-0.402c0.313,0.138,0.662,0.212,1.016,0.212c1.199,0,2.412-0.82,3.166-2.139l0.59-1.032 C27.387,20.48,27.575,19.342,27.315,18.389z M25.274,20.635l-0.59,1.032c-0.438,0.765-1.104,1.251-1.639,1.251 c-0.133,0-0.258-0.029-0.369-0.094c-0.15-0.086-0.346-0.127-0.566-0.127c-0.596,0-1.383,0.295-2.01,0.796l-1.96,1.157 c-1.016,0.425-1.846,1.291-1.846,1.929s-0.898,1.159-1.998,1.159H13.14c-1.1,0-1.998-0.514-1.998-1.141s-0.834-1.477-1.854-1.888 l-2.046-1.157c-0.636-0.511-1.425-0.814-2.006-0.814c-0.202,0-0.379,0.037-0.516,0.115c-0.101,0.057-0.214,0.084-0.333,0.084 c-0.518,0-1.179-0.498-1.62-1.271l-0.591-1.032c-0.545-0.954-0.556-1.983-0.024-2.286c0.532-0.305,0.78-1.432,0.551-2.506 c0,0,0-0.003,0-1.042c0-1.088,0.021-1.18,0.021-1.18c0.238-1.072-0.01-2.203-0.552-2.513C1.631,10.8,1.634,9.765,2.18,8.812 L2.769,7.78c0.438-0.766,1.103-1.251,1.636-1.251c0.131,0,0.255,0.029,0.365,0.092C4.92,6.707,5.114,6.747,5.334,6.747 c0.596,0,1.38-0.296,2.007-0.795l1.944-1.065c1.021-0.407,1.856-1.277,1.856-1.933c0-0.656,0.898-1.192,1.998-1.192h1.156V1.761 c1.1,0,1.998,0.545,1.998,1.211c0,0.667,0.832,1.554,1.849,1.973L20,6.013c0.618,0.489,1.401,0.775,2.012,0.775 c0.24,0,0.454-0.045,0.62-0.139c0.122-0.069,0.259-0.102,0.403-0.102c0.551,0,1.221,0.476,1.653,1.231l0.59,1.032 c0.544,0.953,0.518,2.004-0.062,2.334c-0.577,0.331-0.859,1.48-0.627,2.554c0,0,0.01,0.042,0.01,1.103c0,1.012,0,1.012,0,1.012 c-0.218,1.049,0.068,2.174,0.636,2.498C25.802,18.635,25.819,19.68,25.274,20.635z"/><path d="M13.61,7.611c-3.913,0-7.084,3.173-7.084,7.085c0,3.914,3.171,7.085,7.084,7.085s7.085-3.172,7.085-7.085 C20.695,10.784,17.523,7.611,13.61,7.611z M13.61,20.02c-2.936,0-5.323-2.388-5.323-5.323c0-2.935,2.388-5.323,5.323-5.323 s5.324,2.388,5.324,5.323C18.934,17.632,16.546,20.02,13.61,20.02z"/><path d="M13.682,9.908c-2.602,0-4.718,2.116-4.718,4.718c0,2.601,2.116,4.716,4.718,4.716c2.601,0,4.717-2.115,4.717-4.716 C18.399,12.024,16.283,9.908,13.682,9.908z M13.682,17.581c-1.633,0-2.956-1.323-2.956-2.955s1.323-2.956,2.956-2.956 c1.632,0,2.956,1.324,2.956,2.956S15.314,17.581,13.682,17.581z"/></g></svg> | ||
| <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="Capa_1" width="27.434" height="29.5" enable-background="new 0 0 27.434 29.5" version="1.1" viewBox="0 0 27.434 29.5" xml:space="preserve"><g><path d="M27.315,18.389c-0.165-0.604-0.509-1.113-0.981-1.459c-0.042-0.144-0.083-0.429-0.015-0.761l0.037-0.177v-0.182V14.8 c0-1.247-0.006-1.277-0.048-1.472c-0.076-0.354-0.035-0.653,0.007-0.803c0.477-0.346,0.828-0.861,0.996-1.476 c0.261-0.956,0.076-2.091-0.508-3.114l-0.591-1.032c-0.746-1.307-1.965-2.119-3.182-2.119c-0.378,0-0.75,0.081-1.085,0.235 c-0.198-0.025-0.554-0.15-0.855-0.389l-0.103-0.082l-0.114-0.065l-1.857-1.067L18.92,3.36l-0.105-0.044 c-0.376-0.154-0.658-0.41-0.768-0.556C17.918,1.172,16.349,0,14.296,0H13.14c-2.043,0-3.608,1.154-3.749,2.721 C9.277,2.862,8.999,3.104,8.633,3.25l-0.1,0.039L8.439,3.341L6.495,4.406L6.363,4.479L6.245,4.573 C5.936,4.82,5.596,4.944,5.416,4.977c-0.314-0.139-0.66-0.21-1.011-0.21c-1.198,0-2.411,0.819-3.165,2.139L0.65,7.938 c-0.412,0.72-0.642,1.521-0.644,2.258c-0.003,0.952,0.362,1.756,1.013,2.256c0.034,0.155,0.061,0.448-0.016,0.786 c-0.038,0.168-0.062,0.28-0.062,1.563c0,1.148,0,1.148,0.015,1.262l0.009,0.073l0.017,0.073c0.073,0.346,0.045,0.643,0.011,0.802 C0.348,17.512-0.01,18.314,0,19.268c0.008,0.729,0.238,1.523,0.648,2.242l0.589,1.031c0.761,1.331,1.967,2.159,3.15,2.159 c0.324,0,0.645-0.064,0.938-0.187c0.167,0.038,0.492,0.156,0.813,0.416l0.11,0.088l0.124,0.07l2.045,1.156l0.102,0.057l0.107,0.043 c0.364,0.147,0.646,0.381,0.766,0.521c0.164,1.52,1.719,2.634,3.745,2.634h1.155c2.037,0,3.598-1.134,3.747-2.675 c0.117-0.145,0.401-0.393,0.774-0.549l0.111-0.047l0.105-0.062l1.96-1.159l0.105-0.062l0.097-0.075 c0.309-0.246,0.651-0.371,0.832-0.402c0.313,0.138,0.662,0.212,1.016,0.212c1.199,0,2.412-0.82,3.166-2.139l0.59-1.032 C27.387,20.48,27.575,19.342,27.315,18.389z M25.274,20.635l-0.59,1.032c-0.438,0.765-1.104,1.251-1.639,1.251 c-0.133,0-0.258-0.029-0.369-0.094c-0.15-0.086-0.346-0.127-0.566-0.127c-0.596,0-1.383,0.295-2.01,0.796l-1.96,1.157 c-1.016,0.425-1.846,1.291-1.846,1.929s-0.898,1.159-1.998,1.159H13.14c-1.1,0-1.998-0.514-1.998-1.141s-0.834-1.477-1.854-1.888 l-2.046-1.157c-0.636-0.511-1.425-0.814-2.006-0.814c-0.202,0-0.379,0.037-0.516,0.115c-0.101,0.057-0.214,0.084-0.333,0.084 c-0.518,0-1.179-0.498-1.62-1.271l-0.591-1.032c-0.545-0.954-0.556-1.983-0.024-2.286c0.532-0.305,0.78-1.432,0.551-2.506 c0,0,0-0.003,0-1.042c0-1.088,0.021-1.18,0.021-1.18c0.238-1.072-0.01-2.203-0.552-2.513C1.631,10.8,1.634,9.765,2.18,8.812 L2.769,7.78c0.438-0.766,1.103-1.251,1.636-1.251c0.131,0,0.255,0.029,0.365,0.092C4.92,6.707,5.114,6.747,5.334,6.747 c0.596,0,1.38-0.296,2.007-0.795l1.944-1.065c1.021-0.407,1.856-1.277,1.856-1.933c0-0.656,0.898-1.192,1.998-1.192h1.156V1.761 c1.1,0,1.998,0.545,1.998,1.211c0,0.667,0.832,1.554,1.849,1.973L20,6.013c0.618,0.489,1.401,0.775,2.012,0.775 c0.24,0,0.454-0.045,0.62-0.139c0.122-0.069,0.259-0.102,0.403-0.102c0.551,0,1.221,0.476,1.653,1.231l0.59,1.032 c0.544,0.953,0.518,2.004-0.062,2.334c-0.577,0.331-0.859,1.48-0.627,2.554c0,0,0.01,0.042,0.01,1.103c0,1.012,0,1.012,0,1.012 c-0.218,1.049,0.068,2.174,0.636,2.498C25.802,18.635,25.819,19.68,25.274,20.635z"/><path d="M13.61,7.611c-3.913,0-7.084,3.173-7.084,7.085c0,3.914,3.171,7.085,7.084,7.085s7.085-3.172,7.085-7.085 C20.695,10.784,17.523,7.611,13.61,7.611z M13.61,20.02c-2.936,0-5.323-2.388-5.323-5.323c0-2.935,2.388-5.323,5.323-5.323 s5.324,2.388,5.324,5.323C18.934,17.632,16.546,20.02,13.61,20.02z"/><path d="M13.682,9.908c-2.602,0-4.718,2.116-4.718,4.718c0,2.601,2.116,4.716,4.718,4.716c2.601,0,4.717-2.115,4.717-4.716 C18.399,12.024,16.283,9.908,13.682,9.908z M13.682,17.581c-1.633,0-2.956-1.323-2.956-2.955s1.323-2.956,2.956-2.956 c1.632,0,2.956,1.324,2.956,2.956S15.314,17.581,13.682,17.581z"/></g></svg> |
@@ -23,5 +23,5 @@ use deltae::*; | ||
| println!("{}: {}", delta.method, delta.value); | ||
| println!("{}: {}", delta.method(), delta.value()); | ||
| Ok(()) | ||
| } |
+26
-5
| use std::error::Error; | ||
| use std::str::FromStr; | ||
| use deltae::*; | ||
@@ -7,3 +6,3 @@ | ||
| // Lab from a string | ||
| let lab0 = LabValue::from_str("89.73, 1.88, -6.96")?; | ||
| let lab0: LabValue = "89.73, 1.88, -6.96".parse()?; | ||
| // Lab directly from values | ||
@@ -16,2 +15,20 @@ let lab1 = LabValue { | ||
| // Create your own Lab type | ||
| #[derive(Clone, Copy)] | ||
| struct MyLab(f32, f32, f32); | ||
| // Types that implement Into<LabValue> also implement the Delta trait | ||
| impl From<MyLab> for LabValue { | ||
| fn from(mylab: MyLab) -> Self { | ||
| LabValue { l: mylab.0, a: mylab.1, b: mylab.2 } | ||
| } | ||
| } | ||
| let mylab = MyLab(95.08, -0.17, -10.81); | ||
| // Implement DeltaEq for your own types | ||
| impl<D: Delta + Copy> DeltaEq<D> for MyLab {} | ||
| // Assert that colors are equivalent within a tolerance | ||
| assert_delta_eq!(mylab, lab1, DE2000, 0.0, "mylab is not equal to lab1!"); | ||
| // Calculate DeltaE between two lab values | ||
@@ -27,4 +44,4 @@ let de0 = DeltaE::new(&lab0, &lab1, DE2000); | ||
| // If DE2000 is less than 1.0, the colors are considered equivalent | ||
| assert_eq!(lch0, lab0); | ||
| assert_eq!(xyz0, lab1); | ||
| assert!(lch0.delta_eq(&lab0, DE2000, 1.0)); | ||
| assert!(xyz0.delta_eq(&lab1, DE2000, 1.0)); | ||
@@ -37,3 +54,6 @@ // Calculate DeltaE between different color types | ||
| println!("{}\n{}\n{}\n{}\n{}\n{}\n{}\n", | ||
| // Recalculate DeltaE with different method | ||
| let de3 = de2.with_method(DE1976); | ||
| println!("{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n", | ||
| lab0, // [L:89.73, a:1.88, b:-6.96] | ||
@@ -46,2 +66,3 @@ lab1, // [L:95.08, a:-0.17, b:-10.81] | ||
| de2, // 5.316937 | ||
| de3, // 6.902717 | ||
| ); | ||
@@ -48,0 +69,0 @@ |
+28
-7
@@ -22,3 +22,2 @@ # deltae | ||
| use std::error::Error; | ||
| use std::str::FromStr; | ||
| use deltae::*; | ||
@@ -28,3 +27,3 @@ | ||
| // Lab from a string | ||
| let lab0 = LabValue::from_str("89.73, 1.88, -6.96")?; | ||
| let lab0: LabValue = "89.73, 1.88, -6.96".parse()?; | ||
| // Lab directly from values | ||
@@ -37,2 +36,20 @@ let lab1 = LabValue { | ||
| // Create your own Lab type | ||
| #[derive(Clone, Copy)] | ||
| struct MyLab(f32, f32, f32); | ||
| // Types that implement Into<LabValue> also implement the Delta trait | ||
| impl From<MyLab> for LabValue { | ||
| fn from(mylab: MyLab) -> Self { | ||
| LabValue { l: mylab.0, a: mylab.1, b: mylab.2 } | ||
| } | ||
| } | ||
| let mylab = MyLab(95.08, -0.17, -10.81); | ||
| // Implement DeltaEq for your own types | ||
| impl<D: Delta + Copy> DeltaEq<D> for MyLab {} | ||
| // Assert that colors are equivalent within a tolerance | ||
| assert_delta_eq!(mylab, lab1, DE2000, 0.0, "mylab is not equal to lab1!"); | ||
| // Calculate DeltaE between two lab values | ||
@@ -48,4 +65,4 @@ let de0 = DeltaE::new(&lab0, &lab1, DE2000); | ||
| // If DE2000 is less than 1.0, the colors are considered equivalent | ||
| assert_eq!(lch0, lab0); | ||
| assert_eq!(xyz0, lab1); | ||
| assert!(lch0.delta_eq(&lab0, DE2000, 1.0)); | ||
| assert!(xyz0.delta_eq(&lab1, DE2000, 1.0)); | ||
@@ -58,3 +75,6 @@ // Calculate DeltaE between different color types | ||
| println!("{}\n{}\n{}\n{}\n{}\n{}\n{}\n", | ||
| // Recalculate DeltaE with different method | ||
| let de3 = de2.with_method(DE1976); | ||
| println!("{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n", | ||
| lab0, // [L:89.73, a:1.88, b:-6.96] | ||
@@ -67,2 +87,3 @@ lab1, // [L:95.08, a:-0.17, b:-10.81] | ||
| de2, // 5.316937 | ||
| de3, // 6.902717 | ||
| ); | ||
@@ -76,5 +97,5 @@ | ||
| ## Binary | ||
| ## Example | ||
| The binary included with this library is a command line application that | ||
| The example binary included with this library is a command line application that | ||
| calculates Delta E between to Lab colors. | ||
@@ -81,0 +102,0 @@ |
+41
-42
@@ -7,24 +7,18 @@ //! Manipulate and convert CIE L\*a\*b\* and Lch colors. | ||
| //! use deltae::*; | ||
| //! use std::str::FromStr; | ||
| //! use std::error::Error; | ||
| //! | ||
| //! fn main() -> Result<(), Box<dyn Error>> { | ||
| //! let lab0 = LabValue::from_str("95.08, -0.17, -10.81")?; | ||
| //! let lch0 = LchValue { | ||
| //! l: 95.08, | ||
| //! c: 10.811337, | ||
| //! h: 269.09903, | ||
| //! }; | ||
| //! let lab0: LabValue = "95.08, -0.17, -10.81".parse().unwrap(); | ||
| //! let lch0 = LchValue { | ||
| //! l: 95.08, | ||
| //! c: 10.811337, | ||
| //! h: 269.09903, | ||
| //! }; | ||
| //! | ||
| //! assert_eq!(lab0, lch0); | ||
| //! assert!(lab0.delta_eq(&lch0, DE2000, 0.01)); | ||
| //! | ||
| //! let lch0 = LchValue::from(lab0); | ||
| //! let lab2 = LabValue::from(lch0); | ||
| //! let lch0 = LchValue::from(lab0); | ||
| //! let lab2 = LabValue::from(lch0); | ||
| //! | ||
| //! println!("{}", lch0); // [L:89.73, c:7.2094, h:285.1157] | ||
| //! println!("{}", lch0); // [L:89.73, c:7.2094, h:285.1157] | ||
| //! | ||
| //! assert_eq!(lab0.round_to(4), lab2.round_to(4)); | ||
| //! | ||
| //! Ok(()) | ||
| //! } | ||
| //! assert_eq!(lab0.round_to(4), lab2.round_to(4)); | ||
| //! ``` | ||
@@ -35,14 +29,15 @@ | ||
| use crate::ValueResult; | ||
| use crate::validate::Validate; | ||
| use crate::*; | ||
| /// # CIEL\*a\*b\* | ||
| /// | ||
| /// | `Value` | `Color` | `Range` | | ||
| /// |:-------:|:---------------------:|:----------------:| | ||
| /// | `L*` | `Light <---> Dark` | `0 <---> 100` | | ||
| /// | `a*` | `Green <---> Magenta` | `-128 <---> 128` | | ||
| /// | `b*` | `Blue <---> Yellow` | `-128 <---> 128` | | ||
| /// The [`LabValue`] is the key component in calculating [`DeltaE`] | ||
| /// | ||
| #[derive(Debug, Clone, Copy)] | ||
| /// | `Value` | `Color` | `Range` | | ||
| /// |:-------:|:---------------------:|:--------------------:| | ||
| /// | `L*` | `Light <---> Dark` | `0.0 <---> 100.0` | | ||
| /// | `a*` | `Green <---> Magenta` | `-128.0 <---> 128.0` | | ||
| /// | `b*` | `Blue <---> Yellow` | `-128.0 <---> 128.0` | | ||
| /// | ||
| #[derive(Debug, Clone, Copy, PartialEq)] | ||
| pub struct LabValue { | ||
@@ -59,3 +54,3 @@ /// Lightness | ||
| /// Returns a result of a LabValue from 3 `f32`s. | ||
| /// Will return `Err()` if the values are out of range | ||
| /// Will return `Err()` if the values are out of range as determined by the [`Validate`] trait. | ||
| pub fn new(l: f32, a: f32, b: f32) -> ValueResult<LabValue> { | ||
@@ -80,9 +75,9 @@ LabValue {l, a, b}.validate() | ||
| /// | ||
| /// | `Value` | `Color` | `Range` | | ||
| /// |:-------:|:--------------------------:|:------------------:| | ||
| /// | `L*` | `Light <---> Dark` | `0 <---> 100` | | ||
| /// | `c` | `Chroma (Amount of color)` | `0 <---> 181.0139` | | ||
| /// | `h` | `Hue (Degrees)` | `0 <---> 360°` | | ||
| /// | `Value` | `Color` | `Range` | | ||
| /// |:-------:|:--------------------------:|:----------------------:| | ||
| /// | `L*` | `Light <---> Dark` | `0.0 <---> 100.0` | | ||
| /// | `c` | `Chroma (Amount of color)` | `0.0 <---> 181.0139` | | ||
| /// | `h` | `Hue (Degrees)` | `0.0 <---> 360.0°` | | ||
| /// | ||
| #[derive(Debug, Clone, Copy)] | ||
| #[derive(Debug, Clone, Copy, PartialEq)] | ||
| pub struct LchValue { | ||
@@ -99,3 +94,3 @@ /// Lightness | ||
| /// Returns a result of an LchValue from 3 `f32`s. | ||
| /// Will return `Err()` if the values are out of range | ||
| /// Will return `Err()` if the values are out of range as determined by the [`Validate`] trait. | ||
| pub fn new(l: f32, c: f32, h: f32) -> ValueResult<LchValue> { | ||
@@ -123,11 +118,13 @@ LchValue { l, c, h }.validate() | ||
| /// # XYZ | ||
| /// # CIE 1931 XYZ | ||
| /// | ||
| /// | `Value` | `Color` | `Range` | | ||
| /// |:-------:|:-------:|:-----------:| | ||
| /// | `X` | `Red` | `0 <---> 1` | | ||
| /// | `Y` | `Green` | `0 <---> 1` | | ||
| /// | `Z` | `Blue` | `0 <---> 1` | | ||
| /// Further Reading: [https://en.wikipedia.org/wiki/CIE_1931_color_space](https://en.wikipedia.org/wiki/CIE_1931_color_space) | ||
| /// | ||
| #[derive(Debug, Clone, Copy)] | ||
| /// | `Value` | `Color` | `Range` | | ||
| /// |:-------:|:-----------:|:---------------:| | ||
| /// | `X` | `RGB` | `0.0 <---> 1.0` | | ||
| /// | `Y` | `Luminance` | `0.0 <---> 1.0` | | ||
| /// | `Z` | `Blue` | `0.0 <---> 1.0` | | ||
| /// | ||
| #[derive(Debug, Clone, Copy, PartialEq)] | ||
| pub struct XyzValue { | ||
@@ -144,3 +141,3 @@ /// X Value | ||
| /// Returns a result of an XyzValue from 3 `f32`s. | ||
| /// Will return `Err()` if the values are out of range | ||
| /// Will return `Err()` if the values are out of range as determined by the [`Validate`] trait. | ||
| pub fn new(x: f32, y: f32, z:f32) -> ValueResult<XyzValue> { | ||
@@ -178,3 +175,3 @@ XyzValue {x, y, z}.validate() | ||
| impl Error for ValueError { | ||
| impl ValueError { | ||
| fn description(&self) -> &str { | ||
@@ -187,1 +184,3 @@ match self { | ||
| } | ||
| impl Error for ValueError {} |
+4
-16
@@ -82,8 +82,2 @@ use super::*; | ||
| // To Lch ///////////////////////////////////////////////////////////////////// | ||
| impl From<&LchValue> for LchValue { | ||
| fn from(lch: &LchValue) -> LchValue { | ||
| LchValue::from(*lch) | ||
| } | ||
| } | ||
| impl From<LabValue> for LchValue { | ||
@@ -156,3 +150,3 @@ fn from(lab: LabValue) -> LchValue { | ||
| let fz = fy - (lab.b / 200.0); | ||
| let xr = if fx > CBRT_EPSILON { | ||
| let xr = if fx > CBRT_EPSILON as f32 { | ||
| fx.powi(3) | ||
@@ -167,3 +161,3 @@ } else { | ||
| }; | ||
| let zr = if fz > CBRT_EPSILON { | ||
| let zr = if fz > CBRT_EPSILON as f32 { | ||
| fz.powi(3) | ||
@@ -182,8 +176,2 @@ } else { | ||
| impl From<&XyzValue> for XyzValue { | ||
| fn from(xyz: &XyzValue) -> XyzValue { | ||
| XyzValue::from(*xyz) | ||
| } | ||
| } | ||
| impl From<&LabValue> for XyzValue { | ||
@@ -300,3 +288,3 @@ fn from(lab: &LabValue) -> XyzValue { | ||
| const EPSILON: f32 = 216.0 / 24389.0; // CIE Standard: 0.008856 | ||
| const CBRT_EPSILON: f32 = 0.20689655172413796; | ||
| const CBRT_EPSILON: f64 = 0.20689655172413796; | ||
@@ -315,3 +303,3 @@ pub fn get_h_prime(a: f32, b: f32) -> f32 { | ||
| fn parse_str_to_vecf32(s: &str, length: usize) -> ValueResult<Vec<f32>> { | ||
| let collection: Vec<&str> = s.split(",").collect(); | ||
| let collection: Vec<&str> = s.split(',').collect(); | ||
@@ -318,0 +306,0 @@ // Allow extraneous whitespace ("92.5, 33.5, -18.8") |
+23
-32
@@ -5,3 +5,3 @@ use super::*; | ||
| /// As long as the type can be converted to Lab, we can calculate DeltaE. | ||
| pub trait Delta where Self: Into<LabValue> { | ||
| pub trait Delta: Into<LabValue> { | ||
| /// Calculate DeltaE between 2 types | ||
@@ -16,14 +16,15 @@ /// ``` | ||
| /// ``` | ||
| #[inline] | ||
| fn delta<L: Into<LabValue>>(self, other: L, method: DEMethod) -> DeltaE { | ||
| let lab0: LabValue = self.into(); | ||
| let lab1: LabValue = other.into(); | ||
| let reference: LabValue = self.into(); | ||
| let sample: LabValue = other.into(); | ||
| let value = match method { | ||
| DEMethod::DE1976 => delta_e_1976(&lab0, &lab1), | ||
| DEMethod::DE1994T => delta_e_1994(&lab0, &lab1, true), | ||
| DEMethod::DE1994G => delta_e_1994(&lab0, &lab1, false), | ||
| DEMethod::DE2000 => delta_e_2000(&lab0, &lab1), | ||
| DEMethod::DECMC(t_l, t_c) => delta_e_cmc(&lab0, &lab1, t_l, t_c), | ||
| DEMethod::DE1976 => delta_e_1976(&reference, &sample), | ||
| DEMethod::DE1994T => delta_e_1994(&reference, &sample, true), | ||
| DEMethod::DE1994G => delta_e_1994(&reference, &sample, false), | ||
| DEMethod::DE2000 => delta_e_2000(&reference, &sample), | ||
| DEMethod::DECMC(t_l, t_c) => delta_e_cmc(&reference, &sample, t_l, t_c), | ||
| }; | ||
| DeltaE { value, method } | ||
| DeltaE { value, method, reference, sample } | ||
| } | ||
@@ -52,3 +53,3 @@ } | ||
| let (kl, k1, k2) = match textiles { | ||
| true => (2.0, 0.048, 0.014), | ||
| true => (2.0, 0.048, 0.014), | ||
| false => (1.0, 0.045, 0.015), | ||
@@ -61,6 +62,3 @@ }; | ||
| ( (delta_l / kl * s_l).powi(2) | ||
| + (delta_chroma / s_c).powi(2) | ||
| + (delta_hue / s_h).powi(2) | ||
| ).sqrt() | ||
| ((delta_l / kl * s_l).powi(2) + (delta_chroma / s_c).powi(2) + (delta_hue / s_h).powi(2)).sqrt() | ||
| } | ||
@@ -131,3 +129,3 @@ | ||
| let de2000 = ( | ||
| ( | ||
| (delta_l_prime/(k_l*s_l)).powi(2) | ||
@@ -137,5 +135,3 @@ + (delta_c_prime/(k_c*s_c)).powi(2) | ||
| + (r_t * (delta_c_prime/(k_c*s_c)) * (delta_h_prime/(k_h*s_h))) | ||
| ).sqrt(); | ||
| de2000 | ||
| ).sqrt() | ||
| } | ||
@@ -145,3 +141,3 @@ | ||
| #[inline] | ||
| fn delta_e_cmc(lab0: &LabValue, lab1 :&LabValue, tolerance_l: f32, tolerance_c: f32) -> f32 { | ||
| fn delta_e_cmc(lab0: &LabValue, lab1: &LabValue, tolerance_l: f32, tolerance_c: f32) -> f32 { | ||
| let chroma_0 = (lab0.a.powi(2) + lab0.b.powi(2)).sqrt(); | ||
@@ -167,11 +163,7 @@ let chroma_1 = (lab1.a.powi(2) + lab1.b.powi(2)).sqrt(); | ||
| let h_1 = if h >= 0.0 { | ||
| h | ||
| } else { | ||
| h + 360.0 | ||
| }; | ||
| let h_1 = if h >= 0.0 { h } else { h + 360.0 }; | ||
| let f = (chroma_0.powi(4) / (chroma_0.powi(4) + 1900.0)).sqrt(); | ||
| let t = if 164.0 <= h_1 && h_1 <= 345.0 { | ||
| let t = if (164.0..345.0).contains(&h_1) { | ||
| 0.56 + (0.2 * (h_1 + 168.0).to_radians().cos()).abs() | ||
@@ -184,9 +176,8 @@ } else { | ||
| let decmc = ( | ||
| (delta_l / (tolerance_l * s_l)).powi(2) + | ||
| (delta_c / (tolerance_c * s_c)).powi(2) + | ||
| (delta_h / s_h).powi(2) | ||
| ).sqrt(); | ||
| decmc | ||
| ( | ||
| (delta_l / (tolerance_l * s_l)).powi(2) | ||
| + (delta_c / (tolerance_c * s_c)).powi(2) | ||
| + (delta_h / s_h).powi(2) | ||
| ) | ||
| .sqrt() | ||
| } |
+121
-17
@@ -1,27 +0,131 @@ | ||
| /// We can determine that two colors are equivalent if the Delta is less than | ||
| /// a certain value. Typically, two colors with a DE2000 value of less than 1.0 | ||
| /// are considered indistinguishable. | ||
| //! ## `Tolerance` and `DeltaEq` traits | ||
| //! | ||
| //! This module deals with comparing two colors by [`DeltaE`] within a certain [`Tolerance`]. | ||
| //! | ||
| //! See also: [`assert_delta_eq`] | ||
| //! | ||
| //! ### Implementing `Tolerance` and `DeltaEq` | ||
| //! | ||
| //! ``` | ||
| //! use deltae::*; | ||
| //! | ||
| //! struct MyTolerance(f32); | ||
| //! | ||
| //! impl Tolerance for MyTolerance { | ||
| //! fn tolerance(self) -> f32 { | ||
| //! self.0 | ||
| //! } | ||
| //! } | ||
| //! | ||
| //! #[derive(Copy, Clone)] | ||
| //! struct MyLab(f32, f32, f32); | ||
| //! | ||
| //! // Types that implement Into<Lab> also implement the Delta trait | ||
| //! impl From<MyLab> for LabValue { | ||
| //! fn from(mylab: MyLab) -> LabValue { | ||
| //! LabValue { | ||
| //! l: mylab.0, | ||
| //! a: mylab.1, | ||
| //! b: mylab.2, | ||
| //! } | ||
| //! } | ||
| //! } | ||
| //! | ||
| //! impl<D: Delta + Copy> DeltaEq<D> for MyLab {} | ||
| //! | ||
| //! let mylab = MyLab(89.73, 1.88, -6.96); | ||
| //! let lab = LabValue::new(89.73, 1.88, -6.96).unwrap(); | ||
| //! let de2000 = mylab.delta(lab, DEMethod::DE2000); | ||
| //! assert!(mylab.delta_eq(&lab, DE1976, 0.0)); | ||
| //! ``` | ||
| use crate::*; | ||
| /// Trait to determine whether two values are within a certain tolerance of [`DeltaE`]. Types that | ||
| /// implement Into<[`LabValue`]> implicitly implement [`Delta`]. Types that implement [`Delta`] and | ||
| /// [`Copy`] may also implement DeltaEq for other types that also implement [`Delta`] and [`Copy`]. | ||
| /// ``` | ||
| /// use deltae::*; | ||
| /// | ||
| use super::*; | ||
| use super::delta::Delta; | ||
| /// #[derive(Copy, Clone)] | ||
| /// struct MyLab(f32, f32, f32); | ||
| /// | ||
| /// // Types that implement Into<Lab> implicitly implement the Delta trait | ||
| /// impl From<MyLab> for LabValue { | ||
| /// fn from(mylab: MyLab) -> LabValue { | ||
| /// LabValue { | ||
| /// l: mylab.0, | ||
| /// a: mylab.1, | ||
| /// b: mylab.2, | ||
| /// } | ||
| /// } | ||
| /// } | ||
| /// | ||
| /// // Types that implement Delta and Copy may also implement DeltaEq for other types that also | ||
| /// // implement Delta and Copy | ||
| /// impl<D: Delta + Copy> DeltaEq<D> for MyLab {} | ||
| /// | ||
| /// let mylab = MyLab(89.73, 1.88, -6.96); | ||
| /// let lab = LabValue::new(89.73, 1.88, -6.96).unwrap(); | ||
| /// let de2000 = mylab.delta(lab, DEMethod::DE2000); | ||
| /// assert!(mylab.delta_eq(&lab, DE1976, 0.0)); | ||
| /// ``` | ||
| pub trait DeltaEq<D: Delta + Copy>: Delta + Copy { | ||
| /// Return true if the value is less than or equal to the [`Tolerance`] | ||
| fn delta_eq<T: Tolerance>(&self, other: D, method: DEMethod, tolerance: T) -> bool { | ||
| self.delta(other, method).value() <= &tolerance.tolerance() | ||
| } | ||
| } | ||
| impl<T: Delta + Copy> PartialEq<T> for LabValue | ||
| where LabValue: From<T> { | ||
| fn eq(&self, other: &T) -> bool { | ||
| self.delta(*other, DE2000).value < 1.0 | ||
| /// Convenience macro for asserting two values are equivalent within a tolerance | ||
| /// ``` | ||
| /// use deltae::*; | ||
| /// | ||
| /// let lab0 = LabValue::new(50.0, 0.0, 0.0).unwrap(); | ||
| /// let lab1 = LabValue::new(50.1, 0.1, 0.1).unwrap(); | ||
| /// | ||
| /// // Assert that the difference between lab0 and lab1 is less than 1.0 DE2000 | ||
| /// assert_delta_eq!(lab0, lab1, DE2000, 1.0); | ||
| /// ``` | ||
| #[macro_export] | ||
| macro_rules! assert_delta_eq { | ||
| ($reference:expr, $sample:expr, $method:expr, $tolerance:expr) => { | ||
| assert!($reference.delta_eq($sample, $method, $tolerance)) | ||
| }; | ||
| ($reference:expr, $sample:expr, $method:expr, $tolerance:expr, $($message:tt)*) => { | ||
| assert!($reference.delta_eq($sample, $method, $tolerance), $($message)*) | ||
| }; | ||
| } | ||
| /// Trait to define a tolerance value for the [`DeltaEq`] trait | ||
| pub trait Tolerance { | ||
| /// Return a tolerance value | ||
| fn tolerance(self) -> f32; | ||
| } | ||
| impl Tolerance for f32 { | ||
| fn tolerance(self) -> f32 { | ||
| self | ||
| } | ||
| } | ||
| impl<T: Delta + Copy> PartialEq<T> for LchValue | ||
| where LchValue: From<T> { | ||
| fn eq(&self, other: &T) -> bool { | ||
| self.delta(*other, DE2000).value < 1.0 | ||
| impl Tolerance for f64 { | ||
| fn tolerance(self) -> f32 { | ||
| self as f32 | ||
| } | ||
| } | ||
| impl<T: Delta + Copy> PartialEq<T> for XyzValue | ||
| where XyzValue: From<T> { | ||
| fn eq(&self, other: &T) -> bool { | ||
| self.delta(*other, DE2000).value < 1.0 | ||
| impl Tolerance for DeltaE { | ||
| fn tolerance(self) -> f32 { | ||
| self.value | ||
| } | ||
| } | ||
| macro_rules! impl_delta_eq { | ||
| ($t:ty) => { | ||
| impl<D: Delta + Copy> DeltaEq<D> for $t {} | ||
| } | ||
| } | ||
| impl_delta_eq!(LabValue); | ||
| impl_delta_eq!(LchValue); | ||
| impl_delta_eq!(XyzValue); |
+96
-16
@@ -9,3 +9,2 @@ #![warn(missing_docs)] | ||
| //! use std::error::Error; | ||
| //! use std::str::FromStr; | ||
| //! use deltae::*; | ||
@@ -15,3 +14,3 @@ //! | ||
| //! // Lab from a string | ||
| //! let lab0 = LabValue::from_str("89.73, 1.88, -6.96")?; | ||
| //! let lab0: LabValue = "89.73, 1.88, -6.96".parse()?; | ||
| //! // Lab directly from values | ||
@@ -24,2 +23,20 @@ //! let lab1 = LabValue { | ||
| //! | ||
| //! // Create your own Lab type | ||
| //! #[derive(Clone, Copy)] | ||
| //! struct MyLab(f32, f32, f32); | ||
| //! | ||
| //! // Types that implement Into<LabValue> also implement the Delta trait | ||
| //! impl From<MyLab> for LabValue { | ||
| //! fn from(mylab: MyLab) -> Self { | ||
| //! LabValue { l: mylab.0, a: mylab.1, b: mylab.2 } | ||
| //! } | ||
| //! } | ||
| //! let mylab = MyLab(95.08, -0.17, -10.81); | ||
| //! | ||
| //! // Implement DeltaEq for your own types | ||
| //! impl<D: Delta + Copy> DeltaEq<D> for MyLab {} | ||
| //! | ||
| //! // Assert that colors are equivalent within a tolerance | ||
| //! assert_delta_eq!(mylab, lab1, DE2000, 0.0, "mylab is not equal to lab1!"); | ||
| //! | ||
| //! // Calculate DeltaE between two lab values | ||
@@ -34,4 +51,5 @@ //! let de0 = DeltaE::new(&lab0, &lab1, DE2000); | ||
| //! let xyz0 = XyzValue::from(lab1); | ||
| //! assert_eq!(lch0, lab0); | ||
| //! assert_eq!(xyz0, lab1); | ||
| //! // If DE2000 is less than 1.0, the colors are considered equivalent | ||
| //! assert!(lch0.delta_eq(&lab0, DE2000, 1.0)); | ||
| //! assert!(xyz0.delta_eq(&lab1, DE2000, 1.0)); | ||
| //! | ||
@@ -44,3 +62,6 @@ //! // Calculate DeltaE between different color types | ||
| //! | ||
| //! println!("{}\n{}\n{}\n{}\n{}\n{}\n{}\n", | ||
| //! // Recalculate DeltaE with different method | ||
| //! let de3 = de2.with_method(DE1976); | ||
| //! | ||
| //! println!("{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n", | ||
| //! lab0, // [L:89.73, a:1.88, b:-6.96] | ||
@@ -53,2 +74,3 @@ //! lab1, // [L:95.08, a:-0.17, b:-10.81] | ||
| //! de2, // 5.316937 | ||
| //! de3, // 6.902717 | ||
| //! ); | ||
@@ -60,6 +82,6 @@ //! | ||
| mod color; | ||
| pub mod color; | ||
| mod convert; | ||
| mod delta; | ||
| mod eq; | ||
| pub mod eq; | ||
| mod round; | ||
@@ -74,2 +96,3 @@ mod validate; | ||
| pub use delta::*; | ||
| pub use eq::*; | ||
| pub use round::*; | ||
@@ -85,15 +108,29 @@ pub use validate::*; | ||
| /// | ||
| /// There are many different methods of calculating color difference. | ||
| /// Different methods have a specific purpose, mainly in determining the level | ||
| /// of tolerance for describing the difference between two colors. | ||
| #[derive(Debug, PartialEq, Clone, Copy)] | ||
| /// There are many different methods of calculating color difference. Different methods have a | ||
| /// specific purpose, mainly in determining the level of tolerance for describing the difference | ||
| /// between two colors. Regardless of the [`DEMethod`] used, [`DeltaE`] is always calculated based on the | ||
| /// [`LabValue`]s of the two colors. | ||
| #[derive(Debug, Clone, Copy)] | ||
| pub struct DeltaE { | ||
| /// The mathematical method used for calculating color difference | ||
| pub method: DEMethod, | ||
| /// The calculated value | ||
| pub value: f32, | ||
| method: DEMethod, | ||
| /// The calculated Delta E value | ||
| value: f32, | ||
| /// The reference color | ||
| reference: LabValue, | ||
| /// The sample color | ||
| sample: LabValue, | ||
| } | ||
| impl DeltaE { | ||
| /// New `DeltaE` from colors and `DEMethod`. | ||
| /// New [`DeltaE`] from two colors and a [`DEMethod`]. | ||
| /// ``` | ||
| /// use deltae::{LabValue, DeltaE, DEMethod::DE2000}; | ||
| /// | ||
| /// let lab0 = LabValue::new(89.73, 1.88, -6.96).unwrap(); | ||
| /// let lab1 = LabValue::new(95.08, -0.17, -10.81).unwrap(); | ||
| /// let de0 = DeltaE::new(&lab0, &lab1, DE2000); | ||
| /// assert_eq!(de0, 5.316941); | ||
| /// ``` | ||
| #[inline] | ||
| pub fn new<A, B>(a: A, b: B, method: DEMethod) -> DeltaE | ||
@@ -103,2 +140,39 @@ where A: Delta, B: Delta { | ||
| } | ||
| /// Recalculate [`DeltaE`] with another [`DEMethod`] | ||
| /// ``` | ||
| /// use deltae::{Delta, DeltaE, LabValue, DEMethod}; | ||
| /// | ||
| /// let lab0 = LabValue::new(89.73, 1.88, -6.96).unwrap(); | ||
| /// let lab1 = LabValue::new(95.08, -0.17, -10.81).unwrap(); | ||
| /// let de2000 = lab0.delta(lab1, DEMethod::DE2000); | ||
| /// let de1976 = de2000.with_method(DEMethod::DE1976); | ||
| /// assert_eq!(de1976, 6.902716); | ||
| /// ``` | ||
| #[inline] | ||
| pub fn with_method(self, method: DEMethod) -> Self { | ||
| self.reference.delta(self.sample, method) | ||
| } | ||
| /// Return a reference the [`DeltaE`] method used in the calculation | ||
| pub fn method(&self) -> &DEMethod { | ||
| &self.method | ||
| } | ||
| /// Return a reference to the [`DeltaE`] value | ||
| pub fn value(&self) -> &f32 { | ||
| &self.value | ||
| } | ||
| /// Return a reference to the reference [`LabValue`] used in the calculation. A reference color | ||
| /// is the base color to which the sample color is being compared. | ||
| pub fn reference(&self) -> &LabValue { | ||
| &self.reference | ||
| } | ||
| /// Return a reference to the sample [`LabValue`] used in the calculation. A sample color is | ||
| /// the color being compared to the reference color. | ||
| pub fn sample(&self) -> &LabValue { | ||
| &self.sample | ||
| } | ||
| } | ||
@@ -114,6 +188,12 @@ | ||
| fn eq(&self, f: &f32) -> bool { | ||
| self.value == *f | ||
| &self.value == f | ||
| } | ||
| } | ||
| impl PartialEq for DeltaE { | ||
| fn eq(&self, other: &Self) -> bool { | ||
| self.value == other.value | ||
| } | ||
| } | ||
| /// One should be careful when ordering DeltaE. A `DE2000:1.0` value is not | ||
@@ -120,0 +200,0 @@ /// necessarily the same amount of color difference as a amount of color |
+23
-18
@@ -16,5 +16,7 @@ use super::*; | ||
| impl Round for DeltaE { | ||
| fn round_to(mut self, places: i32) -> Self { | ||
| self.value = round_to(self.value, places); | ||
| self | ||
| fn round_to(self, places: i32) -> Self { | ||
| Self { | ||
| value: round_to(self.value, places), | ||
| ..self | ||
| } | ||
| } | ||
@@ -24,7 +26,8 @@ } | ||
| impl Round for LabValue { | ||
| fn round_to(mut self, places: i32) -> LabValue { | ||
| self.l = round_to(self.l, places); | ||
| self.a = round_to(self.a, places); | ||
| self.b = round_to(self.b, places); | ||
| self | ||
| fn round_to(self, places: i32) -> LabValue { | ||
| Self { | ||
| l: round_to(self.l, places), | ||
| a: round_to(self.a, places), | ||
| b: round_to(self.b, places), | ||
| } | ||
| } | ||
@@ -34,7 +37,8 @@ } | ||
| impl Round for LchValue { | ||
| fn round_to(mut self, places: i32) -> LchValue { | ||
| self.l = round_to(self.l, places); | ||
| self.c = round_to(self.c, places); | ||
| self.h = round_to(self.h, places); | ||
| self | ||
| fn round_to(self, places: i32) -> LchValue { | ||
| Self { | ||
| l: round_to(self.l, places), | ||
| c: round_to(self.c, places), | ||
| h: round_to(self.h, places), | ||
| } | ||
| } | ||
@@ -44,7 +48,8 @@ } | ||
| impl Round for XyzValue { | ||
| fn round_to(mut self, places: i32) -> XyzValue { | ||
| self.x = round_to(self.x, places); | ||
| self.y = round_to(self.y, places); | ||
| self.z = round_to(self.z, places); | ||
| self | ||
| fn round_to(self, places: i32) -> XyzValue { | ||
| Self { | ||
| x: round_to(self.x, places), | ||
| y: round_to(self.y, places), | ||
| z: round_to(self.z, places), | ||
| } | ||
| } | ||
@@ -51,0 +56,0 @@ } |
+21
-15
@@ -9,11 +9,17 @@ use super::*; | ||
| const RANGE_PCT: std::ops::RangeInclusive<f32> = 0.0..=100.0; | ||
| const RANGE_I8: std::ops::RangeInclusive<f32> = -128.0..=128.0; | ||
| const RANGE_CHROMA: std::ops::RangeInclusive<f32> = 0.0..=181.01933; | ||
| const RANGE_360: std::ops::RangeInclusive<f32> = 0.0..=360.0; | ||
| const RANGE_01: std::ops::RangeInclusive<f32> = 0.0..=1.0; | ||
| impl Validate for LabValue { | ||
| fn validate(self) -> ValueResult<Self> { | ||
| if self.l < 0.0 || self.l > 100.0 || | ||
| self.a < -128.0 || self.a > 128.0 || | ||
| self.b < -128.0 || self.b > 128.0 | ||
| if RANGE_PCT.contains(&self.l) | ||
| && RANGE_I8.contains(&self.a) | ||
| && RANGE_I8.contains(&self.b) | ||
| { | ||
| Ok(self) | ||
| } else { | ||
| Err(ValueError::OutOfBounds) | ||
| } else { | ||
| Ok(self) | ||
| } | ||
@@ -25,9 +31,9 @@ } | ||
| fn validate(self) -> ValueResult<Self> { | ||
| if self.l < 0.0 || self.l > 100.0 || | ||
| self.c < 0.0 || self.c > (128_f32.powi(2) + 128_f32.powi(2)).sqrt() || | ||
| self.h < 0.0 || self.h > 360.0 | ||
| if RANGE_PCT.contains(&self.l) | ||
| && RANGE_CHROMA.contains(&self.c) | ||
| && RANGE_360.contains(&self.h) | ||
| { | ||
| Ok(self) | ||
| } else { | ||
| Err(ValueError::OutOfBounds) | ||
| } else { | ||
| Ok(self) | ||
| } | ||
@@ -39,11 +45,11 @@ } | ||
| fn validate(self) -> ValueResult<Self> { | ||
| if self.x < 0.0 || self.x > 1.0 || | ||
| self.y < 0.0 || self.y > 1.0 || | ||
| self.z < 0.0 || self.z > 1.0 | ||
| if RANGE_01.contains(&self.x) | ||
| && RANGE_01.contains(&self.y) | ||
| && RANGE_01.contains(&self.z) | ||
| { | ||
| Ok(self) | ||
| } else { | ||
| Err(ValueError::OutOfBounds) | ||
| } else { | ||
| Ok(self) | ||
| } | ||
| } | ||
| } |
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta http-equiv="refresh" content="0;URL=struct.LabValue.html"> | ||
| </head> | ||
| <body> | ||
| <p>Redirecting to <a href="struct.LabValue.html">struct.LabValue.html</a>...</p> | ||
| <script>location.replace("struct.LabValue.html" + location.search + location.hash);</script> | ||
| </body> | ||
| </html> |
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta http-equiv="refresh" content="0;URL=struct.LchValue.html"> | ||
| </head> | ||
| <body> | ||
| <p>Redirecting to <a href="struct.LchValue.html">struct.LchValue.html</a>...</p> | ||
| <script>location.replace("struct.LchValue.html" + location.search + location.hash);</script> | ||
| </body> | ||
| </html> |
| <!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="API documentation for the Rust `ValueResult` type in crate `deltae`."><meta name="keywords" content="rust, rustlang, rust-lang, ValueResult"><title>deltae::color::ValueResult - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc type"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../deltae/index.html'><img src='../../rust-logo.png' alt='logo' width='100'></a><p class='location'>Type Definition ValueResult</p><div class="sidebar-elems"><p class='location'><a href='../index.html'>deltae</a>::<wbr><a href='index.html'>color</a></p><script>window.sidebarCurrent = {name: 'ValueResult', ty: 'type', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/deltae/color.rs.html#298' title='goto source code'>[src]</a></span><span class='in-band'>Type Definition <a href='../index.html'>deltae</a>::<wbr><a href='index.html'>color</a>::<wbr><a class="type" href=''>ValueResult</a></span></h1><pre class='rust typedef'>type ValueResult<T> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <a class="enum" href="../../deltae/color/enum.ValueError.html" title="enum deltae::color::ValueError">ValueError</a>>;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../../";window.currentCrate = "deltae";</script><script src="../../aliases.js"></script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html> |
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta http-equiv="refresh" content="0;URL=enum.ValueError.html"> | ||
| </head> | ||
| <body> | ||
| <p>Redirecting to <a href="enum.ValueError.html">enum.ValueError.html</a>...</p> | ||
| <script>location.replace("enum.ValueError.html" + location.search + location.hash);</script> | ||
| </body> | ||
| </html> |
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta http-equiv="refresh" content="0;URL=type.ValueResult.html"> | ||
| </head> | ||
| <body> | ||
| <p>Redirecting to <a href="type.ValueResult.html">type.ValueResult.html</a>...</p> | ||
| <script>location.replace("type.ValueResult.html" + location.search + location.hash);</script> | ||
| </body> | ||
| </html> |
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta http-equiv="refresh" content="0;URL=struct.XyzValue.html"> | ||
| </head> | ||
| <body> | ||
| <p>Redirecting to <a href="struct.XyzValue.html">struct.XyzValue.html</a>...</p> | ||
| <script>location.replace("struct.XyzValue.html" + location.search + location.hash);</script> | ||
| </body> | ||
| </html> |
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta http-equiv="refresh" content="0;URL=struct.DeltaE.html"> | ||
| </head> | ||
| <body> | ||
| <p>Redirecting to <a href="struct.DeltaE.html">struct.DeltaE.html</a>...</p> | ||
| <script>location.replace("struct.DeltaE.html" + location.search + location.hash);</script> | ||
| </body> | ||
| </html> |
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta http-equiv="refresh" content="0;URL=enum.DEMethod.html"> | ||
| </head> | ||
| <body> | ||
| <p>Redirecting to <a href="enum.DEMethod.html">enum.DEMethod.html</a>...</p> | ||
| <script>location.replace("enum.DEMethod.html" + location.search + location.hash);</script> | ||
| </body> | ||
| </html> |
| <!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="API documentation for the Rust `ValueError` enum in crate `deltae`."><meta name="keywords" content="rust, rustlang, rust-lang, ValueError"><title>deltae::ValueError - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../dark.css"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../deltae/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Enum ValueError</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.OutOfBounds">OutOfBounds</a><a href="#variant.BadFormat">BadFormat</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-Display">Display</a><a href="#impl-Error">Error</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-ToString">ToString</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><p class='location'><a href='index.html'>deltae</a></p><script>window.sidebarCurrent = {name: 'ValueError', ty: 'enum', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/deltae/color.rs.html#158-163' title='goto source code'>[src]</a></span><span class='in-band'>Enum <a href='index.html'>deltae</a>::<wbr><a class="enum" href=''>ValueError</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust enum'>pub enum ValueError { | ||
| OutOfBounds, | ||
| BadFormat, | ||
| }</pre></div><div class='docblock'><p>Value validation Error type</p> | ||
| </div><h2 id='variants' class='variants small-section-header'> | ||
| Variants<a href='#variants' class='anchor'></a></h2> | ||
| <span id="variant.OutOfBounds" class="variant small-section-header"><a href="#variant.OutOfBounds" class="anchor field"></a><code id='OutOfBounds.v'>OutOfBounds</code></span><div class='docblock'><p>The value is outside the acceptable range</p> | ||
| </div><span id="variant.BadFormat" class="variant small-section-header"><a href="#variant.BadFormat" class="anchor field"></a><code id='BadFormat.v'>BadFormat</code></span><div class='docblock'><p>The value is formatted incorrectly</p> | ||
| </div><h2 id='implementations' class='small-section-header'>Trait Implementations<a href='#implementations' class='anchor'></a></h2><div id='implementations-list'><h3 id='impl-Display' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a></code><a href='#impl-Display' class='anchor'></a><a class='srclink' href='../src/deltae/color.rs.html#165-169' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code id='fmt.v'>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../src/deltae/color.rs.html#166-168' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></p> | ||
| </div></div><h3 id='impl-Debug' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../src/deltae/color.rs.html#156' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt-1' class="method hidden"><code id='fmt.v-1'>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../src/deltae/color.rs.html#156' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p> | ||
| </div></div><h3 id='impl-Error' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html" title="trait std::error::Error">Error</a> for <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a></code><a href='#impl-Error' class='anchor'></a><a class='srclink' href='../src/deltae/color.rs.html#171-178' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.description' class="method hidden"><code id='description.v'>fn <a href='https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.description' class='fnname'>description</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></code><a class='srclink' href='../src/deltae/color.rs.html#172-177' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method is soft-deprecated. <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.description">Read more</a></p> | ||
| </div><h4 id='method.cause' class="method"><code id='cause.v'>fn <a href='https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.cause' class='fnname'>cause</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&dyn <a class="trait" href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html" title="trait std::error::Error">Error</a>></code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/error.rs.html#134-136' title='goto source code'>[src]</a></h4><div class='stability'><div class='stab deprecated'>Deprecated since 1.33.0: <p>replaced by Error::source, which can support downcasting</p> | ||
| </div></div><div class='docblock'><p>The lower-level cause of this error, if any. <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.cause">Read more</a></p> | ||
| </div><h4 id='method.source' class="method"><code id='source.v'>fn <a href='https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.source' class='fnname'>source</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&(dyn <a class="trait" href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html" title="trait std::error::Error">Error</a> + 'static)></code><span class='since' title='Stable since Rust version 1.30.0'>1.30.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/error.rs.html#197' title='goto source code'>[src]</a></h4><div class='docblock'><p>The lower-level source of this error, if any. <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.source">Read more</a></p> | ||
| </div></div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-Send' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-From%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href='#impl-From%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#550-552' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from' class="method hidden"><code id='from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(t: T) -> T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#551' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-ToString' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html" title="trait alloc::string::ToString">ToString</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-ToString' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/string.rs.html#2134-2144' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.to_string' class="method hidden"><code id='to_string.v'>default fn <a href='https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html#tymethod.to_string' class='fnname'>to_string</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/string.rs.html#2136-2143' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Converts the given value to a <code>String</code>. <a href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html#tymethod.to_string">Read more</a></p> | ||
| </div></div><h3 id='impl-Into%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href='#impl-Into%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#541-546' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.into' class="method hidden"><code id='into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into' class='fnname'>into</a>(self) -> U</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#543-545' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-TryFrom%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></code><a href='#impl-TryFrom%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#569-575' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error' class="type"><code id='Error.t'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error' class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p> | ||
| </div><h4 id='method.try_from' class="method hidden"><code id='try_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#572-574' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-TryInto%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><a href='#impl-TryInto%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#557-564' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-1' class="type"><code id='Error.t-1'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error' class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p> | ||
| </div><h4 id='method.try_into' class="method hidden"><code id='try_into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into' class='fnname'>try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#561-563' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213-215' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code id='borrow.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p> | ||
| </div></div><h3 id='impl-BorrowMut%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-BorrowMut%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code id='borrow_mut.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#219' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p> | ||
| </div></div><h3 id='impl-Any' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#100-102' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code id='type_id.v'>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#101' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p> | ||
| </div></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "deltae";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html> |
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta http-equiv="refresh" content="0;URL=trait.FromStr.html"> | ||
| </head> | ||
| <body> | ||
| <p>Redirecting to <a href="trait.FromStr.html">trait.FromStr.html</a>...</p> | ||
| <script>location.replace("trait.FromStr.html" + location.search + location.hash);</script> | ||
| </body> | ||
| </html> |
| <!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="API documentation for the Rust `LabValue` struct in crate `deltae`."><meta name="keywords" content="rust, rustlang, rust-lang, LabValue"><title>deltae::LabValue - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../dark.css"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../deltae/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Struct LabValue</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.l">l</a><a href="#structfield.a">a</a><a href="#structfield.b">b</a></div><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.new">new</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Copy">Copy</a><a href="#impl-Debug">Debug</a><a href="#impl-Default">Default</a><a href="#impl-Display">Display</a><a href="#impl-From%3C%26%27_%20LabValue%3E">From<&'_ LabValue></a><a href="#impl-From%3C%26%27_%20LchValue%3E">From<&'_ LchValue></a><a href="#impl-From%3C%26%27_%20XyzValue%3E">From<&'_ XyzValue></a><a href="#impl-From%3CLabValue%3E">From<LabValue></a><a href="#impl-From%3CLchValue%3E">From<LchValue></a><a href="#impl-From%3CXyzValue%3E">From<XyzValue></a><a href="#impl-FromStr">FromStr</a><a href="#impl-PartialEq%3CT%3E">PartialEq<T></a><a href="#impl-Round">Round</a><a href="#impl-TryFrom%3C%26%27_%20%5Bf32%3B%203%5D%3E">TryFrom<&'_ [f32; 3]></a><a href="#impl-TryFrom%3C%26%27_%20(f32%2C%20f32%2C%20f32)%3E">TryFrom<&'_ (f32, f32, f32)></a><a href="#impl-TryFrom%3C(f32%2C%20f32%2C%20f32)%3E">TryFrom<(f32, f32, f32)></a><a href="#impl-Validate">Validate</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-ToString">ToString</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><p class='location'><a href='index.html'>deltae</a></p><script>window.sidebarCurrent = {name: 'LabValue', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/deltae/color.rs.html#46-53' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='index.html'>deltae</a>::<wbr><a class="struct" href=''>LabValue</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct LabValue { | ||
| pub l: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, | ||
| pub a: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, | ||
| pub b: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, | ||
| }</pre></div><div class='docblock'><h1 id="cielab" class="section-header"><a href="#cielab">CIEL*a*b*</a></h1><table><thead><tr><th align="center"><code>Value</code></th><th align="center"><code>Color</code></th><th align="center"><code>Range</code></th></tr></thead><tbody> | ||
| <tr><td align="center"><code>L*</code></td><td align="center"><code>Light <---> Dark</code></td><td align="center"><code>0 <---> 100</code></td></tr> | ||
| <tr><td align="center"><code>a*</code></td><td align="center"><code>Green <---> Magenta</code></td><td align="center"><code>-128 <---> 128</code></td></tr> | ||
| <tr><td align="center"><code>b*</code></td><td align="center"><code>Blue <---> Yellow</code></td><td align="center"><code>-128 <---> 128</code></td></tr> | ||
| </tbody></table> | ||
| </div><h2 id='fields' class='fields small-section-header'> | ||
| Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.l" class="structfield small-section-header"><a href="#structfield.l" class="anchor field"></a><code id="l.v">l: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></code></span><div class='docblock'><p>Lightness</p> | ||
| </div><span id="structfield.a" class="structfield small-section-header"><a href="#structfield.a" class="anchor field"></a><code id="a.v">a: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></code></span><div class='docblock'><p>Green - Magenta</p> | ||
| </div><span id="structfield.b" class="structfield small-section-header"><a href="#structfield.b" class="anchor field"></a><code id="b.v">b: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></code></span><div class='docblock'><p>Blue - Yellow</p> | ||
| </div><h2 id='methods' class='small-section-header'>Methods<a href='#methods' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../src/deltae/color.rs.html#55-61' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code id='new.v'>pub fn <a href='#method.new' class='fnname'>new</a>(l: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, a: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, b: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a>, <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a>></code><a class='srclink' href='../src/deltae/color.rs.html#58-60' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns a result of a LabValue from 3 <code>f32</code>s. | ||
| Will return <code>Err()</code> if the values are out of range</p> | ||
| </div></div><h2 id='implementations' class='small-section-header'>Trait Implementations<a href='#implementations' class='anchor'></a></h2><div id='implementations-list'><h3 id='impl-Round' class='impl'><code class='in-band'>impl <a class="trait" href="../deltae/trait.Round.html" title="trait deltae::Round">Round</a> for <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a href='#impl-Round' class='anchor'></a><a class='srclink' href='../src/deltae/round.rs.html#22-29' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.round_to' class="method hidden"><code id='round_to.v'>fn <a href='../deltae/trait.Round.html#tymethod.round_to' class='fnname'>round_to</a>(self, places: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -> <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a class='srclink' href='../src/deltae/round.rs.html#23-28' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Rounds the value to a number of decimal places</p> | ||
| </div></div><h3 id='impl-Validate' class='impl'><code class='in-band'>impl <a class="trait" href="../deltae/trait.Validate.html" title="trait deltae::Validate">Validate</a> for <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a href='#impl-Validate' class='anchor'></a><a class='srclink' href='../src/deltae/validate.rs.html#9-20' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.validate' class="method hidden"><code id='validate.v'>fn <a href='../deltae/trait.Validate.html#tymethod.validate' class='fnname'>validate</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a>></code><a class='srclink' href='../src/deltae/validate.rs.html#10-19' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Return <code>Err()</code> if the values are invalid</p> | ||
| </div></div><h3 id='impl-From%3CLchValue%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a>> for <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a href='#impl-From%3CLchValue%3E' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#6-14' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from' class="method hidden"><code id='from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(lch: <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a>) -> <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a class='srclink' href='../src/deltae/convert.rs.html#7-13' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-From%3C%26%27_%20LchValue%3E' class='impl'><code class='in-band'>impl<'_> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'_ <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a>> for <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a href='#impl-From%3C%26%27_%20LchValue%3E' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#16-20' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-1' class="method hidden"><code id='from.v-1'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(lch: &<a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a>) -> <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a class='srclink' href='../src/deltae/convert.rs.html#17-19' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-From%3C%26%27_%20LabValue%3E' class='impl'><code class='in-band'>impl<'_> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'_ <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a>> for <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a href='#impl-From%3C%26%27_%20LabValue%3E' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#22-26' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-2' class="method hidden"><code id='from.v-2'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(lab: &<a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a>) -> <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a class='srclink' href='../src/deltae/convert.rs.html#23-25' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-From%3CXyzValue%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a>> for <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a href='#impl-From%3CXyzValue%3E' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#28-40' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-3' class="method hidden"><code id='from.v-3'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(xyz: <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a>) -> <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a class='srclink' href='../src/deltae/convert.rs.html#29-39' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-From%3C%26%27_%20XyzValue%3E' class='impl'><code class='in-band'>impl<'_> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'_ <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a>> for <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a href='#impl-From%3C%26%27_%20XyzValue%3E' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#42-46' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-4' class="method hidden"><code id='from.v-4'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(xyz: &<a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a>) -> <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a class='srclink' href='../src/deltae/convert.rs.html#43-45' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-From%3CLabValue%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a>> for <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a href='#impl-From%3CLabValue%3E' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#88-96' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-5' class="method hidden"><code id='from.v-5'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(lab: <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a>) -> <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a class='srclink' href='../src/deltae/convert.rs.html#89-95' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-From%3C%26%27_%20LabValue%3E-1' class='impl'><code class='in-band'>impl<'_> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'_ <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a>> for <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a href='#impl-From%3C%26%27_%20LabValue%3E-1' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#98-102' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-6' class="method hidden"><code id='from.v-6'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(lab: &<a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a>) -> <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a class='srclink' href='../src/deltae/convert.rs.html#99-101' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-From%3CLabValue%3E-1' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a>> for <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a href='#impl-From%3CLabValue%3E-1' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#150-177' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-7' class="method hidden"><code id='from.v-7'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(lab: <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a>) -> <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a class='srclink' href='../src/deltae/convert.rs.html#151-176' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-From%3C%26%27_%20LabValue%3E-2' class='impl'><code class='in-band'>impl<'_> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'_ <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a>> for <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a href='#impl-From%3C%26%27_%20LabValue%3E-2' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#185-189' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-8' class="method hidden"><code id='from.v-8'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(lab: &<a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a>) -> <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a class='srclink' href='../src/deltae/convert.rs.html#186-188' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-Default' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a href='#impl-Default' class='anchor'></a><a class='srclink' href='../src/deltae/color.rs.html#63-67' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.default' class="method hidden"><code id='default.v'>fn <a href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default' class='fnname'>default</a>() -> <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a class='srclink' href='../src/deltae/color.rs.html#64-66' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns the "default value" for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></p> | ||
| </div></div><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../src/deltae/color.rs.html#45' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code id='clone.v'>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a class='srclink' href='../src/deltae/color.rs.html#45' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p> | ||
| </div><h4 id='method.clone_from' class="method"><code id='clone_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#131-133' title='goto source code'>[src]</a></h4><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p> | ||
| </div></div><h3 id='impl-PartialEq%3CT%3E' class='impl'><code class='in-band'>impl<T: <a class="trait" href="../deltae/trait.Delta.html" title="trait deltae::Delta">Delta</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><T> for <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a> <span class="where fmt-newline">where<br> <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href='#impl-PartialEq%3CT%3E' class='anchor'></a><a class='srclink' href='../src/deltae/eq.rs.html#8-13' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq' class="method hidden"><code id='eq.v'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/deltae/eq.rs.html#10-12' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p> | ||
| </div><h4 id='method.ne' class="method"><code id='ne.v'><span class="docblock attributes">#[must_use] | ||
| </span>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#200' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests for <code>!=</code>.</p> | ||
| </div></div><h3 id='impl-Copy' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a href='#impl-Copy' class='anchor'></a><a class='srclink' href='../src/deltae/color.rs.html#45' title='goto source code'>[src]</a></h3><div class='impl-items'></div><h3 id='impl-Display' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a href='#impl-Display' class='anchor'></a><a class='srclink' href='../src/deltae/color.rs.html#69-73' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code id='fmt.v'>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../src/deltae/color.rs.html#70-72' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></p> | ||
| </div></div><h3 id='impl-Debug' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../src/deltae/color.rs.html#45' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt-1' class="method hidden"><code id='fmt.v-1'>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../src/deltae/color.rs.html#45' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p> | ||
| </div></div><h3 id='impl-FromStr' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html" title="trait core::str::FromStr">FromStr</a> for <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a href='#impl-FromStr' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#253-264' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Err' class="type"><code id='Err.t'>type <a href='https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#associatedtype.Err' class="type">Err</a> = <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a></code></h4><div class='docblock'><p>The associated error which can be returned from parsing.</p> | ||
| </div><h4 id='method.from_str' class="method hidden"><code id='from_str.v'>fn <a href='https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#tymethod.from_str' class='fnname'>from_str</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a>, <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a>></code><a class='srclink' href='../src/deltae/convert.rs.html#255-263' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Parses a string <code>s</code> to return a value of this type. <a href="https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#tymethod.from_str">Read more</a></p> | ||
| </div></div><h3 id='impl-TryFrom%3C%26%27_%20%5Bf32%3B%203%5D%3E' class='impl'><code class='in-band'>impl<'_> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><&'_ <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">; 3]</a>> for <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a href='#impl-TryFrom%3C%26%27_%20%5Bf32%3B%203%5D%3E' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#48-57' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error' class="type"><code id='Error.t'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error' class="type">Error</a> = <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p> | ||
| </div><h4 id='method.try_from' class="method hidden"><code id='try_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(slice: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">; 3]</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a>, <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a>></code><a class='srclink' href='../src/deltae/convert.rs.html#50-56' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-TryFrom%3C(f32%2C%20f32%2C%20f32)%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>> for <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a href='#impl-TryFrom%3C(f32%2C%20f32%2C%20f32)%3E' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#59-68' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-1' class="type"><code id='Error.t-1'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error' class="type">Error</a> = <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p> | ||
| </div><h4 id='method.try_from-1' class="method hidden"><code id='try_from.v-1'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(tuple: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a>, <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a>></code><a class='srclink' href='../src/deltae/convert.rs.html#61-67' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-TryFrom%3C%26%27_%20(f32%2C%20f32%2C%20f32)%3E' class='impl'><code class='in-band'>impl<'_> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><&'_ <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>> for <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a href='#impl-TryFrom%3C%26%27_%20(f32%2C%20f32%2C%20f32)%3E' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#70-79' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-2' class="type"><code id='Error.t-2'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error' class="type">Error</a> = <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p> | ||
| </div><h4 id='method.try_from-2' class="method hidden"><code id='try_from.v-2'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(tuple: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a>, <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a>></code><a class='srclink' href='../src/deltae/convert.rs.html#72-78' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-Send' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-From%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href='#impl-From%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#550-552' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-9' class="method hidden"><code id='from.v-9'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(t: T) -> T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#551' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-ToString' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html" title="trait alloc::string::ToString">ToString</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-ToString' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/string.rs.html#2134-2144' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.to_string' class="method hidden"><code id='to_string.v'>default fn <a href='https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html#tymethod.to_string' class='fnname'>to_string</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/string.rs.html#2136-2143' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Converts the given value to a <code>String</code>. <a href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html#tymethod.to_string">Read more</a></p> | ||
| </div></div><h3 id='impl-ToOwned' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></code><a href='#impl-ToOwned' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#81-92' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Owned' class="type"><code id='Owned.t'>type <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned' class="type">Owned</a> = T</code></h4><div class='docblock'><p>The resulting type after obtaining ownership.</p> | ||
| </div><h4 id='method.to_owned' class="method hidden"><code id='to_owned.v'>fn <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned' class='fnname'>to_owned</a>(&self) -> T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#85-87' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p> | ||
| </div><h4 id='method.clone_into' class="method hidden"><code id='clone_into.v'>fn <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into' class='fnname'>clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T)</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#89-91' title='goto source code'>[src]</a></h4><div class='stability hidden'><div class='stab unstable'><details><summary><span class='emoji'>🔬</span> This is a nightly-only experimental API. (<code>toowned_clone_into</code>)</summary><p>recently added</p> | ||
| </details></div></div><div class='docblock hidden'><p>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p> | ||
| </div></div><h3 id='impl-Into%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href='#impl-Into%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#541-546' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.into' class="method hidden"><code id='into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into' class='fnname'>into</a>(self) -> U</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#543-545' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-TryFrom%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></code><a href='#impl-TryFrom%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#569-575' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-3' class="type"><code id='Error.t-3'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error' class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p> | ||
| </div><h4 id='method.try_from-3' class="method hidden"><code id='try_from.v-3'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#572-574' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-TryInto%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><a href='#impl-TryInto%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#557-564' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-4' class="type"><code id='Error.t-4'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error' class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p> | ||
| </div><h4 id='method.try_into' class="method hidden"><code id='try_into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into' class='fnname'>try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#561-563' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213-215' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code id='borrow.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p> | ||
| </div></div><h3 id='impl-BorrowMut%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-BorrowMut%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code id='borrow_mut.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#219' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p> | ||
| </div></div><h3 id='impl-Any' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#100-102' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code id='type_id.v'>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#101' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p> | ||
| </div></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "deltae";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html> |
| <!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="API documentation for the Rust `LchValue` struct in crate `deltae`."><meta name="keywords" content="rust, rustlang, rust-lang, LchValue"><title>deltae::LchValue - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../dark.css"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../deltae/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Struct LchValue</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.l">l</a><a href="#structfield.c">c</a><a href="#structfield.h">h</a></div><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.hue_radians">hue_radians</a><a href="#method.new">new</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Copy">Copy</a><a href="#impl-Debug">Debug</a><a href="#impl-Default">Default</a><a href="#impl-Display">Display</a><a href="#impl-From%3C%26%27_%20LabValue%3E">From<&'_ LabValue></a><a href="#impl-From%3C%26%27_%20LchValue%3E">From<&'_ LchValue></a><a href="#impl-From%3C%26%27_%20XyzValue%3E">From<&'_ XyzValue></a><a href="#impl-From%3CLabValue%3E">From<LabValue></a><a href="#impl-From%3CLchValue%3E">From<LchValue></a><a href="#impl-From%3CXyzValue%3E">From<XyzValue></a><a href="#impl-FromStr">FromStr</a><a href="#impl-PartialEq%3CT%3E">PartialEq<T></a><a href="#impl-Round">Round</a><a href="#impl-TryFrom%3C%26%27_%20%5Bf32%3B%203%5D%3E">TryFrom<&'_ [f32; 3]></a><a href="#impl-TryFrom%3C%26%27_%20(f32%2C%20f32%2C%20f32)%3E">TryFrom<&'_ (f32, f32, f32)></a><a href="#impl-TryFrom%3C(f32%2C%20f32%2C%20f32)%3E">TryFrom<(f32, f32, f32)></a><a href="#impl-Validate">Validate</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-ToString">ToString</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><p class='location'><a href='index.html'>deltae</a></p><script>window.sidebarCurrent = {name: 'LchValue', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/deltae/color.rs.html#84-91' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='index.html'>deltae</a>::<wbr><a class="struct" href=''>LchValue</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct LchValue { | ||
| pub l: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, | ||
| pub c: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, | ||
| pub h: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, | ||
| }</pre></div><div class='docblock'><h1 id="lch-luminance-chroma-hue" class="section-header"><a href="#lch-luminance-chroma-hue">Lch: Luminance, Chroma, Hue</a></h1><table><thead><tr><th align="center"><code>Value</code></th><th align="center"><code>Color</code></th><th align="center"><code>Range</code></th></tr></thead><tbody> | ||
| <tr><td align="center"><code>L*</code></td><td align="center"><code>Light <---> Dark</code></td><td align="center"><code>0 <---> 100</code></td></tr> | ||
| <tr><td align="center"><code>c</code></td><td align="center"><code>Chroma (Amount of color)</code></td><td align="center"><code>0 <---> 181.0139</code></td></tr> | ||
| <tr><td align="center"><code>h</code></td><td align="center"><code>Hue (Degrees)</code></td><td align="center"><code>0 <---> 360°</code></td></tr> | ||
| </tbody></table> | ||
| </div><h2 id='fields' class='fields small-section-header'> | ||
| Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.l" class="structfield small-section-header"><a href="#structfield.l" class="anchor field"></a><code id="l.v">l: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></code></span><div class='docblock'><p>Lightness</p> | ||
| </div><span id="structfield.c" class="structfield small-section-header"><a href="#structfield.c" class="anchor field"></a><code id="c.v">c: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></code></span><div class='docblock'><p>Chroma</p> | ||
| </div><span id="structfield.h" class="structfield small-section-header"><a href="#structfield.h" class="anchor field"></a><code id="h.v">h: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></code></span><div class='docblock'><p>Hue (in degrees)</p> | ||
| </div><h2 id='methods' class='small-section-header'>Methods<a href='#methods' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../src/deltae/color.rs.html#93-104' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code id='new.v'>pub fn <a href='#method.new' class='fnname'>new</a>(l: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, c: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, h: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a>, <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a>></code><a class='srclink' href='../src/deltae/color.rs.html#96-98' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns a result of an LchValue from 3 <code>f32</code>s. | ||
| Will return <code>Err()</code> if the values are out of range</p> | ||
| </div><h4 id='method.hue_radians' class="method"><code id='hue_radians.v'>pub fn <a href='#method.hue_radians' class='fnname'>hue_radians</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></code><a class='srclink' href='../src/deltae/color.rs.html#101-103' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the Hue as radians rather than degrees</p> | ||
| </div></div><h2 id='implementations' class='small-section-header'>Trait Implementations<a href='#implementations' class='anchor'></a></h2><div id='implementations-list'><h3 id='impl-Round' class='impl'><code class='in-band'>impl <a class="trait" href="../deltae/trait.Round.html" title="trait deltae::Round">Round</a> for <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a href='#impl-Round' class='anchor'></a><a class='srclink' href='../src/deltae/round.rs.html#31-38' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.round_to' class="method hidden"><code id='round_to.v'>fn <a href='../deltae/trait.Round.html#tymethod.round_to' class='fnname'>round_to</a>(self, places: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -> <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a class='srclink' href='../src/deltae/round.rs.html#32-37' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Rounds the value to a number of decimal places</p> | ||
| </div></div><h3 id='impl-Validate' class='impl'><code class='in-band'>impl <a class="trait" href="../deltae/trait.Validate.html" title="trait deltae::Validate">Validate</a> for <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a href='#impl-Validate' class='anchor'></a><a class='srclink' href='../src/deltae/validate.rs.html#22-33' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.validate' class="method hidden"><code id='validate.v'>fn <a href='../deltae/trait.Validate.html#tymethod.validate' class='fnname'>validate</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a>></code><a class='srclink' href='../src/deltae/validate.rs.html#23-32' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Return <code>Err()</code> if the values are invalid</p> | ||
| </div></div><h3 id='impl-From%3CLchValue%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a>> for <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a href='#impl-From%3CLchValue%3E' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#6-14' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from' class="method hidden"><code id='from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(lch: <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a>) -> <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a class='srclink' href='../src/deltae/convert.rs.html#7-13' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-From%3C%26%27_%20LchValue%3E' class='impl'><code class='in-band'>impl<'_> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'_ <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a>> for <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a href='#impl-From%3C%26%27_%20LchValue%3E' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#16-20' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-1' class="method hidden"><code id='from.v-1'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(lch: &<a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a>) -> <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a class='srclink' href='../src/deltae/convert.rs.html#17-19' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-From%3C%26%27_%20LchValue%3E-1' class='impl'><code class='in-band'>impl<'_> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'_ <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a>> for <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a href='#impl-From%3C%26%27_%20LchValue%3E-1' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#82-86' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-2' class="method hidden"><code id='from.v-2'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(lch: &<a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a>) -> <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a class='srclink' href='../src/deltae/convert.rs.html#83-85' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-From%3CLabValue%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a>> for <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a href='#impl-From%3CLabValue%3E' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#88-96' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-3' class="method hidden"><code id='from.v-3'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(lab: <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a>) -> <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a class='srclink' href='../src/deltae/convert.rs.html#89-95' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-From%3C%26%27_%20LabValue%3E' class='impl'><code class='in-band'>impl<'_> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'_ <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a>> for <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a href='#impl-From%3C%26%27_%20LabValue%3E' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#98-102' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-4' class="method hidden"><code id='from.v-4'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(lab: &<a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a>) -> <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a class='srclink' href='../src/deltae/convert.rs.html#99-101' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-From%3CXyzValue%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a>> for <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a href='#impl-From%3CXyzValue%3E' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#104-108' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-5' class="method hidden"><code id='from.v-5'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(xyz: <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a>) -> <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a class='srclink' href='../src/deltae/convert.rs.html#105-107' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-From%3C%26%27_%20XyzValue%3E' class='impl'><code class='in-band'>impl<'_> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'_ <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a>> for <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a href='#impl-From%3C%26%27_%20XyzValue%3E' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#110-114' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-6' class="method hidden"><code id='from.v-6'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(xyz: &<a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a>) -> <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a class='srclink' href='../src/deltae/convert.rs.html#111-113' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-From%3CLchValue%3E-1' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a>> for <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a href='#impl-From%3CLchValue%3E-1' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#191-195' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-7' class="method hidden"><code id='from.v-7'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(lch: <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a>) -> <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a class='srclink' href='../src/deltae/convert.rs.html#192-194' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-From%3C%26%27_%20LchValue%3E-2' class='impl'><code class='in-band'>impl<'_> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'_ <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a>> for <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a href='#impl-From%3C%26%27_%20LchValue%3E-2' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#197-201' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-8' class="method hidden"><code id='from.v-8'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(lch: &<a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a>) -> <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a class='srclink' href='../src/deltae/convert.rs.html#198-200' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-Default' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a href='#impl-Default' class='anchor'></a><a class='srclink' href='../src/deltae/color.rs.html#106-110' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.default' class="method hidden"><code id='default.v'>fn <a href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default' class='fnname'>default</a>() -> <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a class='srclink' href='../src/deltae/color.rs.html#107-109' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns the "default value" for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></p> | ||
| </div></div><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../src/deltae/color.rs.html#83' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code id='clone.v'>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a class='srclink' href='../src/deltae/color.rs.html#83' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p> | ||
| </div><h4 id='method.clone_from' class="method"><code id='clone_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#131-133' title='goto source code'>[src]</a></h4><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p> | ||
| </div></div><h3 id='impl-PartialEq%3CT%3E' class='impl'><code class='in-band'>impl<T: <a class="trait" href="../deltae/trait.Delta.html" title="trait deltae::Delta">Delta</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><T> for <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a> <span class="where fmt-newline">where<br> <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href='#impl-PartialEq%3CT%3E' class='anchor'></a><a class='srclink' href='../src/deltae/eq.rs.html#15-20' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq' class="method hidden"><code id='eq.v'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/deltae/eq.rs.html#17-19' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p> | ||
| </div><h4 id='method.ne' class="method"><code id='ne.v'><span class="docblock attributes">#[must_use] | ||
| </span>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#200' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests for <code>!=</code>.</p> | ||
| </div></div><h3 id='impl-Copy' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a href='#impl-Copy' class='anchor'></a><a class='srclink' href='../src/deltae/color.rs.html#83' title='goto source code'>[src]</a></h3><div class='impl-items'></div><h3 id='impl-Display' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a href='#impl-Display' class='anchor'></a><a class='srclink' href='../src/deltae/color.rs.html#112-116' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code id='fmt.v'>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../src/deltae/color.rs.html#113-115' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></p> | ||
| </div></div><h3 id='impl-Debug' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../src/deltae/color.rs.html#83' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt-1' class="method hidden"><code id='fmt.v-1'>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../src/deltae/color.rs.html#83' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p> | ||
| </div></div><h3 id='impl-FromStr' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html" title="trait core::str::FromStr">FromStr</a> for <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a href='#impl-FromStr' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#266-277' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Err' class="type"><code id='Err.t'>type <a href='https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#associatedtype.Err' class="type">Err</a> = <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a></code></h4><div class='docblock'><p>The associated error which can be returned from parsing.</p> | ||
| </div><h4 id='method.from_str' class="method hidden"><code id='from_str.v'>fn <a href='https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#tymethod.from_str' class='fnname'>from_str</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a>, <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a>></code><a class='srclink' href='../src/deltae/convert.rs.html#268-276' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Parses a string <code>s</code> to return a value of this type. <a href="https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#tymethod.from_str">Read more</a></p> | ||
| </div></div><h3 id='impl-TryFrom%3C%26%27_%20%5Bf32%3B%203%5D%3E' class='impl'><code class='in-band'>impl<'_> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><&'_ <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">; 3]</a>> for <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a href='#impl-TryFrom%3C%26%27_%20%5Bf32%3B%203%5D%3E' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#116-125' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error' class="type"><code id='Error.t'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error' class="type">Error</a> = <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p> | ||
| </div><h4 id='method.try_from' class="method hidden"><code id='try_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(slice: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">; 3]</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a>, <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a>></code><a class='srclink' href='../src/deltae/convert.rs.html#118-124' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-TryFrom%3C(f32%2C%20f32%2C%20f32)%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>> for <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a href='#impl-TryFrom%3C(f32%2C%20f32%2C%20f32)%3E' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#127-136' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-1' class="type"><code id='Error.t-1'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error' class="type">Error</a> = <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p> | ||
| </div><h4 id='method.try_from-1' class="method hidden"><code id='try_from.v-1'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(tuple: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a>, <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a>></code><a class='srclink' href='../src/deltae/convert.rs.html#129-135' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-TryFrom%3C%26%27_%20(f32%2C%20f32%2C%20f32)%3E' class='impl'><code class='in-band'>impl<'_> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><&'_ <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>> for <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a href='#impl-TryFrom%3C%26%27_%20(f32%2C%20f32%2C%20f32)%3E' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#138-147' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-2' class="type"><code id='Error.t-2'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error' class="type">Error</a> = <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p> | ||
| </div><h4 id='method.try_from-2' class="method hidden"><code id='try_from.v-2'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(tuple: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a>, <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a>></code><a class='srclink' href='../src/deltae/convert.rs.html#140-146' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-Send' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-From%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href='#impl-From%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#550-552' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-9' class="method hidden"><code id='from.v-9'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(t: T) -> T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#551' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-ToString' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html" title="trait alloc::string::ToString">ToString</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-ToString' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/string.rs.html#2134-2144' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.to_string' class="method hidden"><code id='to_string.v'>default fn <a href='https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html#tymethod.to_string' class='fnname'>to_string</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/string.rs.html#2136-2143' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Converts the given value to a <code>String</code>. <a href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html#tymethod.to_string">Read more</a></p> | ||
| </div></div><h3 id='impl-ToOwned' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></code><a href='#impl-ToOwned' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#81-92' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Owned' class="type"><code id='Owned.t'>type <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned' class="type">Owned</a> = T</code></h4><div class='docblock'><p>The resulting type after obtaining ownership.</p> | ||
| </div><h4 id='method.to_owned' class="method hidden"><code id='to_owned.v'>fn <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned' class='fnname'>to_owned</a>(&self) -> T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#85-87' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p> | ||
| </div><h4 id='method.clone_into' class="method hidden"><code id='clone_into.v'>fn <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into' class='fnname'>clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T)</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#89-91' title='goto source code'>[src]</a></h4><div class='stability hidden'><div class='stab unstable'><details><summary><span class='emoji'>🔬</span> This is a nightly-only experimental API. (<code>toowned_clone_into</code>)</summary><p>recently added</p> | ||
| </details></div></div><div class='docblock hidden'><p>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p> | ||
| </div></div><h3 id='impl-Into%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href='#impl-Into%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#541-546' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.into' class="method hidden"><code id='into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into' class='fnname'>into</a>(self) -> U</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#543-545' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-TryFrom%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></code><a href='#impl-TryFrom%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#569-575' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-3' class="type"><code id='Error.t-3'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error' class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p> | ||
| </div><h4 id='method.try_from-3' class="method hidden"><code id='try_from.v-3'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#572-574' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-TryInto%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><a href='#impl-TryInto%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#557-564' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-4' class="type"><code id='Error.t-4'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error' class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p> | ||
| </div><h4 id='method.try_into' class="method hidden"><code id='try_into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into' class='fnname'>try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#561-563' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213-215' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code id='borrow.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p> | ||
| </div></div><h3 id='impl-BorrowMut%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-BorrowMut%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code id='borrow_mut.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#219' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p> | ||
| </div></div><h3 id='impl-Any' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#100-102' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code id='type_id.v'>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#101' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p> | ||
| </div></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "deltae";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html> |
| <!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="API documentation for the Rust `XyzValue` struct in crate `deltae`."><meta name="keywords" content="rust, rustlang, rust-lang, XyzValue"><title>deltae::XyzValue - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../dark.css"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../deltae/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Struct XyzValue</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.x">x</a><a href="#structfield.y">y</a><a href="#structfield.z">z</a></div><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.new">new</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Copy">Copy</a><a href="#impl-Debug">Debug</a><a href="#impl-Default">Default</a><a href="#impl-Display">Display</a><a href="#impl-From%3C%26%27_%20LabValue%3E">From<&'_ LabValue></a><a href="#impl-From%3C%26%27_%20LchValue%3E">From<&'_ LchValue></a><a href="#impl-From%3C%26%27_%20XyzValue%3E">From<&'_ XyzValue></a><a href="#impl-From%3CLabValue%3E">From<LabValue></a><a href="#impl-From%3CLchValue%3E">From<LchValue></a><a href="#impl-From%3CXyzValue%3E">From<XyzValue></a><a href="#impl-FromStr">FromStr</a><a href="#impl-PartialEq%3CT%3E">PartialEq<T></a><a href="#impl-Round">Round</a><a href="#impl-TryFrom%3C%26%27_%20%5Bf32%3B%203%5D%3E">TryFrom<&'_ [f32; 3]></a><a href="#impl-TryFrom%3C%26%27_%20(f32%2C%20f32%2C%20f32)%3E">TryFrom<&'_ (f32, f32, f32)></a><a href="#impl-TryFrom%3C(f32%2C%20f32%2C%20f32)%3E">TryFrom<(f32, f32, f32)></a><a href="#impl-Validate">Validate</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-ToString">ToString</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><p class='location'><a href='index.html'>deltae</a></p><script>window.sidebarCurrent = {name: 'XyzValue', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/deltae/color.rs.html#127-134' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='index.html'>deltae</a>::<wbr><a class="struct" href=''>XyzValue</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct XyzValue { | ||
| pub x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, | ||
| pub y: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, | ||
| pub z: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, | ||
| }</pre></div><div class='docblock'><h1 id="xyz" class="section-header"><a href="#xyz">XYZ</a></h1><table><thead><tr><th align="center"><code>Value</code></th><th align="center"><code>Color</code></th><th align="center"><code>Range</code></th></tr></thead><tbody> | ||
| <tr><td align="center"><code>X</code></td><td align="center"><code>Red</code></td><td align="center"><code>0 <---> 1</code></td></tr> | ||
| <tr><td align="center"><code>Y</code></td><td align="center"><code>Green</code></td><td align="center"><code>0 <---> 1</code></td></tr> | ||
| <tr><td align="center"><code>Z</code></td><td align="center"><code>Blue</code></td><td align="center"><code>0 <---> 1</code></td></tr> | ||
| </tbody></table> | ||
| </div><h2 id='fields' class='fields small-section-header'> | ||
| Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.x" class="structfield small-section-header"><a href="#structfield.x" class="anchor field"></a><code id="x.v">x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></code></span><div class='docblock'><p>X Value</p> | ||
| </div><span id="structfield.y" class="structfield small-section-header"><a href="#structfield.y" class="anchor field"></a><code id="y.v">y: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></code></span><div class='docblock'><p>Y Value</p> | ||
| </div><span id="structfield.z" class="structfield small-section-header"><a href="#structfield.z" class="anchor field"></a><code id="z.v">z: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></code></span><div class='docblock'><p>Z Value</p> | ||
| </div><h2 id='methods' class='small-section-header'>Methods<a href='#methods' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../src/deltae/color.rs.html#136-142' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code id='new.v'>pub fn <a href='#method.new' class='fnname'>new</a>(x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, y: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, z: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a>, <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a>></code><a class='srclink' href='../src/deltae/color.rs.html#139-141' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns a result of an XyzValue from 3 <code>f32</code>s. | ||
| Will return <code>Err()</code> if the values are out of range</p> | ||
| </div></div><h2 id='implementations' class='small-section-header'>Trait Implementations<a href='#implementations' class='anchor'></a></h2><div id='implementations-list'><h3 id='impl-Round' class='impl'><code class='in-band'>impl <a class="trait" href="../deltae/trait.Round.html" title="trait deltae::Round">Round</a> for <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a href='#impl-Round' class='anchor'></a><a class='srclink' href='../src/deltae/round.rs.html#40-47' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.round_to' class="method hidden"><code id='round_to.v'>fn <a href='../deltae/trait.Round.html#tymethod.round_to' class='fnname'>round_to</a>(self, places: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -> <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a class='srclink' href='../src/deltae/round.rs.html#41-46' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Rounds the value to a number of decimal places</p> | ||
| </div></div><h3 id='impl-Validate' class='impl'><code class='in-band'>impl <a class="trait" href="../deltae/trait.Validate.html" title="trait deltae::Validate">Validate</a> for <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a href='#impl-Validate' class='anchor'></a><a class='srclink' href='../src/deltae/validate.rs.html#35-46' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.validate' class="method hidden"><code id='validate.v'>fn <a href='../deltae/trait.Validate.html#tymethod.validate' class='fnname'>validate</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a>></code><a class='srclink' href='../src/deltae/validate.rs.html#36-45' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Return <code>Err()</code> if the values are invalid</p> | ||
| </div></div><h3 id='impl-From%3CXyzValue%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a>> for <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a href='#impl-From%3CXyzValue%3E' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#28-40' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from' class="method hidden"><code id='from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(xyz: <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a>) -> <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a class='srclink' href='../src/deltae/convert.rs.html#29-39' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-From%3C%26%27_%20XyzValue%3E' class='impl'><code class='in-band'>impl<'_> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'_ <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a>> for <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a href='#impl-From%3C%26%27_%20XyzValue%3E' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#42-46' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-1' class="method hidden"><code id='from.v-1'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(xyz: &<a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a>) -> <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a></code><a class='srclink' href='../src/deltae/convert.rs.html#43-45' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-From%3CXyzValue%3E-1' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a>> for <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a href='#impl-From%3CXyzValue%3E-1' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#104-108' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-2' class="method hidden"><code id='from.v-2'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(xyz: <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a>) -> <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a class='srclink' href='../src/deltae/convert.rs.html#105-107' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-From%3C%26%27_%20XyzValue%3E-1' class='impl'><code class='in-band'>impl<'_> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'_ <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a>> for <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a href='#impl-From%3C%26%27_%20XyzValue%3E-1' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#110-114' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-3' class="method hidden"><code id='from.v-3'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(xyz: &<a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a>) -> <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a></code><a class='srclink' href='../src/deltae/convert.rs.html#111-113' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-From%3CLabValue%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a>> for <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a href='#impl-From%3CLabValue%3E' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#150-177' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-4' class="method hidden"><code id='from.v-4'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(lab: <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a>) -> <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a class='srclink' href='../src/deltae/convert.rs.html#151-176' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-From%3C%26%27_%20XyzValue%3E-2' class='impl'><code class='in-band'>impl<'_> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'_ <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a>> for <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a href='#impl-From%3C%26%27_%20XyzValue%3E-2' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#179-183' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-5' class="method hidden"><code id='from.v-5'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(xyz: &<a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a>) -> <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a class='srclink' href='../src/deltae/convert.rs.html#180-182' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-From%3C%26%27_%20LabValue%3E' class='impl'><code class='in-band'>impl<'_> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'_ <a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a>> for <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a href='#impl-From%3C%26%27_%20LabValue%3E' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#185-189' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-6' class="method hidden"><code id='from.v-6'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(lab: &<a class="struct" href="../deltae/struct.LabValue.html" title="struct deltae::LabValue">LabValue</a>) -> <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a class='srclink' href='../src/deltae/convert.rs.html#186-188' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-From%3CLchValue%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a>> for <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a href='#impl-From%3CLchValue%3E' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#191-195' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-7' class="method hidden"><code id='from.v-7'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(lch: <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a>) -> <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a class='srclink' href='../src/deltae/convert.rs.html#192-194' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-From%3C%26%27_%20LchValue%3E' class='impl'><code class='in-band'>impl<'_> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'_ <a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a>> for <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a href='#impl-From%3C%26%27_%20LchValue%3E' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#197-201' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-8' class="method hidden"><code id='from.v-8'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(lch: &<a class="struct" href="../deltae/struct.LchValue.html" title="struct deltae::LchValue">LchValue</a>) -> <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a class='srclink' href='../src/deltae/convert.rs.html#198-200' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-Default' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a href='#impl-Default' class='anchor'></a><a class='srclink' href='../src/deltae/color.rs.html#144-148' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.default' class="method hidden"><code id='default.v'>fn <a href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default' class='fnname'>default</a>() -> <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a class='srclink' href='../src/deltae/color.rs.html#145-147' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns the "default value" for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></p> | ||
| </div></div><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../src/deltae/color.rs.html#126' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code id='clone.v'>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a class='srclink' href='../src/deltae/color.rs.html#126' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p> | ||
| </div><h4 id='method.clone_from' class="method"><code id='clone_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#131-133' title='goto source code'>[src]</a></h4><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p> | ||
| </div></div><h3 id='impl-PartialEq%3CT%3E' class='impl'><code class='in-band'>impl<T: <a class="trait" href="../deltae/trait.Delta.html" title="trait deltae::Delta">Delta</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><T> for <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a> <span class="where fmt-newline">where<br> <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href='#impl-PartialEq%3CT%3E' class='anchor'></a><a class='srclink' href='../src/deltae/eq.rs.html#22-27' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq' class="method hidden"><code id='eq.v'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/deltae/eq.rs.html#24-26' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p> | ||
| </div><h4 id='method.ne' class="method"><code id='ne.v'><span class="docblock attributes">#[must_use] | ||
| </span>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#200' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests for <code>!=</code>.</p> | ||
| </div></div><h3 id='impl-Copy' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a href='#impl-Copy' class='anchor'></a><a class='srclink' href='../src/deltae/color.rs.html#126' title='goto source code'>[src]</a></h3><div class='impl-items'></div><h3 id='impl-Display' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a href='#impl-Display' class='anchor'></a><a class='srclink' href='../src/deltae/color.rs.html#150-154' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code id='fmt.v'>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../src/deltae/color.rs.html#151-153' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></p> | ||
| </div></div><h3 id='impl-Debug' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../src/deltae/color.rs.html#126' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt-1' class="method hidden"><code id='fmt.v-1'>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../src/deltae/color.rs.html#126' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p> | ||
| </div></div><h3 id='impl-FromStr' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html" title="trait core::str::FromStr">FromStr</a> for <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a href='#impl-FromStr' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#279-291' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Err' class="type"><code id='Err.t'>type <a href='https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#associatedtype.Err' class="type">Err</a> = <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a></code></h4><div class='docblock'><p>The associated error which can be returned from parsing.</p> | ||
| </div><h4 id='method.from_str' class="method hidden"><code id='from_str.v'>fn <a href='https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#tymethod.from_str' class='fnname'>from_str</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a>, <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a>></code><a class='srclink' href='../src/deltae/convert.rs.html#281-289' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Parses a string <code>s</code> to return a value of this type. <a href="https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#tymethod.from_str">Read more</a></p> | ||
| </div></div><h3 id='impl-TryFrom%3C%26%27_%20%5Bf32%3B%203%5D%3E' class='impl'><code class='in-band'>impl<'_> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><&'_ <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">; 3]</a>> for <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a href='#impl-TryFrom%3C%26%27_%20%5Bf32%3B%203%5D%3E' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#203-212' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error' class="type"><code id='Error.t'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error' class="type">Error</a> = <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p> | ||
| </div><h4 id='method.try_from' class="method hidden"><code id='try_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(slice: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">; 3]</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a>, <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a>></code><a class='srclink' href='../src/deltae/convert.rs.html#205-211' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-TryFrom%3C(f32%2C%20f32%2C%20f32)%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>> for <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a href='#impl-TryFrom%3C(f32%2C%20f32%2C%20f32)%3E' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#214-223' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-1' class="type"><code id='Error.t-1'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error' class="type">Error</a> = <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p> | ||
| </div><h4 id='method.try_from-1' class="method hidden"><code id='try_from.v-1'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(tuple: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a>, <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a>></code><a class='srclink' href='../src/deltae/convert.rs.html#216-222' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-TryFrom%3C%26%27_%20(f32%2C%20f32%2C%20f32)%3E' class='impl'><code class='in-band'>impl<'_> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><&'_ <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>> for <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a href='#impl-TryFrom%3C%26%27_%20(f32%2C%20f32%2C%20f32)%3E' class='anchor'></a><a class='srclink' href='../src/deltae/convert.rs.html#225-234' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-2' class="type"><code id='Error.t-2'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error' class="type">Error</a> = <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p> | ||
| </div><h4 id='method.try_from-2' class="method hidden"><code id='try_from.v-2'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(tuple: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a>, <a class="enum" href="../deltae/enum.ValueError.html" title="enum deltae::ValueError">ValueError</a>></code><a class='srclink' href='../src/deltae/convert.rs.html#227-233' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-Send' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../deltae/struct.XyzValue.html" title="struct deltae::XyzValue">XyzValue</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-From%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href='#impl-From%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#550-552' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-9' class="method hidden"><code id='from.v-9'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(t: T) -> T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#551' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-ToString' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html" title="trait alloc::string::ToString">ToString</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-ToString' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/string.rs.html#2134-2144' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.to_string' class="method hidden"><code id='to_string.v'>default fn <a href='https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html#tymethod.to_string' class='fnname'>to_string</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/string.rs.html#2136-2143' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Converts the given value to a <code>String</code>. <a href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html#tymethod.to_string">Read more</a></p> | ||
| </div></div><h3 id='impl-ToOwned' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></code><a href='#impl-ToOwned' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#81-92' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Owned' class="type"><code id='Owned.t'>type <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned' class="type">Owned</a> = T</code></h4><div class='docblock'><p>The resulting type after obtaining ownership.</p> | ||
| </div><h4 id='method.to_owned' class="method hidden"><code id='to_owned.v'>fn <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned' class='fnname'>to_owned</a>(&self) -> T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#85-87' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p> | ||
| </div><h4 id='method.clone_into' class="method hidden"><code id='clone_into.v'>fn <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into' class='fnname'>clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T)</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#89-91' title='goto source code'>[src]</a></h4><div class='stability hidden'><div class='stab unstable'><details><summary><span class='emoji'>🔬</span> This is a nightly-only experimental API. (<code>toowned_clone_into</code>)</summary><p>recently added</p> | ||
| </details></div></div><div class='docblock hidden'><p>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p> | ||
| </div></div><h3 id='impl-Into%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href='#impl-Into%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#541-546' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.into' class="method hidden"><code id='into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into' class='fnname'>into</a>(self) -> U</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#543-545' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-TryFrom%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></code><a href='#impl-TryFrom%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#569-575' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-3' class="type"><code id='Error.t-3'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error' class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p> | ||
| </div><h4 id='method.try_from-3' class="method hidden"><code id='try_from.v-3'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#572-574' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-TryInto%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><a href='#impl-TryInto%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#557-564' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-4' class="type"><code id='Error.t-4'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error' class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p> | ||
| </div><h4 id='method.try_into' class="method hidden"><code id='try_into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into' class='fnname'>try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#561-563' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p> | ||
| </div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213-215' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code id='borrow.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p> | ||
| </div></div><h3 id='impl-BorrowMut%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-BorrowMut%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code id='borrow_mut.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#219' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p> | ||
| </div></div><h3 id='impl-Any' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#100-102' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code id='type_id.v'>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#101' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p> | ||
| </div></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "deltae";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html> |
| <!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="API documentation for the Rust `FromStr` trait in crate `deltae`."><meta name="keywords" content="rust, rustlang, rust-lang, FromStr"><title>deltae::FromStr - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../dark.css"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../deltae/index.html'><img src='../rust-logo.png' alt='logo' width='100'></a><p class='location'>Trait FromStr</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#associated-types">Associated Types</a><div class="sidebar-links"><a href="#associatedtype.Err">Err</a></div><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.from_str">from_str</a></div><a class="sidebar-title" href="#foreign-impls">Implementations on Foreign Types</a><div class="sidebar-links"><a href="#impl-FromStr">IpAddr</a><a href="#impl-FromStr">Ipv4Addr</a><a href="#impl-FromStr">Ipv6Addr</a><a href="#impl-FromStr">PathBuf</a><a href="#impl-FromStr">SocketAddr</a><a href="#impl-FromStr">SocketAddrV4</a><a href="#impl-FromStr">SocketAddrV6</a><a href="#impl-FromStr">String</a><a href="#impl-FromStr">bool</a><a href="#impl-FromStr">char</a><a href="#impl-FromStr">f32</a><a href="#impl-FromStr">f64</a><a href="#impl-FromStr">i128</a><a href="#impl-FromStr">i16</a><a href="#impl-FromStr">i32</a><a href="#impl-FromStr">i64</a><a href="#impl-FromStr">i8</a><a href="#impl-FromStr">isize</a><a href="#impl-FromStr">u128</a><a href="#impl-FromStr">u16</a><a href="#impl-FromStr">u32</a><a href="#impl-FromStr">u64</a><a href="#impl-FromStr">u8</a><a href="#impl-FromStr">usize</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class='location'><a href='index.html'>deltae</a></p><script>window.sidebarCurrent = {name: 'FromStr', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/str/mod.rs.html#72-102' title='goto source code'>[src]</a></span><span class='in-band'>Trait <a href='index.html'>deltae</a>::<wbr><a class="trait" href=''>FromStr</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust trait'>pub trait FromStr { | ||
| type <a href='#associatedtype.Err' class="type">Err</a>; | ||
| fn <a href='#tymethod.from_str' class='fnname'>from_str</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, Self::<a class="type" href="../deltae/trait.FromStr.html#associatedtype.Err" title="type deltae::FromStr::Err">Err</a>>; | ||
| }</pre></div><div class='docblock'><p>Parse a value from a string</p> | ||
| <p><code>FromStr</code>'s <a href="#tymethod.from_str"><code>from_str</code></a> method is often used implicitly, through | ||
| <a href="../../std/primitive.str.html"><code>str</code></a>'s <a href="../../std/primitive.str.html#method.parse"><code>parse</code></a> method. See <a href="../../std/primitive.str.html#method.parse"><code>parse</code></a>'s documentation for examples.</p> | ||
| <p><code>FromStr</code> does not have a lifetime parameter, and so you can only parse types | ||
| that do not contain a lifetime parameter themselves. In other words, you can | ||
| parse an <code>i32</code> with <code>FromStr</code>, but not a <code>&i32</code>. You can parse a struct that | ||
| contains an <code>i32</code>, but not one that contains an <code>&i32</code>.</p> | ||
| <h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1> | ||
| <p>Basic implementation of <code>FromStr</code> on an example <code>Point</code> type:</p> | ||
| <div class="example-wrap"><pre class="rust rust-example-rendered"> | ||
| <span class="kw">use</span> <span class="ident">std</span>::<span class="ident">str</span>::<span class="ident">FromStr</span>; | ||
| <span class="kw">use</span> <span class="ident">std</span>::<span class="ident">num</span>::<span class="ident">ParseIntError</span>; | ||
| <span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>, <span class="ident">PartialEq</span>)]</span> | ||
| <span class="kw">struct</span> <span class="ident">Point</span> { | ||
| <span class="ident">x</span>: <span class="ident">i32</span>, | ||
| <span class="ident">y</span>: <span class="ident">i32</span> | ||
| } | ||
| <span class="kw">impl</span> <span class="ident">FromStr</span> <span class="kw">for</span> <span class="ident">Point</span> { | ||
| <span class="kw">type</span> <span class="prelude-val">Err</span> <span class="op">=</span> <span class="ident">ParseIntError</span>; | ||
| <span class="kw">fn</span> <span class="ident">from_str</span>(<span class="ident">s</span>: <span class="kw-2">&</span><span class="ident">str</span>) <span class="op">-></span> <span class="prelude-ty">Result</span><span class="op"><</span><span class="self">Self</span>, <span class="self">Self</span>::<span class="prelude-val">Err</span><span class="op">></span> { | ||
| <span class="kw">let</span> <span class="ident">coords</span>: <span class="ident">Vec</span><span class="op"><</span><span class="kw-2">&</span><span class="ident">str</span><span class="op">></span> <span class="op">=</span> <span class="ident">s</span>.<span class="ident">trim_matches</span>(<span class="op">|</span><span class="ident">p</span><span class="op">|</span> <span class="ident">p</span> <span class="op">==</span> <span class="string">'('</span> <span class="op">||</span> <span class="ident">p</span> <span class="op">==</span> <span class="string">')'</span> ) | ||
| .<span class="ident">split</span>(<span class="string">','</span>) | ||
| .<span class="ident">collect</span>(); | ||
| <span class="kw">let</span> <span class="ident">x_fromstr</span> <span class="op">=</span> <span class="ident">coords</span>[<span class="number">0</span>].<span class="ident">parse</span>::<span class="op"><</span><span class="ident">i32</span><span class="op">></span>()<span class="question-mark">?</span>; | ||
| <span class="kw">let</span> <span class="ident">y_fromstr</span> <span class="op">=</span> <span class="ident">coords</span>[<span class="number">1</span>].<span class="ident">parse</span>::<span class="op"><</span><span class="ident">i32</span><span class="op">></span>()<span class="question-mark">?</span>; | ||
| <span class="prelude-val">Ok</span>(<span class="ident">Point</span> { <span class="ident">x</span>: <span class="ident">x_fromstr</span>, <span class="ident">y</span>: <span class="ident">y_fromstr</span> }) | ||
| } | ||
| } | ||
| <span class="kw">let</span> <span class="ident">p</span> <span class="op">=</span> <span class="ident">Point</span>::<span class="ident">from_str</span>(<span class="string">"(1,2)"</span>); | ||
| <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">p</span>.<span class="ident">unwrap</span>(), <span class="ident">Point</span>{ <span class="ident">x</span>: <span class="number">1</span>, <span class="ident">y</span>: <span class="number">2</span>} )</pre></div> | ||
| </div> | ||
| <h2 id='associated-types' class='small-section-header'>Associated Types<a href='#associated-types' class='anchor'></a></h2><div class='methods'><h3 id='associatedtype.Err' class='method'><code id='Err.t'>type <a href='#associatedtype.Err' class="type">Err</a></code></h3><div class='docblock'><p>The associated error which can be returned from parsing.</p> | ||
| </div></div><span class='loading-content'>Loading content...</span> | ||
| <h2 id='required-methods' class='small-section-header'>Required methods<a href='#required-methods' class='anchor'></a></h2><div class='methods'><h3 id='tymethod.from_str' class='method'><code id='from_str.v'>fn <a href='#tymethod.from_str' class='fnname'>from_str</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, Self::<a class="type" href="../deltae/trait.FromStr.html#associatedtype.Err" title="type deltae::FromStr::Err">Err</a>></code></h3><div class='docblock'><p>Parses a string <code>s</code> to return a value of this type.</p> | ||
| <p>If parsing succeeds, return the value inside <a href="../../std/result/enum.Result.html#variant.Ok"><code>Ok</code></a>, otherwise | ||
| when the string is ill-formatted return an error specific to the | ||
| inside <a href="../../std/result/enum.Result.html#variant.Err"><code>Err</code></a>. The error type is specific to implementation of the trait.</p> | ||
| <h1 id="examples-1" class="section-header"><a href="#examples-1">Examples</a></h1> | ||
| <p>Basic usage with <a href="../../std/primitive.i32.html"><code>i32</code></a>, a type that implements <code>FromStr</code>:</p> | ||
| <div class="example-wrap"><pre class="rust rust-example-rendered"> | ||
| <span class="kw">use</span> <span class="ident">std</span>::<span class="ident">str</span>::<span class="ident">FromStr</span>; | ||
| <span class="kw">let</span> <span class="ident">s</span> <span class="op">=</span> <span class="string">"5"</span>; | ||
| <span class="kw">let</span> <span class="ident">x</span> <span class="op">=</span> <span class="ident">i32</span>::<span class="ident">from_str</span>(<span class="ident">s</span>).<span class="ident">unwrap</span>(); | ||
| <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">5</span>, <span class="ident">x</span>);</pre></div> | ||
| </div></div><span class='loading-content'>Loading content...</span> | ||
| <h2 id='foreign-impls' class='small-section-header'>Implementations on Foreign Types<a href='#foreign-impls' class='anchor'></a></h2><h3 id='impl-FromStr' class='impl'><code class='in-band'>impl <a class="trait" href="../deltae/trait.FromStr.html" title="trait deltae::FromStr">FromStr</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/std/net/ip/struct.Ipv6Addr.html" title="struct std::net::ip::Ipv6Addr">Ipv6Addr</a></code><a href='#impl-FromStr' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/net/parser.rs.html#313-321' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Err-1' class="type"><code id='Err.t-1'>type <a href='#associatedtype.Err' class="type">Err</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/std/net/parser/struct.AddrParseError.html" title="struct std::net::parser::AddrParseError">AddrParseError</a></code></h4><h4 id='method.from_str' class="method hidden"><code id='from_str.v-1'>fn <a href='#method.from_str' class='fnname'>from_str</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="https://doc.rust-lang.org/nightly/std/net/ip/struct.Ipv6Addr.html" title="struct std::net::ip::Ipv6Addr">Ipv6Addr</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/net/parser/struct.AddrParseError.html" title="struct std::net::parser::AddrParseError">AddrParseError</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/net/parser.rs.html#315-320' title='goto source code'>[src]</a></h4></div><h3 id='impl-FromStr-1' class='impl'><code class='in-band'>impl <a class="trait" href="../deltae/trait.FromStr.html" title="trait deltae::FromStr">FromStr</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/std/net/ip/struct.Ipv4Addr.html" title="struct std::net::ip::Ipv4Addr">Ipv4Addr</a></code><a href='#impl-FromStr-1' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/net/parser.rs.html#302-310' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Err-2' class="type"><code id='Err.t-2'>type <a href='#associatedtype.Err' class="type">Err</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/std/net/parser/struct.AddrParseError.html" title="struct std::net::parser::AddrParseError">AddrParseError</a></code></h4><h4 id='method.from_str-1' class="method hidden"><code id='from_str.v-2'>fn <a href='#method.from_str' class='fnname'>from_str</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="https://doc.rust-lang.org/nightly/std/net/ip/struct.Ipv4Addr.html" title="struct std::net::ip::Ipv4Addr">Ipv4Addr</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/net/parser/struct.AddrParseError.html" title="struct std::net::parser::AddrParseError">AddrParseError</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/net/parser.rs.html#304-309' title='goto source code'>[src]</a></h4></div><h3 id='impl-FromStr-2' class='impl'><code class='in-band'>impl <a class="trait" href="../deltae/trait.FromStr.html" title="trait deltae::FromStr">FromStr</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/std/net/addr/struct.SocketAddrV4.html" title="struct std::net::addr::SocketAddrV4">SocketAddrV4</a></code><a href='#impl-FromStr-2' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/net/parser.rs.html#324-332' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Err-3' class="type"><code id='Err.t-3'>type <a href='#associatedtype.Err' class="type">Err</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/std/net/parser/struct.AddrParseError.html" title="struct std::net::parser::AddrParseError">AddrParseError</a></code></h4><h4 id='method.from_str-2' class="method hidden"><code id='from_str.v-3'>fn <a href='#method.from_str' class='fnname'>from_str</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="https://doc.rust-lang.org/nightly/std/net/addr/struct.SocketAddrV4.html" title="struct std::net::addr::SocketAddrV4">SocketAddrV4</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/net/parser/struct.AddrParseError.html" title="struct std::net::parser::AddrParseError">AddrParseError</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/net/parser.rs.html#326-331' title='goto source code'>[src]</a></h4></div><h3 id='impl-FromStr-3' class='impl'><code class='in-band'>impl <a class="trait" href="../deltae/trait.FromStr.html" title="trait deltae::FromStr">FromStr</a> for <a class="enum" href="https://doc.rust-lang.org/nightly/std/net/ip/enum.IpAddr.html" title="enum std::net::ip::IpAddr">IpAddr</a></code><a href='#impl-FromStr-3' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/net/parser.rs.html#291-299' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Err-4' class="type"><code id='Err.t-4'>type <a href='#associatedtype.Err' class="type">Err</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/std/net/parser/struct.AddrParseError.html" title="struct std::net::parser::AddrParseError">AddrParseError</a></code></h4><h4 id='method.from_str-3' class="method hidden"><code id='from_str.v-4'>fn <a href='#method.from_str' class='fnname'>from_str</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/nightly/std/net/ip/enum.IpAddr.html" title="enum std::net::ip::IpAddr">IpAddr</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/net/parser/struct.AddrParseError.html" title="struct std::net::parser::AddrParseError">AddrParseError</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/net/parser.rs.html#293-298' title='goto source code'>[src]</a></h4></div><h3 id='impl-FromStr-4' class='impl'><code class='in-band'>impl <a class="trait" href="../deltae/trait.FromStr.html" title="trait deltae::FromStr">FromStr</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/std/net/addr/struct.SocketAddrV6.html" title="struct std::net::addr::SocketAddrV6">SocketAddrV6</a></code><a href='#impl-FromStr-4' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/net/parser.rs.html#335-343' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Err-5' class="type"><code id='Err.t-5'>type <a href='#associatedtype.Err' class="type">Err</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/std/net/parser/struct.AddrParseError.html" title="struct std::net::parser::AddrParseError">AddrParseError</a></code></h4><h4 id='method.from_str-4' class="method hidden"><code id='from_str.v-5'>fn <a href='#method.from_str' class='fnname'>from_str</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="https://doc.rust-lang.org/nightly/std/net/addr/struct.SocketAddrV6.html" title="struct std::net::addr::SocketAddrV6">SocketAddrV6</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/net/parser/struct.AddrParseError.html" title="struct std::net::parser::AddrParseError">AddrParseError</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/net/parser.rs.html#337-342' title='goto source code'>[src]</a></h4></div><h3 id='impl-FromStr-5' class='impl'><code class='in-band'>impl <a class="trait" href="../deltae/trait.FromStr.html" title="trait deltae::FromStr">FromStr</a> for <a class="enum" href="https://doc.rust-lang.org/nightly/std/net/addr/enum.SocketAddr.html" title="enum std::net::addr::SocketAddr">SocketAddr</a></code><a href='#impl-FromStr-5' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/net/parser.rs.html#346-354' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Err-6' class="type"><code id='Err.t-6'>type <a href='#associatedtype.Err' class="type">Err</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/std/net/parser/struct.AddrParseError.html" title="struct std::net::parser::AddrParseError">AddrParseError</a></code></h4><h4 id='method.from_str-5' class="method hidden"><code id='from_str.v-6'>fn <a href='#method.from_str' class='fnname'>from_str</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/nightly/std/net/addr/enum.SocketAddr.html" title="enum std::net::addr::SocketAddr">SocketAddr</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/net/parser/struct.AddrParseError.html" title="struct std::net::parser::AddrParseError">AddrParseError</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/net/parser.rs.html#348-353' title='goto source code'>[src]</a></h4></div><h3 id='impl-FromStr-6' class='impl'><code class='in-band'>impl <a class="trait" href="../deltae/trait.FromStr.html" title="trait deltae::FromStr">FromStr</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code><a href='#impl-FromStr-6' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/path.rs.html#1534-1540' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Err-7' class="type"><code id='Err.t-7'>type <a href='#associatedtype.Err' class="type">Err</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><h4 id='method.from_str-6' class="method hidden"><code id='from_str.v-7'>fn <a href='#method.from_str' class='fnname'>from_str</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="https://doc.rust-lang.org/nightly/std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a>, <<a class="struct" href="https://doc.rust-lang.org/nightly/std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a> as <a class="trait" href="../deltae/trait.FromStr.html" title="trait deltae::FromStr">FromStr</a>>::<a class="type" href="../deltae/trait.FromStr.html#associatedtype.Err" title="type deltae::FromStr::Err">Err</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/path.rs.html#1537-1539' title='goto source code'>[src]</a></h4></div><h3 id='impl-FromStr-7' class='impl'><code class='in-band'>impl <a class="trait" href="../deltae/trait.FromStr.html" title="trait deltae::FromStr">FromStr</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a></code><a href='#impl-FromStr-7' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/num/mod.rs.html#4490-4495' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Err-8' class="type"><code id='Err.t-8'>type <a href='#associatedtype.Err' class="type">Err</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/core/num/struct.ParseIntError.html" title="struct core::num::ParseIntError">ParseIntError</a></code></h4><h4 id='method.from_str-7' class="method hidden"><code id='from_str.v-8'>fn <a href='#method.from_str' class='fnname'>from_str</a>(src: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/num/struct.ParseIntError.html" title="struct core::num::ParseIntError">ParseIntError</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/num/mod.rs.html#4492-4494' title='goto source code'>[src]</a></h4></div><h3 id='impl-FromStr-8' class='impl'><code class='in-band'>impl <a class="trait" href="../deltae/trait.FromStr.html" title="trait deltae::FromStr">FromStr</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.char.html">char</a></code><a href='#impl-FromStr-8' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/char/convert.rs.html#202-218' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Err-9' class="type"><code id='Err.t-9'>type <a href='#associatedtype.Err' class="type">Err</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/core/char/convert/struct.ParseCharError.html" title="struct core::char::convert::ParseCharError">ParseCharError</a></code></h4><h4 id='method.from_str-8' class="method hidden"><code id='from_str.v-9'>fn <a href='#method.from_str' class='fnname'>from_str</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.char.html">char</a>, <<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.char.html">char</a> as <a class="trait" href="../deltae/trait.FromStr.html" title="trait deltae::FromStr">FromStr</a>>::<a class="type" href="../deltae/trait.FromStr.html#associatedtype.Err" title="type deltae::FromStr::Err">Err</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/char/convert.rs.html#206-217' title='goto source code'>[src]</a></h4></div><h3 id='impl-FromStr-9' class='impl'><code class='in-band'>impl <a class="trait" href="../deltae/trait.FromStr.html" title="trait deltae::FromStr">FromStr</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code><a href='#impl-FromStr-9' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/num/mod.rs.html#4490-4495' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Err-10' class="type"><code id='Err.t-10'>type <a href='#associatedtype.Err' class="type">Err</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/core/num/struct.ParseIntError.html" title="struct core::num::ParseIntError">ParseIntError</a></code></h4><h4 id='method.from_str-9' class="method hidden"><code id='from_str.v-10'>fn <a href='#method.from_str' class='fnname'>from_str</a>(src: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/num/struct.ParseIntError.html" title="struct core::num::ParseIntError">ParseIntError</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/num/mod.rs.html#4492-4494' title='goto source code'>[src]</a></h4></div><h3 id='impl-FromStr-10' class='impl'><code class='in-band'>impl <a class="trait" href="../deltae/trait.FromStr.html" title="trait deltae::FromStr">FromStr</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></code><a href='#impl-FromStr-10' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/num/mod.rs.html#4490-4495' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Err-11' class="type"><code id='Err.t-11'>type <a href='#associatedtype.Err' class="type">Err</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/core/num/struct.ParseIntError.html" title="struct core::num::ParseIntError">ParseIntError</a></code></h4><h4 id='method.from_str-10' class="method hidden"><code id='from_str.v-11'>fn <a href='#method.from_str' class='fnname'>from_str</a>(src: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/num/struct.ParseIntError.html" title="struct core::num::ParseIntError">ParseIntError</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/num/mod.rs.html#4492-4494' title='goto source code'>[src]</a></h4></div><h3 id='impl-FromStr-11' class='impl'><code class='in-band'>impl <a class="trait" href="../deltae/trait.FromStr.html" title="trait deltae::FromStr">FromStr</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></code><a href='#impl-FromStr-11' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/num/dec2flt/mod.rs.html#102-157' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Err-12' class="type"><code id='Err.t-12'>type <a href='#associatedtype.Err' class="type">Err</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/core/num/dec2flt/struct.ParseFloatError.html" title="struct core::num::dec2flt::ParseFloatError">ParseFloatError</a></code></h4><h4 id='method.from_str-11' class="method"><code id='from_str.v-12'>fn <a href='#method.from_str' class='fnname'>from_str</a>(src: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/num/dec2flt/struct.ParseFloatError.html" title="struct core::num::dec2flt::ParseFloatError">ParseFloatError</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/num/dec2flt/mod.rs.html#154-156' title='goto source code'>[src]</a></h4><div class='docblock'><p>Converts a string in base 10 to a float. | ||
| Accepts an optional decimal exponent.</p> | ||
| <p>This function accepts strings such as</p> | ||
| <ul> | ||
| <li>'3.14'</li> | ||
| <li>'-3.14'</li> | ||
| <li>'2.5E10', or equivalently, '2.5e10'</li> | ||
| <li>'2.5E-10'</li> | ||
| <li>'5.'</li> | ||
| <li>'.5', or, equivalently, '0.5'</li> | ||
| <li>'inf', '-inf', 'NaN'</li> | ||
| </ul> | ||
| <p>Leading and trailing whitespace represent an error.</p> | ||
| <h1 id="grammar" class="section-header"><a href="#grammar">Grammar</a></h1> | ||
| <p>All strings that adhere to the following <a href="https://www.w3.org/TR/REC-xml/#sec-notation">EBNF</a> grammar | ||
| will result in an [<code>Ok</code>] being returned:</p> | ||
| <pre><code class="language-txt">Float ::= Sign? ( 'inf' | 'NaN' | Number ) | ||
| Number ::= ( Digit+ | | ||
| Digit+ '.' Digit* | | ||
| Digit* '.' Digit+ ) Exp? | ||
| Exp ::= [eE] Sign? Digit+ | ||
| Sign ::= [+-] | ||
| Digit ::= [0-9] | ||
| </code></pre> | ||
| <h1 id="known-bugs" class="section-header"><a href="#known-bugs">Known bugs</a></h1> | ||
| <p>In some situations, some strings that should create a valid float | ||
| instead return an error. See <a href="https://github.com/rust-lang/rust/issues/31407">issue #31407</a> for details.</p> | ||
| <h1 id="arguments" class="section-header"><a href="#arguments">Arguments</a></h1> | ||
| <ul> | ||
| <li>src - A string</li> | ||
| </ul> | ||
| <h1 id="return-value" class="section-header"><a href="#return-value">Return value</a></h1> | ||
| <p><code>Err(ParseFloatError)</code> if the string did not represent a valid | ||
| number. Otherwise, <code>Ok(n)</code> where <code>n</code> is the floating-point | ||
| number represented by <code>src</code>.</p> | ||
| </div></div><h3 id='impl-FromStr-12' class='impl'><code class='in-band'>impl <a class="trait" href="../deltae/trait.FromStr.html" title="trait deltae::FromStr">FromStr</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code><a href='#impl-FromStr-12' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/num/mod.rs.html#4490-4495' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Err-13' class="type"><code id='Err.t-13'>type <a href='#associatedtype.Err' class="type">Err</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/core/num/struct.ParseIntError.html" title="struct core::num::ParseIntError">ParseIntError</a></code></h4><h4 id='method.from_str-12' class="method hidden"><code id='from_str.v-13'>fn <a href='#method.from_str' class='fnname'>from_str</a>(src: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/num/struct.ParseIntError.html" title="struct core::num::ParseIntError">ParseIntError</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/num/mod.rs.html#4492-4494' title='goto source code'>[src]</a></h4></div><h3 id='impl-FromStr-13' class='impl'><code class='in-band'>impl <a class="trait" href="../deltae/trait.FromStr.html" title="trait deltae::FromStr">FromStr</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a></code><a href='#impl-FromStr-13' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/num/mod.rs.html#4490-4495' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Err-14' class="type"><code id='Err.t-14'>type <a href='#associatedtype.Err' class="type">Err</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/core/num/struct.ParseIntError.html" title="struct core::num::ParseIntError">ParseIntError</a></code></h4><h4 id='method.from_str-13' class="method hidden"><code id='from_str.v-14'>fn <a href='#method.from_str' class='fnname'>from_str</a>(src: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/num/struct.ParseIntError.html" title="struct core::num::ParseIntError">ParseIntError</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/num/mod.rs.html#4492-4494' title='goto source code'>[src]</a></h4></div><h3 id='impl-FromStr-14' class='impl'><code class='in-band'>impl <a class="trait" href="../deltae/trait.FromStr.html" title="trait deltae::FromStr">FromStr</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a></code><a href='#impl-FromStr-14' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/num/mod.rs.html#4490-4495' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Err-15' class="type"><code id='Err.t-15'>type <a href='#associatedtype.Err' class="type">Err</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/core/num/struct.ParseIntError.html" title="struct core::num::ParseIntError">ParseIntError</a></code></h4><h4 id='method.from_str-14' class="method hidden"><code id='from_str.v-15'>fn <a href='#method.from_str' class='fnname'>from_str</a>(src: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/num/struct.ParseIntError.html" title="struct core::num::ParseIntError">ParseIntError</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/num/mod.rs.html#4492-4494' title='goto source code'>[src]</a></h4></div><h3 id='impl-FromStr-15' class='impl'><code class='in-band'>impl <a class="trait" href="../deltae/trait.FromStr.html" title="trait deltae::FromStr">FromStr</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></code><a href='#impl-FromStr-15' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/num/mod.rs.html#4490-4495' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Err-16' class="type"><code id='Err.t-16'>type <a href='#associatedtype.Err' class="type">Err</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/core/num/struct.ParseIntError.html" title="struct core::num::ParseIntError">ParseIntError</a></code></h4><h4 id='method.from_str-15' class="method hidden"><code id='from_str.v-16'>fn <a href='#method.from_str' class='fnname'>from_str</a>(src: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/num/struct.ParseIntError.html" title="struct core::num::ParseIntError">ParseIntError</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/num/mod.rs.html#4492-4494' title='goto source code'>[src]</a></h4></div><h3 id='impl-FromStr-16' class='impl'><code class='in-band'>impl <a class="trait" href="../deltae/trait.FromStr.html" title="trait deltae::FromStr">FromStr</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></code><a href='#impl-FromStr-16' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/num/mod.rs.html#4490-4495' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Err-17' class="type"><code id='Err.t-17'>type <a href='#associatedtype.Err' class="type">Err</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/core/num/struct.ParseIntError.html" title="struct core::num::ParseIntError">ParseIntError</a></code></h4><h4 id='method.from_str-16' class="method hidden"><code id='from_str.v-17'>fn <a href='#method.from_str' class='fnname'>from_str</a>(src: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/num/struct.ParseIntError.html" title="struct core::num::ParseIntError">ParseIntError</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/num/mod.rs.html#4492-4494' title='goto source code'>[src]</a></h4></div><h3 id='impl-FromStr-17' class='impl'><code class='in-band'>impl <a class="trait" href="../deltae/trait.FromStr.html" title="trait deltae::FromStr">FromStr</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a href='#impl-FromStr-17' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/str/mod.rs.html#105-138' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Err-18' class="type"><code id='Err.t-18'>type <a href='#associatedtype.Err' class="type">Err</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/core/str/struct.ParseBoolError.html" title="struct core::str::ParseBoolError">ParseBoolError</a></code></h4><h4 id='method.from_str-17' class="method"><code id='from_str.v-18'>fn <a href='#method.from_str' class='fnname'>from_str</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/str/struct.ParseBoolError.html" title="struct core::str::ParseBoolError">ParseBoolError</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/str/mod.rs.html#131-137' title='goto source code'>[src]</a></h4><div class='docblock'><p>Parse a <code>bool</code> from a string.</p> | ||
| <p>Yields a <code>Result<bool, ParseBoolError></code>, because <code>s</code> may or may not | ||
| actually be parseable.</p> | ||
| <h1 id="examples-2" class="section-header"><a href="#examples-2">Examples</a></h1> | ||
| <div class="example-wrap"><pre class="rust rust-example-rendered"> | ||
| <span class="kw">use</span> <span class="ident">std</span>::<span class="ident">str</span>::<span class="ident">FromStr</span>; | ||
| <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">FromStr</span>::<span class="ident">from_str</span>(<span class="string">"true"</span>), <span class="prelude-val">Ok</span>(<span class="bool-val">true</span>)); | ||
| <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">FromStr</span>::<span class="ident">from_str</span>(<span class="string">"false"</span>), <span class="prelude-val">Ok</span>(<span class="bool-val">false</span>)); | ||
| <span class="macro">assert</span><span class="macro">!</span>(<span class="op"><</span><span class="ident">bool</span> <span class="kw">as</span> <span class="ident">FromStr</span><span class="op">></span>::<span class="ident">from_str</span>(<span class="string">"not even a boolean"</span>).<span class="ident">is_err</span>());</pre></div> | ||
| <p>Note, in many cases, the <code>.parse()</code> method on <code>str</code> is more proper.</p> | ||
| <div class="example-wrap"><pre class="rust rust-example-rendered"> | ||
| <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="string">"true"</span>.<span class="ident">parse</span>(), <span class="prelude-val">Ok</span>(<span class="bool-val">true</span>)); | ||
| <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="string">"false"</span>.<span class="ident">parse</span>(), <span class="prelude-val">Ok</span>(<span class="bool-val">false</span>)); | ||
| <span class="macro">assert</span><span class="macro">!</span>(<span class="string">"not even a boolean"</span>.<span class="ident">parse</span>::<span class="op"><</span><span class="ident">bool</span><span class="op">></span>().<span class="ident">is_err</span>());</pre></div> | ||
| </div></div><h3 id='impl-FromStr-18' class='impl'><code class='in-band'>impl <a class="trait" href="../deltae/trait.FromStr.html" title="trait deltae::FromStr">FromStr</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a></code><a href='#impl-FromStr-18' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/num/mod.rs.html#4490-4495' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Err-19' class="type"><code id='Err.t-19'>type <a href='#associatedtype.Err' class="type">Err</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/core/num/struct.ParseIntError.html" title="struct core::num::ParseIntError">ParseIntError</a></code></h4><h4 id='method.from_str-18' class="method hidden"><code id='from_str.v-19'>fn <a href='#method.from_str' class='fnname'>from_str</a>(src: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/num/struct.ParseIntError.html" title="struct core::num::ParseIntError">ParseIntError</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/num/mod.rs.html#4492-4494' title='goto source code'>[src]</a></h4></div><h3 id='impl-FromStr-19' class='impl'><code class='in-band'>impl <a class="trait" href="../deltae/trait.FromStr.html" title="trait deltae::FromStr">FromStr</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a href='#impl-FromStr-19' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/num/mod.rs.html#4490-4495' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Err-20' class="type"><code id='Err.t-20'>type <a href='#associatedtype.Err' class="type">Err</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/core/num/struct.ParseIntError.html" title="struct core::num::ParseIntError">ParseIntError</a></code></h4><h4 id='method.from_str-19' class="method hidden"><code id='from_str.v-20'>fn <a href='#method.from_str' class='fnname'>from_str</a>(src: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/num/struct.ParseIntError.html" title="struct core::num::ParseIntError">ParseIntError</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/num/mod.rs.html#4492-4494' title='goto source code'>[src]</a></h4></div><h3 id='impl-FromStr-20' class='impl'><code class='in-band'>impl <a class="trait" href="../deltae/trait.FromStr.html" title="trait deltae::FromStr">FromStr</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code><a href='#impl-FromStr-20' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/num/dec2flt/mod.rs.html#102-157' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Err-21' class="type"><code id='Err.t-21'>type <a href='#associatedtype.Err' class="type">Err</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/core/num/dec2flt/struct.ParseFloatError.html" title="struct core::num::dec2flt::ParseFloatError">ParseFloatError</a></code></h4><h4 id='method.from_str-20' class="method"><code id='from_str.v-21'>fn <a href='#method.from_str' class='fnname'>from_str</a>(src: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/num/dec2flt/struct.ParseFloatError.html" title="struct core::num::dec2flt::ParseFloatError">ParseFloatError</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/num/dec2flt/mod.rs.html#154-156' title='goto source code'>[src]</a></h4><div class='docblock'><p>Converts a string in base 10 to a float. | ||
| Accepts an optional decimal exponent.</p> | ||
| <p>This function accepts strings such as</p> | ||
| <ul> | ||
| <li>'3.14'</li> | ||
| <li>'-3.14'</li> | ||
| <li>'2.5E10', or equivalently, '2.5e10'</li> | ||
| <li>'2.5E-10'</li> | ||
| <li>'5.'</li> | ||
| <li>'.5', or, equivalently, '0.5'</li> | ||
| <li>'inf', '-inf', 'NaN'</li> | ||
| </ul> | ||
| <p>Leading and trailing whitespace represent an error.</p> | ||
| <h1 id="grammar-1" class="section-header"><a href="#grammar-1">Grammar</a></h1> | ||
| <p>All strings that adhere to the following <a href="https://www.w3.org/TR/REC-xml/#sec-notation">EBNF</a> grammar | ||
| will result in an [<code>Ok</code>] being returned:</p> | ||
| <pre><code class="language-txt">Float ::= Sign? ( 'inf' | 'NaN' | Number ) | ||
| Number ::= ( Digit+ | | ||
| Digit+ '.' Digit* | | ||
| Digit* '.' Digit+ ) Exp? | ||
| Exp ::= [eE] Sign? Digit+ | ||
| Sign ::= [+-] | ||
| Digit ::= [0-9] | ||
| </code></pre> | ||
| <h1 id="known-bugs-1" class="section-header"><a href="#known-bugs-1">Known bugs</a></h1> | ||
| <p>In some situations, some strings that should create a valid float | ||
| instead return an error. See <a href="https://github.com/rust-lang/rust/issues/31407">issue #31407</a> for details.</p> | ||
| <h1 id="arguments-1" class="section-header"><a href="#arguments-1">Arguments</a></h1> | ||
| <ul> | ||
| <li>src - A string</li> | ||
| </ul> | ||
| <h1 id="return-value-1" class="section-header"><a href="#return-value-1">Return value</a></h1> | ||
| <p><code>Err(ParseFloatError)</code> if the string did not represent a valid | ||
| number. Otherwise, <code>Ok(n)</code> where <code>n</code> is the floating-point | ||
| number represented by <code>src</code>.</p> | ||
| </div></div><h3 id='impl-FromStr-21' class='impl'><code class='in-band'>impl <a class="trait" href="../deltae/trait.FromStr.html" title="trait deltae::FromStr">FromStr</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></code><a href='#impl-FromStr-21' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/num/mod.rs.html#4490-4495' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Err-22' class="type"><code id='Err.t-22'>type <a href='#associatedtype.Err' class="type">Err</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/core/num/struct.ParseIntError.html" title="struct core::num::ParseIntError">ParseIntError</a></code></h4><h4 id='method.from_str-21' class="method hidden"><code id='from_str.v-22'>fn <a href='#method.from_str' class='fnname'>from_str</a>(src: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/num/struct.ParseIntError.html" title="struct core::num::ParseIntError">ParseIntError</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/num/mod.rs.html#4492-4494' title='goto source code'>[src]</a></h4></div><h3 id='impl-FromStr-22' class='impl'><code class='in-band'>impl <a class="trait" href="../deltae/trait.FromStr.html" title="trait deltae::FromStr">FromStr</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a></code><a href='#impl-FromStr-22' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/num/mod.rs.html#4490-4495' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Err-23' class="type"><code id='Err.t-23'>type <a href='#associatedtype.Err' class="type">Err</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/core/num/struct.ParseIntError.html" title="struct core::num::ParseIntError">ParseIntError</a></code></h4><h4 id='method.from_str-22' class="method hidden"><code id='from_str.v-23'>fn <a href='#method.from_str' class='fnname'>from_str</a>(src: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/num/struct.ParseIntError.html" title="struct core::num::ParseIntError">ParseIntError</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/num/mod.rs.html#4492-4494' title='goto source code'>[src]</a></h4></div><h3 id='impl-FromStr-23' class='impl'><code class='in-band'>impl <a class="trait" href="../deltae/trait.FromStr.html" title="trait deltae::FromStr">FromStr</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code><a href='#impl-FromStr-23' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/string.rs.html#2079-2085' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Err-24' class="type"><code id='Err.t-24'>type <a href='#associatedtype.Err' class="type">Err</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><h4 id='method.from_str-23' class="method hidden"><code id='from_str.v-24'>fn <a href='#method.from_str' class='fnname'>from_str</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/string.rs.html#2082-2084' title='goto source code'>[src]</a></h4></div><span class='loading-content'>Loading content...</span> | ||
| <h2 id='implementors' class='small-section-header'>Implementors<a href='#implementors' class='anchor'></a></h2><div class='item-list' id='implementors-list'><h3 id='impl-FromStr-24' class='impl'><code class='in-band'>impl FromStr for <a class="enum" href="../deltae/enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a></code><a href='#impl-FromStr-24' class='anchor'></a><a class='srclink' href='../src/deltae/lib.rs.html#126-144' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Err-25' class="type"><code id='Err.t-25'>type <a href='#associatedtype.Err-25' class="type">Err</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a></code></h4><h4 id='method.from_str-24' class="method"><code id='from_str.v-25'>fn <a href='#method.from_str-24' class='fnname'>from_str</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../deltae/enum.DEMethod.html" title="enum deltae::DEMethod">DEMethod</a>, Self::<a class="type" href="../deltae/trait.FromStr.html#associatedtype.Err" title="type deltae::FromStr::Err">Err</a>></code><a class='srclink' href='../src/deltae/lib.rs.html#128-143' title='goto source code'>[src]</a></h4><div class='docblock'><p>Parse <code>DEMethod</code> from <code>&str</code>. Always returns <code>Ok()</code>. DE2000 is default.</p> | ||
| </div></div><h3 id='impl-FromStr-25' class='impl'><code class='in-band'>impl FromStr for <a class="struct" href="../deltae/color/struct.LabValue.html" title="struct deltae::color::LabValue">LabValue</a></code><a href='#impl-FromStr-25' class='anchor'></a><a class='srclink' href='../src/deltae/color.rs.html#123-136' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Err-26' class="type"><code id='Err.t-26'>type <a href='#associatedtype.Err-26' class="type">Err</a> = <a class="enum" href="../deltae/color/enum.ValueError.html" title="enum deltae::color::ValueError">ValueError</a></code></h4><h4 id='method.from_str-25' class="method"><code id='from_str.v-26'>fn <a href='#method.from_str-25' class='fnname'>from_str</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="type" href="../deltae/color/type.ValueResult.html" title="type deltae::color::ValueResult">ValueResult</a><<a class="struct" href="../deltae/color/struct.LabValue.html" title="struct deltae::color::LabValue">LabValue</a>></code><a class='srclink' href='../src/deltae/color.rs.html#126-135' title='goto source code'>[src]</a></h4><div class='docblock'><p>New <code>LabValue</code> from <code>&str</code></p> | ||
| </div></div><h3 id='impl-FromStr-26' class='impl'><code class='in-band'>impl FromStr for <a class="struct" href="../deltae/color/struct.LchValue.html" title="struct deltae::color::LchValue">LchValue</a></code><a href='#impl-FromStr-26' class='anchor'></a><a class='srclink' href='../src/deltae/color.rs.html#204-217' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Err-27' class="type"><code id='Err.t-27'>type <a href='#associatedtype.Err-27' class="type">Err</a> = <a class="enum" href="../deltae/color/enum.ValueError.html" title="enum deltae::color::ValueError">ValueError</a></code></h4><h4 id='method.from_str-26' class="method"><code id='from_str.v-27'>fn <a href='#method.from_str-26' class='fnname'>from_str</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="type" href="../deltae/color/type.ValueResult.html" title="type deltae::color::ValueResult">ValueResult</a><<a class="struct" href="../deltae/color/struct.LchValue.html" title="struct deltae::color::LchValue">LchValue</a>></code><a class='srclink' href='../src/deltae/color.rs.html#207-216' title='goto source code'>[src]</a></h4><div class='docblock'><p>New <code>LchValue</code> from <code>&str</code></p> | ||
| </div></div><h3 id='impl-FromStr-27' class='impl'><code class='in-band'>impl FromStr for <a class="struct" href="../deltae/color/struct.XyzValue.html" title="struct deltae::color::XyzValue">XyzValue</a></code><a href='#impl-FromStr-27' class='anchor'></a><a class='srclink' href='../src/deltae/color.rs.html#270-284' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Err-28' class="type"><code id='Err.t-28'>type <a href='#associatedtype.Err-28' class="type">Err</a> = <a class="enum" href="../deltae/color/enum.ValueError.html" title="enum deltae::color::ValueError">ValueError</a></code></h4><h4 id='method.from_str-27' class="method"><code id='from_str.v-28'>fn <a href='#method.from_str-27' class='fnname'>from_str</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="type" href="../deltae/color/type.ValueResult.html" title="type deltae::color::ValueResult">ValueResult</a><<a class="struct" href="../deltae/color/struct.XyzValue.html" title="struct deltae::color::XyzValue">XyzValue</a>></code><a class='srclink' href='../src/deltae/color.rs.html#273-282' title='goto source code'>[src]</a></h4><div class='docblock'><p>New <code>XyzValue</code> from <code>&str</code></p> | ||
| </div></div></div><span class='loading-content'>Loading content...</span><script type="text/javascript">window.inlined_types=new Set([]);</script><script type="text/javascript" async | ||
| src="../implementors/core/str/trait.FromStr.js"> | ||
| </script></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "deltae";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display