This commit is contained in:
dabreegster 2021-08-24 17:37:47 +00:00
parent 676162b28c
commit 7e7a7a9c4f
151 changed files with 1691 additions and 506 deletions

File diff suppressed because one or more lines are too long

View File

@ -178,8 +178,8 @@ call this to handle all other events. <a href="#method.other_event">Read more</a
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw-23" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, _: &amp;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>)</h4><a href="#method.draw-23" class="anchor"></a><a class="srclink" href="../../src/game/edit/multiple_roads.rs.html#245-272" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Draw</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.on_destroy-22" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, _: &amp;mut <a class="struct" href="struct.App.html" title="struct game::app::App">App</a>)</h4><a href="#method.on_destroy-22" class="anchor"></a><a class="srclink" href="../../src/game/edit/multiple_roads.rs.html#274-277" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Before this state is popped or replaced, call this.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw_baselayer-22" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</h4><a href="#method.draw_baselayer-22" class="anchor"></a></div></summary><div class='docblock'><p>Specifies what to draw before draw()</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-State%3CApp%3E-23" class="impl has-srclink"><h3 class="code-header in-band">impl State&lt;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../edit/roads/struct.RoadEditor.html" title="struct game::edit::roads::RoadEditor">RoadEditor</a></h3><a href="#impl-State%3CApp%3E-23" class="anchor"></a><a class="srclink" href="../../src/game/edit/roads.rs.html#164-403" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event-23" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="struct.App.html" title="struct game::app::App">App</a>) -&gt; Transition&lt;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>&gt;</h4><a href="#method.event-23" class="anchor"></a><a class="srclink" href="../../src/game/edit/roads.rs.html#165-396" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Respond to a UI event, such as input or time passing.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw-24" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, _: &amp;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>)</h4><a href="#method.draw-24" class="anchor"></a><a class="srclink" href="../../src/game/edit/roads.rs.html#398-402" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Draw</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-State%3CApp%3E-23" class="impl has-srclink"><h3 class="code-header in-band">impl State&lt;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../edit/roads/struct.RoadEditor.html" title="struct game::edit::roads::RoadEditor">RoadEditor</a></h3><a href="#impl-State%3CApp%3E-23" class="anchor"></a><a class="srclink" href="../../src/game/edit/roads.rs.html#180-433" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event-23" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="struct.App.html" title="struct game::app::App">App</a>) -&gt; Transition&lt;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>&gt;</h4><a href="#method.event-23" class="anchor"></a><a class="srclink" href="../../src/game/edit/roads.rs.html#181-426" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Respond to a UI event, such as input or time passing.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw-24" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, _: &amp;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>)</h4><a href="#method.draw-24" class="anchor"></a><a class="srclink" href="../../src/game/edit/roads.rs.html#428-432" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Draw</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw_baselayer-23" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</h4><a href="#method.draw_baselayer-23" class="anchor"></a></div></summary><div class='docblock'><p>Specifies what to draw before draw()</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.on_destroy-23" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;mut </a>A)</h4><a href="#method.on_destroy-23" class="anchor"></a></div></summary><div class='docblock'><p>Before this state is popped or replaced, call this.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-State%3CApp%3E-24" class="impl has-srclink"><h3 class="code-header in-band">impl State&lt;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../edit/routes/struct.RouteEditor.html" title="struct game::edit::routes::RouteEditor">RouteEditor</a></h3><a href="#impl-State%3CApp%3E-24" class="anchor"></a><a class="srclink" href="../../src/game/edit/routes.rs.html#53-91" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event-24" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="struct.App.html" title="struct game::app::App">App</a>) -&gt; Transition&lt;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>&gt;</h4><a href="#method.event-24" class="anchor"></a><a class="srclink" href="../../src/game/edit/routes.rs.html#54-86" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Respond to a UI event, such as input or time passing.</p>

View File

@ -0,0 +1,3 @@
<!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 `build_lane_highlights` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, build_lane_highlights"><title>build_lane_highlights in game::edit::roads - 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 fn"><!--[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">&#9776;</div><a href='../../../game/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">game</a>::<wbr><a href="../index.html">edit</a>::<wbr><a href="index.html">roads</a></h2><div id="sidebar-vars" data-name="build_lane_highlights" data-ty="fn" 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">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">edit</a>::<wbr><a href="index.html">roads</a>::<wbr><a class="fn" href="#">build_lane_highlights</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">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/edit/roads.rs.html#776-812" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn build_lane_highlights(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../app/struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;r: <a class="struct" href="../../../map_model/objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;selected_lane: <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../../map_model/objects/lane/struct.LaneID.html" title="struct map_model::objects::lane::LaneID">LaneID</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;hovered_lane: <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../../map_model/objects/lane/struct.LaneID.html" title="struct map_model::objects::lane::LaneID">LaneID</a>&gt;<br>) -&gt; <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.tuple.html">(</a><a class="enum" href="https://doc.rust-lang.org/1.54.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../../map_model/objects/lane/struct.LaneID.html" title="struct map_model::objects::lane::LaneID">LaneID</a>&gt;, <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../../map_model/objects/lane/struct.LaneID.html" title="struct map_model::objects::lane::LaneID">LaneID</a>&gt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.tuple.html">)</a>, Drawable<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.tuple.html">)</a></pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>

View File

@ -1,3 +1,3 @@
<!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 `can_reverse` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, can_reverse"><title>can_reverse in game::edit::roads - 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 fn"><!--[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">&#9776;</div><a href='../../../game/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">game</a>::<wbr><a href="../index.html">edit</a>::<wbr><a href="index.html">roads</a></h2><div id="sidebar-vars" data-name="can_reverse" data-ty="fn" 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">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">edit</a>::<wbr><a href="index.html">roads</a>::<wbr><a class="fn" href="#">can_reverse</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">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/edit/roads.rs.html#809-811" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn can_reverse(_: <a class="enum" href="../../../map_model/objects/lane/enum.LaneType.html" title="enum map_model::objects::lane::LaneType">LaneType</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>
<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 fn"><!--[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">&#9776;</div><a href='../../../game/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">game</a>::<wbr><a href="../index.html">edit</a>::<wbr><a href="index.html">roads</a></h2><div id="sidebar-vars" data-name="can_reverse" data-ty="fn" 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">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">edit</a>::<wbr><a href="index.html">roads</a>::<wbr><a class="fn" href="#">can_reverse</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">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/edit/roads.rs.html#851-853" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn can_reverse(_: <a class="enum" href="../../../map_model/objects/lane/enum.LaneType.html" title="enum map_model::objects::lane::LaneType">LaneType</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>

View File

@ -1,3 +0,0 @@
<!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 `highlight_current_selection` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, highlight_current_selection"><title>highlight_current_selection in game::edit::roads - 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 fn"><!--[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">&#9776;</div><a href='../../../game/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">game</a>::<wbr><a href="../index.html">edit</a>::<wbr><a href="index.html">roads</a></h2><div id="sidebar-vars" data-name="highlight_current_selection" data-ty="fn" 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">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">edit</a>::<wbr><a href="index.html">roads</a>::<wbr><a class="fn" href="#">highlight_current_selection</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">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/edit/roads.rs.html#748-770" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn highlight_current_selection(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../app/struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;r: <a class="struct" href="../../../map_model/objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;l: <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../../map_model/objects/lane/struct.LaneID.html" title="struct map_model::objects::lane::LaneID">LaneID</a>&gt;<br>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.tuple.html">(</a><a class="enum" href="https://doc.rust-lang.org/1.54.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../../map_model/objects/lane/struct.LaneID.html" title="struct map_model::objects::lane::LaneID">LaneID</a>&gt;, Drawable<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.tuple.html">)</a></pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>

View File

@ -1,3 +1,3 @@
<!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 `lane_type_to_icon` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, lane_type_to_icon"><title>lane_type_to_icon in game::edit::roads - 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 fn"><!--[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">&#9776;</div><a href='../../../game/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">game</a>::<wbr><a href="../index.html">edit</a>::<wbr><a href="index.html">roads</a></h2><div id="sidebar-vars" data-name="lane_type_to_icon" data-ty="fn" 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">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">edit</a>::<wbr><a href="index.html">roads</a>::<wbr><a class="fn" href="#">lane_type_to_icon</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">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/edit/roads.rs.html#772-791" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn lane_type_to_icon(lt: <a class="enum" href="../../../map_model/objects/lane/enum.LaneType.html" title="enum map_model::objects::lane::LaneType">LaneType</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;'static <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a>&gt;</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>
<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 fn"><!--[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">&#9776;</div><a href='../../../game/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">game</a>::<wbr><a href="../index.html">edit</a>::<wbr><a href="index.html">roads</a></h2><div id="sidebar-vars" data-name="lane_type_to_icon" data-ty="fn" 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">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">edit</a>::<wbr><a href="index.html">roads</a>::<wbr><a class="fn" href="#">lane_type_to_icon</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">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/edit/roads.rs.html#814-833" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn lane_type_to_icon(lt: <a class="enum" href="../../../map_model/objects/lane/enum.LaneType.html" title="enum map_model::objects::lane::LaneType">LaneType</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;'static <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a>&gt;</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>

View File

@ -1,3 +1,3 @@
<!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 `make_main_panel` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, make_main_panel"><title>make_main_panel in game::edit::roads - 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 fn"><!--[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">&#9776;</div><a href='../../../game/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">game</a>::<wbr><a href="../index.html">edit</a>::<wbr><a href="index.html">roads</a></h2><div id="sidebar-vars" data-name="make_main_panel" data-ty="fn" 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">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">edit</a>::<wbr><a href="index.html">roads</a>::<wbr><a class="fn" href="#">make_main_panel</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">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/edit/roads.rs.html#467-746" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn make_main_panel(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../app/struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;road: &amp;<a class="struct" href="../../../map_model/objects/road/struct.Road.html" title="struct map_model::objects::road::Road">Road</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;current_lane: <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../../map_model/objects/lane/struct.LaneID.html" title="struct map_model::objects::lane::LaneID">LaneID</a>&gt;<br>) -&gt; Panel</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>
<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 fn"><!--[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">&#9776;</div><a href='../../../game/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">game</a>::<wbr><a href="../index.html">edit</a>::<wbr><a href="index.html">roads</a></h2><div id="sidebar-vars" data-name="make_main_panel" data-ty="fn" 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">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">edit</a>::<wbr><a href="index.html">roads</a>::<wbr><a class="fn" href="#">make_main_panel</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">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/edit/roads.rs.html#497-774" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn make_main_panel(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../app/struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;road: &amp;<a class="struct" href="../../../map_model/objects/road/struct.Road.html" title="struct map_model::objects::road::Road">Road</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;selected_lane: <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../../map_model/objects/lane/struct.LaneID.html" title="struct map_model::objects::lane::LaneID">LaneID</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;hovering_on_lane: <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../../map_model/objects/lane/struct.LaneID.html" title="struct map_model::objects::lane::LaneID">LaneID</a>&gt;<br>) -&gt; Panel</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>

View File

@ -1,3 +1,3 @@
<!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 `make_top_panel` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, make_top_panel"><title>make_top_panel in game::edit::roads - 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 fn"><!--[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">&#9776;</div><a href='../../../game/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">game</a>::<wbr><a href="../index.html">edit</a>::<wbr><a href="index.html">roads</a></h2><div id="sidebar-vars" data-name="make_top_panel" data-ty="fn" 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">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">edit</a>::<wbr><a href="index.html">roads</a>::<wbr><a class="fn" href="#">make_top_panel</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">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/edit/roads.rs.html#405-465" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn make_top_panel(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../app/struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;num_edit_cmds_originally: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.usize.html">usize</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;no_redo_cmds: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;r: <a class="struct" href="../../../map_model/objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;orig_road_state: <a class="struct" href="../../../map_model/edits/struct.EditRoad.html" title="struct map_model::edits::EditRoad">EditRoad</a><br>) -&gt; Panel</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>
<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 fn"><!--[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">&#9776;</div><a href='../../../game/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">game</a>::<wbr><a href="../index.html">edit</a>::<wbr><a href="index.html">roads</a></h2><div id="sidebar-vars" data-name="make_top_panel" data-ty="fn" 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">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">edit</a>::<wbr><a href="index.html">roads</a>::<wbr><a class="fn" href="#">make_top_panel</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">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/edit/roads.rs.html#435-495" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn make_top_panel(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../app/struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;num_edit_cmds_originally: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.usize.html">usize</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;no_redo_cmds: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;r: <a class="struct" href="../../../map_model/objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;orig_road_state: <a class="struct" href="../../../map_model/edits/struct.EditRoad.html" title="struct map_model::edits::EditRoad">EditRoad</a><br>) -&gt; Panel</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>

View File

@ -1,3 +1,3 @@
<!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 `width_choices` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, width_choices"><title>width_choices in game::edit::roads - 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 fn"><!--[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">&#9776;</div><a href='../../../game/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">game</a>::<wbr><a href="../index.html">edit</a>::<wbr><a href="index.html">roads</a></h2><div id="sidebar-vars" data-name="width_choices" data-ty="fn" 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">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">edit</a>::<wbr><a href="index.html">roads</a>::<wbr><a class="fn" href="#">width_choices</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">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/edit/roads.rs.html#793-805" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn width_choices(app: &amp;<a class="struct" href="../../app/struct.App.html" title="struct game::app::App">App</a>, l: <a class="struct" href="../../../map_model/objects/lane/struct.LaneID.html" title="struct map_model::objects::lane::LaneID">LaneID</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;Choice&lt;<a class="struct" href="../../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a>&gt;&gt;</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>
<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 fn"><!--[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">&#9776;</div><a href='../../../game/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">game</a>::<wbr><a href="../index.html">edit</a>::<wbr><a href="index.html">roads</a></h2><div id="sidebar-vars" data-name="width_choices" data-ty="fn" 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">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">edit</a>::<wbr><a href="index.html">roads</a>::<wbr><a class="fn" href="#">width_choices</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">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/edit/roads.rs.html#835-847" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn width_choices(app: &amp;<a class="struct" href="../../app/struct.App.html" title="struct game::app::App">App</a>, l: <a class="struct" href="../../../map_model/objects/lane/struct.LaneID.html" title="struct map_model::objects::lane::LaneID">LaneID</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;Choice&lt;<a class="struct" href="../../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a>&gt;&gt;</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>

View File

@ -1,5 +1,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="API documentation for the Rust `roads` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, roads"><title>game::edit::roads - 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">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module roads</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="roads" 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">game</a>::<wbr><a href="../index.html">edit</a>::<wbr><a class="mod" href="#">roads</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">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/edit/roads.rs.html#1-811" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<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">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module roads</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="roads" 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">game</a>::<wbr><a href="../index.html">edit</a>::<wbr><a class="mod" href="#">roads</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">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/edit/roads.rs.html#1-853" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<table><tr class="module-item"><td><a class="struct" href="struct.RoadEditor.html" title="game::edit::roads::RoadEditor struct">RoadEditor</a></td><td class="docblock-short"></td></tr></table><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>
<table><tr class="module-item"><td><a class="fn" href="fn.can_reverse.html" title="game::edit::roads::can_reverse fn">can_reverse</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.highlight_current_selection.html" title="game::edit::roads::highlight_current_selection fn">highlight_current_selection</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.lane_type_to_icon.html" title="game::edit::roads::lane_type_to_icon fn">lane_type_to_icon</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.make_main_panel.html" title="game::edit::roads::make_main_panel fn">make_main_panel</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.make_top_panel.html" title="game::edit::roads::make_top_panel fn">make_top_panel</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.width_choices.html" title="game::edit::roads::width_choices fn">width_choices</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>
<table><tr class="module-item"><td><a class="fn" href="fn.build_lane_highlights.html" title="game::edit::roads::build_lane_highlights fn">build_lane_highlights</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.can_reverse.html" title="game::edit::roads::can_reverse fn">can_reverse</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.lane_type_to_icon.html" title="game::edit::roads::lane_type_to_icon fn">lane_type_to_icon</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.make_main_panel.html" title="game::edit::roads::make_main_panel fn">make_main_panel</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.make_top_panel.html" title="game::edit::roads::make_top_panel fn">make_top_panel</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.width_choices.html" title="game::edit::roads::width_choices fn">width_choices</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>

View File

@ -1 +1 @@
initSidebarItems({"fn":[["can_reverse",""],["highlight_current_selection",""],["lane_type_to_icon",""],["make_main_panel",""],["make_top_panel",""],["width_choices",""]],"struct":[["RoadEditor",""]]});
initSidebarItems({"fn":[["build_lane_highlights",""],["can_reverse",""],["lane_type_to_icon",""],["make_main_panel",""],["make_top_panel",""],["width_choices",""]],"struct":[["RoadEditor",""]]});

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,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="The build time in RFC2822, UTC."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>BUILT_TIME_UTC in game::pregame::built_info - 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">&#9776;</div><a href='../../../game/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">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a></h2><div id="sidebar-vars" data-name="BUILT_TIME_UTC" 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">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="#">BUILT_TIME_UTC</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">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-7b2f388b02b372bc/out/built.rs.html#78" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const BUILT_TIME_UTC: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a> = r&quot;Tue, 24 Aug 2021 02:46:26 +0000&quot;;</pre><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The build time in RFC2822, UTC.</p>
<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">&#9776;</div><a href='../../../game/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">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a></h2><div id="sidebar-vars" data-name="BUILT_TIME_UTC" 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">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="#">BUILT_TIME_UTC</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">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-7b2f388b02b372bc/out/built.rs.html#78" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const BUILT_TIME_UTC: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a> = r&quot;Tue, 24 Aug 2021 17:36:33 +0000&quot;;</pre><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The build time in RFC2822, UTC.</p>
</div></details></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -6,5 +6,5 @@ implementors["map_model"] = [{"text":"impl <a class=\"trait\" href=\"https://doc
implementors["santa"] = [{"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=\"santa/music/struct.Music.html\" title=\"struct santa::music::Music\">Music</a>","synthetic":false,"types":["santa::music::Music"]}];
implementors["sim"] = [{"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=\"sim/analytics/struct.Analytics.html\" title=\"struct sim::analytics::Analytics\">Analytics</a>","synthetic":false,"types":["sim::analytics::Analytics"]},{"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=\"sim/sim/struct.SimOptions.html\" title=\"struct sim::sim::SimOptions\">SimOptions</a>","synthetic":false,"types":["sim::sim::SimOptions"]},{"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=\"sim/sim/enum.AlertHandler.html\" title=\"enum sim::sim::AlertHandler\">AlertHandler</a>","synthetic":false,"types":["sim::sim::AlertHandler"]}];
implementors["sumo"] = [{"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=\"sumo/raw/enum.Function.html\" title=\"enum sumo::raw::Function\">Function</a>","synthetic":false,"types":["sumo::raw::Function"]},{"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=\"sumo/raw/enum.SpreadType.html\" title=\"enum sumo::raw::SpreadType\">SpreadType</a>","synthetic":false,"types":["sumo::raw::SpreadType"]}];
implementors["widgetry"] = [{"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=\"widgetry/geom/geom_batch_stack/struct.GeomBatchStack.html\" title=\"struct widgetry::geom::geom_batch_stack::GeomBatchStack\">GeomBatchStack</a>","synthetic":false,"types":["widgetry::geom::geom_batch_stack::GeomBatchStack"]},{"text":"impl&lt;K:&nbsp;<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=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a>, V&gt; <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=\"widgetry/tools/struct.Cached.html\" title=\"struct widgetry::tools::Cached\">Cached</a>&lt;K, V&gt;","synthetic":false,"types":["widgetry::tools::Cached"]},{"text":"impl&lt;'a, 'c&gt; <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=\"widgetry/widgets/button/struct.ButtonBuilder.html\" title=\"struct widgetry::widgets::button::ButtonBuilder\">ButtonBuilder</a>&lt;'a, 'c&gt;","synthetic":false,"types":["widgetry::widgets::button::ButtonBuilder"]},{"text":"impl&lt;'a, 'c&gt; <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=\"widgetry/widgets/button/struct.ButtonStateStyle.html\" title=\"struct widgetry::widgets::button::ButtonStateStyle\">ButtonStateStyle</a>&lt;'a, 'c&gt;","synthetic":false,"types":["widgetry::widgets::button::ButtonStateStyle"]},{"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=\"widgetry/widgets/button/struct.Label.html\" title=\"struct widgetry::widgets::button::Label\">Label</a>","synthetic":false,"types":["widgetry::widgets::button::Label"]},{"text":"impl&lt;'a, 'c&gt; <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=\"widgetry/widgets/image/struct.Image.html\" title=\"struct widgetry::widgets::image::Image\">Image</a>&lt;'a, 'c&gt;","synthetic":false,"types":["widgetry::widgets::image::Image"]},{"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=\"widgetry/widgets/enum.CornerRounding.html\" title=\"enum widgetry::widgets::CornerRounding\">CornerRounding</a>","synthetic":false,"types":["widgetry::widgets::CornerRounding"]},{"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=\"widgetry/widgets/struct.EdgeInsets.html\" title=\"struct widgetry::widgets::EdgeInsets\">EdgeInsets</a>","synthetic":false,"types":["widgetry::widgets::EdgeInsets"]},{"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=\"widgetry/enum.ContentMode.html\" title=\"enum widgetry::ContentMode\">ContentMode</a>","synthetic":false,"types":["widgetry::ContentMode"]}];
implementors["widgetry"] = [{"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=\"widgetry/geom/geom_batch_stack/struct.GeomBatchStack.html\" title=\"struct widgetry::geom::geom_batch_stack::GeomBatchStack\">GeomBatchStack</a>","synthetic":false,"types":["widgetry::geom::geom_batch_stack::GeomBatchStack"]},{"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=\"widgetry/geom/struct.GeomBatch.html\" title=\"struct widgetry::geom::GeomBatch\">GeomBatch</a>","synthetic":false,"types":["widgetry::geom::GeomBatch"]},{"text":"impl&lt;K:&nbsp;<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=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a>, V&gt; <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=\"widgetry/tools/struct.Cached.html\" title=\"struct widgetry::tools::Cached\">Cached</a>&lt;K, V&gt;","synthetic":false,"types":["widgetry::tools::Cached"]},{"text":"impl&lt;'a, 'c&gt; <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=\"widgetry/widgets/button/struct.ButtonBuilder.html\" title=\"struct widgetry::widgets::button::ButtonBuilder\">ButtonBuilder</a>&lt;'a, 'c&gt;","synthetic":false,"types":["widgetry::widgets::button::ButtonBuilder"]},{"text":"impl&lt;'a, 'c&gt; <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=\"widgetry/widgets/button/struct.ButtonStateStyle.html\" title=\"struct widgetry::widgets::button::ButtonStateStyle\">ButtonStateStyle</a>&lt;'a, 'c&gt;","synthetic":false,"types":["widgetry::widgets::button::ButtonStateStyle"]},{"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=\"widgetry/widgets/button/struct.Label.html\" title=\"struct widgetry::widgets::button::Label\">Label</a>","synthetic":false,"types":["widgetry::widgets::button::Label"]},{"text":"impl&lt;'a, 'c&gt; <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=\"widgetry/widgets/image/struct.Image.html\" title=\"struct widgetry::widgets::image::Image\">Image</a>&lt;'a, 'c&gt;","synthetic":false,"types":["widgetry::widgets::image::Image"]},{"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=\"widgetry/widgets/enum.CornerRounding.html\" title=\"enum widgetry::widgets::CornerRounding\">CornerRounding</a>","synthetic":false,"types":["widgetry::widgets::CornerRounding"]},{"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=\"widgetry/widgets/struct.EdgeInsets.html\" title=\"struct widgetry::widgets::EdgeInsets\">EdgeInsets</a>","synthetic":false,"types":["widgetry::widgets::EdgeInsets"]},{"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=\"widgetry/enum.ContentMode.html\" title=\"enum widgetry::ContentMode\">ContentMode</a>","synthetic":false,"types":["widgetry::ContentMode"]}];
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
<!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="This crate contains common code for applications that draw and interact with a `Map`."><meta name="keywords" content="rust, rustlang, rust-lang, map_gui"><title>map_gui - 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">&#9776;</div><a href='../map_gui/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Crate map_gui</h2><div class="block version"><p>Version 0.1.0</p></div><div class="sidebar-elems"><a id="all-types" href="all.html"><p>See all map_gui's items</p></a><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#traits">Traits</a></li></ul></div><div id="sidebar-vars" data-name="map_gui" 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="#">map_gui</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">&#x2212;</span>]</a></span><a class="srclink" href="../src/map_gui/lib.rs.html#1-126" 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>This crate contains common code for applications that draw and interact with a <code>Map</code>.</p>
<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">&#9776;</div><a href='../map_gui/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Crate map_gui</h2><div class="block version"><p>Version 0.1.0</p></div><div class="sidebar-elems"><a id="all-types" href="all.html"><p>See all map_gui's items</p></a><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#traits">Traits</a></li></ul></div><div id="sidebar-vars" data-name="map_gui" 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="#">map_gui</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">&#x2212;</span>]</a></span><a class="srclink" href="../src/map_gui/lib.rs.html#1-186" 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>This crate contains common code for applications that draw and interact with a <code>Map</code>.</p>
</div></details><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2>
<table><tr class="module-item"><td><a class="mod" href="colors/index.html" title="map_gui::colors mod">colors</a></td><td class="docblock-short"><p>A color scheme groups colors used for different map, dynamic, and UI elements in one place, to
encourage deduplication. The player can also switch between different color schemes.</p>

View File

@ -1,3 +1,3 @@
<!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 `find_divided_highways` fn in crate `parking_mapper`."><meta name="keywords" content="rust, rustlang, rust-lang, find_divided_highways"><title>find_divided_highways in parking_mapper::mapper - 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 fn"><!--[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">&#9776;</div><a href='../../parking_mapper/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">parking_mapper</a>::<wbr><a href="index.html">mapper</a></h2><div id="sidebar-vars" data-name="find_divided_highways" data-ty="fn" 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">Function <a href="../index.html">parking_mapper</a>::<wbr><a href="index.html">mapper</a>::<wbr><a class="fn" href="#">find_divided_highways</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/parking_mapper/mapper.rs.html#592-632" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn find_divided_highways(app: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.54.0/std/collections/hash/set/struct.HashSet.html" title="struct std::collections::hash::set::HashSet">HashSet</a>&lt;<a class="struct" href="../../map_model/objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>&gt;</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="parking_mapper" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>
<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 fn"><!--[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">&#9776;</div><a href='../../parking_mapper/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">parking_mapper</a>::<wbr><a href="index.html">mapper</a></h2><div id="sidebar-vars" data-name="find_divided_highways" data-ty="fn" 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">Function <a href="../index.html">parking_mapper</a>::<wbr><a href="index.html">mapper</a>::<wbr><a class="fn" href="#">find_divided_highways</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/parking_mapper/mapper.rs.html#592-632" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn find_divided_highways(app: &amp;SimpleApp&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.54.0/std/collections/hash/set/struct.HashSet.html" title="struct std::collections::hash::set::HashSet">HashSet</a>&lt;<a class="struct" href="../../map_model/objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>&gt;</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="parking_mapper" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>

View File

@ -1,3 +1,3 @@
<!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 `find_overlapping_stuff` fn in crate `parking_mapper`."><meta name="keywords" content="rust, rustlang, rust-lang, find_overlapping_stuff"><title>find_overlapping_stuff in parking_mapper::mapper - 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 fn"><!--[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">&#9776;</div><a href='../../parking_mapper/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">parking_mapper</a>::<wbr><a href="index.html">mapper</a></h2><div id="sidebar-vars" data-name="find_overlapping_stuff" data-ty="fn" 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">Function <a href="../index.html">parking_mapper</a>::<wbr><a href="index.html">mapper</a>::<wbr><a class="fn" href="#">find_overlapping_stuff</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/parking_mapper/mapper.rs.html#635-676" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn find_overlapping_stuff(<br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;timer: &amp;mut <a class="struct" href="../../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a>&lt;'_&gt;<br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>&gt;</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="parking_mapper" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>
<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 fn"><!--[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">&#9776;</div><a href='../../parking_mapper/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">parking_mapper</a>::<wbr><a href="index.html">mapper</a></h2><div id="sidebar-vars" data-name="find_overlapping_stuff" data-ty="fn" 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">Function <a href="../index.html">parking_mapper</a>::<wbr><a href="index.html">mapper</a>::<wbr><a class="fn" href="#">find_overlapping_stuff</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/parking_mapper/mapper.rs.html#635-676" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn find_overlapping_stuff(<br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;SimpleApp&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;timer: &amp;mut <a class="struct" href="../../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a>&lt;'_&gt;<br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>&gt;</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="parking_mapper" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,3 @@
<!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 `App` type in crate `parking_mapper`."><meta name="keywords" content="rust, rustlang, rust-lang, App"><title>App in parking_mapper::mapper - 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 type"><!--[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">&#9776;</div><a href='../../parking_mapper/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Type Definition App</h2><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">parking_mapper</a>::<wbr><a href="index.html">mapper</a></h2><div id="sidebar-vars" data-name="App" data-ty="type" 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">Type Definition <a href="../index.html">parking_mapper</a>::<wbr><a href="index.html">mapper</a>::<wbr><a class="type" href="#">App</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/parking_mapper/mapper.rs.html#16" title="goto source code">[src]</a></span></h1><pre class="rust typedef">type App = <a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt;;</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="parking_mapper" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>
<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 type"><!--[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">&#9776;</div><a href='../../parking_mapper/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Type Definition App</h2><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">parking_mapper</a>::<wbr><a href="index.html">mapper</a></h2><div id="sidebar-vars" data-name="App" data-ty="type" 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">Type Definition <a href="../index.html">parking_mapper</a>::<wbr><a href="index.html">mapper</a>::<wbr><a class="type" href="#">App</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/parking_mapper/mapper.rs.html#16" title="goto source code">[src]</a></span></h1><pre class="rust typedef">type App = SimpleApp&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt;;</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="parking_mapper" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>

File diff suppressed because one or more lines are too long

View File

@ -35,6 +35,6 @@ sourcesIndex["tests"] = {"name":"","files":["main.rs"]};
sourcesIndex["traffic_seitan"] = {"name":"","files":["main.rs"]};
sourcesIndex["traffic_signal_data"] = {"name":"","files":["lib.rs"]};
sourcesIndex["updater"] = {"name":"","files":["main.rs"]};
sourcesIndex["widgetry"] = {"name":"","dirs":[{"name":"geom","files":["geom_batch_stack.rs","mod.rs"]},{"name":"style","files":["button_style.rs","mod.rs"]},{"name":"tools","files":["mod.rs","screenshot.rs","warper.rs"]},{"name":"widgets","files":["autocomplete.rs","button.rs","compare_times.rs","containers.rs","dropdown.rs","fan_chart.rs","filler.rs","image.rs","just_draw.rs","line_plot.rs","menu.rs","mod.rs","panel.rs","persistent_split.rs","plots.rs","scatter_plot.rs","slider.rs","spinner.rs","stash.rs","table.rs","tabs.rs","text_box.rs","toggle.rs"]}],"files":["app_state.rs","assets.rs","backend_glow.rs","backend_glow_native.rs","canvas.rs","color.rs","drawing.rs","event.rs","event_ctx.rs","input.rs","lib.rs","runner.rs","screen_geom.rs","svg.rs","text.rs"]};
sourcesIndex["widgetry"] = {"name":"","dirs":[{"name":"geom","files":["geom_batch_stack.rs","mod.rs"]},{"name":"style","files":["button_style.rs","mod.rs"]},{"name":"tools","files":["mod.rs","screenshot.rs","warper.rs"]},{"name":"widgets","files":["autocomplete.rs","button.rs","compare_times.rs","containers.rs","drag_drop.rs","dropdown.rs","fan_chart.rs","filler.rs","image.rs","just_draw.rs","line_plot.rs","menu.rs","mod.rs","panel.rs","persistent_split.rs","plots.rs","scatter_plot.rs","slider.rs","spinner.rs","stash.rs","table.rs","tabs.rs","text_box.rs","toggle.rs"]}],"files":["app_state.rs","assets.rs","backend_glow.rs","backend_glow_native.rs","canvas.rs","color.rs","drawing.rs","event.rs","event_ctx.rs","input.rs","lib.rs","runner.rs","screen_geom.rs","svg.rs","text.rs"]};
sourcesIndex["widgetry_demo"] = {"name":"","files":["lib.rs"]};
createSourceSidebar();

View File

@ -814,8 +814,51 @@
<span id="812">812</span>
<span id="813">813</span>
<span id="814">814</span>
<span id="815">815</span>
<span id="816">816</span>
<span id="817">817</span>
<span id="818">818</span>
<span id="819">819</span>
<span id="820">820</span>
<span id="821">821</span>
<span id="822">822</span>
<span id="823">823</span>
<span id="824">824</span>
<span id="825">825</span>
<span id="826">826</span>
<span id="827">827</span>
<span id="828">828</span>
<span id="829">829</span>
<span id="830">830</span>
<span id="831">831</span>
<span id="832">832</span>
<span id="833">833</span>
<span id="834">834</span>
<span id="835">835</span>
<span id="836">836</span>
<span id="837">837</span>
<span id="838">838</span>
<span id="839">839</span>
<span id="840">840</span>
<span id="841">841</span>
<span id="842">842</span>
<span id="843">843</span>
<span id="844">844</span>
<span id="845">845</span>
<span id="846">846</span>
<span id="847">847</span>
<span id="848">848</span>
<span id="849">849</span>
<span id="850">850</span>
<span id="851">851</span>
<span id="852">852</span>
<span id="853">853</span>
<span id="854">854</span>
<span id="855">855</span>
<span id="856">856</span>
</pre><pre class="rust">
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">CornerRadii</span>, <span class="ident">Distance</span>, <span class="ident">UnitFmt</span>};
<span class="kw">use</span> <span class="ident">abstutil::Tags</span>;
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Bounds</span>, <span class="ident">CornerRadii</span>, <span class="ident">Distance</span>, <span class="ident">UnitFmt</span>};
<span class="kw">use</span> <span class="ident">map_gui::render</span>::{<span class="ident">Renderable</span>, <span class="ident">OUTLINE_THICKNESS</span>};
<span class="kw">use</span> <span class="ident">map_gui::tools::PopupMsg</span>;
<span class="kw">use</span> <span class="ident">map_gui::ID</span>;
@ -823,9 +866,9 @@
<span class="ident">BufferType</span>, <span class="ident">Direction</span>, <span class="ident">EditCmd</span>, <span class="ident">EditRoad</span>, <span class="ident">LaneID</span>, <span class="ident">LaneSpec</span>, <span class="ident">LaneType</span>, <span class="ident">MapEdits</span>, <span class="ident">Road</span>, <span class="ident">RoadID</span>,
};
<span class="kw">use</span> <span class="ident">widgetry</span>::{
<span class="ident">lctrl</span>, <span class="ident">Choice</span>, <span class="ident">Color</span>, <span class="ident">ControlState</span>, <span class="ident">Drawable</span>, <span class="ident">EventCtx</span>, <span class="ident">GeomBatch</span>, <span class="ident">GeomBatchStack</span>, <span class="ident">GfxCtx</span>,
<span class="ident">HorizontalAlignment</span>, <span class="ident">Image</span>, <span class="ident">Key</span>, <span class="ident">Line</span>, <span class="ident">Outcome</span>, <span class="ident">Panel</span>, <span class="ident">Spinner</span>, <span class="ident">State</span>, <span class="ident">Text</span>, <span class="ident">TextExt</span>,
<span class="ident">VerticalAlignment</span>, <span class="ident">Widget</span>, <span class="ident">DEFAULT_CORNER_RADIUS</span>,
<span class="ident">lctrl</span>, <span class="ident">Choice</span>, <span class="ident">Color</span>, <span class="ident">ControlState</span>, <span class="ident">DragDrop</span>, <span class="ident">Drawable</span>, <span class="ident">EdgeInsets</span>, <span class="ident">EventCtx</span>, <span class="ident">GeomBatch</span>,
<span class="ident">GeomBatchStack</span>, <span class="ident">GfxCtx</span>, <span class="ident">HorizontalAlignment</span>, <span class="ident">Image</span>, <span class="ident">Key</span>, <span class="ident">Line</span>, <span class="ident">Outcome</span>, <span class="ident">Panel</span>, <span class="ident">Spinner</span>, <span class="ident">State</span>,
<span class="ident">Text</span>, <span class="ident">TextExt</span>, <span class="ident">VerticalAlignment</span>, <span class="ident">Widget</span>, <span class="ident">DEFAULT_CORNER_RADIUS</span>,
};
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::app</span>::{<span class="ident">App</span>, <span class="ident">Transition</span>};
@ -836,11 +879,13 @@
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">RoadEditor</span> {
<span class="ident">r</span>: <span class="ident">RoadID</span>,
<span class="ident">current_lane</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">LaneID</span><span class="op">&gt;</span>,
<span class="ident">selected_lane</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">LaneID</span><span class="op">&gt;</span>,
<span class="ident">hovering_on_lane</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">LaneID</span><span class="op">&gt;</span>,
<span class="ident">top_panel</span>: <span class="ident">Panel</span>,
<span class="ident">main_panel</span>: <span class="ident">Panel</span>,
<span class="ident">highlight_selection</span>: (<span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">LaneID</span><span class="op">&gt;</span>, <span class="ident">Drawable</span>),
<span class="ident">hovering_on_lane</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">LaneID</span><span class="op">&gt;</span>,
<span class="comment">// (cache_key: (selected, hovering), Drawable)</span>
<span class="ident">lane_highlights</span>: ((<span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">LaneID</span><span class="op">&gt;</span>, <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">LaneID</span><span class="op">&gt;</span>), <span class="ident">Drawable</span>),
<span class="comment">// Immediately after modifying the map but before the mouse moves, we should recalculate</span>
<span class="comment">// mouseover</span>
@ -870,16 +915,16 @@
<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>,
<span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">App</span>,
<span class="ident">r</span>: <span class="ident">RoadID</span>,
<span class="ident">current_lane</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">LaneID</span><span class="op">&gt;</span>,
<span class="ident">selected_lane</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">LaneID</span><span class="op">&gt;</span>,
) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Box</span><span class="op">&lt;</span><span class="kw">dyn</span> <span class="ident">State</span><span class="op">&lt;</span><span class="ident">App</span><span class="op">&gt;</span><span class="op">&gt;</span> {
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">current_selection</span> <span class="op">=</span> <span class="prelude-val">None</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">editor</span> <span class="op">=</span> <span class="ident">RoadEditor</span> {
<span class="ident">r</span>,
<span class="ident">current_lane</span>,
<span class="ident">selected_lane</span>,
<span class="ident">top_panel</span>: <span class="ident">Panel::empty</span>(<span class="ident">ctx</span>),
<span class="ident">main_panel</span>: <span class="ident">Panel::empty</span>(<span class="ident">ctx</span>),
<span class="ident">highlight_selection</span>: (<span class="prelude-val">None</span>, <span class="ident">Drawable::empty</span>(<span class="ident">ctx</span>)),
<span class="ident">lane_highlights</span>: ((<span class="prelude-val">None</span>, <span class="prelude-val">None</span>), <span class="ident">Drawable::empty</span>(<span class="ident">ctx</span>)),
<span class="ident">hovering_on_lane</span>: <span class="prelude-val">None</span>,
<span class="ident">recalculate_mouseover</span>: <span class="bool-val">false</span>,
@ -892,6 +937,10 @@
<span class="ident">Box::new</span>(<span class="ident">editor</span>)
}
<span class="kw">fn</span> <span class="ident">lane_for_idx</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>, <span class="ident">idx</span>: <span class="ident">usize</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">LaneID</span> {
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">get_r</span>(<span class="self">self</span>.<span class="ident">r</span>).<span class="ident">lanes_ltr</span>()[<span class="ident">idx</span>].<span class="number">0</span>
}
<span class="kw">fn</span> <span class="ident">modify_current_lane</span><span class="op">&lt;</span><span class="ident">F</span>: <span class="ident">Fn</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EditRoad</span>, <span class="ident">usize</span>)<span class="op">&gt;</span>(
<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>,
<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>,
@ -903,7 +952,7 @@
.<span class="ident">primary</span>
.<span class="ident">map</span>
.<span class="ident">get_r</span>(<span class="self">self</span>.<span class="ident">r</span>)
.<span class="ident">offset</span>(<span class="self">self</span>.<span class="ident">current_lane</span>.<span class="ident">unwrap</span>());
.<span class="ident">offset</span>(<span class="self">self</span>.<span class="ident">selected_lane</span>.<span class="ident">unwrap</span>());
<span class="kw">let</span> <span class="ident">cmd</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">edit_road_cmd</span>(<span class="self">self</span>.<span class="ident">r</span>, <span class="op">|</span><span class="ident">new</span><span class="op">|</span> (<span class="ident">f</span>)(<span class="ident">new</span>, <span class="ident">idx</span>));
<span class="comment">// Special check here -- this invalid state can be reached in many ways.</span>
@ -931,11 +980,8 @@
<span class="ident">apply_map_edits</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">edits</span>);
<span class="self">self</span>.<span class="ident">redo_stack</span>.<span class="ident">clear</span>();
<span class="self">self</span>.<span class="ident">current_lane</span> <span class="op">=</span> <span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">offset</span>) <span class="op">=</span> <span class="ident">select_new_lane_offset</span> {
<span class="prelude-val">Some</span>(<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">get_r</span>(<span class="self">self</span>.<span class="ident">r</span>).<span class="ident">lanes_ltr</span>()[((<span class="ident">idx</span> <span class="kw">as</span> <span class="ident">isize</span>) <span class="op">+</span> <span class="ident">offset</span>) <span class="kw">as</span> <span class="ident">usize</span>].<span class="number">0</span>)
} <span class="kw">else</span> {
<span class="prelude-val">None</span>
};
<span class="self">self</span>.<span class="ident">selected_lane</span> <span class="op">=</span> <span class="ident">select_new_lane_offset</span>
.<span class="ident">map</span>(<span class="op">|</span><span class="ident">offset</span><span class="op">|</span> <span class="self">self</span>.<span class="ident">lane_for_idx</span>(<span class="ident">app</span>, (<span class="ident">idx</span> <span class="kw">as</span> <span class="ident">isize</span> <span class="op">+</span> <span class="ident">offset</span>) <span class="kw">as</span> <span class="ident">usize</span>));
<span class="self">self</span>.<span class="ident">recalc_all_panels</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
<span class="self">self</span>.<span class="ident">recalculate_mouseover</span> <span class="op">=</span> <span class="bool-val">true</span>;
@ -944,9 +990,21 @@
}
<span class="kw">fn</span> <span class="ident">recalc_all_panels</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>) {
<span class="self">self</span>.<span class="ident">main_panel</span> <span class="op">=</span>
<span class="ident">make_main_panel</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">get_r</span>(<span class="self">self</span>.<span class="ident">r</span>), <span class="self">self</span>.<span class="ident">current_lane</span>);
<span class="self">self</span>.<span class="ident">highlight_selection</span> <span class="op">=</span> <span class="ident">highlight_current_selection</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="self">self</span>.<span class="ident">r</span>, <span class="self">self</span>.<span class="ident">current_lane</span>);
<span class="self">self</span>.<span class="ident">main_panel</span> <span class="op">=</span> <span class="ident">make_main_panel</span>(
<span class="ident">ctx</span>,
<span class="ident">app</span>,
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">get_r</span>(<span class="self">self</span>.<span class="ident">r</span>),
<span class="self">self</span>.<span class="ident">selected_lane</span>,
<span class="self">self</span>.<span class="ident">hovering_on_lane</span>,
);
<span class="kw">let</span> <span class="ident">drag_drop</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">main_panel</span>.<span class="ident">find</span>::<span class="op">&lt;</span><span class="ident">DragDrop</span><span class="op">&lt;</span><span class="ident">LaneID</span><span class="op">&gt;</span><span class="op">&gt;</span>(<span class="string">&quot;lane cards&quot;</span>);
<span class="kw">let</span> <span class="ident">selected</span> <span class="op">=</span> <span class="ident">drag_drop</span>.<span class="ident">selected_value</span>().<span class="ident">or</span>(<span class="self">self</span>.<span class="ident">selected_lane</span>);
<span class="kw">let</span> <span class="ident">hovering</span> <span class="op">=</span> <span class="ident">drag_drop</span>.<span class="ident">hovering_value</span>().<span class="ident">or</span>(<span class="self">self</span>.<span class="ident">hovering_on_lane</span>);
<span class="kw">if</span> (<span class="ident">selected</span>, <span class="ident">hovering</span>) <span class="op">!</span><span class="op">=</span> <span class="self">self</span>.<span class="ident">lane_highlights</span>.<span class="number">0</span> {
<span class="self">self</span>.<span class="ident">lane_highlights</span> <span class="op">=</span> <span class="ident">build_lane_highlights</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="self">self</span>.<span class="ident">r</span>, <span class="ident">selected</span>, <span class="ident">hovering</span>);
}
<span class="self">self</span>.<span class="ident">top_panel</span> <span class="op">=</span> <span class="ident">make_top_panel</span>(
<span class="ident">ctx</span>,
<span class="ident">app</span>,
@ -982,6 +1040,8 @@
<span class="kw">fn</span> <span class="ident">event</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">App</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Transition</span> {
<span class="ident">ctx</span>.<span class="ident">canvas_movement</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">panels_need_recalc</span> <span class="op">=</span> <span class="bool-val">false</span>;
<span class="kw">if</span> <span class="kw">let</span> <span class="ident">Outcome::Clicked</span>(<span class="ident">x</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">top_panel</span>.<span class="ident">event</span>(<span class="ident">ctx</span>) {
<span class="kw">match</span> <span class="ident">x</span>.<span class="ident">as_ref</span>() {
<span class="string">&quot;Finish&quot;</span> <span class="op">=</span><span class="op">&gt;</span> {
@ -1008,27 +1068,27 @@
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">get_config</span>(),
),
});
<span class="self">self</span>.<span class="ident">current_lane</span> <span class="op">=</span> <span class="prelude-val">None</span>;
<span class="self">self</span>.<span class="ident">selected_lane</span> <span class="op">=</span> <span class="prelude-val">None</span>;
<span class="self">self</span>.<span class="ident">hovering_on_lane</span> <span class="op">=</span> <span class="prelude-val">None</span>;
<span class="ident">apply_map_edits</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">edits</span>);
<span class="self">self</span>.<span class="ident">redo_stack</span>.<span class="ident">clear</span>();
<span class="self">self</span>.<span class="ident">recalc_all_panels</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
<span class="ident">panels_need_recalc</span> <span class="op">=</span> <span class="bool-val">true</span>;
}
<span class="string">&quot;undo&quot;</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">edits</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">get_edits</span>().<span class="ident">clone</span>();
<span class="self">self</span>.<span class="ident">redo_stack</span>.<span class="ident">push</span>(<span class="ident">edits</span>.<span class="ident">commands</span>.<span class="ident">pop</span>().<span class="ident">unwrap</span>());
<span class="ident">apply_map_edits</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">edits</span>);
<span class="self">self</span>.<span class="ident">current_lane</span> <span class="op">=</span> <span class="prelude-val">None</span>;
<span class="self">self</span>.<span class="ident">recalc_all_panels</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
<span class="self">self</span>.<span class="ident">selected_lane</span> <span class="op">=</span> <span class="prelude-val">None</span>;
<span class="ident">panels_need_recalc</span> <span class="op">=</span> <span class="bool-val">true</span>;
}
<span class="string">&quot;redo&quot;</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">edits</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">get_edits</span>().<span class="ident">clone</span>();
<span class="ident">edits</span>.<span class="ident">commands</span>.<span class="ident">push</span>(<span class="self">self</span>.<span class="ident">redo_stack</span>.<span class="ident">pop</span>().<span class="ident">unwrap</span>());
<span class="ident">apply_map_edits</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">edits</span>);
<span class="self">self</span>.<span class="ident">current_lane</span> <span class="op">=</span> <span class="prelude-val">None</span>;
<span class="self">self</span>.<span class="ident">recalc_all_panels</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
<span class="self">self</span>.<span class="ident">selected_lane</span> <span class="op">=</span> <span class="prelude-val">None</span>;
<span class="ident">panels_need_recalc</span> <span class="op">=</span> <span class="bool-val">true</span>;
}
<span class="string">&quot;jump to road&quot;</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">return</span> <span class="ident">Transition::Push</span>(<span class="ident">Warping::new_state</span>(
@ -1059,8 +1119,8 @@
<span class="kw">match</span> <span class="self">self</span>.<span class="ident">main_panel</span>.<span class="ident">event</span>(<span class="ident">ctx</span>) {
<span class="ident">Outcome::Clicked</span>(<span class="ident">x</span>) <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">idx</span>) <span class="op">=</span> <span class="ident">x</span>.<span class="ident">strip_prefix</span>(<span class="string">&quot;modify Lane #&quot;</span>) {
<span class="self">self</span>.<span class="ident">current_lane</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">LaneID</span>(<span class="ident">idx</span>.<span class="ident">parse</span>().<span class="ident">unwrap</span>()));
<span class="self">self</span>.<span class="ident">recalc_all_panels</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
<span class="self">self</span>.<span class="ident">selected_lane</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">LaneID</span>(<span class="ident">idx</span>.<span class="ident">parse</span>().<span class="ident">unwrap</span>()));
<span class="ident">panels_need_recalc</span> <span class="op">=</span> <span class="bool-val">true</span>;
} <span class="kw">else</span> <span class="kw">if</span> <span class="ident">x</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;delete lane&quot;</span> {
<span class="kw">return</span> <span class="self">self</span>.<span class="ident">modify_current_lane</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="prelude-val">None</span>, <span class="op">|</span><span class="ident">new</span>, <span class="ident">idx</span><span class="op">|</span> {
<span class="ident">new</span>.<span class="ident">lanes_ltr</span>.<span class="ident">remove</span>(<span class="ident">idx</span>);
@ -1069,14 +1129,6 @@
<span class="kw">return</span> <span class="self">self</span>.<span class="ident">modify_current_lane</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="prelude-val">Some</span>(<span class="number">0</span>), <span class="op">|</span><span class="ident">new</span>, <span class="ident">idx</span><span class="op">|</span> {
<span class="ident">new</span>.<span class="ident">lanes_ltr</span>[<span class="ident">idx</span>].<span class="ident">dir</span> <span class="op">=</span> <span class="ident">new</span>.<span class="ident">lanes_ltr</span>[<span class="ident">idx</span>].<span class="ident">dir</span>.<span class="ident">opposite</span>();
});
} <span class="kw">else</span> <span class="kw">if</span> <span class="ident">x</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;move lane left&quot;</span> {
<span class="kw">return</span> <span class="self">self</span>.<span class="ident">modify_current_lane</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="prelude-val">Some</span>(<span class="op">-</span><span class="number">1</span>), <span class="op">|</span><span class="ident">new</span>, <span class="ident">idx</span><span class="op">|</span> {
<span class="ident">new</span>.<span class="ident">lanes_ltr</span>.<span class="ident">swap</span>(<span class="ident">idx</span>, <span class="ident">idx</span> <span class="op">-</span> <span class="number">1</span>);
});
} <span class="kw">else</span> <span class="kw">if</span> <span class="ident">x</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;move lane right&quot;</span> {
<span class="kw">return</span> <span class="self">self</span>.<span class="ident">modify_current_lane</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="prelude-val">Some</span>(<span class="number">1</span>), <span class="op">|</span><span class="ident">new</span>, <span class="ident">idx</span><span class="op">|</span> {
<span class="ident">new</span>.<span class="ident">lanes_ltr</span>.<span class="ident">swap</span>(<span class="ident">idx</span>, <span class="ident">idx</span> <span class="op">+</span> <span class="number">1</span>);
});
} <span class="kw">else</span> <span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">lt</span>) <span class="op">=</span> <span class="ident">x</span>.<span class="ident">strip_prefix</span>(<span class="string">&quot;change to &quot;</span>) {
<span class="kw">let</span> <span class="ident">lt</span> <span class="op">=</span> <span class="ident">LaneType::from_short_name</span>(<span class="ident">lt</span>).<span class="ident">unwrap</span>();
<span class="kw">let</span> <span class="ident">width</span> <span class="op">=</span>
@ -1115,9 +1167,9 @@
<span class="ident">apply_map_edits</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">edits</span>);
<span class="self">self</span>.<span class="ident">redo_stack</span>.<span class="ident">clear</span>();
<span class="macro">assert!</span>(<span class="self">self</span>.<span class="ident">current_lane</span>.<span class="ident">is_none</span>());
<span class="self">self</span>.<span class="ident">current_lane</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">get_r</span>(<span class="self">self</span>.<span class="ident">r</span>).<span class="ident">lanes_ltr</span>()[<span class="ident">idx</span>].<span class="number">0</span>);
<span class="self">self</span>.<span class="ident">recalc_all_panels</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
<span class="macro">assert!</span>(<span class="self">self</span>.<span class="ident">selected_lane</span>.<span class="ident">is_none</span>());
<span class="self">self</span>.<span class="ident">selected_lane</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="self">self</span>.<span class="ident">lane_for_idx</span>(<span class="ident">app</span>, <span class="ident">idx</span>));
<span class="ident">panels_need_recalc</span> <span class="op">=</span> <span class="bool-val">true</span>;
} <span class="kw">else</span> <span class="kw">if</span> <span class="ident">x</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;Access restrictions&quot;</span> {
<span class="comment">// The RoadEditor maintains an undo/redo stack for a single road, but the</span>
<span class="comment">// ZoneEditor usually operates on multiple roads. So before we switch over to</span>
@ -1149,30 +1201,52 @@
<span class="ident">new</span>.<span class="ident">lanes_ltr</span>[<span class="ident">idx</span>].<span class="ident">width</span> <span class="op">=</span> <span class="ident">width</span>;
});
}
<span class="string">&quot;lane cards&quot;</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="comment">// hovering index changed</span>
<span class="ident">panels_need_recalc</span> <span class="op">=</span> <span class="bool-val">true</span>;
}
<span class="kw">_</span> <span class="op">=</span><span class="op">&gt;</span> <span class="macro">unreachable!</span>(),
},
<span class="kw">_</span> <span class="op">=</span><span class="op">&gt;</span> {}
<span class="ident">Outcome::DragDropReleased</span>(<span class="kw">_</span>, <span class="ident">old_idx</span>, <span class="ident">new_idx</span>) <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">if</span> <span class="ident">old_idx</span> <span class="op">!</span><span class="op">=</span> <span class="ident">new_idx</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">edits</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">get_edits</span>().<span class="ident">clone</span>();
<span class="ident">edits</span>
.<span class="ident">commands</span>
.<span class="ident">push</span>(<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">edit_road_cmd</span>(<span class="self">self</span>.<span class="ident">r</span>, <span class="op">|</span><span class="ident">new</span><span class="op">|</span> {
<span class="ident">new</span>.<span class="ident">lanes_ltr</span>.<span class="ident">swap</span>(<span class="ident">old_idx</span>, <span class="ident">new_idx</span>);
}));
<span class="ident">apply_map_edits</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">edits</span>);
<span class="self">self</span>.<span class="ident">redo_stack</span>.<span class="ident">clear</span>();
}
<span class="self">self</span>.<span class="ident">selected_lane</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="self">self</span>.<span class="ident">lane_for_idx</span>(<span class="ident">app</span>, <span class="ident">new_idx</span>));
<span class="self">self</span>.<span class="ident">hovering_on_lane</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">selected_lane</span>;
<span class="ident">panels_need_recalc</span> <span class="op">=</span> <span class="bool-val">true</span>;
}
<span class="ident">Outcome::Nothing</span> <span class="op">=</span><span class="op">&gt;</span> {}
<span class="kw">_</span> <span class="op">=</span><span class="op">&gt;</span> <span class="macro">debug!</span>(<span class="string">&quot;main_panel had unhandled outcome&quot;</span>),
}
<span class="kw">let</span> <span class="ident">prev_hovering_on_lane</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">hovering_on_lane</span>.<span class="ident">take</span>();
<span class="comment">// let prev_hovering_on_lane = self.hovering_on_lane.take();</span>
<span class="kw">if</span> <span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">get_cursor_in_map_space</span>().<span class="ident">is_some</span>() {
<span class="kw">if</span> <span class="ident">ctx</span>.<span class="ident">redo_mouseover</span>() <span class="op">|</span><span class="op">|</span> <span class="self">self</span>.<span class="ident">recalculate_mouseover</span> {
<span class="self">self</span>.<span class="ident">recalculate_mouseover</span> <span class="op">=</span> <span class="bool-val">false</span>;
<span class="ident">app</span>.<span class="ident">recalculate_current_selection</span>(<span class="ident">ctx</span>);
<span class="kw">if</span> <span class="kw">match</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">current_selection</span> {
<span class="prelude-val">Some</span>(<span class="ident">ID::Lane</span>(<span class="ident">l</span>)) <span class="op">=</span><span class="op">&gt;</span> <span class="op">!</span><span class="ident">can_edit_lane</span>(<span class="ident">app</span>, <span class="ident">l</span>),
<span class="kw">_</span> <span class="op">=</span><span class="op">&gt;</span> <span class="bool-val">true</span>,
} {
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">current_selection</span> <span class="op">=</span> <span class="prelude-val">None</span>;
}
}
<span class="self">self</span>.<span class="ident">recalculate_mouseover</span> <span class="op">=</span> <span class="bool-val">false</span>;
<span class="ident">app</span>.<span class="ident">recalculate_current_selection</span>(<span class="ident">ctx</span>);
<span class="kw">let</span> <span class="ident">hovering</span> <span class="op">=</span> <span class="kw">match</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">current_selection</span>.<span class="ident">take</span>() {
<span class="prelude-val">Some</span>(<span class="ident">ID::Lane</span>(<span class="ident">l</span>)) <span class="kw">if</span> <span class="ident">can_edit_lane</span>(<span class="ident">app</span>, <span class="ident">l</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="prelude-val">Some</span>(<span class="ident">l</span>),
<span class="kw">_</span> <span class="op">=</span><span class="op">&gt;</span> <span class="prelude-val">None</span>,
};
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">l</span>) <span class="op">=</span> <span class="ident">hovering</span> {
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">hovering_on_lane</span> <span class="op">!</span><span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">l</span>) {
<span class="self">self</span>.<span class="ident">hovering_on_lane</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">l</span>);
<span class="ident">panels_need_recalc</span> <span class="op">=</span> <span class="bool-val">true</span>;
}
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">ID::Lane</span>(<span class="ident">l</span>)) <span class="op">=</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">current_selection</span> {
<span class="self">self</span>.<span class="ident">hovering_on_lane</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">l</span>);
<span class="kw">if</span> <span class="ident">ctx</span>.<span class="ident">normal_left_click</span>() {
<span class="kw">if</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">get_l</span>(<span class="ident">l</span>).<span class="ident">parent</span> <span class="op">=</span><span class="op">=</span> <span class="self">self</span>.<span class="ident">r</span> {
<span class="self">self</span>.<span class="ident">current_lane</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">l</span>);
<span class="self">self</span>.<span class="ident">recalc_all_panels</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
<span class="self">self</span>.<span class="ident">selected_lane</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">l</span>);
<span class="ident">panels_need_recalc</span> <span class="op">=</span> <span class="bool-val">true</span>;
} <span class="kw">else</span> {
<span class="comment">// Switch to editing another road, first compressing the edits here if</span>
<span class="comment">// needed.</span>
@ -1182,30 +1256,28 @@
<span class="kw">return</span> <span class="ident">Transition::Replace</span>(<span class="ident">RoadEditor::new_state</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">l</span>));
}
}
} <span class="kw">else</span> <span class="kw">if</span> <span class="self">self</span>.<span class="ident">current_lane</span>.<span class="ident">is_some</span>() <span class="op">&amp;&amp;</span> <span class="ident">ctx</span>.<span class="ident">normal_left_click</span>() {
<span class="comment">// Deselect the current lane</span>
<span class="self">self</span>.<span class="ident">current_lane</span> <span class="op">=</span> <span class="prelude-val">None</span>;
<span class="self">self</span>.<span class="ident">recalc_all_panels</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
}
} <span class="kw">else</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">highlight</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">current_lane</span>;
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">name</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">main_panel</span>.<span class="ident">currently_hovering</span>() {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">idx</span>) <span class="op">=</span> <span class="ident">name</span>.<span class="ident">strip_prefix</span>(<span class="string">&quot;modify Lane #&quot;</span>) {
<span class="ident">highlight</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">LaneID</span>(<span class="ident">idx</span>.<span class="ident">parse</span>().<span class="ident">unwrap</span>()));
} <span class="kw">else</span> {
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">hovering_on_lane</span>.<span class="ident">is_some</span>() {
<span class="self">self</span>.<span class="ident">hovering_on_lane</span> <span class="op">=</span> <span class="prelude-val">None</span>;
<span class="ident">panels_need_recalc</span> <span class="op">=</span> <span class="bool-val">true</span>;
}
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">selected_lane</span>.<span class="ident">is_some</span>() <span class="op">&amp;&amp;</span> <span class="ident">ctx</span>.<span class="ident">normal_left_click</span>() {
<span class="comment">// Deselect the current lane</span>
<span class="self">self</span>.<span class="ident">selected_lane</span> <span class="op">=</span> <span class="prelude-val">None</span>;
<span class="self">self</span>.<span class="ident">hovering_on_lane</span> <span class="op">=</span> <span class="prelude-val">None</span>;
<span class="ident">panels_need_recalc</span> <span class="op">=</span> <span class="bool-val">true</span>;
}
}
<span class="kw">if</span> <span class="ident">highlight</span> <span class="op">!</span><span class="op">=</span> <span class="self">self</span>.<span class="ident">highlight_selection</span>.<span class="number">0</span> {
<span class="self">self</span>.<span class="ident">highlight_selection</span> <span class="op">=</span> <span class="ident">highlight_current_selection</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="self">self</span>.<span class="ident">r</span>, <span class="ident">highlight</span>);
} <span class="kw">else</span> {
<span class="comment">// If we&#39;re not hovering on the map, then we&#39;re not hovering on a lane.</span>
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">hovering_on_lane</span>.<span class="ident">is_some</span>() {
<span class="self">self</span>.<span class="ident">hovering_on_lane</span> <span class="op">=</span> <span class="prelude-val">None</span>;
<span class="ident">panels_need_recalc</span> <span class="op">=</span> <span class="bool-val">true</span>;
}
}
<span class="comment">// Update the main panel to show which lane icon we&#39;re hovering on, if it&#39;s</span>
<span class="comment">// changed.</span>
<span class="comment">// TODO Moving the mouse across all lanes quickly isn&#39;t responsive; rebuilding the full</span>
<span class="comment">// panel is heavyweight.</span>
<span class="comment">// TODO When we hover on the cards, we only draw one highlighted lane on the map. But not</span>
<span class="comment">// vice versa; should we match that?</span>
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">hovering_on_lane</span> <span class="op">!</span><span class="op">=</span> <span class="ident">prev_hovering_on_lane</span> {
<span class="kw">if</span> <span class="ident">panels_need_recalc</span> {
<span class="self">self</span>.<span class="ident">recalc_all_panels</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
}
@ -1213,7 +1285,7 @@
}
<span class="kw">fn</span> <span class="ident">draw</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">g</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">GfxCtx</span>, <span class="kw">_</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>) {
<span class="ident">g</span>.<span class="ident">redraw</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">highlight_selection</span>.<span class="number">1</span>);
<span class="ident">g</span>.<span class="ident">redraw</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">lane_highlights</span>.<span class="number">1</span>);
<span class="self">self</span>.<span class="ident">top_panel</span>.<span class="ident">draw</span>(<span class="ident">g</span>);
<span class="self">self</span>.<span class="ident">main_panel</span>.<span class="ident">draw</span>(<span class="ident">g</span>);
}
@ -1285,18 +1357,13 @@
<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>,
<span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>,
<span class="ident">road</span>: <span class="kw-2">&amp;</span><span class="ident">Road</span>,
<span class="ident">current_lane</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">LaneID</span><span class="op">&gt;</span>,
<span class="ident">selected_lane</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">LaneID</span><span class="op">&gt;</span>,
<span class="ident">hovering_on_lane</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">LaneID</span><span class="op">&gt;</span>,
) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Panel</span> {
<span class="kw">let</span> <span class="ident">map</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>;
<span class="kw">let</span> <span class="ident">hovering_lane</span> <span class="op">=</span> <span class="kw">match</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">current_selection</span> {
<span class="prelude-val">Some</span>(<span class="ident">ID::Lane</span>(<span class="ident">l</span>)) <span class="op">=</span><span class="op">&gt;</span> <span class="prelude-val">Some</span>(<span class="ident">l</span>),
<span class="kw">_</span> <span class="op">=</span><span class="op">&gt;</span> <span class="prelude-val">None</span>,
};
<span class="kw">let</span> <span class="ident">modify_lane</span> <span class="op">=</span> <span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">l</span>) <span class="op">=</span> <span class="ident">current_lane</span> {
<span class="kw">let</span> <span class="ident">modify_lane</span> <span class="op">=</span> <span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">l</span>) <span class="op">=</span> <span class="ident">selected_lane</span> {
<span class="kw">let</span> <span class="ident">lane</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_l</span>(<span class="ident">l</span>);
<span class="kw">let</span> <span class="ident">idx</span> <span class="op">=</span> <span class="ident">road</span>.<span class="ident">offset</span>(<span class="ident">l</span>);
<span class="ident">Widget::row</span>(<span class="macro">vec!</span>[
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_solid_destructive</span>
@ -1330,21 +1397,11 @@
)
.<span class="ident">centered_horiz</span>(),
]),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_prev</span>()
.<span class="ident">disabled</span>(<span class="ident">idx</span> <span class="op">=</span><span class="op">=</span> <span class="number">0</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key::LeftArrow</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;move lane left&quot;</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_next</span>()
.<span class="ident">disabled</span>(<span class="ident">idx</span> <span class="op">=</span><span class="op">=</span> <span class="ident">road</span>.<span class="ident">lanes_ltr</span>().<span class="ident">len</span>() <span class="op">-</span> <span class="number">1</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key::RightArrow</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;move lane right&quot;</span>),
])
} <span class="kw">else</span> {
<span class="ident">Widget::nothing</span>()
};
<span class="kw">let</span> <span class="ident">current_lt</span> <span class="op">=</span> <span class="ident">current_lane</span>.<span class="ident">map</span>(<span class="op">|</span><span class="ident">l</span><span class="op">|</span> <span class="ident">map</span>.<span class="ident">get_l</span>(<span class="ident">l</span>).<span class="ident">lane_type</span>);
<span class="kw">let</span> <span class="ident">current_lt</span> <span class="op">=</span> <span class="ident">selected_lane</span>.<span class="ident">map</span>(<span class="op">|</span><span class="ident">l</span><span class="op">|</span> <span class="ident">map</span>.<span class="ident">get_l</span>(<span class="ident">l</span>).<span class="ident">lane_type</span>);
<span class="kw">let</span> <span class="ident">current_lts</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">LaneType</span><span class="op">&gt;</span> <span class="op">=</span> <span class="ident">road</span>.<span class="ident">lanes_ltr</span>().<span class="ident">into_iter</span>().<span class="ident">map</span>(<span class="op">|</span>(<span class="kw">_</span>, <span class="kw">_</span>, <span class="ident">lt</span>)<span class="op">|</span> <span class="ident">lt</span>).<span class="ident">collect</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">available_lane_types_row</span> <span class="op">=</span> <span class="macro">vec!</span>[
@ -1402,7 +1459,7 @@
<span class="ident">ctx</span>,
<span class="macro">format!</span>(
<span class="string">&quot;{} {}&quot;</span>,
<span class="kw">if</span> <span class="ident">current_lane</span>.<span class="ident">is_some</span>() {
<span class="kw">if</span> <span class="ident">selected_lane</span>.<span class="ident">is_some</span>() {
<span class="string">&quot;change to&quot;</span>
} <span class="kw">else</span> {
<span class="string">&quot;add&quot;</span>
@ -1414,7 +1471,7 @@
.<span class="ident">collect</span>::<span class="op">&lt;</span><span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">Widget</span><span class="op">&gt;</span><span class="op">&gt;</span>();
<span class="ident">available_lane_types_row</span>.<span class="ident">insert</span>(
<span class="number">0</span>,
<span class="kw">if</span> <span class="ident">current_lane</span>.<span class="ident">is_some</span>() {
<span class="kw">if</span> <span class="ident">selected_lane</span>.<span class="ident">is_some</span>() {
<span class="string">&quot;change to&quot;</span>
} <span class="kw">else</span> {
<span class="string">&quot;add new&quot;</span>
@ -1424,21 +1481,21 @@
);
<span class="kw">let</span> <span class="ident">available_lane_types_row</span> <span class="op">=</span> <span class="ident">Widget::row</span>(<span class="ident">available_lane_types_row</span>);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">current_lanes_ltr</span> <span class="op">=</span> <span class="ident">Vec::new</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">drag_drop</span> <span class="op">=</span> <span class="ident">DragDrop::new</span>(<span class="ident">ctx</span>, <span class="string">&quot;lane cards&quot;</span>);
<span class="kw">let</span> <span class="ident">lanes_ltr</span> <span class="op">=</span> <span class="ident">road</span>.<span class="ident">lanes_ltr</span>();
<span class="kw">let</span> <span class="ident">lanes_len</span> <span class="op">=</span> <span class="ident">lanes_ltr</span>.<span class="ident">len</span>();
<span class="kw">for</span> (<span class="ident">idx</span>, (<span class="ident">id</span>, <span class="ident">dir</span>, <span class="ident">lt</span>)) <span class="kw">in</span> <span class="ident">lanes_ltr</span>.<span class="ident">into_iter</span>().<span class="ident">enumerate</span>() {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">stack</span> <span class="op">=</span> <span class="ident">GeomBatchStack::vertical</span>(<span class="macro">vec!</span>[
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">icon_stack</span> <span class="op">=</span> <span class="ident">GeomBatchStack::vertical</span>(<span class="macro">vec!</span>[
<span class="ident">Image::from_path</span>(<span class="ident">lane_type_to_icon</span>(<span class="ident">lt</span>).<span class="ident">unwrap</span>())
.<span class="ident">build_batch</span>(<span class="ident">ctx</span>)
.<span class="ident">unwrap</span>()
.<span class="number">0</span>,
]);
<span class="ident">stack</span>.<span class="ident">set_spacing</span>(<span class="number">20.0</span>);
<span class="ident">icon_stack</span>.<span class="ident">set_spacing</span>(<span class="number">20.0</span>);
<span class="kw">if</span> <span class="ident">can_reverse</span>(<span class="ident">lt</span>) {
<span class="ident">stack</span>.<span class="ident">push</span>(
<span class="ident">icon_stack</span>.<span class="ident">push</span>(
<span class="ident">Image::from_path</span>(<span class="kw">if</span> <span class="ident">dir</span> <span class="op">=</span><span class="op">=</span> <span class="ident">Direction::Fwd</span> {
<span class="string">&quot;system/assets/edit/forwards.svg&quot;</span>
} <span class="kw">else</span> {
@ -1449,8 +1506,8 @@
.<span class="number">0</span>,
);
}
<span class="kw">let</span> <span class="ident">stack_batch</span> <span class="op">=</span> <span class="ident">stack</span>.<span class="ident">batch</span>();
<span class="kw">let</span> <span class="ident">stack_bounds</span> <span class="op">=</span> <span class="ident">stack_batch</span>.<span class="ident">get_bounds</span>();
<span class="kw">let</span> <span class="ident">icon_batch</span> <span class="op">=</span> <span class="ident">icon_stack</span>.<span class="ident">batch</span>();
<span class="kw">let</span> <span class="ident">icon_bounds</span> <span class="op">=</span> <span class="ident">icon_batch</span>.<span class="ident">get_bounds</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rounding</span> <span class="op">=</span> <span class="ident">CornerRadii::zero</span>();
<span class="kw">if</span> <span class="ident">idx</span> <span class="op">=</span><span class="op">=</span> <span class="number">0</span> {
@ -1462,36 +1519,46 @@
<span class="ident">rounding</span>.<span class="ident">bottom_right</span> <span class="op">=</span> <span class="ident">DEFAULT_CORNER_RADIUS</span>;
}
<span class="ident">current_lanes_ltr</span>.<span class="ident">push</span>(
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_plain</span>
.<span class="ident">btn</span>()
.<span class="ident">image_batch</span>(<span class="ident">stack_batch</span>, <span class="ident">stack_bounds</span>)
.<span class="ident">disabled</span>(<span class="prelude-val">Some</span>(<span class="ident">id</span>) <span class="op">=</span><span class="op">=</span> <span class="ident">current_lane</span>)
.<span class="ident">bg_color</span>(
<span class="kw">if</span> <span class="prelude-val">Some</span>(<span class="ident">id</span>) <span class="op">=</span><span class="op">=</span> <span class="ident">hovering_lane</span> {
<span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">selected</span>.<span class="ident">alpha</span>(<span class="number">0.5</span>)
<span class="kw">let</span> (<span class="ident">card_bounds</span>, <span class="ident">default_batch</span>, <span class="ident">hovering_batch</span>, <span class="ident">selected_batch</span>) <span class="op">=</span> {
<span class="kw">let</span> <span class="ident">card_batch</span> <span class="op">=</span> <span class="op">|</span>(<span class="ident">icon_batch</span>, <span class="ident">hovering</span>, <span class="ident">selected</span>)<span class="op">|</span> <span class="op">-</span><span class="op">&gt;</span> (<span class="ident">GeomBatch</span>, <span class="ident">Bounds</span>) {
<span class="ident">Image::from_batch</span>(<span class="ident">icon_batch</span>, <span class="ident">icon_bounds</span>)
<span class="comment">// TODO: For selected/hover, rather than change the entire card&#39;s background, let&#39;s</span>
<span class="comment">// just add an outline to match the styling of the corresponding lane in the map</span>
.<span class="ident">bg_color</span>(<span class="kw">if</span> <span class="ident">selected</span> {
<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">primary_fg</span>
} <span class="kw">else</span> <span class="kw">if</span> <span class="ident">hovering</span> {
<span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">selected</span>.<span class="ident">tint</span>(<span class="number">0.2</span>)
} <span class="kw">else</span> {
<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">section_bg</span>
},
<span class="ident">ControlState::Default</span>,
)
.<span class="ident">bg_color</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">section_bg</span>.<span class="ident">shade</span>(<span class="number">0.1</span>), <span class="ident">ControlState::Hovered</span>)
.<span class="ident">bg_color</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_solid_primary</span>.<span class="ident">bg</span>, <span class="ident">ControlState::Disabled</span>)
.<span class="ident">image_color</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_plain</span>.<span class="ident">fg</span>, <span class="ident">ControlState::Disabled</span>)
.<span class="ident">image_dims</span>(<span class="number">60.0</span>)
.<span class="ident">padding_top</span>(<span class="number">32.0</span>)
.<span class="ident">padding_bottom</span>(<span class="number">32.0</span>)
.<span class="ident">corner_rounding</span>(<span class="ident">rounding</span>)
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="macro">format!</span>(<span class="string">&quot;modify {}&quot;</span>, <span class="ident">id</span>)),
})
.<span class="ident">color</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_plain</span>.<span class="ident">fg</span>)
.<span class="ident">dims</span>(<span class="number">60.0</span>)
.<span class="ident">padding</span>(<span class="ident">EdgeInsets</span> {
<span class="ident">top</span>: <span class="number">32.0</span>,
<span class="ident">left</span>: <span class="number">16.0</span>,
<span class="ident">bottom</span>: <span class="number">32.0</span>,
<span class="ident">right</span>: <span class="number">16.0</span>,
})
.<span class="ident">corner_rounding</span>(<span class="ident">rounding</span>)
.<span class="ident">build_batch</span>(<span class="ident">ctx</span>)
.<span class="ident">unwrap</span>()
};
<span class="kw">let</span> (<span class="ident">default_batch</span>, <span class="ident">bounds</span>) <span class="op">=</span> <span class="ident">card_batch</span>((<span class="ident">icon_batch</span>.<span class="ident">clone</span>(), <span class="bool-val">false</span>, <span class="bool-val">false</span>));
<span class="kw">let</span> (<span class="ident">hovering_batch</span>, <span class="kw">_</span>) <span class="op">=</span> <span class="ident">card_batch</span>((<span class="ident">icon_batch</span>.<span class="ident">clone</span>(), <span class="bool-val">true</span>, <span class="bool-val">false</span>));
<span class="kw">let</span> (<span class="ident">selected_batch</span>, <span class="kw">_</span>) <span class="op">=</span> <span class="ident">card_batch</span>((<span class="ident">icon_batch</span>, <span class="bool-val">false</span>, <span class="bool-val">true</span>));
(<span class="ident">bounds</span>, <span class="ident">default_batch</span>, <span class="ident">hovering_batch</span>, <span class="ident">selected_batch</span>)
};
<span class="ident">drag_drop</span>.<span class="ident">push_card</span>(
<span class="ident">id</span>,
<span class="ident">card_bounds</span>.<span class="ident">into</span>(),
<span class="ident">default_batch</span>,
<span class="ident">hovering_batch</span>,
<span class="ident">selected_batch</span>,
);
}
<span class="comment">// Wrap this row in an extra container, so that the background color doesn&#39;t stretch over and</span>
<span class="comment">// fill any extra space on the right side.</span>
<span class="kw">let</span> <span class="ident">current_lanes_ltr</span> <span class="op">=</span> <span class="ident">Widget::evenly_spaced_row</span>(<span class="number">2</span>, <span class="ident">current_lanes_ltr</span>)
.<span class="ident">bg</span>(<span class="ident">Color::hex</span>(<span class="string">&quot;#979797&quot;</span>))
.<span class="ident">container</span>();
<span class="ident">drag_drop</span>.<span class="ident">set_initial_state</span>(<span class="ident">selected_lane</span>, <span class="ident">hovering_on_lane</span>);
<span class="kw">let</span> <span class="ident">total_width</span> <span class="op">=</span> {
<span class="kw">let</span> <span class="ident">current_width</span> <span class="op">=</span> <span class="ident">road</span>.<span class="ident">get_width</span>(<span class="ident">map</span>);
@ -1555,35 +1622,52 @@
<span class="ident">Panel::new_builder</span>(<span class="ident">Widget::col</span>(<span class="macro">vec!</span>[
<span class="ident">modify_lane</span>,
<span class="ident">available_lane_types_row</span>,
<span class="ident">current_lanes_ltr</span>,
<span class="ident">drag_drop</span>
.<span class="ident">into_widget</span>(<span class="ident">ctx</span>)
.<span class="ident">named</span>(<span class="string">&quot;lane cards&quot;</span>)
.<span class="ident">bg</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">text_primary_color</span>.<span class="ident">tint</span>(<span class="number">0.3</span>)),
<span class="ident">road_settings</span>,
]))
.<span class="ident">aligned</span>(<span class="ident">HorizontalAlignment::Left</span>, <span class="ident">VerticalAlignment::Center</span>)
.<span class="ident">build</span>(<span class="ident">ctx</span>)
}
<span class="kw">fn</span> <span class="ident">highlight_current_selection</span>(
<span class="kw">fn</span> <span class="ident">build_lane_highlights</span>(
<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>,
<span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>,
<span class="ident">r</span>: <span class="ident">RoadID</span>,
<span class="ident">l</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">LaneID</span><span class="op">&gt;</span>,
) <span class="op">-</span><span class="op">&gt;</span> (<span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">LaneID</span><span class="op">&gt;</span>, <span class="ident">Drawable</span>) {
<span class="ident">selected_lane</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">LaneID</span><span class="op">&gt;</span>,
<span class="ident">hovered_lane</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">LaneID</span><span class="op">&gt;</span>,
) <span class="op">-</span><span class="op">&gt;</span> ((<span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">LaneID</span><span class="op">&gt;</span>, <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">LaneID</span><span class="op">&gt;</span>), <span class="ident">Drawable</span>) {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">batch</span> <span class="op">=</span> <span class="ident">GeomBatch::new</span>();
<span class="kw">let</span> <span class="ident">color</span> <span class="op">=</span> <span class="ident">Color::hex</span>(<span class="string">&quot;#DF8C3D&quot;</span>);
<span class="kw">let</span> <span class="ident">map</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>;
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">l</span>) <span class="op">=</span> <span class="ident">l</span> {
<span class="ident">batch</span>.<span class="ident">push</span>(<span class="ident">color</span>, <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">draw_map</span>.<span class="ident">get_l</span>(<span class="ident">l</span>).<span class="ident">get_outline</span>(<span class="ident">map</span>));
} <span class="kw">else</span> {
<span class="kw">let</span> <span class="ident">road</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_r</span>(<span class="ident">r</span>);
<span class="kw">let</span> <span class="ident">selected_color</span> <span class="op">=</span> <span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">primary_fg</span>;
<span class="kw">let</span> <span class="ident">hovered_color</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">selected</span>;
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">hovered_lane</span>) <span class="op">=</span> <span class="ident">hovered_lane</span> {
<span class="ident">batch</span>.<span class="ident">push</span>(
<span class="ident">color</span>,
<span class="ident">road</span>.<span class="ident">center_pts</span>
.<span class="ident">to_thick_boundary</span>(<span class="ident">road</span>.<span class="ident">get_width</span>(<span class="ident">map</span>), <span class="ident">OUTLINE_THICKNESS</span>)
.<span class="ident">unwrap_or_else</span>(<span class="op">|</span><span class="op">|</span> <span class="ident">road</span>.<span class="ident">get_thick_polygon</span>(<span class="ident">map</span>)),
<span class="ident">hovered_color</span>,
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">draw_map</span>.<span class="ident">get_l</span>(<span class="ident">hovered_lane</span>).<span class="ident">get_outline</span>(<span class="ident">map</span>),
);
}
(<span class="ident">l</span>, <span class="ident">ctx</span>.<span class="ident">upload</span>(<span class="ident">batch</span>))
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">selected_lane</span>) <span class="op">=</span> <span class="ident">selected_lane</span> {
<span class="ident">batch</span>.<span class="ident">push</span>(
<span class="ident">selected_color</span>,
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">draw_map</span>.<span class="ident">get_l</span>(<span class="ident">selected_lane</span>).<span class="ident">get_outline</span>(<span class="ident">map</span>),
);
}
<span class="kw">let</span> <span class="ident">road</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_r</span>(<span class="ident">r</span>);
<span class="ident">batch</span>.<span class="ident">push</span>(
<span class="ident">selected_color</span>.<span class="ident">alpha</span>(<span class="number">0.5</span>),
<span class="ident">road</span>.<span class="ident">center_pts</span>
.<span class="ident">to_thick_boundary</span>(<span class="ident">road</span>.<span class="ident">get_width</span>(<span class="ident">map</span>), <span class="ident">OUTLINE_THICKNESS</span>)
.<span class="ident">unwrap_or_else</span>(<span class="op">|</span><span class="op">|</span> <span class="ident">road</span>.<span class="ident">get_thick_polygon</span>(<span class="ident">map</span>)),
);
((<span class="ident">selected_lane</span>, <span class="ident">hovered_lane</span>), <span class="ident">ctx</span>.<span class="ident">upload</span>(<span class="ident">batch</span>))
}
<span class="kw">fn</span> <span class="ident">lane_type_to_icon</span>(<span class="ident">lt</span>: <span class="ident">LaneType</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="kw-2">&amp;</span><span class="lifetime">&#39;static</span> <span class="ident">str</span><span class="op">&gt;</span> {

View File

@ -177,7 +177,7 @@
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">RUSTDOC_VERSION</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r&quot;rustdoc 1.54.0 (a178d0322 2021-07-26)&quot;</span>;
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#&quot;The build time in RFC2822, UTC.&quot;#</span>]</span>
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r&quot;Tue, 24 Aug 2021 02:46:26 +0000&quot;</span>;
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r&quot;Tue, 24 Aug 2021 17:36:33 +0000&quot;</span>;
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#&quot;The target architecture, given by `CARGO_CFG_TARGET_ARCH`.&quot;#</span>]</span>
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CFG_TARGET_ARCH</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r&quot;x86_64&quot;</span>;

View File

@ -126,6 +126,66 @@
<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>
<span id="132">132</span>
<span id="133">133</span>
<span id="134">134</span>
<span id="135">135</span>
<span id="136">136</span>
<span id="137">137</span>
<span id="138">138</span>
<span id="139">139</span>
<span id="140">140</span>
<span id="141">141</span>
<span id="142">142</span>
<span id="143">143</span>
<span id="144">144</span>
<span id="145">145</span>
<span id="146">146</span>
<span id="147">147</span>
<span id="148">148</span>
<span id="149">149</span>
<span id="150">150</span>
<span id="151">151</span>
<span id="152">152</span>
<span id="153">153</span>
<span id="154">154</span>
<span id="155">155</span>
<span id="156">156</span>
<span id="157">157</span>
<span id="158">158</span>
<span id="159">159</span>
<span id="160">160</span>
<span id="161">161</span>
<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>
</pre><pre class="rust">
<span class="doccomment">//! This crate contains common code for applications that draw and interact with a `Map`.</span>
@ -253,5 +313,65 @@
}
}
}
<span class="kw">impl</span> <span class="ident">From</span><span class="op">&lt;</span><span class="ident">RoadID</span><span class="op">&gt;</span> <span class="kw">for</span> <span class="ident">ID</span> {
<span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">r</span>: <span class="ident">RoadID</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="self">Self</span> {
<span class="self">Self</span><span class="ident">::Road</span>(<span class="ident">r</span>)
}
}
<span class="kw">impl</span> <span class="ident">From</span><span class="op">&lt;</span><span class="ident">LaneID</span><span class="op">&gt;</span> <span class="kw">for</span> <span class="ident">ID</span> {
<span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">l</span>: <span class="ident">LaneID</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="self">Self</span> {
<span class="self">Self</span><span class="ident">::Lane</span>(<span class="ident">l</span>)
}
}
<span class="kw">impl</span> <span class="ident">From</span><span class="op">&lt;</span><span class="ident">IntersectionID</span><span class="op">&gt;</span> <span class="kw">for</span> <span class="ident">ID</span> {
<span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">i</span>: <span class="ident">IntersectionID</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="self">Self</span> {
<span class="self">Self</span><span class="ident">::Intersection</span>(<span class="ident">i</span>)
}
}
<span class="kw">impl</span> <span class="ident">From</span><span class="op">&lt;</span><span class="ident">BuildingID</span><span class="op">&gt;</span> <span class="kw">for</span> <span class="ident">ID</span> {
<span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">b</span>: <span class="ident">BuildingID</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="self">Self</span> {
<span class="self">Self</span><span class="ident">::Building</span>(<span class="ident">b</span>)
}
}
<span class="kw">impl</span> <span class="ident">From</span><span class="op">&lt;</span><span class="ident">ParkingLotID</span><span class="op">&gt;</span> <span class="kw">for</span> <span class="ident">ID</span> {
<span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">p</span>: <span class="ident">ParkingLotID</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="self">Self</span> {
<span class="self">Self</span><span class="ident">::ParkingLot</span>(<span class="ident">p</span>)
}
}
<span class="kw">impl</span> <span class="ident">From</span><span class="op">&lt;</span><span class="ident">CarID</span><span class="op">&gt;</span> <span class="kw">for</span> <span class="ident">ID</span> {
<span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">c</span>: <span class="ident">CarID</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="self">Self</span> {
<span class="self">Self</span><span class="ident">::Car</span>(<span class="ident">c</span>)
}
}
<span class="kw">impl</span> <span class="ident">From</span><span class="op">&lt;</span><span class="ident">PedestrianID</span><span class="op">&gt;</span> <span class="kw">for</span> <span class="ident">ID</span> {
<span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">p</span>: <span class="ident">PedestrianID</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="self">Self</span> {
<span class="self">Self</span><span class="ident">::Pedestrian</span>(<span class="ident">p</span>)
}
}
<span class="kw">impl</span> <span class="ident">From</span><span class="op">&lt;</span><span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">PedestrianID</span><span class="op">&gt;</span><span class="op">&gt;</span> <span class="kw">for</span> <span class="ident">ID</span> {
<span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">p</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">PedestrianID</span><span class="op">&gt;</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="self">Self</span> {
<span class="self">Self</span><span class="ident">::PedCrowd</span>(<span class="ident">p</span>)
}
}
<span class="kw">impl</span> <span class="ident">From</span><span class="op">&lt;</span><span class="ident">BusStopID</span><span class="op">&gt;</span> <span class="kw">for</span> <span class="ident">ID</span> {
<span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">b</span>: <span class="ident">BusStopID</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="self">Self</span> {
<span class="self">Self</span><span class="ident">::BusStop</span>(<span class="ident">b</span>)
}
}
<span class="kw">impl</span> <span class="ident">From</span><span class="op">&lt;</span><span class="ident">AreaID</span><span class="op">&gt;</span> <span class="kw">for</span> <span class="ident">ID</span> {
<span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">a</span>: <span class="ident">AreaID</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="self">Self</span> {
<span class="self">Self</span><span class="ident">::Area</span>(<span class="ident">a</span>)
}
}
</pre></div>
</section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="map_gui" 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>

View File

@ -296,6 +296,8 @@
<span id="294">294</span>
<span id="295">295</span>
<span id="296">296</span>
<span id="297">297</span>
<span id="298">298</span>
</pre><pre class="rust">
<span class="doccomment">//! A widgetry application splits its state into two pieces: global shared state that lasts for the</span>
<span class="doccomment">//! entire lifetime of the application, and a stack of smaller states, only one of which is active</span>
@ -580,7 +582,9 @@
.<span class="ident">inner</span>
.<span class="ident">panel_changed</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>.<span class="ident">panel</span>)
.<span class="ident">unwrap_or_else</span>(<span class="op">|</span><span class="op">|</span> <span class="self">self</span>.<span class="ident">inner</span>.<span class="ident">other_event</span>(<span class="ident">ctx</span>, <span class="ident">app</span>)),
<span class="ident">Outcome::Nothing</span> <span class="op">=</span><span class="op">&gt;</span> <span class="self">self</span>.<span class="ident">inner</span>.<span class="ident">other_event</span>(<span class="ident">ctx</span>, <span class="ident">app</span>),
<span class="ident">Outcome::DragDropReleased</span>(<span class="kw">_</span>, <span class="kw">_</span>, <span class="kw">_</span>) <span class="op">|</span> <span class="ident">Outcome::Nothing</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">inner</span>.<span class="ident">other_event</span>(<span class="ident">ctx</span>, <span class="ident">app</span>)
}
}
}

View File

@ -130,6 +130,14 @@
<span id="128">128</span>
<span id="129">129</span>
<span id="130">130</span>
<span id="131">131</span>
<span id="132">132</span>
<span id="133">133</span>
<span id="134">134</span>
<span id="135">135</span>
<span id="136">136</span>
<span id="137">137</span>
<span id="138">138</span>
</pre><pre class="rust">
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::GeomBatch</span>;
@ -152,7 +160,7 @@
<span class="doccomment">///</span>
<span class="doccomment">/// You can add items incrementally, change `spacing` and `axis`, and call `batch` at the end to</span>
<span class="doccomment">/// apply these rules to produce an aggeregate `GeomBatch`.</span>
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>)]</span>
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>, <span class="ident">Clone</span>)]</span>
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">GeomBatchStack</span> {
<span class="ident">batches</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">GeomBatch</span><span class="op">&gt;</span>,
<span class="ident">axis</span>: <span class="ident">Axis</span>,
@ -188,6 +196,14 @@
}
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">get</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">index</span>: <span class="ident">usize</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="kw-2">&amp;</span><span class="ident">GeomBatch</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">batches</span>.<span class="ident">get</span>(<span class="ident">index</span>)
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">get_mut</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">index</span>: <span class="ident">usize</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">GeomBatch</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">batches</span>.<span class="ident">get_mut</span>(<span class="ident">index</span>)
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">push</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">geom_batch</span>: <span class="ident">GeomBatch</span>) {
<span class="self">self</span>.<span class="ident">batches</span>.<span class="ident">push</span>(<span class="ident">geom_batch</span>);
}

View File

@ -323,6 +323,12 @@
<span id="321">321</span>
<span id="322">322</span>
<span id="323">323</span>
<span id="324">324</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>
</pre><pre class="rust">
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Angle</span>, <span class="ident">Bounds</span>, <span class="ident">GPSBounds</span>, <span class="ident">Polygon</span>, <span class="ident">Pt2D</span>};
@ -589,6 +595,12 @@
}
}
<span class="kw">impl</span> <span class="ident">Default</span> <span class="kw">for</span> <span class="ident">GeomBatch</span> {
<span class="kw">fn</span> <span class="ident">default</span>() <span class="op">-</span><span class="op">&gt;</span> <span class="self">Self</span> {
<span class="ident">GeomBatch::new</span>()
}
}
<span class="kw">impl</span><span class="op">&lt;</span><span class="ident">F</span>: <span class="ident">Into</span><span class="op">&lt;</span><span class="ident">Fill</span><span class="op">&gt;</span><span class="op">&gt;</span> <span class="ident">From</span><span class="op">&lt;</span><span class="ident">Vec</span><span class="op">&lt;</span>(<span class="ident">F</span>, <span class="ident">Polygon</span>)<span class="op">&gt;</span><span class="op">&gt;</span> <span class="kw">for</span> <span class="ident">GeomBatch</span> {
<span class="doccomment">/// Creates a batch of filled polygons.</span>
<span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">list</span>: <span class="ident">Vec</span><span class="op">&lt;</span>(<span class="ident">F</span>, <span class="ident">Polygon</span>)<span class="op">&gt;</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">GeomBatch</span> {

View File

@ -231,6 +231,8 @@
<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>
</pre><pre class="rust">
<span class="doccomment">//! # Widgets</span>
<span class="doccomment">//!</span>
@ -242,6 +244,7 @@
<span class="doccomment">//! * [`Button`] - clickable buttons with keybindings and tooltips</span>
<span class="doccomment">//! * [`Toggle`] - checkboxes, switches, and other toggles</span>
<span class="doccomment">//! * [`CompareTimes`] - a scatter plot specialized for comparing times</span>
<span class="doccomment">//! * [`DragDrop`] - a reorderable row of draggable cards</span>
<span class="doccomment">//! * [`DrawWithTooltips`] - draw static geometry, with mouse tooltips in certain regions</span>
<span class="doccomment">//! * [`Dropdown`] - a button that expands into a menu</span>
<span class="doccomment">//! * [`FanChart`] - visualize a range of values over time</span>
@ -288,6 +291,7 @@
<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">use</span> <span class="kw">crate</span><span class="ident">::widgets::button::Button</span>;
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span><span class="ident">::widgets::button</span>::{<span class="ident">ButtonBuilder</span>, <span class="ident">MultiButton</span>};
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span><span class="ident">::widgets::compare_times::CompareTimes</span>;
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span><span class="ident">::widgets::drag_drop::DragDrop</span>;
<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">use</span> <span class="kw">crate</span><span class="ident">::widgets::dropdown::Dropdown</span>;
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span><span class="ident">::widgets::fan_chart::FanChart</span>;
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span><span class="ident">::widgets::filler::Filler</span>;

View File

@ -193,6 +193,23 @@
<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>
</pre><pre class="rust">
<span class="kw">use</span> <span class="ident">serde</span>::{<span class="ident">Deserialize</span>, <span class="ident">Serialize</span>};
@ -218,6 +235,10 @@
<span class="ident">Pt2D::new</span>(<span class="self">self</span>.<span class="ident">x</span>, <span class="self">self</span>.<span class="ident">y</span>)
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">zero</span>() <span class="op">-</span><span class="op">&gt;</span> <span class="self">Self</span> {
<span class="self">Self</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="kw">pub</span> <span class="kw">fn</span> <span class="ident">translated</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">x</span>: <span class="ident">f64</span>, <span class="ident">y</span>: <span class="ident">f64</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="self">Self</span> {
<span class="self">Self</span> {
<span class="ident">x</span>: <span class="self">self</span>.<span class="ident">x</span> <span class="op">+</span> <span class="ident">x</span>,
@ -316,6 +337,13 @@
}
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">zero</span>() <span class="op">-</span><span class="op">&gt;</span> <span class="self">Self</span> {
<span class="ident">ScreenDims</span> {
<span class="ident">width</span>: <span class="number">0.0</span>,
<span class="ident">height</span>: <span class="number">0.0</span>,
}
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">square</span>(<span class="ident">square</span>: <span class="ident">f64</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="self">Self</span> {
<span class="self">Self</span><span class="ident">::new</span>(<span class="ident">square</span>, <span class="ident">square</span>)
}
@ -379,6 +407,12 @@
}
}
<span class="kw">impl</span> <span class="ident">From</span><span class="op">&lt;</span><span class="ident">geom::Bounds</span><span class="op">&gt;</span> <span class="kw">for</span> <span class="ident">ScreenDims</span> {
<span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">bounds</span>: <span class="ident">geom::Bounds</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="self">Self</span> {
<span class="ident">ScreenDims::new</span>(<span class="ident">bounds</span>.<span class="ident">width</span>(), <span class="ident">bounds</span>.<span class="ident">height</span>())
}
}
<span class="kw">impl</span> <span class="ident">From</span><span class="op">&lt;</span><span class="ident">ScreenDims</span><span class="op">&gt;</span> <span class="kw">for</span> <span class="ident">stretch::geometry::Size</span><span class="op">&lt;</span><span class="ident">stretch::style::Dimension</span><span class="op">&gt;</span> {
<span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">dims</span>: <span class="ident">ScreenDims</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="self">Self</span> {
<span class="self">Self</span> {

View File

@ -0,0 +1,575 @@
<!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 `widgetry/src/widgets/drag_drop.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>drag_drop.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">&#9776;</div><a href='../../../widgetry/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>
<span id="132">132</span>
<span id="133">133</span>
<span id="134">134</span>
<span id="135">135</span>
<span id="136">136</span>
<span id="137">137</span>
<span id="138">138</span>
<span id="139">139</span>
<span id="140">140</span>
<span id="141">141</span>
<span id="142">142</span>
<span id="143">143</span>
<span id="144">144</span>
<span id="145">145</span>
<span id="146">146</span>
<span id="147">147</span>
<span id="148">148</span>
<span id="149">149</span>
<span id="150">150</span>
<span id="151">151</span>
<span id="152">152</span>
<span id="153">153</span>
<span id="154">154</span>
<span id="155">155</span>
<span id="156">156</span>
<span id="157">157</span>
<span id="158">158</span>
<span id="159">159</span>
<span id="160">160</span>
<span id="161">161</span>
<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>
<span id="242">242</span>
<span id="243">243</span>
<span id="244">244</span>
<span id="245">245</span>
<span id="246">246</span>
<span id="247">247</span>
<span id="248">248</span>
<span id="249">249</span>
<span id="250">250</span>
<span id="251">251</span>
<span id="252">252</span>
<span id="253">253</span>
<span id="254">254</span>
<span id="255">255</span>
<span id="256">256</span>
<span id="257">257</span>
<span id="258">258</span>
<span id="259">259</span>
<span id="260">260</span>
<span id="261">261</span>
<span id="262">262</span>
<span id="263">263</span>
<span id="264">264</span>
<span id="265">265</span>
<span id="266">266</span>
<span id="267">267</span>
<span id="268">268</span>
<span id="269">269</span>
<span id="270">270</span>
<span id="271">271</span>
<span id="272">272</span>
<span id="273">273</span>
<span id="274">274</span>
<span id="275">275</span>
<span id="276">276</span>
<span id="277">277</span>
<span id="278">278</span>
<span id="279">279</span>
<span id="280">280</span>
<span id="281">281</span>
<span id="282">282</span>
<span id="283">283</span>
<span id="284">284</span>
<span id="285">285</span>
</pre><pre class="rust">
<span class="kw">use</span> <span class="kw">crate</span>::{
<span class="ident">Drawable</span>, <span class="ident">EventCtx</span>, <span class="ident">GeomBatch</span>, <span class="ident">GeomBatchStack</span>, <span class="ident">GfxCtx</span>, <span class="ident">Outcome</span>, <span class="ident">ScreenDims</span>, <span class="ident">ScreenPt</span>,
<span class="ident">ScreenRectangle</span>, <span class="ident">Widget</span>, <span class="ident">WidgetImpl</span>, <span class="ident">WidgetOutput</span>,
};
<span class="kw">const</span> <span class="ident">SPACE_BETWEEN_CARDS</span>: <span class="ident">f64</span> <span class="op">=</span> <span class="number">2.0</span>;
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">DragDrop</span><span class="op">&lt;</span><span class="ident">T</span>: <span class="ident">Copy</span> <span class="op">+</span> <span class="ident">PartialEq</span><span class="op">&gt;</span> {
<span class="ident">label</span>: <span class="ident">String</span>,
<span class="ident">cards</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">Card</span><span class="op">&lt;</span><span class="ident">T</span><span class="op">&gt;</span><span class="op">&gt;</span>,
<span class="ident">draw</span>: <span class="ident">Drawable</span>,
<span class="ident">state</span>: <span class="ident">State</span>,
<span class="ident">dims</span>: <span class="ident">ScreenDims</span>,
<span class="ident">top_left</span>: <span class="ident">ScreenPt</span>,
}
<span class="kw">struct</span> <span class="ident">Card</span><span class="op">&lt;</span><span class="ident">T</span>: <span class="ident">PartialEq</span><span class="op">&gt;</span> {
<span class="ident">value</span>: <span class="ident">T</span>,
<span class="ident">dims</span>: <span class="ident">ScreenDims</span>,
<span class="ident">default_batch</span>: <span class="ident">GeomBatch</span>,
<span class="ident">hovering_batch</span>: <span class="ident">GeomBatch</span>,
<span class="ident">selected_batch</span>: <span class="ident">GeomBatch</span>,
}
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">PartialEq</span>)]</span>
<span class="kw">enum</span> <span class="ident">State</span> {
<span class="ident">Initial</span> {
<span class="ident">hovering</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">usize</span><span class="op">&gt;</span>,
<span class="ident">selected</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">usize</span><span class="op">&gt;</span>,
},
<span class="ident">Idle</span> {
<span class="ident">hovering</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">usize</span><span class="op">&gt;</span>,
<span class="ident">selected</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">usize</span><span class="op">&gt;</span>,
},
<span class="ident">Dragging</span> {
<span class="ident">orig_idx</span>: <span class="ident">usize</span>,
<span class="ident">drag_from</span>: <span class="ident">ScreenPt</span>,
<span class="ident">cursor_at</span>: <span class="ident">ScreenPt</span>,
<span class="ident">new_idx</span>: <span class="ident">usize</span>,
},
}
<span class="kw">impl</span><span class="op">&lt;</span><span class="ident">T</span>: <span class="lifetime">&#39;static</span> <span class="op">+</span> <span class="ident">Copy</span> <span class="op">+</span> <span class="ident">PartialEq</span><span class="op">&gt;</span> <span class="ident">DragDrop</span><span class="op">&lt;</span><span class="ident">T</span><span class="op">&gt;</span> {
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="ident">EventCtx</span>, <span class="ident">label</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="self">Self</span> {
<span class="ident">DragDrop</span> {
<span class="ident">label</span>: <span class="ident">label</span>.<span class="ident">to_string</span>(),
<span class="ident">cards</span>: <span class="macro">vec!</span>[],
<span class="ident">draw</span>: <span class="ident">Drawable::empty</span>(<span class="ident">ctx</span>),
<span class="ident">state</span>: <span class="ident">State::Idle</span> {
<span class="ident">hovering</span>: <span class="prelude-val">None</span>,
<span class="ident">selected</span>: <span class="prelude-val">None</span>,
},
<span class="ident">dims</span>: <span class="ident">ScreenDims::zero</span>(),
<span class="ident">top_left</span>: <span class="ident">ScreenPt::zero</span>(),
}
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">into_widget</span>(<span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="ident">EventCtx</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Widget</span> {
<span class="self">self</span>.<span class="ident">recalc_draw</span>(<span class="ident">ctx</span>);
<span class="ident">Widget::new</span>(<span class="ident">Box::new</span>(<span class="self">self</span>))
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">selected_value</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">T</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">idx</span> <span class="op">=</span> <span class="kw">match</span> <span class="self">self</span>.<span class="ident">state</span> {
<span class="ident">State::Initial</span> { <span class="ident">selected</span>, .. } <span class="op">|</span> <span class="ident">State::Idle</span> { <span class="ident">selected</span>, .. } <span class="op">=</span><span class="op">&gt;</span> <span class="ident">selected</span>,
<span class="ident">State::Dragging</span> { <span class="ident">orig_idx</span>, .. } <span class="op">=</span><span class="op">&gt;</span> <span class="prelude-val">Some</span>(<span class="ident">orig_idx</span>),
}<span class="question-mark">?</span>;
<span class="prelude-val">Some</span>(<span class="self">self</span>.<span class="ident">cards</span>[<span class="ident">idx</span>].<span class="ident">value</span>)
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">hovering_value</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">T</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">idx</span> <span class="op">=</span> <span class="kw">match</span> <span class="self">self</span>.<span class="ident">state</span> {
<span class="ident">State::Initial</span> { <span class="ident">hovering</span>, .. } <span class="op">|</span> <span class="ident">State::Idle</span> { <span class="ident">hovering</span>, .. } <span class="op">=</span><span class="op">&gt;</span> <span class="ident">hovering</span>,
<span class="kw">_</span> <span class="op">=</span><span class="op">&gt;</span> <span class="prelude-val">None</span>,
}<span class="question-mark">?</span>;
<span class="prelude-val">Some</span>(<span class="self">self</span>.<span class="ident">cards</span>[<span class="ident">idx</span>].<span class="ident">value</span>)
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">push_card</span>(
<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>,
<span class="ident">value</span>: <span class="ident">T</span>,
<span class="ident">dims</span>: <span class="ident">ScreenDims</span>,
<span class="ident">default_batch</span>: <span class="ident">GeomBatch</span>,
<span class="ident">hovering_batch</span>: <span class="ident">GeomBatch</span>,
<span class="ident">selected_batch</span>: <span class="ident">GeomBatch</span>,
) {
<span class="self">self</span>.<span class="ident">cards</span>.<span class="ident">push</span>(<span class="ident">Card</span> {
<span class="ident">value</span>,
<span class="ident">dims</span>,
<span class="ident">default_batch</span>,
<span class="ident">hovering_batch</span>,
<span class="ident">selected_batch</span>,
});
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">set_initial_state</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">selected_value</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">T</span><span class="op">&gt;</span>, <span class="ident">hovering_value</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">T</span><span class="op">&gt;</span>) {
<span class="kw">let</span> <span class="ident">selected</span> <span class="op">=</span> <span class="ident">selected_value</span>.<span class="ident">and_then</span>(<span class="op">|</span><span class="ident">selected_value</span><span class="op">|</span> {
<span class="self">self</span>.<span class="ident">cards</span>
.<span class="ident">iter</span>()
.<span class="ident">position</span>(<span class="op">|</span><span class="ident">card</span><span class="op">|</span> <span class="ident">card</span>.<span class="ident">value</span> <span class="op">=</span><span class="op">=</span> <span class="ident">selected_value</span>)
});
<span class="kw">let</span> <span class="ident">hovering</span> <span class="op">=</span> <span class="ident">hovering_value</span>.<span class="ident">and_then</span>(<span class="op">|</span><span class="ident">hovering_value</span><span class="op">|</span> {
<span class="self">self</span>.<span class="ident">cards</span>
.<span class="ident">iter</span>()
.<span class="ident">position</span>(<span class="op">|</span><span class="ident">card</span><span class="op">|</span> <span class="ident">card</span>.<span class="ident">value</span> <span class="op">=</span><span class="op">=</span> <span class="ident">hovering_value</span>)
});
<span class="self">self</span>.<span class="ident">state</span> <span class="op">=</span> <span class="ident">State::Initial</span> { <span class="ident">selected</span>, <span class="ident">hovering</span> };
}
}
<span class="kw">impl</span><span class="op">&lt;</span><span class="ident">T</span>: <span class="lifetime">&#39;static</span> <span class="op">+</span> <span class="ident">Copy</span> <span class="op">+</span> <span class="ident">PartialEq</span><span class="op">&gt;</span> <span class="ident">DragDrop</span><span class="op">&lt;</span><span class="ident">T</span><span class="op">&gt;</span> {
<span class="kw">fn</span> <span class="ident">recalc_draw</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="ident">EventCtx</span>) {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">stack</span> <span class="op">=</span> <span class="ident">GeomBatchStack::horizontal</span>(<span class="ident">Vec::new</span>());
<span class="ident">stack</span>.<span class="ident">set_spacing</span>(<span class="ident">SPACE_BETWEEN_CARDS</span>);
<span class="kw">let</span> (<span class="ident">dims</span>, <span class="ident">batch</span>) <span class="op">=</span> <span class="kw">match</span> <span class="self">self</span>.<span class="ident">state</span> {
<span class="ident">State::Initial</span> { <span class="ident">hovering</span>, <span class="ident">selected</span> } <span class="op">|</span> <span class="ident">State::Idle</span> { <span class="ident">hovering</span>, <span class="ident">selected</span> } <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">for</span> (<span class="ident">idx</span>, <span class="ident">card</span>) <span class="kw">in</span> <span class="self">self</span>.<span class="ident">cards</span>.<span class="ident">iter</span>().<span class="ident">enumerate</span>() {
<span class="kw">if</span> <span class="ident">selected</span> <span class="op">=</span><span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">idx</span>) {
<span class="ident">stack</span>.<span class="ident">push</span>(<span class="ident">card</span>.<span class="ident">selected_batch</span>.<span class="ident">clone</span>());
} <span class="kw">else</span> <span class="kw">if</span> <span class="ident">hovering</span> <span class="op">=</span><span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">idx</span>) {
<span class="ident">stack</span>.<span class="ident">push</span>(<span class="ident">card</span>.<span class="ident">hovering_batch</span>.<span class="ident">clone</span>());
} <span class="kw">else</span> {
<span class="ident">stack</span>.<span class="ident">push</span>(<span class="ident">card</span>.<span class="ident">default_batch</span>.<span class="ident">clone</span>());
}
}
<span class="kw">let</span> <span class="ident">batch</span> <span class="op">=</span> <span class="ident">stack</span>.<span class="ident">batch</span>();
(<span class="ident">batch</span>.<span class="ident">get_dims</span>(), <span class="ident">batch</span>)
}
<span class="ident">State::Dragging</span> {
<span class="ident">orig_idx</span>,
<span class="ident">drag_from</span>,
<span class="ident">cursor_at</span>,
<span class="ident">new_idx</span>,
} <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">width</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">cards</span>[<span class="ident">orig_idx</span>].<span class="ident">dims</span>.<span class="ident">width</span>;
<span class="kw">for</span> (<span class="ident">idx</span>, <span class="ident">card</span>) <span class="kw">in</span> <span class="self">self</span>.<span class="ident">cards</span>.<span class="ident">iter</span>().<span class="ident">enumerate</span>() {
<span class="comment">// the target we&#39;re dragging</span>
<span class="kw">let</span> <span class="ident">batch</span> <span class="op">=</span> <span class="kw">if</span> <span class="ident">idx</span> <span class="op">=</span><span class="op">=</span> <span class="ident">orig_idx</span> {
<span class="ident">card</span>.<span class="ident">selected_batch</span>.<span class="ident">clone</span>()
} <span class="kw">else</span> <span class="kw">if</span> <span class="ident">idx</span> <span class="op">&lt;</span><span class="op">=</span> <span class="ident">new_idx</span> <span class="op">&amp;&amp;</span> <span class="ident">idx</span> <span class="op">&gt;</span> <span class="ident">orig_idx</span> {
<span class="comment">// move batch to the left if target is newly greater than us</span>
<span class="ident">card</span>.<span class="ident">default_batch</span>
.<span class="ident">clone</span>()
.<span class="ident">translate</span>(<span class="op">-</span>(<span class="ident">width</span> <span class="op">+</span> <span class="ident">SPACE_BETWEEN_CARDS</span>), <span class="number">0.0</span>)
} <span class="kw">else</span> <span class="kw">if</span> <span class="ident">idx</span> <span class="op">&gt;</span><span class="op">=</span> <span class="ident">new_idx</span> <span class="op">&amp;&amp;</span> <span class="ident">idx</span> <span class="op">&lt;</span> <span class="ident">orig_idx</span> {
<span class="comment">// move batch to the right if target is newly less than us</span>
<span class="ident">card</span>.<span class="ident">default_batch</span>
.<span class="ident">clone</span>()
.<span class="ident">translate</span>(<span class="ident">width</span> <span class="op">+</span> <span class="ident">SPACE_BETWEEN_CARDS</span>, <span class="number">0.0</span>)
} <span class="kw">else</span> {
<span class="ident">card</span>.<span class="ident">default_batch</span>.<span class="ident">clone</span>()
};
<span class="ident">stack</span>.<span class="ident">push</span>(<span class="ident">batch</span>);
}
<span class="comment">// PERF: avoid this clone by implementing a non-consuming `stack.get_dims()`.</span>
<span class="comment">// At the moment it seems like not a big deal to just clone the thing</span>
<span class="kw">let</span> <span class="ident">dims</span> <span class="op">=</span> <span class="ident">stack</span>.<span class="ident">clone</span>().<span class="ident">batch</span>().<span class="ident">get_dims</span>();
<span class="comment">// The dragged batch follows the cursor, but don&#39;t translate it until we&#39;ve captured</span>
<span class="comment">// the pre-existing `dims`, otherwise the dragged position will be included in the</span>
<span class="comment">// overall dims of this widget, causing other screen content to shift around as we</span>
<span class="comment">// drag.</span>
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">dragged_batch</span> <span class="op">=</span> <span class="ident">std::mem::take</span>(<span class="ident">stack</span>.<span class="ident">get_mut</span>(<span class="ident">orig_idx</span>).<span class="ident">unwrap</span>());
<span class="comment">// offset the dragged item just a little to initially hint that it&#39;s moveable</span>
<span class="kw">let</span> <span class="ident">floating_effect_offset</span> <span class="op">=</span> <span class="number">4.0</span>;
<span class="ident">dragged_batch</span> <span class="op">=</span> <span class="ident">dragged_batch</span>
.<span class="ident">translate</span>(
<span class="ident">cursor_at</span>.<span class="ident">x</span> <span class="op">-</span> <span class="ident">drag_from</span>.<span class="ident">x</span> <span class="op">+</span> <span class="ident">floating_effect_offset</span>,
<span class="ident">cursor_at</span>.<span class="ident">y</span> <span class="op">-</span> <span class="ident">drag_from</span>.<span class="ident">y</span> <span class="op">-</span> <span class="ident">floating_effect_offset</span>,
)
.<span class="ident">set_z_offset</span>(<span class="op">-</span><span class="number">0.1</span>);
<span class="kw-2">*</span><span class="ident">stack</span>.<span class="ident">get_mut</span>(<span class="ident">orig_idx</span>).<span class="ident">unwrap</span>() <span class="op">=</span> <span class="ident">dragged_batch</span>;
(<span class="ident">dims</span>, <span class="ident">stack</span>.<span class="ident">batch</span>())
}
};
<span class="self">self</span>.<span class="ident">dims</span> <span class="op">=</span> <span class="ident">dims</span>;
<span class="self">self</span>.<span class="ident">draw</span> <span class="op">=</span> <span class="ident">batch</span>.<span class="ident">upload</span>(<span class="ident">ctx</span>);
}
<span class="kw">fn</span> <span class="ident">mouseover_card</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="ident">EventCtx</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">usize</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">pt</span> <span class="op">=</span> <span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">get_cursor_in_screen_space</span>()<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">top_left</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">top_left</span>;
<span class="kw">for</span> (<span class="ident">idx</span>, <span class="ident">Card</span> { <span class="ident">dims</span>, .. }) <span class="kw">in</span> <span class="self">self</span>.<span class="ident">cards</span>.<span class="ident">iter</span>().<span class="ident">enumerate</span>() {
<span class="kw">if</span> <span class="ident">ScreenRectangle::top_left</span>(<span class="ident">top_left</span>, <span class="kw-2">*</span><span class="ident">dims</span>).<span class="ident">contains</span>(<span class="ident">pt</span>) {
<span class="kw">return</span> <span class="prelude-val">Some</span>(<span class="ident">idx</span>);
}
<span class="ident">top_left</span>.<span class="ident">x</span> <span class="op">+</span><span class="op">=</span> <span class="ident">dims</span>.<span class="ident">width</span> <span class="op">+</span> <span class="ident">SPACE_BETWEEN_CARDS</span>;
}
<span class="prelude-val">None</span>
}
}
<span class="kw">impl</span><span class="op">&lt;</span><span class="ident">T</span>: <span class="lifetime">&#39;static</span> <span class="op">+</span> <span class="ident">Copy</span> <span class="op">+</span> <span class="ident">PartialEq</span><span class="op">&gt;</span> <span class="ident">WidgetImpl</span> <span class="kw">for</span> <span class="ident">DragDrop</span><span class="op">&lt;</span><span class="ident">T</span><span class="op">&gt;</span> {
<span class="kw">fn</span> <span class="ident">get_dims</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ScreenDims</span> {
<span class="self">self</span>.<span class="ident">dims</span>
}
<span class="kw">fn</span> <span class="ident">set_pos</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">top_left</span>: <span class="ident">ScreenPt</span>) {
<span class="self">self</span>.<span class="ident">top_left</span> <span class="op">=</span> <span class="ident">top_left</span>;
}
<span class="kw">fn</span> <span class="ident">event</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">output</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">WidgetOutput</span>) {
<span class="kw">let</span> <span class="ident">new_state</span> <span class="op">=</span> <span class="kw">match</span> <span class="self">self</span>.<span class="ident">state</span> {
<span class="ident">State::Initial</span> { <span class="ident">selected</span>, .. } <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">idx</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">mouseover_card</span>(<span class="ident">ctx</span>) {
<span class="ident">State::Idle</span> {
<span class="ident">hovering</span>: <span class="prelude-val">Some</span>(<span class="ident">idx</span>),
<span class="ident">selected</span>,
}
} <span class="kw">else</span> {
<span class="comment">// Keep the intial state, which reflects hovering/selection from interacting</span>
<span class="comment">// with the lanes on the map.</span>
<span class="kw">return</span>;
}
}
<span class="ident">State::Idle</span> { <span class="ident">hovering</span>, <span class="ident">selected</span> } <span class="op">=</span><span class="op">&gt;</span> <span class="kw">match</span> <span class="self">self</span>.<span class="ident">mouseover_card</span>(<span class="ident">ctx</span>) {
<span class="prelude-val">Some</span>(<span class="ident">idx</span>) <span class="kw">if</span> <span class="ident">ctx</span>.<span class="ident">input</span>.<span class="ident">left_mouse_button_pressed</span>() <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">cursor</span> <span class="op">=</span> <span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">get_cursor_in_screen_space</span>().<span class="ident">unwrap</span>();
<span class="ident">State::Dragging</span> {
<span class="ident">orig_idx</span>: <span class="ident">idx</span>,
<span class="ident">drag_from</span>: <span class="ident">cursor</span>,
<span class="ident">cursor_at</span>: <span class="ident">cursor</span>,
<span class="ident">new_idx</span>: <span class="ident">idx</span>,
}
}
<span class="ident">maybe_idx</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">if</span> <span class="ident">hovering</span> <span class="op">!</span><span class="op">=</span> <span class="ident">maybe_idx</span> {
<span class="ident">output</span>.<span class="ident">outcome</span> <span class="op">=</span> <span class="ident">Outcome::Changed</span>(<span class="self">self</span>.<span class="ident">label</span>.<span class="ident">clone</span>());
}
<span class="ident">State::Idle</span> {
<span class="ident">hovering</span>: <span class="ident">maybe_idx</span>,
<span class="ident">selected</span>,
}
}
},
<span class="ident">State::Dragging</span> {
<span class="ident">orig_idx</span>,
<span class="ident">new_idx</span>,
<span class="ident">cursor_at</span>,
<span class="ident">drag_from</span>,
} <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">if</span> <span class="ident">ctx</span>.<span class="ident">input</span>.<span class="ident">left_mouse_button_released</span>() {
<span class="ident">output</span>.<span class="ident">outcome</span> <span class="op">=</span>
<span class="ident">Outcome::DragDropReleased</span>(<span class="self">self</span>.<span class="ident">label</span>.<span class="ident">clone</span>(), <span class="ident">orig_idx</span>, <span class="ident">new_idx</span>);
<span class="kw">if</span> <span class="ident">orig_idx</span> <span class="op">!</span><span class="op">=</span> <span class="ident">new_idx</span> {
<span class="kw">let</span> <span class="ident">item</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">cards</span>.<span class="ident">remove</span>(<span class="ident">orig_idx</span>);
<span class="self">self</span>.<span class="ident">cards</span>.<span class="ident">insert</span>(<span class="ident">new_idx</span>, <span class="ident">item</span>);
}
<span class="ident">State::Idle</span> {
<span class="ident">hovering</span>: <span class="prelude-val">Some</span>(<span class="ident">new_idx</span>),
<span class="ident">selected</span>: <span class="prelude-val">Some</span>(<span class="ident">new_idx</span>),
}
} <span class="kw">else</span> {
<span class="ident">State::Dragging</span> {
<span class="ident">orig_idx</span>,
<span class="comment">// TODO https://jqueryui.com/sortable/ only swaps once you cross the center of</span>
<span class="comment">// the new card</span>
<span class="ident">new_idx</span>: <span class="self">self</span>.<span class="ident">mouseover_card</span>(<span class="ident">ctx</span>).<span class="ident">unwrap_or</span>(<span class="ident">new_idx</span>),
<span class="ident">cursor_at</span>: <span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">get_cursor_in_screen_space</span>().<span class="ident">unwrap_or</span>(<span class="ident">cursor_at</span>),
<span class="ident">drag_from</span>,
}
}
}
};
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">state</span> <span class="op">!</span><span class="op">=</span> <span class="ident">new_state</span> {
<span class="self">self</span>.<span class="ident">state</span> <span class="op">=</span> <span class="ident">new_state</span>;
<span class="self">self</span>.<span class="ident">recalc_draw</span>(<span class="ident">ctx</span>);
}
}
<span class="kw">fn</span> <span class="ident">draw</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">g</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">GfxCtx</span>) {
<span class="ident">g</span>.<span class="ident">redraw_at</span>(<span class="self">self</span>.<span class="ident">top_left</span>, <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">draw</span>);
}
}
</pre></div>
</section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="widgetry" 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>

View File

@ -309,6 +309,39 @@
<span id="307">307</span>
<span id="308">308</span>
<span id="309">309</span>
<span id="310">310</span>
<span id="311">311</span>
<span id="312">312</span>
<span id="313">313</span>
<span id="314">314</span>
<span id="315">315</span>
<span id="316">316</span>
<span id="317">317</span>
<span id="318">318</span>
<span id="319">319</span>
<span id="320">320</span>
<span id="321">321</span>
<span id="322">322</span>
<span id="323">323</span>
<span id="324">324</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>
<span id="338">338</span>
<span id="339">339</span>
<span id="340">340</span>
<span id="341">341</span>
<span id="342">342</span>
</pre><pre class="rust">
<span class="kw">use</span> <span class="kw">crate</span>::{
<span class="ident">Color</span>, <span class="ident">ContentMode</span>, <span class="ident">CornerRounding</span>, <span class="ident">DrawWithTooltips</span>, <span class="ident">EdgeInsets</span>, <span class="ident">EventCtx</span>, <span class="ident">GeomBatch</span>,
@ -527,8 +560,41 @@
<span class="self">self</span>
}
<span class="doccomment">/// Padding above the image</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">padding_top</span>(<span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">new_value</span>: <span class="ident">f64</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="self">Self</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">padding</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">padding</span>.<span class="ident">unwrap_or_default</span>();
<span class="ident">padding</span>.<span class="ident">top</span> <span class="op">=</span> <span class="ident">new_value</span>;
<span class="self">self</span>.<span class="ident">padding</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">padding</span>);
<span class="self">self</span>
}
<span class="doccomment">/// Padding to the left of the image</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">padding_left</span>(<span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">new_value</span>: <span class="ident">f64</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="self">Self</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">padding</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">padding</span>.<span class="ident">unwrap_or_default</span>();
<span class="ident">padding</span>.<span class="ident">left</span> <span class="op">=</span> <span class="ident">new_value</span>;
<span class="self">self</span>.<span class="ident">padding</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">padding</span>);
<span class="self">self</span>
}
<span class="doccomment">/// Padding below the image</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">padding_bottom</span>(<span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">new_value</span>: <span class="ident">f64</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="self">Self</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">padding</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">padding</span>.<span class="ident">unwrap_or_default</span>();
<span class="ident">padding</span>.<span class="ident">bottom</span> <span class="op">=</span> <span class="ident">new_value</span>;
<span class="self">self</span>.<span class="ident">padding</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">padding</span>);
<span class="self">self</span>
}
<span class="doccomment">/// Padding to the right of the image</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">padding_right</span>(<span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">new_value</span>: <span class="ident">f64</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="self">Self</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">padding</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">padding</span>.<span class="ident">unwrap_or_default</span>();
<span class="ident">padding</span>.<span class="ident">right</span> <span class="op">=</span> <span class="ident">new_value</span>;
<span class="self">self</span>.<span class="ident">padding</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">padding</span>);
<span class="self">self</span>
}
<span class="doccomment">/// Render the `Image` and any styling (padding, background, etc.) to a `GeomBatch`.</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">build_batch</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="ident">EventCtx</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span>(<span class="ident">GeomBatch</span>, <span class="ident">Bounds</span>)<span class="op">&gt;</span> {
<span class="comment">// TODO: unwrap/panic if source is empty?</span>
<span class="self">self</span>.<span class="ident">source</span>.<span class="ident">as_ref</span>().<span class="ident">map</span>(<span class="op">|</span><span class="ident">source</span><span class="op">|</span> {
<span class="kw">let</span> (<span class="kw-2">mut</span> <span class="ident">image_batch</span>, <span class="ident">image_bounds</span>) <span class="op">=</span> <span class="ident">source</span>.<span class="ident">load</span>(<span class="ident">ctx</span>.<span class="ident">prerender</span>);

View File

@ -864,6 +864,10 @@
<span id="862">862</span>
<span id="863">863</span>
<span id="864">864</span>
<span id="865">865</span>
<span id="866">866</span>
<span id="867">867</span>
<span id="868">868</span>
</pre><pre class="rust">
<span class="kw">use</span> <span class="ident">std::collections::HashSet</span>;
@ -888,6 +892,7 @@
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">button</span>;
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">compare_times</span>;
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">containers</span>;
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">drag_drop</span>;
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">dropdown</span>;
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">fan_chart</span>;
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">filler</span>;
@ -943,6 +948,9 @@
<span class="doccomment">/// A dropdown, checkbox, spinner, etc changed values. The name of the changed widget is</span>
<span class="doccomment">/// returned, but not the value, since its type is generic.</span>
<span class="ident">Changed</span>(<span class="ident">String</span>),
<span class="doccomment">/// On a DragDrop widget, a member was clicked on and released. Its position may have changed.</span>
<span class="doccomment">/// (name, orig_idx, new_idx)</span>
<span class="ident">DragDropReleased</span>(<span class="ident">String</span>, <span class="ident">usize</span>, <span class="ident">usize</span>),
<span class="doccomment">/// Nothing happened</span>
<span class="ident">Nothing</span>,
}

View File

@ -675,7 +675,6 @@
<span id="673">673</span>
<span id="674">674</span>
<span id="675">675</span>
<span id="676">676</span>
</pre><pre class="rust">
<span class="kw">use</span> <span class="ident">std::cell::RefCell</span>;
<span class="kw">use</span> <span class="ident">std::collections::HashSet</span>;
@ -843,7 +842,6 @@
}
<span class="kw">fn</span> <span class="ident">invalidate_flexbox</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>) {
<span class="macro">debug!</span>(<span class="string">&quot;invalidating flexbox&quot;</span>);
<span class="self">self</span>.<span class="ident">cached_flexbox</span> <span class="op">=</span> <span class="prelude-val">None</span>;
}

View File

@ -622,6 +622,35 @@
<span id="620">620</span>
<span id="621">621</span>
<span id="622">622</span>
<span id="623">623</span>
<span id="624">624</span>
<span id="625">625</span>
<span id="626">626</span>
<span id="627">627</span>
<span id="628">628</span>
<span id="629">629</span>
<span id="630">630</span>
<span id="631">631</span>
<span id="632">632</span>
<span id="633">633</span>
<span id="634">634</span>
<span id="635">635</span>
<span id="636">636</span>
<span id="637">637</span>
<span id="638">638</span>
<span id="639">639</span>
<span id="640">640</span>
<span id="641">641</span>
<span id="642">642</span>
<span id="643">643</span>
<span id="644">644</span>
<span id="645">645</span>
<span id="646">646</span>
<span id="647">647</span>
<span id="648">648</span>
<span id="649">649</span>
<span id="650">650</span>
<span id="651">651</span>
</pre><pre class="rust">
<span class="kw">use</span> <span class="ident">std::collections::HashSet</span>;
@ -630,7 +659,7 @@
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Angle</span>, <span class="ident">Duration</span>, <span class="ident">Percent</span>, <span class="ident">Polygon</span>, <span class="ident">Pt2D</span>, <span class="ident">Time</span>};
<span class="kw">use</span> <span class="ident">widgetry</span>::{
<span class="ident">lctrl</span>, <span class="ident">Choice</span>, <span class="ident">Color</span>, <span class="ident">ContentMode</span>, <span class="ident">Drawable</span>, <span class="ident">EventCtx</span>, <span class="ident">Fill</span>, <span class="ident">GeomBatch</span>, <span class="ident">GfxCtx</span>,
<span class="ident">lctrl</span>, <span class="ident">Choice</span>, <span class="ident">Color</span>, <span class="ident">ContentMode</span>, <span class="ident">DragDrop</span>, <span class="ident">Drawable</span>, <span class="ident">EventCtx</span>, <span class="ident">Fill</span>, <span class="ident">GeomBatch</span>, <span class="ident">GfxCtx</span>,
<span class="ident">HorizontalAlignment</span>, <span class="ident">Image</span>, <span class="ident">Key</span>, <span class="ident">Line</span>, <span class="ident">LinePlot</span>, <span class="ident">Outcome</span>, <span class="ident">Panel</span>, <span class="ident">PersistentSplit</span>, <span class="ident">PlotOptions</span>,
<span class="ident">ScreenDims</span>, <span class="ident">Series</span>, <span class="ident">Settings</span>, <span class="ident">SharedAppState</span>, <span class="ident">State</span>, <span class="ident">TabController</span>, <span class="ident">Text</span>, <span class="ident">TextExt</span>, <span class="ident">Texture</span>,
<span class="ident">Toggle</span>, <span class="ident">Transition</span>, <span class="ident">UpdateType</span>, <span class="ident">VerticalAlignment</span>, <span class="ident">Widget</span>,
@ -1045,6 +1074,8 @@
]),
<span class="ident">Text::from</span>(<span class="ident">Line</span>(<span class="string">&quot;Spinner&quot;</span>).<span class="ident">big_heading_styled</span>().<span class="ident">size</span>(<span class="number">18</span>)).<span class="ident">into_widget</span>(<span class="ident">ctx</span>),
<span class="ident">widgetry::Spinner::widget</span>(<span class="ident">ctx</span>, <span class="string">&quot;spinner&quot;</span>, (<span class="number">0</span>, <span class="number">11</span>), <span class="number">1</span>, <span class="number">1</span>),
<span class="ident">Text::from</span>(<span class="ident">Line</span>(<span class="string">&quot;Drag &amp; Drop Cards&quot;</span>).<span class="ident">big_heading_styled</span>().<span class="ident">size</span>(<span class="number">18</span>)).<span class="ident">into_widget</span>(<span class="ident">ctx</span>),
<span class="ident">build_drag_drop</span>(<span class="ident">ctx</span>, <span class="number">5</span>).<span class="ident">into_widget</span>(<span class="ident">ctx</span>),
]);
<span class="ident">tabs</span>.<span class="ident">push_tab</span>(<span class="ident">gallery_bar_item</span>, <span class="ident">gallery_content</span>);
@ -1229,6 +1260,33 @@
.<span class="ident">build</span>(<span class="ident">ctx</span>)
}
<span class="kw">fn</span> <span class="ident">build_drag_drop</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="ident">EventCtx</span>, <span class="ident">num_cards</span>: <span class="ident">usize</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">DragDrop</span><span class="op">&lt;</span><span class="ident">usize</span><span class="op">&gt;</span> {
<span class="kw">fn</span> <span class="ident">build_card</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="ident">EventCtx</span>, <span class="ident">num</span>: <span class="ident">usize</span>) <span class="op">-</span><span class="op">&gt;</span> (<span class="ident">ScreenDims</span>, <span class="ident">GeomBatch</span>, <span class="ident">GeomBatch</span>, <span class="ident">GeomBatch</span>) {
<span class="kw">let</span> <span class="ident">dims</span> <span class="op">=</span> <span class="ident">ScreenDims::new</span>(<span class="number">100.0</span> <span class="op">+</span> (<span class="ident">num</span> <span class="op">%</span> <span class="number">2</span>) <span class="kw">as</span> <span class="ident">f64</span> <span class="op">*</span> <span class="number">50.0</span>, <span class="number">150.0</span>);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">default_batch</span> <span class="op">=</span> <span class="ident">GeomBatch::new</span>();
<span class="ident">default_batch</span>.<span class="ident">push</span>(<span class="ident">Color::ORANGE</span>, <span class="ident">Polygon::rectangle</span>(<span class="ident">dims</span>.<span class="ident">width</span>, <span class="ident">dims</span>.<span class="ident">height</span>));
<span class="ident">default_batch</span>.<span class="ident">append</span>(<span class="ident">Text::from</span>(<span class="macro">format!</span>(<span class="string">&quot;Card {}&quot;</span>, <span class="ident">num</span>)).<span class="ident">render</span>(<span class="ident">ctx</span>));
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">hovering_batch</span> <span class="op">=</span> <span class="ident">GeomBatch::new</span>();
<span class="ident">hovering_batch</span>.<span class="ident">push</span>(<span class="ident">Color::RED</span>, <span class="ident">Polygon::rectangle</span>(<span class="ident">dims</span>.<span class="ident">width</span>, <span class="ident">dims</span>.<span class="ident">height</span>));
<span class="ident">hovering_batch</span>.<span class="ident">append</span>(<span class="ident">Text::from</span>(<span class="macro">format!</span>(<span class="string">&quot;Card {}&quot;</span>, <span class="ident">num</span>)).<span class="ident">render</span>(<span class="ident">ctx</span>));
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">selected_batch</span> <span class="op">=</span> <span class="ident">GeomBatch::new</span>();
<span class="ident">selected_batch</span>.<span class="ident">push</span>(<span class="ident">Color::BLUE</span>, <span class="ident">Polygon::rectangle</span>(<span class="ident">dims</span>.<span class="ident">width</span>, <span class="ident">dims</span>.<span class="ident">height</span>));
<span class="ident">selected_batch</span>.<span class="ident">append</span>(<span class="ident">Text::from</span>(<span class="macro">format!</span>(<span class="string">&quot;Card {}&quot;</span>, <span class="ident">num</span>)).<span class="ident">render</span>(<span class="ident">ctx</span>));
(<span class="ident">dims</span>, <span class="ident">default_batch</span>, <span class="ident">hovering_batch</span>, <span class="ident">selected_batch</span>)
}
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">drag_drop</span> <span class="op">=</span> <span class="ident">DragDrop::new</span>(<span class="ident">ctx</span>, <span class="string">&quot;drag and drop cards&quot;</span>);
<span class="kw">for</span> <span class="ident">i</span> <span class="kw">in</span> <span class="number">0</span>..<span class="ident">num_cards</span> {
<span class="kw">let</span> (<span class="ident">dims</span>, <span class="ident">default_batch</span>, <span class="ident">hovering_batch</span>, <span class="ident">selected_batch</span>) <span class="op">=</span> <span class="ident">build_card</span>(<span class="ident">ctx</span>, <span class="ident">i</span>);
<span class="ident">drag_drop</span>.<span class="ident">push_card</span>(<span class="ident">i</span>, <span class="ident">dims</span>, <span class="ident">default_batch</span>, <span class="ident">hovering_batch</span>, <span class="ident">selected_batch</span>);
}
<span class="ident">drag_drop</span>
}
<span class="comment">// Boilerplate for web support</span>
<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">target_arch</span> <span class="op">=</span> <span class="string">&quot;wasm32&quot;</span>)]</span>

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
<!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="A widgetry application splits its state into two pieces: global shared state that lasts for the entire lifetime of the application, and a stack of smaller states, only one of which is active at a time. For example, imagine an application to view a map. The shared state would include the map and pre-rendered geometry for it. The individual states might start with a splash screen or menu to choose a map, then a map viewer, then maybe a state to drill down into pieces of the map."><meta name="keywords" content="rust, rustlang, rust-lang, app_state"><title>widgetry::app_state - 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">&#9776;</div><a href='../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module app_state</h2><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="#traits">Traits</a></li></ul></div><div id="sidebar-vars" data-name="app_state" 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">widgetry</a>::<wbr><a class="mod" href="#">app_state</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/widgetry/app_state.rs.html#1-296" 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>A widgetry application splits its state into two pieces: global shared state that lasts for the
<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">&#9776;</div><a href='../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module app_state</h2><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="#traits">Traits</a></li></ul></div><div id="sidebar-vars" data-name="app_state" 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">widgetry</a>::<wbr><a class="mod" href="#">app_state</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/widgetry/app_state.rs.html#1-298" 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>A widgetry application splits its state into two pieces: global shared state that lasts for the
entire lifetime of the application, and a stack of smaller states, only one of which is active
at a time. For example, imagine an application to view a map. The shared state would include
the map and pre-rendered geometry for it. The individual states might start with a splash

View File

@ -4,9 +4,9 @@
panel: <a class="struct" href="../widgets/panel/struct.Panel.html" title="struct widgetry::widgets::panel::Panel">Panel</a>,
inner: <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="trait.SimpleState.html" title="trait widgetry::app_state::SimpleState">SimpleState</a>&lt;A&gt;&gt;,
}</pre></div><h2 id="fields" class="fields small-section-header">
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.panel" class="structfield small-section-header"><a href="#structfield.panel" class="anchor field"></a><code>panel: <a class="struct" href="../widgets/panel/struct.Panel.html" title="struct widgetry::widgets::panel::Panel">Panel</a></code></span><span id="structfield.inner" class="structfield small-section-header"><a href="#structfield.inner" class="anchor field"></a><code>inner: <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="trait.SimpleState.html" title="trait widgetry::app_state::SimpleState">SimpleState</a>&lt;A&gt;&gt;</code></span><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-State%3CA%3E" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;A:&nbsp;'static&gt; <a class="trait" href="trait.State.html" title="trait widgetry::app_state::State">State</a>&lt;A&gt; for <a class="struct" href="struct.SimpleStateWrapper.html" title="struct widgetry::app_state::SimpleStateWrapper">SimpleStateWrapper</a>&lt;A&gt;</h3><a href="#impl-State%3CA%3E" class="anchor"></a><a class="srclink" href="../../src/widgetry/app_state.rs.html#272-296" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="trait.State.html#tymethod.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut <a class="struct" href="../event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, app: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;mut </a>A) -&gt; <a class="enum" href="enum.Transition.html" title="enum widgetry::app_state::Transition">Transition</a>&lt;A&gt;</h4><a href="#method.event" class="anchor"></a><a class="srclink" href="../../src/widgetry/app_state.rs.html#273-286" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Respond to a UI event, such as input or time passing.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="trait.State.html#tymethod.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut <a class="struct" href="../drawing/struct.GfxCtx.html" title="struct widgetry::drawing::GfxCtx">GfxCtx</a>&lt;'_&gt;, app: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</a>A)</h4><a href="#method.draw" class="anchor"></a><a class="srclink" href="../../src/widgetry/app_state.rs.html#288-292" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Draw</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw_baselayer" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="trait.State.html#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; <a class="enum" href="enum.DrawBaselayer.html" title="enum widgetry::app_state::DrawBaselayer">DrawBaselayer</a></h4><a href="#method.draw_baselayer" class="anchor"></a><a class="srclink" href="../../src/widgetry/app_state.rs.html#293-295" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Specifies what to draw before draw()</p>
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.panel" class="structfield small-section-header"><a href="#structfield.panel" class="anchor field"></a><code>panel: <a class="struct" href="../widgets/panel/struct.Panel.html" title="struct widgetry::widgets::panel::Panel">Panel</a></code></span><span id="structfield.inner" class="structfield small-section-header"><a href="#structfield.inner" class="anchor field"></a><code>inner: <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="trait.SimpleState.html" title="trait widgetry::app_state::SimpleState">SimpleState</a>&lt;A&gt;&gt;</code></span><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-State%3CA%3E" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;A:&nbsp;'static&gt; <a class="trait" href="trait.State.html" title="trait widgetry::app_state::State">State</a>&lt;A&gt; for <a class="struct" href="struct.SimpleStateWrapper.html" title="struct widgetry::app_state::SimpleStateWrapper">SimpleStateWrapper</a>&lt;A&gt;</h3><a href="#impl-State%3CA%3E" class="anchor"></a><a class="srclink" href="../../src/widgetry/app_state.rs.html#272-298" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="trait.State.html#tymethod.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut <a class="struct" href="../event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, app: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;mut </a>A) -&gt; <a class="enum" href="enum.Transition.html" title="enum widgetry::app_state::Transition">Transition</a>&lt;A&gt;</h4><a href="#method.event" class="anchor"></a><a class="srclink" href="../../src/widgetry/app_state.rs.html#273-288" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Respond to a UI event, such as input or time passing.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="trait.State.html#tymethod.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut <a class="struct" href="../drawing/struct.GfxCtx.html" title="struct widgetry::drawing::GfxCtx">GfxCtx</a>&lt;'_&gt;, app: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</a>A)</h4><a href="#method.draw" class="anchor"></a><a class="srclink" href="../../src/widgetry/app_state.rs.html#290-294" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Draw</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw_baselayer" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="trait.State.html#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; <a class="enum" href="enum.DrawBaselayer.html" title="enum widgetry::app_state::DrawBaselayer">DrawBaselayer</a></h4><a href="#method.draw_baselayer" class="anchor"></a><a class="srclink" href="../../src/widgetry/app_state.rs.html#295-297" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Specifies what to draw before draw()</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.on_destroy" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="trait.State.html#method.on_destroy" class="fnname">on_destroy</a>(&amp;mut self, _: &amp;mut <a class="struct" href="../event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, _: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;mut </a>A)</h4><a href="#method.on_destroy" class="anchor"></a><a class="srclink" href="../../src/widgetry/app_state.rs.html#183" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Before this state is popped or replaced, call this.</p>
</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&lt;A&gt; !<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.SimpleStateWrapper.html" title="struct widgetry::app_state::SimpleStateWrapper">SimpleStateWrapper</a>&lt;A&gt;</h3><a href="#impl-RefUnwindSafe" class="anchor"></a></div><div id="impl-Send" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;A&gt; !<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.SimpleStateWrapper.html" title="struct widgetry::app_state::SimpleStateWrapper">SimpleStateWrapper</a>&lt;A&gt;</h3><a href="#impl-Send" class="anchor"></a></div><div id="impl-Sync" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;A&gt; !<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.SimpleStateWrapper.html" title="struct widgetry::app_state::SimpleStateWrapper">SimpleStateWrapper</a>&lt;A&gt;</h3><a href="#impl-Sync" class="anchor"></a></div><div id="impl-Unpin" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;A&gt; <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.SimpleStateWrapper.html" title="struct widgetry::app_state::SimpleStateWrapper">SimpleStateWrapper</a>&lt;A&gt;</h3><a href="#impl-Unpin" class="anchor"></a></div><div id="impl-UnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;A&gt; !<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.SimpleStateWrapper.html" title="struct widgetry::app_state::SimpleStateWrapper">SimpleStateWrapper</a>&lt;A&gt;</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</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>

View File

@ -21,4 +21,4 @@ type <code>__T</code>. Returns the original <code>Rc</code>-ed trait if it isn
<code>None</code> if it isnt.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.downcast_mut" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.downcast_mut" class="fnname">downcast_mut</a>&lt;__T:&nbsp;<a class="trait" href="trait.State.html" title="trait widgetry::app_state::State">State</a>&lt;A&gt;&gt;(&amp;mut self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;mut </a>__T&gt;</h4><a href="#method.downcast_mut" class="anchor"></a><a class="srclink" href="../../src/widgetry/app_state.rs.html#187" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Returns a mutable reference to the object within the trait object if it is of type
<code>__T</code>, or <code>None</code> if it isnt.</p>
</div></details></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-State%3CA%3E" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;A:&nbsp;'static&gt; <a class="trait" href="trait.State.html" title="trait widgetry::app_state::State">State</a>&lt;A&gt; for <a class="struct" href="struct.SimpleStateWrapper.html" title="struct widgetry::app_state::SimpleStateWrapper">SimpleStateWrapper</a>&lt;A&gt;</h3><a href="#impl-State%3CA%3E" class="anchor"></a><a class="srclink" href="../../src/widgetry/app_state.rs.html#272-296" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.event" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut <a class="struct" href="../event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, app: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;mut </a>A) -&gt; <a class="enum" href="enum.Transition.html" title="enum widgetry::app_state::Transition">Transition</a>&lt;A&gt;</h4><a href="#method.event" class="anchor"></a><a class="srclink" href="../../src/widgetry/app_state.rs.html#273-286" title="goto source code">[src]</a></div><div id="method.draw" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut <a class="struct" href="../drawing/struct.GfxCtx.html" title="struct widgetry::drawing::GfxCtx">GfxCtx</a>&lt;'_&gt;, app: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</a>A)</h4><a href="#method.draw" class="anchor"></a><a class="srclink" href="../../src/widgetry/app_state.rs.html#288-292" title="goto source code">[src]</a></div><div id="method.draw_baselayer-1" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; <a class="enum" href="enum.DrawBaselayer.html" title="enum widgetry::app_state::DrawBaselayer">DrawBaselayer</a></h4><a href="#method.draw_baselayer-1" class="anchor"></a><a class="srclink" href="../../src/widgetry/app_state.rs.html#293-295" title="goto source code">[src]</a></div></div></details></div><script type="text/javascript" src="../../implementors/widgetry/app_state/trait.State.js" async></script></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="widgetry" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>
</div></details></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-State%3CA%3E" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;A:&nbsp;'static&gt; <a class="trait" href="trait.State.html" title="trait widgetry::app_state::State">State</a>&lt;A&gt; for <a class="struct" href="struct.SimpleStateWrapper.html" title="struct widgetry::app_state::SimpleStateWrapper">SimpleStateWrapper</a>&lt;A&gt;</h3><a href="#impl-State%3CA%3E" class="anchor"></a><a class="srclink" href="../../src/widgetry/app_state.rs.html#272-298" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.event" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut <a class="struct" href="../event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, app: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;mut </a>A) -&gt; <a class="enum" href="enum.Transition.html" title="enum widgetry::app_state::Transition">Transition</a>&lt;A&gt;</h4><a href="#method.event" class="anchor"></a><a class="srclink" href="../../src/widgetry/app_state.rs.html#273-288" title="goto source code">[src]</a></div><div id="method.draw" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut <a class="struct" href="../drawing/struct.GfxCtx.html" title="struct widgetry::drawing::GfxCtx">GfxCtx</a>&lt;'_&gt;, app: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</a>A)</h4><a href="#method.draw" class="anchor"></a><a class="srclink" href="../../src/widgetry/app_state.rs.html#290-294" title="goto source code">[src]</a></div><div id="method.draw_baselayer-1" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; <a class="enum" href="enum.DrawBaselayer.html" title="enum widgetry::app_state::DrawBaselayer">DrawBaselayer</a></h4><a href="#method.draw_baselayer-1" class="anchor"></a><a class="srclink" href="../../src/widgetry/app_state.rs.html#295-297" title="goto source code">[src]</a></div></div></details></div><script type="text/javascript" src="../../implementors/widgetry/app_state/trait.State.js" async></script></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="widgetry" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>

View File

@ -1,4 +1,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 `backend` mod in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, backend"><title>widgetry::backend - 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">&#9776;</div><a href='../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module backend</h2><div class="sidebar-elems"><div id="sidebar-vars" data-name="backend" 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">widgetry</a>::<wbr><a class="mod" href="#">backend</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/widgetry/lib.rs.html#103-106" title="goto source code">[src]</a></span></h1><h2 id="reexports" class="section-header"><a href="#reexports">Re-exports</a></h2>
<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">&#9776;</div><a href='../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module backend</h2><div class="sidebar-elems"><div id="sidebar-vars" data-name="backend" 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">widgetry</a>::<wbr><a class="mod" href="#">backend</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/widgetry/lib.rs.html#105-108" title="goto source code">[src]</a></span></h1><h2 id="reexports" class="section-header"><a href="#reexports">Re-exports</a></h2>
<table><tr class="import-item"><td><code>pub use crate::<a class="mod" href="../backend_glow/index.html" title="mod widgetry::backend_glow">backend_glow</a>::*;</code></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="widgetry" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>

View File

@ -12,7 +12,7 @@
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Deserialize%3C%27de%3E" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;'de&gt; <a class="trait" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt; for <a class="struct" href="struct.Color.html" title="struct widgetry::color::Color">Color</a></h3><a href="#impl-Deserialize%3C%27de%3E" class="anchor"></a><a class="srclink" href="../../src/widgetry/color.rs.html#7" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.deserialize" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html#tymethod.deserialize" class="fnname">deserialize</a>&lt;__D&gt;(__deserializer: __D) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, __D::<a class="type" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__D: <a class="trait" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a>&lt;'de&gt;,&nbsp;</span></h4><a href="#method.deserialize" class="anchor"></a><a class="srclink" href="../../src/widgetry/color.rs.html#7" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html#tymethod.deserialize">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.Color.html" title="struct widgetry::color::Color">Color</a></h3><a href="#impl-Display" class="anchor"></a><a class="srclink" href="../../src/widgetry/color.rs.html#15-23" 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>(&amp;self, f: &amp;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>&lt;'_&gt;) -&gt; <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/widgetry/color.rs.html#16-22" 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-From%3CColor%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/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="struct.Color.html" title="struct widgetry::color::Color">Color</a>&gt; for <a class="enum" href="enum.Fill.html" title="enum widgetry::color::Fill">Fill</a></h3><a href="#impl-From%3CColor%3E" class="anchor"></a><a class="srclink" href="../../src/widgetry/color.rs.html#231-235" 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">fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(color: <a class="struct" href="struct.Color.html" title="struct widgetry::color::Color">Color</a>) -&gt; <a class="enum" href="enum.Fill.html" title="enum widgetry::color::Fill">Fill</a></h4><a href="#method.from" class="anchor"></a><a class="srclink" href="../../src/widgetry/color.rs.html#232-234" 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-From%3CColor%3E-1" class="impl has-srclink"><h3 class="code-header in-band">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>&lt;<a class="struct" href="struct.Color.html" title="struct widgetry::color::Color">Color</a>&gt; for <a class="enum" href="../geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl-From%3CColor%3E-1" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#292-296" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from-1" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(color: <a class="struct" href="struct.Color.html" title="struct widgetry::color::Color">Color</a>) -&gt; <a class="enum" href="../geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h4><a href="#method.from-1" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#293-295" 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-From%3CColor%3E-1" class="impl has-srclink"><h3 class="code-header in-band">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>&lt;<a class="struct" href="struct.Color.html" title="struct widgetry::color::Color">Color</a>&gt; for <a class="enum" href="../geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl-From%3CColor%3E-1" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#298-302" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from-1" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(color: <a class="struct" href="struct.Color.html" title="struct widgetry::color::Color">Color</a>) -&gt; <a class="enum" href="../geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h4><a href="#method.from-1" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#299-301" 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-PartialEq%3CColor%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>&lt;<a class="struct" href="struct.Color.html" title="struct widgetry::color::Color">Color</a>&gt; for <a class="struct" href="struct.Color.html" title="struct widgetry::color::Color">Color</a></h3><a href="#impl-PartialEq%3CColor%3E" class="anchor"></a><a class="srclink" href="../../src/widgetry/color.rs.html#7" 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>(&amp;self, other: &amp;<a class="struct" href="struct.Color.html" title="struct widgetry::color::Color">Color</a>) -&gt; <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/widgetry/color.rs.html#7" 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>(&amp;self, other: &amp;<a class="struct" href="struct.Color.html" title="struct widgetry::color::Color">Color</a>) -&gt; <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/widgetry/color.rs.html#7" title="goto source code">[src]</a></div></summary><div class='docblock'><p>This method tests for <code>!=</code>.</p>

View File

@ -1,3 +1,3 @@
<!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 `DEFAULT_CORNER_RADIUS` constant in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, DEFAULT_CORNER_RADIUS"><title>DEFAULT_CORNER_RADIUS in widgetry - 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">&#9776;</div><a href='../widgetry/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">widgetry</a></h2><div id="sidebar-vars" data-name="DEFAULT_CORNER_RADIUS" 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">widgetry</a>::<wbr><a class="constant" href="#">DEFAULT_CORNER_RADIUS</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">&#x2212;</span>]</a></span><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#43" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const DEFAULT_CORNER_RADIUS: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a> = 5.0;</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="widgetry" data-search-index-js="../search-index.js" data-search-js="../search.js"></div><script src="../main.js"></script></body></html>
<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">&#9776;</div><a href='../widgetry/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">widgetry</a></h2><div id="sidebar-vars" data-name="DEFAULT_CORNER_RADIUS" 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">widgetry</a>::<wbr><a class="constant" href="#">DEFAULT_CORNER_RADIUS</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">&#x2212;</span>]</a></span><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#44" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const DEFAULT_CORNER_RADIUS: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a> = 5.0;</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="widgetry" data-search-index-js="../search-index.js" data-search-js="../search.js"></div><script src="../main.js"></script></body></html>

View File

@ -1,6 +1,6 @@
<!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="When an action happens through a button-like widget, what data is plumbed back?"><meta name="keywords" content="rust, rustlang, rust-lang, ClickOutcome"><title>ClickOutcome in widgetry - 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">&#9776;</div><a href='../widgetry/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Enum ClickOutcome</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.Custom">Custom</a><a href="#variant.Label">Label</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&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><h2 class="location">Other items in<br><a href="index.html">widgetry</a></h2><div id="sidebar-vars" data-name="ClickOutcome" 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">widgetry</a>::<wbr><a class="enum" href="#">ClickOutcome</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">&#x2212;</span>]</a></span><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#84-87" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust enum">pub enum ClickOutcome {
<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">&#9776;</div><a href='../widgetry/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Enum ClickOutcome</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.Custom">Custom</a><a href="#variant.Label">Label</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&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><h2 class="location">Other items in<br><a href="index.html">widgetry</a></h2><div id="sidebar-vars" data-name="ClickOutcome" 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">widgetry</a>::<wbr><a class="enum" href="#">ClickOutcome</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">&#x2212;</span>]</a></span><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#88-91" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust enum">pub enum ClickOutcome {
Label(<a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>),
Custom(<a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="../abstutil/clone/trait.CloneableAny.html" title="trait abstutil::clone::CloneableAny">CloneableAny</a>&gt;),
}</pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>When an action happens through a button-like widget, what data is plumbed back?</p>

View File

@ -1,6 +1,6 @@
<!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="Rules for how content should stretch to fill its bounds"><meta name="keywords" content="rust, rustlang, rust-lang, ContentMode"><title>ContentMode in widgetry - 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">&#9776;</div><a href='../widgetry/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Enum ContentMode</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.ScaleAspectFill">ScaleAspectFill</a><a href="#variant.ScaleAspectFit">ScaleAspectFit</a><a href="#variant.ScaleToFill">ScaleToFill</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></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&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><h2 class="location">Other items in<br><a href="index.html">widgetry</a></h2><div id="sidebar-vars" data-name="ContentMode" 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">widgetry</a>::<wbr><a class="enum" href="#">ContentMode</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">&#x2212;</span>]</a></span><a class="srclink" href="../src/widgetry/lib.rs.html#128-144" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust enum">pub enum ContentMode {
<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">&#9776;</div><a href='../widgetry/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Enum ContentMode</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.ScaleAspectFill">ScaleAspectFill</a><a href="#variant.ScaleAspectFit">ScaleAspectFit</a><a href="#variant.ScaleToFill">ScaleToFill</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></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&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><h2 class="location">Other items in<br><a href="index.html">widgetry</a></h2><div id="sidebar-vars" data-name="ContentMode" 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">widgetry</a>::<wbr><a class="enum" href="#">ContentMode</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">&#x2212;</span>]</a></span><a class="srclink" href="../src/widgetry/lib.rs.html#130-146" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust enum">pub enum ContentMode {
ScaleToFill,
ScaleAspectFit,
ScaleAspectFill,
@ -15,11 +15,11 @@ then there will be some empty space within the bounds to center the content.</p>
</div><div id="variant.ScaleAspectFill" class="variant small-section-header"><a href="#variant.ScaleAspectFill" class="anchor field"></a><code>ScaleAspectFill</code></div><div class="docblock"><p>Maintaining aspect ratio, content grows until both bounds are met.</p>
<p>If the aspect ratio of the bounds do not exactly match the aspect ratio of the content,
the content will overflow one dimension of its bounds.</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.ContentMode.html" title="enum widgetry::ContentMode">ContentMode</a></h3><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#127" 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>(&amp;self) -&gt; <a class="enum" href="enum.ContentMode.html" title="enum widgetry::ContentMode">ContentMode</a></h4><a href="#method.clone" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#127" 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><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.ContentMode.html" title="enum widgetry::ContentMode">ContentMode</a></h3><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#129" 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>(&amp;self) -&gt; <a class="enum" href="enum.ContentMode.html" title="enum widgetry::ContentMode">ContentMode</a></h4><a href="#method.clone" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#129" 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>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</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.ContentMode.html" title="enum widgetry::ContentMode">ContentMode</a></h3><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#127" 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>(&amp;self, f: &amp;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>&lt;'_&gt;) -&gt; <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/widgetry/lib.rs.html#127" 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.ContentMode.html" title="enum widgetry::ContentMode">ContentMode</a></h3><a href="#impl-Default" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#146-150" 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>() -&gt; Self</h4><a href="#method.default" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#147-149" 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><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.ContentMode.html" title="enum widgetry::ContentMode">ContentMode</a></h3><a href="#impl-Copy" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#127" 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.ContentMode.html" title="enum widgetry::ContentMode">ContentMode</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.ContentMode.html" title="enum widgetry::ContentMode">ContentMode</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.ContentMode.html" title="enum widgetry::ContentMode">ContentMode</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.ContentMode.html" title="enum widgetry::ContentMode">ContentMode</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.ContentMode.html" title="enum widgetry::ContentMode">ContentMode</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <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-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.ContentMode.html" title="enum widgetry::ContentMode">ContentMode</a></h3><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#129" 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>(&amp;self, f: &amp;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>&lt;'_&gt;) -&gt; <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/widgetry/lib.rs.html#129" 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.ContentMode.html" title="enum widgetry::ContentMode">ContentMode</a></h3><a href="#impl-Default" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#148-152" 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>() -&gt; Self</h4><a href="#method.default" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#149-151" 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><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.ContentMode.html" title="enum widgetry::ContentMode">ContentMode</a></h3><a href="#impl-Copy" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#129" 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.ContentMode.html" title="enum widgetry::ContentMode">ContentMode</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.ContentMode.html" title="enum widgetry::ContentMode">ContentMode</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.ContentMode.html" title="enum widgetry::ContentMode">ContentMode</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.ContentMode.html" title="enum widgetry::ContentMode">ContentMode</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.ContentMode.html" title="enum widgetry::ContentMode">ContentMode</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;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-Downcast" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;T&gt; Downcast for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</span></h3><a href="#impl-Downcast" class="anchor"></a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into_any" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="#tymethod.into_any" class="fnname">into_any</a>(self: <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;T, <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static, <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;</h4><a href="#method.into_any" class="anchor"></a></div></summary><div class='docblock'><p>Convert <code>Box&lt;dyn Trait&gt;</code> (where <code>Trait: Downcast</code>) to <code>Box&lt;dyn Any&gt;</code>. <code>Box&lt;dyn Any&gt;</code> can

View File

@ -1,15 +1,15 @@
<!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 `ControlState` enum in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, ControlState"><title>ControlState in widgetry - 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">&#9776;</div><a href='../widgetry/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Enum ControlState</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.Default">Default</a><a href="#variant.Disabled">Disabled</a><a href="#variant.Hovered">Hovered</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></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&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><h2 class="location">Other items in<br><a href="index.html">widgetry</a></h2><div id="sidebar-vars" data-name="ControlState" 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">widgetry</a>::<wbr><a class="enum" href="#">ControlState</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">&#x2212;</span>]</a></span><a class="srclink" href="../src/widgetry/lib.rs.html#119-124" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust enum">pub enum ControlState {
<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">&#9776;</div><a href='../widgetry/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Enum ControlState</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.Default">Default</a><a href="#variant.Disabled">Disabled</a><a href="#variant.Hovered">Hovered</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></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&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><h2 class="location">Other items in<br><a href="index.html">widgetry</a></h2><div id="sidebar-vars" data-name="ControlState" 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">widgetry</a>::<wbr><a class="enum" href="#">ControlState</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">&#x2212;</span>]</a></span><a class="srclink" href="../src/widgetry/lib.rs.html#121-126" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust enum">pub enum ControlState {
Default,
Hovered,
Disabled,
}</pre></div><h2 id="variants" class="variants small-section-header">
Variants<a href="#variants" class="anchor"></a></h2>
<div id="variant.Default" class="variant small-section-header"><a href="#variant.Default" class="anchor field"></a><code>Default</code></div><div id="variant.Hovered" class="variant small-section-header"><a href="#variant.Hovered" class="anchor field"></a><code>Hovered</code></div><div id="variant.Disabled" class="variant small-section-header"><a href="#variant.Disabled" class="anchor field"></a><code>Disabled</code></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.ControlState.html" title="enum widgetry::ControlState">ControlState</a></h3><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#118" 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>(&amp;self) -&gt; <a class="enum" href="enum.ControlState.html" title="enum widgetry::ControlState">ControlState</a></h4><a href="#method.clone" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#118" 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 id="variant.Default" class="variant small-section-header"><a href="#variant.Default" class="anchor field"></a><code>Default</code></div><div id="variant.Hovered" class="variant small-section-header"><a href="#variant.Hovered" class="anchor field"></a><code>Hovered</code></div><div id="variant.Disabled" class="variant small-section-header"><a href="#variant.Disabled" class="anchor field"></a><code>Disabled</code></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.ControlState.html" title="enum widgetry::ControlState">ControlState</a></h3><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#120" 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>(&amp;self) -&gt; <a class="enum" href="enum.ControlState.html" title="enum widgetry::ControlState">ControlState</a></h4><a href="#method.clone" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#120" 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>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</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.ControlState.html" title="enum widgetry::ControlState">ControlState</a></h3><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#118" 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>(&amp;self, f: &amp;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>&lt;'_&gt;) -&gt; <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/widgetry/lib.rs.html#118" 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><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.ControlState.html" title="enum widgetry::ControlState">ControlState</a></h3><a href="#impl-Copy" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#118" 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.ControlState.html" title="enum widgetry::ControlState">ControlState</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.ControlState.html" title="enum widgetry::ControlState">ControlState</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.ControlState.html" title="enum widgetry::ControlState">ControlState</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.ControlState.html" title="enum widgetry::ControlState">ControlState</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.ControlState.html" title="enum widgetry::ControlState">ControlState</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <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-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.ControlState.html" title="enum widgetry::ControlState">ControlState</a></h3><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#120" 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>(&amp;self, f: &amp;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>&lt;'_&gt;) -&gt; <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/widgetry/lib.rs.html#120" 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><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.ControlState.html" title="enum widgetry::ControlState">ControlState</a></h3><a href="#impl-Copy" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#120" 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.ControlState.html" title="enum widgetry::ControlState">ControlState</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.ControlState.html" title="enum widgetry::ControlState">ControlState</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.ControlState.html" title="enum widgetry::ControlState">ControlState</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.ControlState.html" title="enum widgetry::ControlState">ControlState</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.ControlState.html" title="enum widgetry::ControlState">ControlState</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;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-Downcast" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;T&gt; Downcast for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</span></h3><a href="#impl-Downcast" class="anchor"></a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into_any" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="#tymethod.into_any" class="fnname">into_any</a>(self: <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;T, <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static, <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;</h4><a href="#method.into_any" class="anchor"></a></div></summary><div class='docblock'><p>Convert <code>Box&lt;dyn Trait&gt;</code> (where <code>Trait: Downcast</code>) to <code>Box&lt;dyn Any&gt;</code>. <code>Box&lt;dyn Any&gt;</code> can

View File

@ -1,17 +1,17 @@
<!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 `CornerRounding` enum in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, CornerRounding"><title>CornerRounding in widgetry - 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">&#9776;</div><a href='../widgetry/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Enum CornerRounding</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.CornerRadii">CornerRadii</a><a href="#variant.FullyRounded">FullyRounded</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-From%3CCornerRadii%3E">From&lt;CornerRadii&gt;</a><a href="#impl-From%3Cf64%3E">From&lt;f64&gt;</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&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><h2 class="location">Other items in<br><a href="index.html">widgetry</a></h2><div id="sidebar-vars" data-name="CornerRounding" 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">widgetry</a>::<wbr><a class="enum" href="#">CornerRounding</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">&#x2212;</span>]</a></span><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#120-123" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust enum">pub enum CornerRounding {
<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">&#9776;</div><a href='../widgetry/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Enum CornerRounding</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.CornerRadii">CornerRadii</a><a href="#variant.FullyRounded">FullyRounded</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-From%3CCornerRadii%3E">From&lt;CornerRadii&gt;</a><a href="#impl-From%3Cf64%3E">From&lt;f64&gt;</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&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><h2 class="location">Other items in<br><a href="index.html">widgetry</a></h2><div id="sidebar-vars" data-name="CornerRounding" 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">widgetry</a>::<wbr><a class="enum" href="#">CornerRounding</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">&#x2212;</span>]</a></span><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#124-127" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust enum">pub enum CornerRounding {
CornerRadii(<a class="struct" href="../geom/struct.CornerRadii.html" title="struct geom::CornerRadii">CornerRadii</a>),
FullyRounded,
}</pre></div><h2 id="variants" class="variants small-section-header">
Variants<a href="#variants" class="anchor"></a></h2>
<div id="variant.CornerRadii" class="variant small-section-header"><a href="#variant.CornerRadii" class="anchor field"></a><code>CornerRadii(<a class="struct" href="../geom/struct.CornerRadii.html" title="struct geom::CornerRadii">CornerRadii</a>)</code></div><div id="variant.FullyRounded" class="variant small-section-header"><a href="#variant.FullyRounded" class="anchor field"></a><code>FullyRounded</code></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="widgets/enum.CornerRounding.html" title="enum widgetry::widgets::CornerRounding">CornerRounding</a></h3><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#119" 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>(&amp;self) -&gt; <a class="enum" href="widgets/enum.CornerRounding.html" title="enum widgetry::widgets::CornerRounding">CornerRounding</a></h4><a href="#method.clone" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#119" 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 id="variant.CornerRadii" class="variant small-section-header"><a href="#variant.CornerRadii" class="anchor field"></a><code>CornerRadii(<a class="struct" href="../geom/struct.CornerRadii.html" title="struct geom::CornerRadii">CornerRadii</a>)</code></div><div id="variant.FullyRounded" class="variant small-section-header"><a href="#variant.FullyRounded" class="anchor field"></a><code>FullyRounded</code></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="widgets/enum.CornerRounding.html" title="enum widgetry::widgets::CornerRounding">CornerRounding</a></h3><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#123" 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>(&amp;self) -&gt; <a class="enum" href="widgets/enum.CornerRounding.html" title="enum widgetry::widgets::CornerRounding">CornerRounding</a></h4><a href="#method.clone" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#123" 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>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</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="widgets/enum.CornerRounding.html" title="enum widgetry::widgets::CornerRounding">CornerRounding</a></h3><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#119" 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>(&amp;self, f: &amp;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>&lt;'_&gt;) -&gt; <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/widgetry/widgets/mod.rs.html#119" 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="widgets/enum.CornerRounding.html" title="enum widgetry::widgets::CornerRounding">CornerRounding</a></h3><a href="#impl-Default" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#137-141" 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>() -&gt; Self</h4><a href="#method.default" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#138-140" 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-From%3CCornerRadii%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/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="../geom/struct.CornerRadii.html" title="struct geom::CornerRadii">CornerRadii</a>&gt; for <a class="enum" href="widgets/enum.CornerRounding.html" title="enum widgetry::widgets::CornerRounding">CornerRounding</a></h3><a href="#impl-From%3CCornerRadii%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.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.from-1" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(radii: <a class="struct" href="../geom/struct.CornerRadii.html" title="struct geom::CornerRadii">CornerRadii</a>) -&gt; Self</h4><a href="#method.from-1" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#132-134" 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-From%3Cf64%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/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>&gt; for <a class="enum" href="widgets/enum.CornerRounding.html" title="enum widgetry::widgets::CornerRounding">CornerRounding</a></h3><a href="#impl-From%3Cf64%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#125-129" 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">fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(uniform: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>) -&gt; Self</h4><a href="#method.from" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#126-128" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</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="widgets/enum.CornerRounding.html" title="enum widgetry::widgets::CornerRounding">CornerRounding</a></h3><a href="#impl-Copy" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#119" 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="widgets/enum.CornerRounding.html" title="enum widgetry::widgets::CornerRounding">CornerRounding</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="widgets/enum.CornerRounding.html" title="enum widgetry::widgets::CornerRounding">CornerRounding</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="widgets/enum.CornerRounding.html" title="enum widgetry::widgets::CornerRounding">CornerRounding</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="widgets/enum.CornerRounding.html" title="enum widgetry::widgets::CornerRounding">CornerRounding</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="widgets/enum.CornerRounding.html" title="enum widgetry::widgets::CornerRounding">CornerRounding</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <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-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="widgets/enum.CornerRounding.html" title="enum widgetry::widgets::CornerRounding">CornerRounding</a></h3><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#123" 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>(&amp;self, f: &amp;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>&lt;'_&gt;) -&gt; <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/widgetry/widgets/mod.rs.html#123" 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="widgets/enum.CornerRounding.html" title="enum widgetry::widgets::CornerRounding">CornerRounding</a></h3><a href="#impl-Default" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#141-145" 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>() -&gt; Self</h4><a href="#method.default" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#142-144" 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-From%3CCornerRadii%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/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="../geom/struct.CornerRadii.html" title="struct geom::CornerRadii">CornerRadii</a>&gt; for <a class="enum" href="widgets/enum.CornerRounding.html" title="enum widgetry::widgets::CornerRounding">CornerRounding</a></h3><a href="#impl-From%3CCornerRadii%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#135-139" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from-1" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(radii: <a class="struct" href="../geom/struct.CornerRadii.html" title="struct geom::CornerRadii">CornerRadii</a>) -&gt; Self</h4><a href="#method.from-1" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#136-138" 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-From%3Cf64%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/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>&gt; for <a class="enum" href="widgets/enum.CornerRounding.html" title="enum widgetry::widgets::CornerRounding">CornerRounding</a></h3><a href="#impl-From%3Cf64%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#129-133" 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">fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(uniform: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>) -&gt; Self</h4><a href="#method.from" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#130-132" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</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="widgets/enum.CornerRounding.html" title="enum widgetry::widgets::CornerRounding">CornerRounding</a></h3><a href="#impl-Copy" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#123" 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="widgets/enum.CornerRounding.html" title="enum widgetry::widgets::CornerRounding">CornerRounding</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="widgets/enum.CornerRounding.html" title="enum widgetry::widgets::CornerRounding">CornerRounding</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="widgets/enum.CornerRounding.html" title="enum widgetry::widgets::CornerRounding">CornerRounding</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="widgets/enum.CornerRounding.html" title="enum widgetry::widgets::CornerRounding">CornerRounding</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="widgets/enum.CornerRounding.html" title="enum widgetry::widgets::CornerRounding">CornerRounding</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;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-Downcast" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;T&gt; Downcast for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</span></h3><a href="#impl-Downcast" class="anchor"></a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into_any" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="#tymethod.into_any" class="fnname">into_any</a>(self: <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;T, <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static, <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;</h4><a href="#method.into_any" class="anchor"></a></div></summary><div class='docblock'><p>Convert <code>Box&lt;dyn Trait&gt;</code> (where <code>Trait: Downcast</code>) to <code>Box&lt;dyn Any&gt;</code>. <code>Box&lt;dyn Any&gt;</code> can

View File

@ -1,9 +1,10 @@
<!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 result of a Panel handling an event"><meta name="keywords" content="rust, rustlang, rust-lang, Outcome"><title>Outcome in widgetry - 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">&#9776;</div><a href='../widgetry/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Enum Outcome</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.Changed">Changed</a><a href="#variant.ClickCustom">ClickCustom</a><a href="#variant.Clicked">Clicked</a><a href="#variant.Nothing">Nothing</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&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><h2 class="location">Other items in<br><a href="index.html">widgetry</a></h2><div id="sidebar-vars" data-name="Outcome" 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">widgetry</a>::<wbr><a class="enum" href="#">Outcome</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">&#x2212;</span>]</a></span><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#71-81" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust enum">pub enum Outcome {
<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">&#9776;</div><a href='../widgetry/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Enum Outcome</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.Changed">Changed</a><a href="#variant.ClickCustom">ClickCustom</a><a href="#variant.Clicked">Clicked</a><a href="#variant.DragDropReleased">DragDropReleased</a><a href="#variant.Nothing">Nothing</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&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><h2 class="location">Other items in<br><a href="index.html">widgetry</a></h2><div id="sidebar-vars" data-name="Outcome" 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">widgetry</a>::<wbr><a class="enum" href="#">Outcome</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">&#x2212;</span>]</a></span><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#72-85" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust enum">pub enum Outcome {
Clicked(<a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>),
ClickCustom(<a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="../abstutil/clone/trait.CloneableAny.html" title="trait abstutil::clone::CloneableAny">CloneableAny</a>&gt;),
Changed(<a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>),
DragDropReleased(<a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>,&nbsp;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.usize.html">usize</a>,&nbsp;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.usize.html">usize</a>),
Nothing,
}</pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The result of a Panel handling an event</p>
</div></details><h2 id="variants" class="variants small-section-header">
@ -12,6 +13,8 @@
</div><div id="variant.ClickCustom" class="variant small-section-header"><a href="#variant.ClickCustom" class="anchor field"></a><code>ClickCustom(<a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="../abstutil/clone/trait.CloneableAny.html" title="trait abstutil::clone::CloneableAny">CloneableAny</a>&gt;)</code></div><div class="docblock"><p>An action was done, with custom data. The caller must cast to the proper type.</p>
</div><div id="variant.Changed" class="variant small-section-header"><a href="#variant.Changed" class="anchor field"></a><code>Changed(<a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>)</code></div><div class="docblock"><p>A dropdown, checkbox, spinner, etc changed values. The name of the changed widget is
returned, but not the value, since its type is generic.</p>
</div><div id="variant.DragDropReleased" class="variant small-section-header"><a href="#variant.DragDropReleased" class="anchor field"></a><code>DragDropReleased(<a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>,&nbsp;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.usize.html">usize</a>,&nbsp;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.usize.html">usize</a>)</code></div><div class="docblock"><p>On a DragDrop widget, a member was clicked on and released. Its position may have changed.
(name, orig_idx, new_idx)</p>
</div><div id="variant.Nothing" class="variant small-section-header"><a href="#variant.Nothing" class="anchor field"></a><code>Nothing</code></div><div class="docblock"><p>Nothing happened</p>
</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="widgets/enum.Outcome.html" title="enum widgetry::widgets::Outcome">Outcome</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="widgets/enum.Outcome.html" title="enum widgetry::widgets::Outcome">Outcome</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="widgets/enum.Outcome.html" title="enum widgetry::widgets::Outcome">Outcome</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="widgets/enum.Outcome.html" title="enum widgetry::widgets::Outcome">Outcome</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="widgets/enum.Outcome.html" title="enum widgetry::widgets::Outcome">Outcome</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</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>

View File

@ -1,6 +1,6 @@
<!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="A way to transform all colors in a GeomBatch."><meta name="keywords" content="rust, rustlang, rust-lang, RewriteColor"><title>RewriteColor in widgetry - 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">&#9776;</div><a href='../widgetry/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Enum RewriteColor</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.Change">Change</a><a href="#variant.ChangeAll">ChangeAll</a><a href="#variant.ChangeAlpha">ChangeAlpha</a><a href="#variant.MakeGrayscale">MakeGrayscale</a><a href="#variant.NoOp">NoOp</a></div><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.apply">apply</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-Deserialize%3C%27de%3E">Deserialize&lt;&#39;de&gt;</a><a href="#impl-From%3CColor%3E">From&lt;Color&gt;</a><a href="#impl-PartialEq%3CRewriteColor%3E">PartialEq&lt;RewriteColor&gt;</a><a href="#impl-Serialize">Serialize</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&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><h2 class="location">Other items in<br><a href="index.html">widgetry</a></h2><div id="sidebar-vars" data-name="RewriteColor" 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">widgetry</a>::<wbr><a class="enum" href="#">RewriteColor</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">&#x2212;</span>]</a></span><a class="srclink" href="../src/widgetry/geom/mod.rs.html#278-290" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust enum">pub enum RewriteColor {
<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">&#9776;</div><a href='../widgetry/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Enum RewriteColor</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.Change">Change</a><a href="#variant.ChangeAll">ChangeAll</a><a href="#variant.ChangeAlpha">ChangeAlpha</a><a href="#variant.MakeGrayscale">MakeGrayscale</a><a href="#variant.NoOp">NoOp</a></div><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.apply">apply</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-Deserialize%3C%27de%3E">Deserialize&lt;&#39;de&gt;</a><a href="#impl-From%3CColor%3E">From&lt;Color&gt;</a><a href="#impl-PartialEq%3CRewriteColor%3E">PartialEq&lt;RewriteColor&gt;</a><a href="#impl-Serialize">Serialize</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&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><h2 class="location">Other items in<br><a href="index.html">widgetry</a></h2><div id="sidebar-vars" data-name="RewriteColor" 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">widgetry</a>::<wbr><a class="enum" href="#">RewriteColor</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">&#x2212;</span>]</a></span><a class="srclink" href="../src/widgetry/geom/mod.rs.html#284-296" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust enum">pub enum RewriteColor {
NoOp,
Change(<a class="struct" href="color/struct.Color.html" title="struct widgetry::color::Color">Color</a>,&nbsp;<a class="struct" href="color/struct.Color.html" title="struct widgetry::color::Color">Color</a>),
ChangeAll(<a class="struct" href="color/struct.Color.html" title="struct widgetry::color::Color">Color</a>),
@ -15,16 +15,16 @@
be a solid block of color. This does not modify Color::CLEAR.</p>
</div><div id="variant.ChangeAlpha" class="variant small-section-header"><a href="#variant.ChangeAlpha" class="anchor field"></a><code>ChangeAlpha(<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f32.html">f32</a>)</code></div><div class="docblock"><p>Change the alpha value of all colors to this value.</p>
</div><div id="variant.MakeGrayscale" class="variant small-section-header"><a href="#variant.MakeGrayscale" class="anchor field"></a><code>MakeGrayscale</code></div><div class="docblock"><p>Convert all colors to greyscale.</p>
</div><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="enum" href="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#298-323" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.apply" class="method has-srclink"><h4 class="code-header">fn <a href="#method.apply" class="fnname">apply</a>(&amp;self, c: <a class="struct" href="color/struct.Color.html" title="struct widgetry::color::Color">Color</a>) -&gt; <a class="struct" href="color/struct.Color.html" title="struct widgetry::color::Color">Color</a></h4><a href="#method.apply" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#299-322" title="goto source code">[src]</a></div></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="enum" href="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#277" 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>(&amp;self) -&gt; <a class="enum" href="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h4><a href="#method.clone" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#277" 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><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="enum" href="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#304-329" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.apply" class="method has-srclink"><h4 class="code-header">fn <a href="#method.apply" class="fnname">apply</a>(&amp;self, c: <a class="struct" href="color/struct.Color.html" title="struct widgetry::color::Color">Color</a>) -&gt; <a class="struct" href="color/struct.Color.html" title="struct widgetry::color::Color">Color</a></h4><a href="#method.apply" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#305-328" title="goto source code">[src]</a></div></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="enum" href="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#283" 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>(&amp;self) -&gt; <a class="enum" href="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h4><a href="#method.clone" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#283" 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>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</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="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#277" 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>(&amp;self, f: &amp;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>&lt;'_&gt;) -&gt; <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/widgetry/geom/mod.rs.html#277" 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-Deserialize%3C%27de%3E" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;'de&gt; <a class="trait" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt; for <a class="enum" href="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl-Deserialize%3C%27de%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#277" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.deserialize" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html#tymethod.deserialize" class="fnname">deserialize</a>&lt;__D&gt;(__deserializer: __D) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, __D::<a class="type" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__D: <a class="trait" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a>&lt;'de&gt;,&nbsp;</span></h4><a href="#method.deserialize" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#277" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-From%3CColor%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/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="color/struct.Color.html" title="struct widgetry::color::Color">Color</a>&gt; for <a class="enum" href="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl-From%3CColor%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#292-296" 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">fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(color: <a class="struct" href="color/struct.Color.html" title="struct widgetry::color::Color">Color</a>) -&gt; <a class="enum" href="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h4><a href="#method.from" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#293-295" 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-PartialEq%3CRewriteColor%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>&lt;<a class="enum" href="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>&gt; for <a class="enum" href="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl-PartialEq%3CRewriteColor%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#277" 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>(&amp;self, other: &amp;<a class="enum" href="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>) -&gt; <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/widgetry/geom/mod.rs.html#277" 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
</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="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#283" 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>(&amp;self, f: &amp;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>&lt;'_&gt;) -&gt; <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/widgetry/geom/mod.rs.html#283" 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-Deserialize%3C%27de%3E" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;'de&gt; <a class="trait" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt; for <a class="enum" href="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl-Deserialize%3C%27de%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#283" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.deserialize" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html#tymethod.deserialize" class="fnname">deserialize</a>&lt;__D&gt;(__deserializer: __D) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, __D::<a class="type" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__D: <a class="trait" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a>&lt;'de&gt;,&nbsp;</span></h4><a href="#method.deserialize" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#283" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-From%3CColor%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/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="color/struct.Color.html" title="struct widgetry::color::Color">Color</a>&gt; for <a class="enum" href="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl-From%3CColor%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#298-302" 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">fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(color: <a class="struct" href="color/struct.Color.html" title="struct widgetry::color::Color">Color</a>) -&gt; <a class="enum" href="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h4><a href="#method.from" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#299-301" 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-PartialEq%3CRewriteColor%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>&lt;<a class="enum" href="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>&gt; for <a class="enum" href="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl-PartialEq%3CRewriteColor%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#283" 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>(&amp;self, other: &amp;<a class="enum" href="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>) -&gt; <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/widgetry/geom/mod.rs.html#283" 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>(&amp;self, other: &amp;<a class="enum" href="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>) -&gt; <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/widgetry/geom/mod.rs.html#277" 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-Serialize" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a> for <a class="enum" href="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl-Serialize" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#277" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.serialize" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serialize.html#tymethod.serialize" class="fnname">serialize</a>&lt;__S&gt;(&amp;self, __serializer: __S) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;__S::<a class="type" href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, __S::<a class="type" href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__S: <a class="trait" href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serializer.html" title="trait serde::ser::Serializer">Serializer</a>,&nbsp;</span></h4><a href="#method.serialize" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#277" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Serialize this value into the given Serde serializer. <a href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serialize.html#tymethod.serialize">Read more</a></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="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl-Copy" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#277" 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="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl-StructuralPartialEq" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#277" 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="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</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="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</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="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</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="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</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="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <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><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>(&amp;self, other: &amp;<a class="enum" href="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>) -&gt; <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/widgetry/geom/mod.rs.html#283" 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-Serialize" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a> for <a class="enum" href="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl-Serialize" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#283" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.serialize" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serialize.html#tymethod.serialize" class="fnname">serialize</a>&lt;__S&gt;(&amp;self, __serializer: __S) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;__S::<a class="type" href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, __S::<a class="type" href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__S: <a class="trait" href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serializer.html" title="trait serde::ser::Serializer">Serializer</a>,&nbsp;</span></h4><a href="#method.serialize" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#283" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Serialize this value into the given Serde serializer. <a href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serialize.html#tymethod.serialize">Read more</a></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="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl-Copy" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#283" 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="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl-StructuralPartialEq" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#283" 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="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</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="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</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="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</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="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</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="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;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-Downcast" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;T&gt; Downcast for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</span></h3><a href="#impl-Downcast" class="anchor"></a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into_any" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="#tymethod.into_any" class="fnname">into_any</a>(self: <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;T, <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static, <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;</h4><a href="#method.into_any" class="anchor"></a></div></summary><div class='docblock'><p>Convert <code>Box&lt;dyn Trait&gt;</code> (where <code>Trait: Downcast</code>) to <code>Box&lt;dyn Any&gt;</code>. <code>Box&lt;dyn Any&gt;</code> can

View File

@ -1,6 +1,6 @@
<!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="A way to transform all colors in a GeomBatch."><meta name="keywords" content="rust, rustlang, rust-lang, RewriteColor"><title>RewriteColor in widgetry::geom - 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">&#9776;</div><a href='../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Enum RewriteColor</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.Change">Change</a><a href="#variant.ChangeAll">ChangeAll</a><a href="#variant.ChangeAlpha">ChangeAlpha</a><a href="#variant.MakeGrayscale">MakeGrayscale</a><a href="#variant.NoOp">NoOp</a></div><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.apply">apply</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-Deserialize%3C%27de%3E">Deserialize&lt;&#39;de&gt;</a><a href="#impl-From%3CColor%3E">From&lt;Color&gt;</a><a href="#impl-PartialEq%3CRewriteColor%3E">PartialEq&lt;RewriteColor&gt;</a><a href="#impl-Serialize">Serialize</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&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><h2 class="location">Other items in<br><a href="../index.html">widgetry</a>::<wbr><a href="index.html">geom</a></h2><div id="sidebar-vars" data-name="RewriteColor" 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">widgetry</a>::<wbr><a href="index.html">geom</a>::<wbr><a class="enum" href="#">RewriteColor</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#278-290" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust enum">pub enum RewriteColor {
<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">&#9776;</div><a href='../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Enum RewriteColor</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.Change">Change</a><a href="#variant.ChangeAll">ChangeAll</a><a href="#variant.ChangeAlpha">ChangeAlpha</a><a href="#variant.MakeGrayscale">MakeGrayscale</a><a href="#variant.NoOp">NoOp</a></div><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.apply">apply</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-Deserialize%3C%27de%3E">Deserialize&lt;&#39;de&gt;</a><a href="#impl-From%3CColor%3E">From&lt;Color&gt;</a><a href="#impl-PartialEq%3CRewriteColor%3E">PartialEq&lt;RewriteColor&gt;</a><a href="#impl-Serialize">Serialize</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&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><h2 class="location">Other items in<br><a href="../index.html">widgetry</a>::<wbr><a href="index.html">geom</a></h2><div id="sidebar-vars" data-name="RewriteColor" 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">widgetry</a>::<wbr><a href="index.html">geom</a>::<wbr><a class="enum" href="#">RewriteColor</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#284-296" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust enum">pub enum RewriteColor {
NoOp,
Change(<a class="struct" href="../color/struct.Color.html" title="struct widgetry::color::Color">Color</a>,&nbsp;<a class="struct" href="../color/struct.Color.html" title="struct widgetry::color::Color">Color</a>),
ChangeAll(<a class="struct" href="../color/struct.Color.html" title="struct widgetry::color::Color">Color</a>),
@ -15,16 +15,16 @@
be a solid block of color. This does not modify Color::CLEAR.</p>
</div><div id="variant.ChangeAlpha" class="variant small-section-header"><a href="#variant.ChangeAlpha" class="anchor field"></a><code>ChangeAlpha(<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f32.html">f32</a>)</code></div><div class="docblock"><p>Change the alpha value of all colors to this value.</p>
</div><div id="variant.MakeGrayscale" class="variant small-section-header"><a href="#variant.MakeGrayscale" class="anchor field"></a><code>MakeGrayscale</code></div><div class="docblock"><p>Convert all colors to greyscale.</p>
</div><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="enum" href="enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#298-323" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.apply" class="method has-srclink"><h4 class="code-header">fn <a href="#method.apply" class="fnname">apply</a>(&amp;self, c: <a class="struct" href="../color/struct.Color.html" title="struct widgetry::color::Color">Color</a>) -&gt; <a class="struct" href="../color/struct.Color.html" title="struct widgetry::color::Color">Color</a></h4><a href="#method.apply" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#299-322" title="goto source code">[src]</a></div></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="enum" href="enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#277" 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>(&amp;self) -&gt; <a class="enum" href="enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h4><a href="#method.clone" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#277" 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><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="enum" href="enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#304-329" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.apply" class="method has-srclink"><h4 class="code-header">fn <a href="#method.apply" class="fnname">apply</a>(&amp;self, c: <a class="struct" href="../color/struct.Color.html" title="struct widgetry::color::Color">Color</a>) -&gt; <a class="struct" href="../color/struct.Color.html" title="struct widgetry::color::Color">Color</a></h4><a href="#method.apply" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#305-328" title="goto source code">[src]</a></div></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="enum" href="enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#283" 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>(&amp;self) -&gt; <a class="enum" href="enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h4><a href="#method.clone" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#283" 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>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</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.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#277" 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>(&amp;self, f: &amp;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>&lt;'_&gt;) -&gt; <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/widgetry/geom/mod.rs.html#277" 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-Deserialize%3C%27de%3E" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;'de&gt; <a class="trait" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt; for <a class="enum" href="enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl-Deserialize%3C%27de%3E" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#277" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.deserialize" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html#tymethod.deserialize" class="fnname">deserialize</a>&lt;__D&gt;(__deserializer: __D) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, __D::<a class="type" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__D: <a class="trait" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a>&lt;'de&gt;,&nbsp;</span></h4><a href="#method.deserialize" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#277" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-From%3CColor%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/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="../color/struct.Color.html" title="struct widgetry::color::Color">Color</a>&gt; for <a class="enum" href="enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl-From%3CColor%3E" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#292-296" 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">fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(color: <a class="struct" href="../color/struct.Color.html" title="struct widgetry::color::Color">Color</a>) -&gt; <a class="enum" href="enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h4><a href="#method.from" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#293-295" 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-PartialEq%3CRewriteColor%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>&lt;<a class="enum" href="enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>&gt; for <a class="enum" href="enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl-PartialEq%3CRewriteColor%3E" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#277" 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>(&amp;self, other: &amp;<a class="enum" href="enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>) -&gt; <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/widgetry/geom/mod.rs.html#277" 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
</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.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#283" 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>(&amp;self, f: &amp;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>&lt;'_&gt;) -&gt; <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/widgetry/geom/mod.rs.html#283" 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-Deserialize%3C%27de%3E" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;'de&gt; <a class="trait" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt; for <a class="enum" href="enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl-Deserialize%3C%27de%3E" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#283" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.deserialize" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html#tymethod.deserialize" class="fnname">deserialize</a>&lt;__D&gt;(__deserializer: __D) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, __D::<a class="type" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__D: <a class="trait" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a>&lt;'de&gt;,&nbsp;</span></h4><a href="#method.deserialize" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#283" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-From%3CColor%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/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="../color/struct.Color.html" title="struct widgetry::color::Color">Color</a>&gt; for <a class="enum" href="enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl-From%3CColor%3E" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#298-302" 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">fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(color: <a class="struct" href="../color/struct.Color.html" title="struct widgetry::color::Color">Color</a>) -&gt; <a class="enum" href="enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h4><a href="#method.from" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#299-301" 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-PartialEq%3CRewriteColor%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>&lt;<a class="enum" href="enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>&gt; for <a class="enum" href="enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl-PartialEq%3CRewriteColor%3E" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#283" 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>(&amp;self, other: &amp;<a class="enum" href="enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>) -&gt; <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/widgetry/geom/mod.rs.html#283" 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>(&amp;self, other: &amp;<a class="enum" href="enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>) -&gt; <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/widgetry/geom/mod.rs.html#277" 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-Serialize" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a> for <a class="enum" href="enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl-Serialize" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#277" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.serialize" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serialize.html#tymethod.serialize" class="fnname">serialize</a>&lt;__S&gt;(&amp;self, __serializer: __S) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;__S::<a class="type" href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, __S::<a class="type" href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__S: <a class="trait" href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serializer.html" title="trait serde::ser::Serializer">Serializer</a>,&nbsp;</span></h4><a href="#method.serialize" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#277" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Serialize this value into the given Serde serializer. <a href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serialize.html#tymethod.serialize">Read more</a></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.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl-Copy" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#277" 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.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl-StructuralPartialEq" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#277" 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.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</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.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</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.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</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.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</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.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <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><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>(&amp;self, other: &amp;<a class="enum" href="enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>) -&gt; <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/widgetry/geom/mod.rs.html#283" 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-Serialize" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a> for <a class="enum" href="enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl-Serialize" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#283" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.serialize" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serialize.html#tymethod.serialize" class="fnname">serialize</a>&lt;__S&gt;(&amp;self, __serializer: __S) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;__S::<a class="type" href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, __S::<a class="type" href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__S: <a class="trait" href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serializer.html" title="trait serde::ser::Serializer">Serializer</a>,&nbsp;</span></h4><a href="#method.serialize" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#283" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Serialize this value into the given Serde serializer. <a href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serialize.html#tymethod.serialize">Read more</a></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.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl-Copy" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#283" 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.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl-StructuralPartialEq" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#283" 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.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</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.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</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.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</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.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</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.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;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-Downcast" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;T&gt; Downcast for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</span></h3><a href="#impl-Downcast" class="anchor"></a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into_any" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="#tymethod.into_any" class="fnname">into_any</a>(self: <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;T, <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static, <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;</h4><a href="#method.into_any" class="anchor"></a></div></summary><div class='docblock'><p>Convert <code>Box&lt;dyn Trait&gt;</code> (where <code>Trait: Downcast</code>) to <code>Box&lt;dyn Any&gt;</code>. <code>Box&lt;dyn Any&gt;</code> can

View File

@ -1,6 +1,6 @@
<!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 `geom_batch_stack` mod in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, geom_batch_stack"><title>widgetry::geom::geom_batch_stack - 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">&#9776;</div><a href='../../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module geom_batch_stack</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="geom_batch_stack" 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">widgetry</a>::<wbr><a href="../index.html">geom</a>::<wbr><a class="mod" href="#">geom_batch_stack</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">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/widgetry/geom/geom_batch_stack.rs.html#1-130" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<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">&#9776;</div><a href='../../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module geom_batch_stack</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="geom_batch_stack" 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">widgetry</a>::<wbr><a href="../index.html">geom</a>::<wbr><a class="mod" href="#">geom_batch_stack</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">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/widgetry/geom/geom_batch_stack.rs.html#1-138" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<table><tr class="module-item"><td><a class="struct" href="struct.GeomBatchStack.html" title="widgetry::geom::geom_batch_stack::GeomBatchStack struct">GeomBatchStack</a></td><td class="docblock-short"><p>Similar to [<code>Widget::row</code>]/[<code>Widget::column</code>], but for <a href="../struct.GeomBatch.html" title="GeomBatch"><code>GeomBatch</code></a>s instead of [<code>Widget</code>]s,
and follows a builder pattern</p>
</td></tr></table><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2>

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
<!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 `geom` mod in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, geom"><title>widgetry::geom - 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">&#9776;</div><a href='../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module geom</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li></ul></div><div id="sidebar-vars" data-name="geom" 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">widgetry</a>::<wbr><a class="mod" href="#">geom</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#1-323" title="goto source code">[src]</a></span></h1><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2>
<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">&#9776;</div><a href='../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module geom</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li></ul></div><div id="sidebar-vars" data-name="geom" 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">widgetry</a>::<wbr><a class="mod" href="#">geom</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#1-329" title="goto source code">[src]</a></span></h1><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2>
<table><tr class="module-item"><td><a class="mod" href="geom_batch_stack/index.html" title="widgetry::geom::geom_batch_stack mod">geom_batch_stack</a></td><td class="docblock-short"></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.GeomBatch.html" title="widgetry::geom::GeomBatch struct">GeomBatch</a></td><td class="docblock-short"><p>A mutable builder for a group of colored polygons.</p>
</td></tr></table><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2>

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
<!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="Widgets"><meta name="keywords" content="rust, rustlang, rust-lang, widgetry"><title>widgetry - 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">&#9776;</div><a href='../widgetry/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Crate widgetry</h2><div class="block version"><p>Version 0.1.0</p></div><div class="sidebar-elems"><a id="all-types" href="all.html"><p>See all widgetry'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><li><a href="#functions">Functions</a></li><li><a href="#types">Type Definitions</a></li></ul></div><div id="sidebar-vars" data-name="widgetry" 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="#">widgetry</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">&#x2212;</span>]</a></span><a class="srclink" href="../src/widgetry/lib.rs.html#1-231" 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"><h1 id="widgets" class="section-header"><a href="#widgets">Widgets</a></h1>
<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">&#9776;</div><a href='../widgetry/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Crate widgetry</h2><div class="block version"><p>Version 0.1.0</p></div><div class="sidebar-elems"><a id="all-types" href="all.html"><p>See all widgetry'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><li><a href="#functions">Functions</a></li><li><a href="#types">Type Definitions</a></li></ul></div><div id="sidebar-vars" data-name="widgetry" 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="#">widgetry</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">&#x2212;</span>]</a></span><a class="srclink" href="../src/widgetry/lib.rs.html#1-233" 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"><h1 id="widgets" class="section-header"><a href="#widgets">Widgets</a></h1>
<p>If none of these do what you need, implementing a new <a href="widgets/trait.WidgetImpl.html" title="WidgetImpl"><code>WidgetImpl</code></a> isnt tough.</p>
<p>TODO inline pictures of some of these</p>
<ul>
@ -8,6 +8,7 @@
<li><a href="widgets/button/struct.Button.html" title="Button"><code>Button</code></a> - clickable buttons with keybindings and tooltips</li>
<li><a href="widgets/toggle/struct.Toggle.html" title="Toggle"><code>Toggle</code></a> - checkboxes, switches, and other toggles</li>
<li><a href="widgets/compare_times/struct.CompareTimes.html" title="CompareTimes"><code>CompareTimes</code></a> - a scatter plot specialized for comparing times</li>
<li><a href="widgets/drag_drop/struct.DragDrop.html" title="DragDrop"><code>DragDrop</code></a> - a reorderable row of draggable cards</li>
<li><a href="widgets/just_draw/struct.DrawWithTooltips.html" title="DrawWithTooltips"><code>DrawWithTooltips</code></a> - draw static geometry, with mouse tooltips in certain regions</li>
<li><a href="widgets/dropdown/struct.Dropdown.html" title="Dropdown"><code>Dropdown</code></a> - a button that expands into a menu</li>
<li><a href="widgets/fan_chart/struct.FanChart.html" title="FanChart"><code>FanChart</code></a> - visualize a range of values over time</li>
@ -34,7 +35,7 @@ of the map.</p>
<table><tr class="module-item"><td><a class="macro" href="macro.include_labeled_bytes.html" title="widgetry::include_labeled_bytes macro">include_labeled_bytes</a></td><td class="docblock-short"><p>Like <a href="https://doc.rust-lang.org/1.54.0/core/macro.include_bytes.html" title="std::include_bytes!"><code>std::include_bytes!</code></a>, but also returns its argument, the relative path to the bytes</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.Autocomplete.html" title="widgetry::Autocomplete struct">Autocomplete</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.ButtonBuilder.html" title="widgetry::ButtonBuilder struct">ButtonBuilder</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.ButtonStyle.html" title="widgetry::ButtonStyle struct">ButtonStyle</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.Cached.html" title="widgetry::Cached struct">Cached</a></td><td class="docblock-short"><p>Store a cached key/value pair, only recalculating when the key changes.</p>
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Canvas.html" title="widgetry::Canvas struct">Canvas</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.CanvasSettings.html" title="widgetry::CanvasSettings struct">CanvasSettings</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.Choice.html" title="widgetry::Choice struct">Choice</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.Color.html" title="widgetry::Color struct">Color</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.CompareTimes.html" title="widgetry::CompareTimes struct">CompareTimes</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.DrawWithTooltips.html" title="widgetry::DrawWithTooltips struct">DrawWithTooltips</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.Drawable.html" title="widgetry::Drawable struct">Drawable</a></td><td class="docblock-short"><p>Geometry thats been uploaded to the GPU once and can be quickly redrawn many times. Create by
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Canvas.html" title="widgetry::Canvas struct">Canvas</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.CanvasSettings.html" title="widgetry::CanvasSettings struct">CanvasSettings</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.Choice.html" title="widgetry::Choice struct">Choice</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.Color.html" title="widgetry::Color struct">Color</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.CompareTimes.html" title="widgetry::CompareTimes struct">CompareTimes</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.DragDrop.html" title="widgetry::DragDrop struct">DragDrop</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.DrawWithTooltips.html" title="widgetry::DrawWithTooltips struct">DrawWithTooltips</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.Drawable.html" title="widgetry::Drawable struct">Drawable</a></td><td class="docblock-short"><p>Geometry thats been uploaded to the GPU once and can be quickly redrawn many times. Create by
creating a <code>GeomBatch</code> and calling <code>ctx.upload(batch)</code>.</p>
</td></tr><tr class="module-item"><td><a class="struct" href="struct.EdgeInsets.html" title="widgetry::EdgeInsets struct">EdgeInsets</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.EventCtx.html" title="widgetry::EventCtx struct">EventCtx</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.FanChart.html" title="widgetry::FanChart struct">FanChart</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.Filler.html" title="widgetry::Filler struct">Filler</a></td><td class="docblock-short"><p>Doesnt do anything by itself, just used for widgetsing. Something else reaches in, asks for the
ScreenRectangle to use.</p>

View File

@ -1,6 +1,6 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Like [`std::include_bytes!`], but also returns its argument, the relative path to the bytes"><meta name="keywords" content="rust, rustlang, rust-lang, include_labeled_bytes"><title>include_labeled_bytes in widgetry - 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">&#9776;</div><a href='../widgetry/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">widgetry</a></h2><div id="sidebar-vars" data-name="include_labeled_bytes" 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">widgetry</a>::<wbr><a class="macro" href="#">include_labeled_bytes</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">&#x2212;</span>]</a></span><a class="srclink" href="../src/widgetry/lib.rs.html#112-116" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><div class="example-wrap"><pre class="rust macro">
<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">&#9776;</div><a href='../widgetry/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">widgetry</a></h2><div id="sidebar-vars" data-name="include_labeled_bytes" 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">widgetry</a>::<wbr><a class="macro" href="#">include_labeled_bytes</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">&#x2212;</span>]</a></span><a class="srclink" href="../src/widgetry/lib.rs.html#114-118" 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">include_labeled_bytes</span> {
(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">file</span>:<span class="ident">expr</span>) <span class="op">=</span><span class="op">&gt;</span> { ... };
}</pre></div>

View File

@ -1,6 +1,6 @@
<!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 `screen_geom` mod in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, screen_geom"><title>widgetry::screen_geom - 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">&#9776;</div><a href='../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module screen_geom</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><div id="sidebar-vars" data-name="screen_geom" 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">widgetry</a>::<wbr><a class="mod" href="#">screen_geom</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/widgetry/screen_geom.rs.html#1-193" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<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">&#9776;</div><a href='../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module screen_geom</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><div id="sidebar-vars" data-name="screen_geom" 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">widgetry</a>::<wbr><a class="mod" href="#">screen_geom</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/widgetry/screen_geom.rs.html#1-210" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<table><tr class="module-item"><td><a class="struct" href="struct.ScreenDims.html" title="widgetry::screen_geom::ScreenDims struct">ScreenDims</a></td><td class="docblock-short"><p>ScreenDims is in units of logical pixels, as opposed to physical pixels.</p>
</td></tr><tr class="module-item"><td><a class="struct" href="struct.ScreenPt.html" title="widgetry::screen_geom::ScreenPt struct">ScreenPt</a></td><td class="docblock-short"><p>ScreenPt is in units of logical pixels, as opposed to physical pixels.</p>
</td></tr><tr class="module-item"><td><a class="struct" href="struct.ScreenRectangle.html" title="widgetry::screen_geom::ScreenRectangle struct">ScreenRectangle</a></td><td class="docblock-short"><p>ScreenRectangle is in units of logical pixels, as opposed to physical pixels.</p>

File diff suppressed because one or more lines are too long

View File

@ -1,14 +1,14 @@
<!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="ScreenPt is in units of logical pixels, as opposed to physical pixels."><meta name="keywords" content="rust, rustlang, rust-lang, ScreenPt"><title>ScreenPt in widgetry::screen_geom - 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">&#9776;</div><a href='../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct ScreenPt</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield.x">x</a><a href="#structfield.y">y</a></div><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.new">new</a><a href="#method.to_pt">to_pt</a><a href="#method.translated">translated</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-From%3CLogicalPosition%3Cf64%3E%3E">From&lt;LogicalPosition&lt;f64&gt;&gt;</a><a href="#impl-PartialEq%3CScreenPt%3E">PartialEq&lt;ScreenPt&gt;</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&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><h2 class="location">Other items in<br><a href="../index.html">widgetry</a>::<wbr><a href="index.html">screen_geom</a></h2><div id="sidebar-vars" data-name="ScreenPt" 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">widgetry</a>::<wbr><a href="index.html">screen_geom</a>::<wbr><a class="struct" href="#">ScreenPt</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/widgetry/screen_geom.rs.html#9-12" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct">pub struct ScreenPt {
<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">&#9776;</div><a href='../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct ScreenPt</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield.x">x</a><a href="#structfield.y">y</a></div><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.new">new</a><a href="#method.to_pt">to_pt</a><a href="#method.translated">translated</a><a href="#method.zero">zero</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-From%3CLogicalPosition%3Cf64%3E%3E">From&lt;LogicalPosition&lt;f64&gt;&gt;</a><a href="#impl-PartialEq%3CScreenPt%3E">PartialEq&lt;ScreenPt&gt;</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&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><h2 class="location">Other items in<br><a href="../index.html">widgetry</a>::<wbr><a href="index.html">screen_geom</a></h2><div id="sidebar-vars" data-name="ScreenPt" 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">widgetry</a>::<wbr><a href="index.html">screen_geom</a>::<wbr><a class="struct" href="#">ScreenPt</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/widgetry/screen_geom.rs.html#9-12" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct">pub struct ScreenPt {
pub x: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>,
pub y: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>,
}</pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>ScreenPt is in units of logical pixels, as opposed to physical pixels.</p>
</div></details><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>x: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a></code></span><span id="structfield.y" class="structfield small-section-header"><a href="#structfield.y" class="anchor field"></a><code>y: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a></code></span><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.ScreenPt.html" title="struct widgetry::screen_geom::ScreenPt">ScreenPt</a></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/widgetry/screen_geom.rs.html#14-31" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.new" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.new" class="fnname">new</a>(x: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>, y: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>) -&gt; <a class="struct" href="struct.ScreenPt.html" title="struct widgetry::screen_geom::ScreenPt">ScreenPt</a></h4><a href="#method.new" class="anchor"></a><a class="srclink" href="../../src/widgetry/screen_geom.rs.html#15-17" title="goto source code">[src]</a></div><div id="method.to_pt" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.to_pt" class="fnname">to_pt</a>(self) -&gt; <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a></h4><a href="#method.to_pt" class="anchor"></a><a class="srclink" href="../../src/widgetry/screen_geom.rs.html#21-23" title="goto source code">[src]</a></div><div id="method.translated" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.translated" class="fnname">translated</a>(&amp;self, x: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>, y: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>) -&gt; Self</h4><a href="#method.translated" class="anchor"></a><a class="srclink" href="../../src/widgetry/screen_geom.rs.html#25-30" title="goto source code">[src]</a></div></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.ScreenPt.html" title="struct widgetry::screen_geom::ScreenPt">ScreenPt</a></h3><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../src/widgetry/screen_geom.rs.html#8" 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>(&amp;self) -&gt; <a class="struct" href="struct.ScreenPt.html" title="struct widgetry::screen_geom::ScreenPt">ScreenPt</a></h4><a href="#method.clone" class="anchor"></a><a class="srclink" href="../../src/widgetry/screen_geom.rs.html#8" 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>
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>x: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a></code></span><span id="structfield.y" class="structfield small-section-header"><a href="#structfield.y" class="anchor field"></a><code>y: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a></code></span><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.ScreenPt.html" title="struct widgetry::screen_geom::ScreenPt">ScreenPt</a></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/widgetry/screen_geom.rs.html#14-35" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.new" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.new" class="fnname">new</a>(x: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>, y: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>) -&gt; <a class="struct" href="struct.ScreenPt.html" title="struct widgetry::screen_geom::ScreenPt">ScreenPt</a></h4><a href="#method.new" class="anchor"></a><a class="srclink" href="../../src/widgetry/screen_geom.rs.html#15-17" title="goto source code">[src]</a></div><div id="method.to_pt" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.to_pt" class="fnname">to_pt</a>(self) -&gt; <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a></h4><a href="#method.to_pt" class="anchor"></a><a class="srclink" href="../../src/widgetry/screen_geom.rs.html#21-23" title="goto source code">[src]</a></div><div id="method.zero" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.zero" class="fnname">zero</a>() -&gt; Self</h4><a href="#method.zero" class="anchor"></a><a class="srclink" href="../../src/widgetry/screen_geom.rs.html#25-27" title="goto source code">[src]</a></div><div id="method.translated" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.translated" class="fnname">translated</a>(&amp;self, x: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>, y: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>) -&gt; Self</h4><a href="#method.translated" class="anchor"></a><a class="srclink" href="../../src/widgetry/screen_geom.rs.html#29-34" title="goto source code">[src]</a></div></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.ScreenPt.html" title="struct widgetry::screen_geom::ScreenPt">ScreenPt</a></h3><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../src/widgetry/screen_geom.rs.html#8" 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>(&amp;self) -&gt; <a class="struct" href="struct.ScreenPt.html" title="struct widgetry::screen_geom::ScreenPt">ScreenPt</a></h4><a href="#method.clone" class="anchor"></a><a class="srclink" href="../../src/widgetry/screen_geom.rs.html#8" 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>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</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.ScreenPt.html" title="struct widgetry::screen_geom::ScreenPt">ScreenPt</a></h3><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/widgetry/screen_geom.rs.html#8" 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>(&amp;self, f: &amp;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>&lt;'_&gt;) -&gt; <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/widgetry/screen_geom.rs.html#8" 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-From%3CLogicalPosition%3Cf64%3E%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/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;LogicalPosition&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>&gt;&gt; for <a class="struct" href="struct.ScreenPt.html" title="struct widgetry::screen_geom::ScreenPt">ScreenPt</a></h3><a href="#impl-From%3CLogicalPosition%3Cf64%3E%3E" class="anchor"></a><a class="srclink" href="../../src/widgetry/screen_geom.rs.html#33-37" 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">fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(lp: LogicalPosition&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>&gt;) -&gt; <a class="struct" href="struct.ScreenPt.html" title="struct widgetry::screen_geom::ScreenPt">ScreenPt</a></h4><a href="#method.from" class="anchor"></a><a class="srclink" href="../../src/widgetry/screen_geom.rs.html#34-36" 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-From%3CLogicalPosition%3Cf64%3E%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/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;LogicalPosition&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>&gt;&gt; for <a class="struct" href="struct.ScreenPt.html" title="struct widgetry::screen_geom::ScreenPt">ScreenPt</a></h3><a href="#impl-From%3CLogicalPosition%3Cf64%3E%3E" class="anchor"></a><a class="srclink" href="../../src/widgetry/screen_geom.rs.html#37-41" 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">fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(lp: LogicalPosition&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>&gt;) -&gt; <a class="struct" href="struct.ScreenPt.html" title="struct widgetry::screen_geom::ScreenPt">ScreenPt</a></h4><a href="#method.from" class="anchor"></a><a class="srclink" href="../../src/widgetry/screen_geom.rs.html#38-40" 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-PartialEq%3CScreenPt%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>&lt;<a class="struct" href="struct.ScreenPt.html" title="struct widgetry::screen_geom::ScreenPt">ScreenPt</a>&gt; for <a class="struct" href="struct.ScreenPt.html" title="struct widgetry::screen_geom::ScreenPt">ScreenPt</a></h3><a href="#impl-PartialEq%3CScreenPt%3E" class="anchor"></a><a class="srclink" href="../../src/widgetry/screen_geom.rs.html#8" 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>(&amp;self, other: &amp;<a class="struct" href="struct.ScreenPt.html" title="struct widgetry::screen_geom::ScreenPt">ScreenPt</a>) -&gt; <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/widgetry/screen_geom.rs.html#8" 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>(&amp;self, other: &amp;<a class="struct" href="struct.ScreenPt.html" title="struct widgetry::screen_geom::ScreenPt">ScreenPt</a>) -&gt; <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/widgetry/screen_geom.rs.html#8" title="goto source code">[src]</a></div></summary><div class='docblock'><p>This method tests for <code>!=</code>.</p>

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
initSidebarItems({"constant":[["DEFAULT_CORNER_RADIUS",""]],"enum":[["ClickOutcome","When an action happens through a button-like widget, what data is plumbed back?"],["ContentMode","Rules for how content should stretch to fill its bounds"],["ControlState",""],["CornerRounding",""],["DrawBaselayer","Before `State::draw` is called, draw something else."],["Event",""],["Fill",""],["Font",""],["HorizontalAlignment",""],["ImageSource","The visual"],["Key",""],["MultiKey",""],["Outcome","The result of a Panel handling an event"],["RewriteColor","A way to transform all colors in a GeomBatch."],["StackAlignment",""],["StackAxis",""],["Transition","When a state responds to an event, it can specify some way to manipulate the stack of states."],["UpdateType",""],["VerticalAlignment",""]],"fn":[["Line",""],["hotkeys",""],["lctrl",""],["run",""]],"macro":[["include_labeled_bytes","Like [`std::include_bytes!`], but also returns its argument, the relative path to the bytes"]],"mod":[["app_state","A widgetry application splits its state into two pieces: global shared state that lasts for the entire lifetime of the application, and a stack of smaller states, only one of which is active at a time. For example, imagine an application to view a map. The shared state would include the map and pre-rendered geometry for it. The individual states might start with a splash screen or menu to choose a map, then a map viewer, then maybe a state to drill down into pieces of the map."],["assets",""],["backend",""],["backend_glow",""],["backend_glow_native",""],["canvas",""],["color",""],["drawing",""],["event",""],["event_ctx",""],["geom",""],["input",""],["runner",""],["screen_geom",""],["style",""],["svg",""],["table",""],["text",""],["tools",""],["widgets",""]],"struct":[["Autocomplete",""],["ButtonBuilder",""],["ButtonStyle",""],["Cached","Store a cached key/value pair, only recalculating when the key changes."],["Canvas",""],["CanvasSettings",""],["Choice",""],["Color",""],["CompareTimes",""],["DrawWithTooltips",""],["Drawable","Geometry thats been uploaded to the GPU once and can be quickly redrawn many times. Create by creating a `GeomBatch` and calling `ctx.upload(batch)`."],["EdgeInsets",""],["EventCtx",""],["FanChart",""],["Filler","Doesnt do anything by itself, just used for widgetsing. Something else reaches in, asks for the ScreenRectangle to use."],["GeomBatch","A mutable builder for a group of colored polygons."],["GeomBatchStack","Similar to [`Widget::row`]/[`Widget::column`], but for [`GeomBatch`]s instead of [`Widget`]s, and follows a builder pattern"],["GfxCtx",""],["Image","A stylable UI component builder which presents vector graphics from an [`ImageSource`]."],["LinePlot",""],["LinearGradient",""],["Menu",""],["MultiButton",""],["Panel",""],["PersistentSplit",""],["PlotOptions",""],["Prerender",""],["ScatterPlot",""],["ScreenDims","ScreenDims is in units of logical pixels, as opposed to physical pixels."],["ScreenPt","ScreenPt is in units of logical pixels, as opposed to physical pixels."],["ScreenRectangle","ScreenRectangle is in units of logical pixels, as opposed to physical pixels."],["Series",""],["Settings","Customize how widgetry works. Most of these settings cant be changed after starting."],["Slider",""],["Spinner",""],["Stash","An invisible widget that stores some arbitrary data on the Panel. Users of the panel can read and write the value. This is one method for “returning” data when a State completes."],["Style",""],["TabController",""],["Text",""],["TextBox",""],["TextSpan",""],["Texture",""],["Toggle",""],["UserInput",""],["Warper",""],["Widget",""],["WidgetOutput",""]],"trait":[["SharedAppState","Any data that should last the entire lifetime of the application should be stored in the struct implementing this trait."],["SimpleState","Many states fit a pattern of managing a single panel, handling mouseover events, and other interactions on the map. Implementing this instead of `State` reduces some boilerplate."],["State","A temporary state of an application. Theres a stack of these, with the most recent being the active one."],["TextExt",""],["WidgetImpl","Create a new widget by implementing this trait. You can instantiate your widget by calling `Widget::new(Box::new(instance of your new widget))`, which gives you the usual style options."]],"type":[["OutlineStyle",""]]});
initSidebarItems({"constant":[["DEFAULT_CORNER_RADIUS",""]],"enum":[["ClickOutcome","When an action happens through a button-like widget, what data is plumbed back?"],["ContentMode","Rules for how content should stretch to fill its bounds"],["ControlState",""],["CornerRounding",""],["DrawBaselayer","Before `State::draw` is called, draw something else."],["Event",""],["Fill",""],["Font",""],["HorizontalAlignment",""],["ImageSource","The visual"],["Key",""],["MultiKey",""],["Outcome","The result of a Panel handling an event"],["RewriteColor","A way to transform all colors in a GeomBatch."],["StackAlignment",""],["StackAxis",""],["Transition","When a state responds to an event, it can specify some way to manipulate the stack of states."],["UpdateType",""],["VerticalAlignment",""]],"fn":[["Line",""],["hotkeys",""],["lctrl",""],["run",""]],"macro":[["include_labeled_bytes","Like [`std::include_bytes!`], but also returns its argument, the relative path to the bytes"]],"mod":[["app_state","A widgetry application splits its state into two pieces: global shared state that lasts for the entire lifetime of the application, and a stack of smaller states, only one of which is active at a time. For example, imagine an application to view a map. The shared state would include the map and pre-rendered geometry for it. The individual states might start with a splash screen or menu to choose a map, then a map viewer, then maybe a state to drill down into pieces of the map."],["assets",""],["backend",""],["backend_glow",""],["backend_glow_native",""],["canvas",""],["color",""],["drawing",""],["event",""],["event_ctx",""],["geom",""],["input",""],["runner",""],["screen_geom",""],["style",""],["svg",""],["table",""],["text",""],["tools",""],["widgets",""]],"struct":[["Autocomplete",""],["ButtonBuilder",""],["ButtonStyle",""],["Cached","Store a cached key/value pair, only recalculating when the key changes."],["Canvas",""],["CanvasSettings",""],["Choice",""],["Color",""],["CompareTimes",""],["DragDrop",""],["DrawWithTooltips",""],["Drawable","Geometry thats been uploaded to the GPU once and can be quickly redrawn many times. Create by creating a `GeomBatch` and calling `ctx.upload(batch)`."],["EdgeInsets",""],["EventCtx",""],["FanChart",""],["Filler","Doesnt do anything by itself, just used for widgetsing. Something else reaches in, asks for the ScreenRectangle to use."],["GeomBatch","A mutable builder for a group of colored polygons."],["GeomBatchStack","Similar to [`Widget::row`]/[`Widget::column`], but for [`GeomBatch`]s instead of [`Widget`]s, and follows a builder pattern"],["GfxCtx",""],["Image","A stylable UI component builder which presents vector graphics from an [`ImageSource`]."],["LinePlot",""],["LinearGradient",""],["Menu",""],["MultiButton",""],["Panel",""],["PersistentSplit",""],["PlotOptions",""],["Prerender",""],["ScatterPlot",""],["ScreenDims","ScreenDims is in units of logical pixels, as opposed to physical pixels."],["ScreenPt","ScreenPt is in units of logical pixels, as opposed to physical pixels."],["ScreenRectangle","ScreenRectangle is in units of logical pixels, as opposed to physical pixels."],["Series",""],["Settings","Customize how widgetry works. Most of these settings cant be changed after starting."],["Slider",""],["Spinner",""],["Stash","An invisible widget that stores some arbitrary data on the Panel. Users of the panel can read and write the value. This is one method for “returning” data when a State completes."],["Style",""],["TabController",""],["Text",""],["TextBox",""],["TextSpan",""],["Texture",""],["Toggle",""],["UserInput",""],["Warper",""],["Widget",""],["WidgetOutput",""]],"trait":[["SharedAppState","Any data that should last the entire lifetime of the application should be stored in the struct implementing this trait."],["SimpleState","Many states fit a pattern of managing a single panel, handling mouseover events, and other interactions on the map. Implementing this instead of `State` reduces some boilerplate."],["State","A temporary state of an application. Theres a stack of these, with the most recent being the active one."],["TextExt",""],["WidgetImpl","Create a new widget by implementing this trait. You can instantiate your widget by calling `Widget::new(Box::new(instance of your new widget))`, which gives you the usual style options."]],"type":[["OutlineStyle",""]]});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -12,7 +12,7 @@
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Deserialize%3C%27de%3E" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;'de&gt; <a class="trait" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt; for <a class="struct" href="color/struct.Color.html" title="struct widgetry::color::Color">Color</a></h3><a href="#impl-Deserialize%3C%27de%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/color.rs.html#7" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.deserialize" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html#tymethod.deserialize" class="fnname">deserialize</a>&lt;__D&gt;(__deserializer: __D) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, __D::<a class="type" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__D: <a class="trait" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a>&lt;'de&gt;,&nbsp;</span></h4><a href="#method.deserialize" class="anchor"></a><a class="srclink" href="../src/widgetry/color.rs.html#7" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html#tymethod.deserialize">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="color/struct.Color.html" title="struct widgetry::color::Color">Color</a></h3><a href="#impl-Display" class="anchor"></a><a class="srclink" href="../src/widgetry/color.rs.html#15-23" 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>(&amp;self, f: &amp;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>&lt;'_&gt;) -&gt; <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/widgetry/color.rs.html#16-22" 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-From%3CColor%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/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="color/struct.Color.html" title="struct widgetry::color::Color">Color</a>&gt; for <a class="enum" href="color/enum.Fill.html" title="enum widgetry::color::Fill">Fill</a></h3><a href="#impl-From%3CColor%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/color.rs.html#231-235" 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">fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(color: <a class="struct" href="color/struct.Color.html" title="struct widgetry::color::Color">Color</a>) -&gt; <a class="enum" href="color/enum.Fill.html" title="enum widgetry::color::Fill">Fill</a></h4><a href="#method.from" class="anchor"></a><a class="srclink" href="../src/widgetry/color.rs.html#232-234" 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-From%3CColor%3E-1" class="impl has-srclink"><h3 class="code-header in-band">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>&lt;<a class="struct" href="color/struct.Color.html" title="struct widgetry::color::Color">Color</a>&gt; for <a class="enum" href="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl-From%3CColor%3E-1" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#292-296" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from-1" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(color: <a class="struct" href="color/struct.Color.html" title="struct widgetry::color::Color">Color</a>) -&gt; <a class="enum" href="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h4><a href="#method.from-1" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#293-295" 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-From%3CColor%3E-1" class="impl has-srclink"><h3 class="code-header in-band">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>&lt;<a class="struct" href="color/struct.Color.html" title="struct widgetry::color::Color">Color</a>&gt; for <a class="enum" href="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h3><a href="#impl-From%3CColor%3E-1" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#298-302" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from-1" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(color: <a class="struct" href="color/struct.Color.html" title="struct widgetry::color::Color">Color</a>) -&gt; <a class="enum" href="geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></h4><a href="#method.from-1" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#299-301" 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-PartialEq%3CColor%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>&lt;<a class="struct" href="color/struct.Color.html" title="struct widgetry::color::Color">Color</a>&gt; for <a class="struct" href="color/struct.Color.html" title="struct widgetry::color::Color">Color</a></h3><a href="#impl-PartialEq%3CColor%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/color.rs.html#7" 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>(&amp;self, other: &amp;<a class="struct" href="color/struct.Color.html" title="struct widgetry::color::Color">Color</a>) -&gt; <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/widgetry/color.rs.html#7" 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>(&amp;self, other: &amp;<a class="struct" href="color/struct.Color.html" title="struct widgetry::color::Color">Color</a>) -&gt; <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/widgetry/color.rs.html#7" title="goto source code">[src]</a></div></summary><div class='docblock'><p>This method tests for <code>!=</code>.</p>

View File

@ -12,9 +12,9 @@
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#tymethod.event" class="fnname">event</a>(&amp;mut self, _: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, _: &amp;mut <a class="struct" href="widgets/struct.WidgetOutput.html" title="struct widgetry::widgets::WidgetOutput">WidgetOutput</a>)</h4><a href="#method.event" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/compare_times.rs.html#151" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Your chance to react to an event. Any side effects outside of this widget are communicated
through the output. <a href="widgets/trait.WidgetImpl.html#tymethod.event">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#tymethod.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut <a class="struct" href="drawing/struct.GfxCtx.html" title="struct widgetry::drawing::GfxCtx">GfxCtx</a>&lt;'_&gt;)</h4><a href="#method.draw" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/compare_times.rs.html#153-202" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Draw the widget. Be sure to draw relative to the top-left specified by <code>set_pos</code>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.can_restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.can_restore" class="fnname">can_restore</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.can_restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#60-62" title="goto source code">[src]</a></div></summary><div class='docblock'><p>If a new Panel is being created to replace an older one, all widgets have the chance to
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.can_restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.can_restore" class="fnname">can_restore</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.can_restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#61-63" title="goto source code">[src]</a></div></summary><div class='docblock'><p>If a new Panel is being created to replace an older one, all widgets have the chance to
preserve state from the previous version. <a href="widgets/trait.WidgetImpl.html#method.can_restore">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.restore" class="fnname">restore</a>(&amp;mut self, _: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, _prev: &amp;dyn <a class="trait" href="widgets/trait.WidgetImpl.html" title="trait widgetry::widgets::WidgetImpl">WidgetImpl</a>)</h4><a href="#method.restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#65-67" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Restore state from the previous version of this widget, with the same ID. Implementors must
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.restore" class="fnname">restore</a>(&amp;mut self, _: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, _prev: &amp;dyn <a class="trait" href="widgets/trait.WidgetImpl.html" title="trait widgetry::widgets::WidgetImpl">WidgetImpl</a>)</h4><a href="#method.restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#66-68" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Restore state from the previous version of this widget, with the same ID. Implementors must
downcast. <a href="widgets/trait.WidgetImpl.html#method.restore">Read more</a></p>
</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="struct" href="widgets/compare_times/struct.CompareTimes.html" title="struct widgetry::widgets::compare_times::CompareTimes">CompareTimes</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="widgets/compare_times/struct.CompareTimes.html" title="struct widgetry::widgets::compare_times::CompareTimes">CompareTimes</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="widgets/compare_times/struct.CompareTimes.html" title="struct widgetry::widgets::compare_times::CompareTimes">CompareTimes</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="widgets/compare_times/struct.CompareTimes.html" title="struct widgetry::widgets::compare_times::CompareTimes">CompareTimes</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="widgets/compare_times/struct.CompareTimes.html" title="struct widgetry::widgets::compare_times::CompareTimes">CompareTimes</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</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>

File diff suppressed because one or more lines are too long

View File

@ -21,9 +21,9 @@ you want hovering to be a no-op</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#tymethod.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, output: &amp;mut <a class="struct" href="widgets/struct.WidgetOutput.html" title="struct widgetry::widgets::WidgetOutput">WidgetOutput</a>)</h4><a href="#method.event" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/just_draw.rs.html#86-114" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Your chance to react to an event. Any side effects outside of this widget are communicated
through the output. <a href="widgets/trait.WidgetImpl.html#tymethod.event">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#tymethod.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut <a class="struct" href="drawing/struct.GfxCtx.html" title="struct widgetry::drawing::GfxCtx">GfxCtx</a>&lt;'_&gt;)</h4><a href="#method.draw" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/just_draw.rs.html#116-124" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Draw the widget. Be sure to draw relative to the top-left specified by <code>set_pos</code>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.can_restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.can_restore" class="fnname">can_restore</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.can_restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#60-62" title="goto source code">[src]</a></div></summary><div class='docblock'><p>If a new Panel is being created to replace an older one, all widgets have the chance to
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.can_restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.can_restore" class="fnname">can_restore</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.can_restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#61-63" title="goto source code">[src]</a></div></summary><div class='docblock'><p>If a new Panel is being created to replace an older one, all widgets have the chance to
preserve state from the previous version. <a href="widgets/trait.WidgetImpl.html#method.can_restore">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.restore" class="fnname">restore</a>(&amp;mut self, _: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, _prev: &amp;dyn <a class="trait" href="widgets/trait.WidgetImpl.html" title="trait widgetry::widgets::WidgetImpl">WidgetImpl</a>)</h4><a href="#method.restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#65-67" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Restore state from the previous version of this widget, with the same ID. Implementors must
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.restore" class="fnname">restore</a>(&amp;mut self, _: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, _prev: &amp;dyn <a class="trait" href="widgets/trait.WidgetImpl.html" title="trait widgetry::widgets::WidgetImpl">WidgetImpl</a>)</h4><a href="#method.restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#66-68" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Restore state from the previous version of this widget, with the same ID. Implementors must
downcast. <a href="widgets/trait.WidgetImpl.html#method.restore">Read more</a></p>
</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="struct" href="widgets/just_draw/struct.DrawWithTooltips.html" title="struct widgetry::widgets::just_draw::DrawWithTooltips">DrawWithTooltips</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="widgets/just_draw/struct.DrawWithTooltips.html" title="struct widgetry::widgets::just_draw::DrawWithTooltips">DrawWithTooltips</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="widgets/just_draw/struct.DrawWithTooltips.html" title="struct widgetry::widgets::just_draw::DrawWithTooltips">DrawWithTooltips</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="widgets/just_draw/struct.DrawWithTooltips.html" title="struct widgetry::widgets::just_draw::DrawWithTooltips">DrawWithTooltips</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="widgets/just_draw/struct.DrawWithTooltips.html" title="struct widgetry::widgets::just_draw::DrawWithTooltips">DrawWithTooltips</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</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>

View File

@ -1,22 +1,22 @@
<!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 `EdgeInsets` struct in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, EdgeInsets"><title>EdgeInsets in widgetry - 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">&#9776;</div><a href='../widgetry/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct EdgeInsets</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield.bottom">bottom</a><a href="#structfield.left">left</a><a href="#structfield.right">right</a><a href="#structfield.top">top</a></div><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.uniform">uniform</a><a href="#method.zero">zero</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-From%3CEdgeInsets%3E">From&lt;EdgeInsets&gt;</a><a href="#impl-From%3Cf64%3E">From&lt;f64&gt;</a><a href="#impl-From%3Cusize%3E">From&lt;usize&gt;</a><a href="#impl-PartialEq%3CEdgeInsets%3E">PartialEq&lt;EdgeInsets&gt;</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&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-IsDefault">IsDefault</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><h2 class="location">Other items in<br><a href="index.html">widgetry</a></h2><div id="sidebar-vars" data-name="EdgeInsets" 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">widgetry</a>::<wbr><a class="struct" href="#">EdgeInsets</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">&#x2212;</span>]</a></span><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#806-811" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct">pub struct EdgeInsets {
<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">&#9776;</div><a href='../widgetry/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct EdgeInsets</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield.bottom">bottom</a><a href="#structfield.left">left</a><a href="#structfield.right">right</a><a href="#structfield.top">top</a></div><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.uniform">uniform</a><a href="#method.zero">zero</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-From%3CEdgeInsets%3E">From&lt;EdgeInsets&gt;</a><a href="#impl-From%3Cf64%3E">From&lt;f64&gt;</a><a href="#impl-From%3Cusize%3E">From&lt;usize&gt;</a><a href="#impl-PartialEq%3CEdgeInsets%3E">PartialEq&lt;EdgeInsets&gt;</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&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-IsDefault">IsDefault</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><h2 class="location">Other items in<br><a href="index.html">widgetry</a></h2><div id="sidebar-vars" data-name="EdgeInsets" 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">widgetry</a>::<wbr><a class="struct" href="#">EdgeInsets</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">&#x2212;</span>]</a></span><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#810-815" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct">pub struct EdgeInsets {
pub top: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>,
pub left: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>,
pub bottom: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>,
pub right: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>,
}</pre></div><h2 id="fields" class="fields small-section-header">
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.top" class="structfield small-section-header"><a href="#structfield.top" class="anchor field"></a><code>top: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a></code></span><span id="structfield.left" class="structfield small-section-header"><a href="#structfield.left" class="anchor field"></a><code>left: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a></code></span><span id="structfield.bottom" class="structfield small-section-header"><a href="#structfield.bottom" class="anchor field"></a><code>bottom: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a></code></span><span id="structfield.right" class="structfield small-section-header"><a href="#structfield.right" class="anchor field"></a><code>right: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a></code></span><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="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#813-831" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.zero" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.zero" class="fnname">zero</a>() -&gt; Self</h4><a href="#method.zero" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#814-821" title="goto source code">[src]</a></div><div id="method.uniform" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.uniform" class="fnname">uniform</a>(inset: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>) -&gt; Self</h4><a href="#method.uniform" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#823-830" title="goto source code">[src]</a></div></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="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></h3><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#805" 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>(&amp;self) -&gt; <a class="struct" href="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></h4><a href="#method.clone" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#805" 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>
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.top" class="structfield small-section-header"><a href="#structfield.top" class="anchor field"></a><code>top: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a></code></span><span id="structfield.left" class="structfield small-section-header"><a href="#structfield.left" class="anchor field"></a><code>left: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a></code></span><span id="structfield.bottom" class="structfield small-section-header"><a href="#structfield.bottom" class="anchor field"></a><code>bottom: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a></code></span><span id="structfield.right" class="structfield small-section-header"><a href="#structfield.right" class="anchor field"></a><code>right: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a></code></span><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="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#817-835" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.zero" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.zero" class="fnname">zero</a>() -&gt; Self</h4><a href="#method.zero" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#818-825" title="goto source code">[src]</a></div><div id="method.uniform" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.uniform" class="fnname">uniform</a>(inset: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>) -&gt; Self</h4><a href="#method.uniform" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#827-834" title="goto source code">[src]</a></div></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="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></h3><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#809" 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>(&amp;self) -&gt; <a class="struct" href="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></h4><a href="#method.clone" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#809" 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>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</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="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></h3><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#805" 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>(&amp;self, f: &amp;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>&lt;'_&gt;) -&gt; <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/widgetry/widgets/mod.rs.html#805" 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="struct" href="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></h3><a href="#impl-Default" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#805" 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>() -&gt; <a class="struct" href="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></h4><a href="#method.default" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#805" 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-From%3CEdgeInsets%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/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a>&gt; for Rect&lt;Dimension&gt;</h3><a href="#impl-From%3CEdgeInsets%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#855-864" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from-2" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(insets: <a class="struct" href="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a>) -&gt; Rect&lt;Dimension&gt;</h4><a href="#method.from-2" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#856-863" 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-From%3Cf64%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/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>&gt; for <a class="struct" href="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></h3><a href="#impl-From%3Cf64%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#844-853" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from-1" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(uniform_size: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>) -&gt; <a class="struct" href="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></h4><a href="#method.from-1" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#845-852" 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-From%3Cusize%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/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.usize.html">usize</a>&gt; for <a class="struct" href="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></h3><a href="#impl-From%3Cusize%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#833-842" 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">fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(uniform_size: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></h4><a href="#method.from" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#834-841" 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-PartialEq%3CEdgeInsets%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>&lt;<a class="struct" href="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a>&gt; for <a class="struct" href="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></h3><a href="#impl-PartialEq%3CEdgeInsets%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#805" 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>(&amp;self, other: &amp;<a class="struct" href="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a>) -&gt; <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/widgetry/widgets/mod.rs.html#805" 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
</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="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></h3><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#809" 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>(&amp;self, f: &amp;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>&lt;'_&gt;) -&gt; <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/widgetry/widgets/mod.rs.html#809" 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="struct" href="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></h3><a href="#impl-Default" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#809" 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>() -&gt; <a class="struct" href="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></h4><a href="#method.default" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#809" 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-From%3CEdgeInsets%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/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a>&gt; for Rect&lt;Dimension&gt;</h3><a href="#impl-From%3CEdgeInsets%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#859-868" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from-2" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(insets: <a class="struct" href="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a>) -&gt; Rect&lt;Dimension&gt;</h4><a href="#method.from-2" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#860-867" 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-From%3Cf64%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/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>&gt; for <a class="struct" href="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></h3><a href="#impl-From%3Cf64%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#848-857" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from-1" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(uniform_size: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>) -&gt; <a class="struct" href="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></h4><a href="#method.from-1" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#849-856" 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-From%3Cusize%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/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.usize.html">usize</a>&gt; for <a class="struct" href="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></h3><a href="#impl-From%3Cusize%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#837-846" 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">fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(uniform_size: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></h4><a href="#method.from" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#838-845" 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-PartialEq%3CEdgeInsets%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>&lt;<a class="struct" href="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a>&gt; for <a class="struct" href="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></h3><a href="#impl-PartialEq%3CEdgeInsets%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#809" 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>(&amp;self, other: &amp;<a class="struct" href="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a>) -&gt; <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/widgetry/widgets/mod.rs.html#809" 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>(&amp;self, other: &amp;<a class="struct" href="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a>) -&gt; <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/widgetry/widgets/mod.rs.html#805" 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="struct" href="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></h3><a href="#impl-Copy" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#805" 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="struct" href="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></h3><a href="#impl-StructuralPartialEq" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#805" 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="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</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="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</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="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</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="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</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="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <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><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>(&amp;self, other: &amp;<a class="struct" href="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a>) -&gt; <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/widgetry/widgets/mod.rs.html#809" 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="struct" href="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></h3><a href="#impl-Copy" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#809" 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="struct" href="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></h3><a href="#impl-StructuralPartialEq" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#809" 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="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</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="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</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="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</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="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</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="widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;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-Downcast" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;T&gt; Downcast for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</span></h3><a href="#impl-Downcast" class="anchor"></a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into_any" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="#tymethod.into_any" class="fnname">into_any</a>(self: <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;T, <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static, <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;</h4><a href="#method.into_any" class="anchor"></a></div></summary><div class='docblock'><p>Convert <code>Box&lt;dyn Trait&gt;</code> (where <code>Trait: Downcast</code>) to <code>Box&lt;dyn Any&gt;</code>. <code>Box&lt;dyn Any&gt;</code> can

View File

@ -11,9 +11,9 @@
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#tymethod.event" class="fnname">event</a>(&amp;mut self, _: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, _: &amp;mut <a class="struct" href="widgets/struct.WidgetOutput.html" title="struct widgetry::widgets::WidgetOutput">WidgetOutput</a>)</h4><a href="#method.event" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/fan_chart.rs.html#191" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Your chance to react to an event. Any side effects outside of this widget are communicated
through the output. <a href="widgets/trait.WidgetImpl.html#tymethod.event">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#tymethod.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut <a class="struct" href="drawing/struct.GfxCtx.html" title="struct widgetry::drawing::GfxCtx">GfxCtx</a>&lt;'_&gt;)</h4><a href="#method.draw" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/fan_chart.rs.html#193-195" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Draw the widget. Be sure to draw relative to the top-left specified by <code>set_pos</code>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.can_restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.can_restore" class="fnname">can_restore</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.can_restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#60-62" title="goto source code">[src]</a></div></summary><div class='docblock'><p>If a new Panel is being created to replace an older one, all widgets have the chance to
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.can_restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.can_restore" class="fnname">can_restore</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.can_restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#61-63" title="goto source code">[src]</a></div></summary><div class='docblock'><p>If a new Panel is being created to replace an older one, all widgets have the chance to
preserve state from the previous version. <a href="widgets/trait.WidgetImpl.html#method.can_restore">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.restore" class="fnname">restore</a>(&amp;mut self, _: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, _prev: &amp;dyn <a class="trait" href="widgets/trait.WidgetImpl.html" title="trait widgetry::widgets::WidgetImpl">WidgetImpl</a>)</h4><a href="#method.restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#65-67" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Restore state from the previous version of this widget, with the same ID. Implementors must
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.restore" class="fnname">restore</a>(&amp;mut self, _: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, _prev: &amp;dyn <a class="trait" href="widgets/trait.WidgetImpl.html" title="trait widgetry::widgets::WidgetImpl">WidgetImpl</a>)</h4><a href="#method.restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#66-68" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Restore state from the previous version of this widget, with the same ID. Implementors must
downcast. <a href="widgets/trait.WidgetImpl.html#method.restore">Read more</a></p>
</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="struct" href="widgets/fan_chart/struct.FanChart.html" title="struct widgetry::widgets::fan_chart::FanChart">FanChart</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="widgets/fan_chart/struct.FanChart.html" title="struct widgetry::widgets::fan_chart::FanChart">FanChart</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="widgets/fan_chart/struct.FanChart.html" title="struct widgetry::widgets::fan_chart::FanChart">FanChart</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="widgets/fan_chart/struct.FanChart.html" title="struct widgetry::widgets::fan_chart::FanChart">FanChart</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="widgets/fan_chart/struct.FanChart.html" title="struct widgetry::widgets::fan_chart::FanChart">FanChart</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</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>

View File

@ -12,9 +12,9 @@ ScreenRectangle to use.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#tymethod.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, _: &amp;mut <a class="struct" href="widgets/struct.WidgetOutput.html" title="struct widgetry::widgets::WidgetOutput">WidgetOutput</a>)</h4><a href="#method.event" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/filler.rs.html#47-53" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Your chance to react to an event. Any side effects outside of this widget are communicated
through the output. <a href="widgets/trait.WidgetImpl.html#tymethod.event">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#tymethod.draw" class="fnname">draw</a>(&amp;self, _g: &amp;mut <a class="struct" href="drawing/struct.GfxCtx.html" title="struct widgetry::drawing::GfxCtx">GfxCtx</a>&lt;'_&gt;)</h4><a href="#method.draw" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/filler.rs.html#55" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Draw the widget. Be sure to draw relative to the top-left specified by <code>set_pos</code>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.can_restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.can_restore" class="fnname">can_restore</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.can_restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#60-62" title="goto source code">[src]</a></div></summary><div class='docblock'><p>If a new Panel is being created to replace an older one, all widgets have the chance to
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.can_restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.can_restore" class="fnname">can_restore</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.can_restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#61-63" title="goto source code">[src]</a></div></summary><div class='docblock'><p>If a new Panel is being created to replace an older one, all widgets have the chance to
preserve state from the previous version. <a href="widgets/trait.WidgetImpl.html#method.can_restore">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.restore" class="fnname">restore</a>(&amp;mut self, _: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, _prev: &amp;dyn <a class="trait" href="widgets/trait.WidgetImpl.html" title="trait widgetry::widgets::WidgetImpl">WidgetImpl</a>)</h4><a href="#method.restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#65-67" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Restore state from the previous version of this widget, with the same ID. Implementors must
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.restore" class="fnname">restore</a>(&amp;mut self, _: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, _prev: &amp;dyn <a class="trait" href="widgets/trait.WidgetImpl.html" title="trait widgetry::widgets::WidgetImpl">WidgetImpl</a>)</h4><a href="#method.restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#66-68" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Restore state from the previous version of this widget, with the same ID. Implementors must
downcast. <a href="widgets/trait.WidgetImpl.html#method.restore">Read more</a></p>
</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="struct" href="widgets/filler/struct.Filler.html" title="struct widgetry::widgets::filler::Filler">Filler</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="widgets/filler/struct.Filler.html" title="struct widgetry::widgets::filler::Filler">Filler</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="widgets/filler/struct.Filler.html" title="struct widgetry::widgets::filler::Filler">Filler</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="widgets/filler/struct.Filler.html" title="struct widgetry::widgets::filler::Filler">Filler</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="widgets/filler/struct.Filler.html" title="struct widgetry::widgets::filler::Filler">Filler</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</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>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -14,9 +14,9 @@
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#tymethod.event" class="fnname">event</a>(&amp;mut self, _: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, _: &amp;mut <a class="struct" href="widgets/struct.WidgetOutput.html" title="struct widgetry::widgets::WidgetOutput">WidgetOutput</a>)</h4><a href="#method.event" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/line_plot.rs.html#180" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Your chance to react to an event. Any side effects outside of this widget are communicated
through the output. <a href="widgets/trait.WidgetImpl.html#tymethod.event">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#tymethod.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut <a class="struct" href="drawing/struct.GfxCtx.html" title="struct widgetry::drawing::GfxCtx">GfxCtx</a>&lt;'_&gt;)</h4><a href="#method.draw" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/line_plot.rs.html#182-213" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Draw the widget. Be sure to draw relative to the top-left specified by <code>set_pos</code>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.can_restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.can_restore" class="fnname">can_restore</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.can_restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#60-62" title="goto source code">[src]</a></div></summary><div class='docblock'><p>If a new Panel is being created to replace an older one, all widgets have the chance to
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.can_restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.can_restore" class="fnname">can_restore</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.can_restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#61-63" title="goto source code">[src]</a></div></summary><div class='docblock'><p>If a new Panel is being created to replace an older one, all widgets have the chance to
preserve state from the previous version. <a href="widgets/trait.WidgetImpl.html#method.can_restore">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.restore" class="fnname">restore</a>(&amp;mut self, _: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, _prev: &amp;dyn <a class="trait" href="widgets/trait.WidgetImpl.html" title="trait widgetry::widgets::WidgetImpl">WidgetImpl</a>)</h4><a href="#method.restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#65-67" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Restore state from the previous version of this widget, with the same ID. Implementors must
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.restore" class="fnname">restore</a>(&amp;mut self, _: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, _prev: &amp;dyn <a class="trait" href="widgets/trait.WidgetImpl.html" title="trait widgetry::widgets::WidgetImpl">WidgetImpl</a>)</h4><a href="#method.restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#66-68" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Restore state from the previous version of this widget, with the same ID. Implementors must
downcast. <a href="widgets/trait.WidgetImpl.html#method.restore">Read more</a></p>
</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&lt;X, Y&gt; !<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="widgets/line_plot/struct.LinePlot.html" title="struct widgetry::widgets::line_plot::LinePlot">LinePlot</a>&lt;X, Y&gt;</h3><a href="#impl-RefUnwindSafe" class="anchor"></a></div><div id="impl-Send" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;X, Y&gt; !<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="widgets/line_plot/struct.LinePlot.html" title="struct widgetry::widgets::line_plot::LinePlot">LinePlot</a>&lt;X, Y&gt;</h3><a href="#impl-Send" class="anchor"></a></div><div id="impl-Sync" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;X, Y&gt; !<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="widgets/line_plot/struct.LinePlot.html" title="struct widgetry::widgets::line_plot::LinePlot">LinePlot</a>&lt;X, Y&gt;</h3><a href="#impl-Sync" class="anchor"></a></div><div id="impl-Unpin" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;X, Y&gt; <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="widgets/line_plot/struct.LinePlot.html" title="struct widgetry::widgets::line_plot::LinePlot">LinePlot</a>&lt;X, Y&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;X: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Y: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,&nbsp;</span></h3><a href="#impl-Unpin" class="anchor"></a></div><div id="impl-UnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;X, Y&gt; <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="widgets/line_plot/struct.LinePlot.html" title="struct widgetry::widgets::line_plot::LinePlot">LinePlot</a>&lt;X, Y&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;X: <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Y: <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a>,&nbsp;</span></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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</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>

File diff suppressed because one or more lines are too long

View File

@ -13,9 +13,9 @@
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#tymethod.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, output: &amp;mut <a class="struct" href="widgets/struct.WidgetOutput.html" title="struct widgetry::widgets::WidgetOutput">WidgetOutput</a>)</h4><a href="#method.event" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/button.rs.html#767-791" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Your chance to react to an event. Any side effects outside of this widget are communicated
through the output. <a href="widgets/trait.WidgetImpl.html#tymethod.event">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#tymethod.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut <a class="struct" href="drawing/struct.GfxCtx.html" title="struct widgetry::drawing::GfxCtx">GfxCtx</a>&lt;'_&gt;)</h4><a href="#method.draw" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/button.rs.html#793-801" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Draw the widget. Be sure to draw relative to the top-left specified by <code>set_pos</code>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.can_restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.can_restore" class="fnname">can_restore</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.can_restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#60-62" title="goto source code">[src]</a></div></summary><div class='docblock'><p>If a new Panel is being created to replace an older one, all widgets have the chance to
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.can_restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.can_restore" class="fnname">can_restore</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.can_restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#61-63" title="goto source code">[src]</a></div></summary><div class='docblock'><p>If a new Panel is being created to replace an older one, all widgets have the chance to
preserve state from the previous version. <a href="widgets/trait.WidgetImpl.html#method.can_restore">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.restore" class="fnname">restore</a>(&amp;mut self, _: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, _prev: &amp;dyn <a class="trait" href="widgets/trait.WidgetImpl.html" title="trait widgetry::widgets::WidgetImpl">WidgetImpl</a>)</h4><a href="#method.restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#65-67" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Restore state from the previous version of this widget, with the same ID. Implementors must
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.restore" class="fnname">restore</a>(&amp;mut self, _: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, _prev: &amp;dyn <a class="trait" href="widgets/trait.WidgetImpl.html" title="trait widgetry::widgets::WidgetImpl">WidgetImpl</a>)</h4><a href="#method.restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#66-68" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Restore state from the previous version of this widget, with the same ID. Implementors must
downcast. <a href="widgets/trait.WidgetImpl.html#method.restore">Read more</a></p>
</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="struct" href="widgets/button/struct.MultiButton.html" title="struct widgetry::widgets::button::MultiButton">MultiButton</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="widgets/button/struct.MultiButton.html" title="struct widgetry::widgets::button::MultiButton">MultiButton</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="widgets/button/struct.MultiButton.html" title="struct widgetry::widgets::button::MultiButton">MultiButton</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="widgets/button/struct.MultiButton.html" title="struct widgetry::widgets::button::MultiButton">MultiButton</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="widgets/button/struct.MultiButton.html" title="struct widgetry::widgets::button::MultiButton">MultiButton</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</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>

File diff suppressed because one or more lines are too long

View File

@ -12,9 +12,9 @@
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#tymethod.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, output: &amp;mut <a class="struct" href="widgets/struct.WidgetOutput.html" title="struct widgetry::widgets::WidgetOutput">WidgetOutput</a>)</h4><a href="#method.event" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/persistent_split.rs.html#104-123" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Your chance to react to an event. Any side effects outside of this widget are communicated
through the output. <a href="widgets/trait.WidgetImpl.html#tymethod.event">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#tymethod.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut <a class="struct" href="drawing/struct.GfxCtx.html" title="struct widgetry::drawing::GfxCtx">GfxCtx</a>&lt;'_&gt;)</h4><a href="#method.draw" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/persistent_split.rs.html#125-129" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Draw the widget. Be sure to draw relative to the top-left specified by <code>set_pos</code>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.can_restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.can_restore" class="fnname">can_restore</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.can_restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#60-62" title="goto source code">[src]</a></div></summary><div class='docblock'><p>If a new Panel is being created to replace an older one, all widgets have the chance to
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.can_restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.can_restore" class="fnname">can_restore</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.can_restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#61-63" title="goto source code">[src]</a></div></summary><div class='docblock'><p>If a new Panel is being created to replace an older one, all widgets have the chance to
preserve state from the previous version. <a href="widgets/trait.WidgetImpl.html#method.can_restore">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.restore" class="fnname">restore</a>(&amp;mut self, _: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, _prev: &amp;dyn <a class="trait" href="widgets/trait.WidgetImpl.html" title="trait widgetry::widgets::WidgetImpl">WidgetImpl</a>)</h4><a href="#method.restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#65-67" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Restore state from the previous version of this widget, with the same ID. Implementors must
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.restore" class="fnname">restore</a>(&amp;mut self, _: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, _prev: &amp;dyn <a class="trait" href="widgets/trait.WidgetImpl.html" title="trait widgetry::widgets::WidgetImpl">WidgetImpl</a>)</h4><a href="#method.restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#66-68" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Restore state from the previous version of this widget, with the same ID. Implementors must
downcast. <a href="widgets/trait.WidgetImpl.html#method.restore">Read more</a></p>
</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&lt;T&gt; !<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="widgets/persistent_split/struct.PersistentSplit.html" title="struct widgetry::widgets::persistent_split::PersistentSplit">PersistentSplit</a>&lt;T&gt;</h3><a href="#impl-RefUnwindSafe" class="anchor"></a></div><div id="impl-Send" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;T&gt; !<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="widgets/persistent_split/struct.PersistentSplit.html" title="struct widgetry::widgets::persistent_split::PersistentSplit">PersistentSplit</a>&lt;T&gt;</h3><a href="#impl-Send" class="anchor"></a></div><div id="impl-Sync" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;T&gt; !<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="widgets/persistent_split/struct.PersistentSplit.html" title="struct widgetry::widgets::persistent_split::PersistentSplit">PersistentSplit</a>&lt;T&gt;</h3><a href="#impl-Sync" class="anchor"></a></div><div id="impl-Unpin" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;T&gt; <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="widgets/persistent_split/struct.PersistentSplit.html" title="struct widgetry::widgets::persistent_split::PersistentSplit">PersistentSplit</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,&nbsp;</span></h3><a href="#impl-Unpin" class="anchor"></a></div><div id="impl-UnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;T&gt; <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="widgets/persistent_split/struct.PersistentSplit.html" title="struct widgetry::widgets::persistent_split::PersistentSplit">PersistentSplit</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a>,&nbsp;</span></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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</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>

View File

@ -11,9 +11,9 @@
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#tymethod.event" class="fnname">event</a>(&amp;mut self, _: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, _: &amp;mut <a class="struct" href="widgets/struct.WidgetOutput.html" title="struct widgetry::widgets::WidgetOutput">WidgetOutput</a>)</h4><a href="#method.event" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/scatter_plot.rs.html#189" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Your chance to react to an event. Any side effects outside of this widget are communicated
through the output. <a href="widgets/trait.WidgetImpl.html#tymethod.event">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#tymethod.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut <a class="struct" href="drawing/struct.GfxCtx.html" title="struct widgetry::drawing::GfxCtx">GfxCtx</a>&lt;'_&gt;)</h4><a href="#method.draw" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/scatter_plot.rs.html#191-193" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Draw the widget. Be sure to draw relative to the top-left specified by <code>set_pos</code>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.can_restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.can_restore" class="fnname">can_restore</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.can_restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#60-62" title="goto source code">[src]</a></div></summary><div class='docblock'><p>If a new Panel is being created to replace an older one, all widgets have the chance to
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.can_restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.can_restore" class="fnname">can_restore</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.can_restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#61-63" title="goto source code">[src]</a></div></summary><div class='docblock'><p>If a new Panel is being created to replace an older one, all widgets have the chance to
preserve state from the previous version. <a href="widgets/trait.WidgetImpl.html#method.can_restore">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.restore" class="fnname">restore</a>(&amp;mut self, _: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, _prev: &amp;dyn <a class="trait" href="widgets/trait.WidgetImpl.html" title="trait widgetry::widgets::WidgetImpl">WidgetImpl</a>)</h4><a href="#method.restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#65-67" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Restore state from the previous version of this widget, with the same ID. Implementors must
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.restore" class="fnname">restore</a>(&amp;mut self, _: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, _prev: &amp;dyn <a class="trait" href="widgets/trait.WidgetImpl.html" title="trait widgetry::widgets::WidgetImpl">WidgetImpl</a>)</h4><a href="#method.restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#66-68" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Restore state from the previous version of this widget, with the same ID. Implementors must
downcast. <a href="widgets/trait.WidgetImpl.html#method.restore">Read more</a></p>
</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="struct" href="widgets/scatter_plot/struct.ScatterPlot.html" title="struct widgetry::widgets::scatter_plot::ScatterPlot">ScatterPlot</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="widgets/scatter_plot/struct.ScatterPlot.html" title="struct widgetry::widgets::scatter_plot::ScatterPlot">ScatterPlot</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="widgets/scatter_plot/struct.ScatterPlot.html" title="struct widgetry::widgets::scatter_plot::ScatterPlot">ScatterPlot</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="widgets/scatter_plot/struct.ScatterPlot.html" title="struct widgetry::widgets::scatter_plot::ScatterPlot">ScatterPlot</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="widgets/scatter_plot/struct.ScatterPlot.html" title="struct widgetry::widgets::scatter_plot::ScatterPlot">ScatterPlot</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</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>

File diff suppressed because one or more lines are too long

View File

@ -1,14 +1,14 @@
<!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="ScreenPt is in units of logical pixels, as opposed to physical pixels."><meta name="keywords" content="rust, rustlang, rust-lang, ScreenPt"><title>ScreenPt in widgetry - 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">&#9776;</div><a href='../widgetry/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct ScreenPt</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield.x">x</a><a href="#structfield.y">y</a></div><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.new">new</a><a href="#method.to_pt">to_pt</a><a href="#method.translated">translated</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-From%3CLogicalPosition%3Cf64%3E%3E">From&lt;LogicalPosition&lt;f64&gt;&gt;</a><a href="#impl-PartialEq%3CScreenPt%3E">PartialEq&lt;ScreenPt&gt;</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&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><h2 class="location">Other items in<br><a href="index.html">widgetry</a></h2><div id="sidebar-vars" data-name="ScreenPt" 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">widgetry</a>::<wbr><a class="struct" href="#">ScreenPt</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">&#x2212;</span>]</a></span><a class="srclink" href="../src/widgetry/screen_geom.rs.html#9-12" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct">pub struct ScreenPt {
<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">&#9776;</div><a href='../widgetry/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct ScreenPt</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield.x">x</a><a href="#structfield.y">y</a></div><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.new">new</a><a href="#method.to_pt">to_pt</a><a href="#method.translated">translated</a><a href="#method.zero">zero</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-From%3CLogicalPosition%3Cf64%3E%3E">From&lt;LogicalPosition&lt;f64&gt;&gt;</a><a href="#impl-PartialEq%3CScreenPt%3E">PartialEq&lt;ScreenPt&gt;</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&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><h2 class="location">Other items in<br><a href="index.html">widgetry</a></h2><div id="sidebar-vars" data-name="ScreenPt" 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">widgetry</a>::<wbr><a class="struct" href="#">ScreenPt</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">&#x2212;</span>]</a></span><a class="srclink" href="../src/widgetry/screen_geom.rs.html#9-12" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct">pub struct ScreenPt {
pub x: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>,
pub y: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>,
}</pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>ScreenPt is in units of logical pixels, as opposed to physical pixels.</p>
</div></details><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>x: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a></code></span><span id="structfield.y" class="structfield small-section-header"><a href="#structfield.y" class="anchor field"></a><code>y: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a></code></span><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="screen_geom/struct.ScreenPt.html" title="struct widgetry::screen_geom::ScreenPt">ScreenPt</a></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../src/widgetry/screen_geom.rs.html#14-31" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.new" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.new" class="fnname">new</a>(x: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>, y: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>) -&gt; <a class="struct" href="screen_geom/struct.ScreenPt.html" title="struct widgetry::screen_geom::ScreenPt">ScreenPt</a></h4><a href="#method.new" class="anchor"></a><a class="srclink" href="../src/widgetry/screen_geom.rs.html#15-17" title="goto source code">[src]</a></div><div id="method.to_pt" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.to_pt" class="fnname">to_pt</a>(self) -&gt; <a class="struct" href="../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a></h4><a href="#method.to_pt" class="anchor"></a><a class="srclink" href="../src/widgetry/screen_geom.rs.html#21-23" title="goto source code">[src]</a></div><div id="method.translated" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.translated" class="fnname">translated</a>(&amp;self, x: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>, y: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>) -&gt; Self</h4><a href="#method.translated" class="anchor"></a><a class="srclink" href="../src/widgetry/screen_geom.rs.html#25-30" title="goto source code">[src]</a></div></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="screen_geom/struct.ScreenPt.html" title="struct widgetry::screen_geom::ScreenPt">ScreenPt</a></h3><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../src/widgetry/screen_geom.rs.html#8" 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>(&amp;self) -&gt; <a class="struct" href="screen_geom/struct.ScreenPt.html" title="struct widgetry::screen_geom::ScreenPt">ScreenPt</a></h4><a href="#method.clone" class="anchor"></a><a class="srclink" href="../src/widgetry/screen_geom.rs.html#8" 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>
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>x: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a></code></span><span id="structfield.y" class="structfield small-section-header"><a href="#structfield.y" class="anchor field"></a><code>y: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a></code></span><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="screen_geom/struct.ScreenPt.html" title="struct widgetry::screen_geom::ScreenPt">ScreenPt</a></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../src/widgetry/screen_geom.rs.html#14-35" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.new" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.new" class="fnname">new</a>(x: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>, y: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>) -&gt; <a class="struct" href="screen_geom/struct.ScreenPt.html" title="struct widgetry::screen_geom::ScreenPt">ScreenPt</a></h4><a href="#method.new" class="anchor"></a><a class="srclink" href="../src/widgetry/screen_geom.rs.html#15-17" title="goto source code">[src]</a></div><div id="method.to_pt" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.to_pt" class="fnname">to_pt</a>(self) -&gt; <a class="struct" href="../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a></h4><a href="#method.to_pt" class="anchor"></a><a class="srclink" href="../src/widgetry/screen_geom.rs.html#21-23" title="goto source code">[src]</a></div><div id="method.zero" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.zero" class="fnname">zero</a>() -&gt; Self</h4><a href="#method.zero" class="anchor"></a><a class="srclink" href="../src/widgetry/screen_geom.rs.html#25-27" title="goto source code">[src]</a></div><div id="method.translated" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.translated" class="fnname">translated</a>(&amp;self, x: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>, y: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>) -&gt; Self</h4><a href="#method.translated" class="anchor"></a><a class="srclink" href="../src/widgetry/screen_geom.rs.html#29-34" title="goto source code">[src]</a></div></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="screen_geom/struct.ScreenPt.html" title="struct widgetry::screen_geom::ScreenPt">ScreenPt</a></h3><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../src/widgetry/screen_geom.rs.html#8" 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>(&amp;self) -&gt; <a class="struct" href="screen_geom/struct.ScreenPt.html" title="struct widgetry::screen_geom::ScreenPt">ScreenPt</a></h4><a href="#method.clone" class="anchor"></a><a class="srclink" href="../src/widgetry/screen_geom.rs.html#8" 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>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</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="screen_geom/struct.ScreenPt.html" title="struct widgetry::screen_geom::ScreenPt">ScreenPt</a></h3><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/widgetry/screen_geom.rs.html#8" 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>(&amp;self, f: &amp;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>&lt;'_&gt;) -&gt; <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/widgetry/screen_geom.rs.html#8" 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-From%3CLogicalPosition%3Cf64%3E%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/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;LogicalPosition&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>&gt;&gt; for <a class="struct" href="screen_geom/struct.ScreenPt.html" title="struct widgetry::screen_geom::ScreenPt">ScreenPt</a></h3><a href="#impl-From%3CLogicalPosition%3Cf64%3E%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/screen_geom.rs.html#33-37" 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">fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(lp: LogicalPosition&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>&gt;) -&gt; <a class="struct" href="screen_geom/struct.ScreenPt.html" title="struct widgetry::screen_geom::ScreenPt">ScreenPt</a></h4><a href="#method.from" class="anchor"></a><a class="srclink" href="../src/widgetry/screen_geom.rs.html#34-36" 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-From%3CLogicalPosition%3Cf64%3E%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/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;LogicalPosition&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>&gt;&gt; for <a class="struct" href="screen_geom/struct.ScreenPt.html" title="struct widgetry::screen_geom::ScreenPt">ScreenPt</a></h3><a href="#impl-From%3CLogicalPosition%3Cf64%3E%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/screen_geom.rs.html#37-41" 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">fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(lp: LogicalPosition&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>&gt;) -&gt; <a class="struct" href="screen_geom/struct.ScreenPt.html" title="struct widgetry::screen_geom::ScreenPt">ScreenPt</a></h4><a href="#method.from" class="anchor"></a><a class="srclink" href="../src/widgetry/screen_geom.rs.html#38-40" 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-PartialEq%3CScreenPt%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>&lt;<a class="struct" href="screen_geom/struct.ScreenPt.html" title="struct widgetry::screen_geom::ScreenPt">ScreenPt</a>&gt; for <a class="struct" href="screen_geom/struct.ScreenPt.html" title="struct widgetry::screen_geom::ScreenPt">ScreenPt</a></h3><a href="#impl-PartialEq%3CScreenPt%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/screen_geom.rs.html#8" 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>(&amp;self, other: &amp;<a class="struct" href="screen_geom/struct.ScreenPt.html" title="struct widgetry::screen_geom::ScreenPt">ScreenPt</a>) -&gt; <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/widgetry/screen_geom.rs.html#8" 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>(&amp;self, other: &amp;<a class="struct" href="screen_geom/struct.ScreenPt.html" title="struct widgetry::screen_geom::ScreenPt">ScreenPt</a>) -&gt; <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/widgetry/screen_geom.rs.html#8" title="goto source code">[src]</a></div></summary><div class='docblock'><p>This method tests for <code>!=</code>.</p>

File diff suppressed because one or more lines are too long

View File

@ -16,9 +16,9 @@
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#tymethod.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, output: &amp;mut <a class="struct" href="widgets/struct.WidgetOutput.html" title="struct widgetry::widgets::WidgetOutput">WidgetOutput</a>)</h4><a href="#method.event" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/slider.rs.html#316-323" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Your chance to react to an event. Any side effects outside of this widget are communicated
through the output. <a href="widgets/trait.WidgetImpl.html#tymethod.event">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#tymethod.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut <a class="struct" href="drawing/struct.GfxCtx.html" title="struct widgetry::drawing::GfxCtx">GfxCtx</a>&lt;'_&gt;)</h4><a href="#method.draw" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/slider.rs.html#325-331" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Draw the widget. Be sure to draw relative to the top-left specified by <code>set_pos</code>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.can_restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.can_restore" class="fnname">can_restore</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.can_restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#60-62" title="goto source code">[src]</a></div></summary><div class='docblock'><p>If a new Panel is being created to replace an older one, all widgets have the chance to
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.can_restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.can_restore" class="fnname">can_restore</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.can_restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#61-63" title="goto source code">[src]</a></div></summary><div class='docblock'><p>If a new Panel is being created to replace an older one, all widgets have the chance to
preserve state from the previous version. <a href="widgets/trait.WidgetImpl.html#method.can_restore">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.restore" class="fnname">restore</a>(&amp;mut self, _: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, _prev: &amp;dyn <a class="trait" href="widgets/trait.WidgetImpl.html" title="trait widgetry::widgets::WidgetImpl">WidgetImpl</a>)</h4><a href="#method.restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#65-67" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Restore state from the previous version of this widget, with the same ID. Implementors must
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.restore" class="fnname">restore</a>(&amp;mut self, _: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, _prev: &amp;dyn <a class="trait" href="widgets/trait.WidgetImpl.html" title="trait widgetry::widgets::WidgetImpl">WidgetImpl</a>)</h4><a href="#method.restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#66-68" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Restore state from the previous version of this widget, with the same ID. Implementors must
downcast. <a href="widgets/trait.WidgetImpl.html#method.restore">Read more</a></p>
</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="struct" href="widgets/slider/struct.Slider.html" title="struct widgetry::widgets::slider::Slider">Slider</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="widgets/slider/struct.Slider.html" title="struct widgetry::widgets::slider::Slider">Slider</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="widgets/slider/struct.Slider.html" title="struct widgetry::widgets::slider::Slider">Slider</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="widgets/slider/struct.Slider.html" title="struct widgetry::widgets::slider::Slider">Slider</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="widgets/slider/struct.Slider.html" title="struct widgetry::widgets::slider::Slider">Slider</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</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>

View File

@ -23,9 +23,9 @@ rendering.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#tymethod.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, output: &amp;mut <a class="struct" href="widgets/struct.WidgetOutput.html" title="struct widgetry::widgets::WidgetOutput">WidgetOutput</a>)</h4><a href="#method.event" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/spinner.rs.html#228-267" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Your chance to react to an event. Any side effects outside of this widget are communicated
through the output. <a href="widgets/trait.WidgetImpl.html#tymethod.event">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#tymethod.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut <a class="struct" href="drawing/struct.GfxCtx.html" title="struct widgetry::drawing::GfxCtx">GfxCtx</a>&lt;'_&gt;)</h4><a href="#method.draw" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/spinner.rs.html#269-274" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Draw the widget. Be sure to draw relative to the top-left specified by <code>set_pos</code>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.can_restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.can_restore" class="fnname">can_restore</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.can_restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#60-62" title="goto source code">[src]</a></div></summary><div class='docblock'><p>If a new Panel is being created to replace an older one, all widgets have the chance to
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.can_restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.can_restore" class="fnname">can_restore</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.can_restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#61-63" title="goto source code">[src]</a></div></summary><div class='docblock'><p>If a new Panel is being created to replace an older one, all widgets have the chance to
preserve state from the previous version. <a href="widgets/trait.WidgetImpl.html#method.can_restore">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.restore" class="fnname">restore</a>(&amp;mut self, _: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, _prev: &amp;dyn <a class="trait" href="widgets/trait.WidgetImpl.html" title="trait widgetry::widgets::WidgetImpl">WidgetImpl</a>)</h4><a href="#method.restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#65-67" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Restore state from the previous version of this widget, with the same ID. Implementors must
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.restore" class="fnname">restore</a>(&amp;mut self, _: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, _prev: &amp;dyn <a class="trait" href="widgets/trait.WidgetImpl.html" title="trait widgetry::widgets::WidgetImpl">WidgetImpl</a>)</h4><a href="#method.restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#66-68" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Restore state from the previous version of this widget, with the same ID. Implementors must
downcast. <a href="widgets/trait.WidgetImpl.html#method.restore">Read more</a></p>
</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&lt;T&gt; !<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="widgets/spinner/struct.Spinner.html" title="struct widgetry::widgets::spinner::Spinner">Spinner</a>&lt;T&gt;</h3><a href="#impl-RefUnwindSafe" class="anchor"></a></div><div id="impl-Send" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;T&gt; !<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="widgets/spinner/struct.Spinner.html" title="struct widgetry::widgets::spinner::Spinner">Spinner</a>&lt;T&gt;</h3><a href="#impl-Send" class="anchor"></a></div><div id="impl-Sync" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;T&gt; !<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="widgets/spinner/struct.Spinner.html" title="struct widgetry::widgets::spinner::Spinner">Spinner</a>&lt;T&gt;</h3><a href="#impl-Sync" class="anchor"></a></div><div id="impl-Unpin" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;T&gt; <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="widgets/spinner/struct.Spinner.html" title="struct widgetry::widgets::spinner::Spinner">Spinner</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,&nbsp;</span></h3><a href="#impl-Unpin" class="anchor"></a></div><div id="impl-UnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;T&gt; !<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="widgets/spinner/struct.Spinner.html" title="struct widgetry::widgets::spinner::Spinner">Spinner</a>&lt;T&gt;</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</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>

View File

@ -11,9 +11,9 @@ and write the value. This is one method for “returning” data when a State co
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#tymethod.event" class="fnname">event</a>(&amp;mut self, _: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, _: &amp;mut <a class="struct" href="widgets/struct.WidgetOutput.html" title="struct widgetry::widgets::WidgetOutput">WidgetOutput</a>)</h4><a href="#method.event" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/stash.rs.html#32" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Your chance to react to an event. Any side effects outside of this widget are communicated
through the output. <a href="widgets/trait.WidgetImpl.html#tymethod.event">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#tymethod.draw" class="fnname">draw</a>(&amp;self, _: &amp;mut <a class="struct" href="drawing/struct.GfxCtx.html" title="struct widgetry::drawing::GfxCtx">GfxCtx</a>&lt;'_&gt;)</h4><a href="#method.draw" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/stash.rs.html#33" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Draw the widget. Be sure to draw relative to the top-left specified by <code>set_pos</code>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.can_restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.can_restore" class="fnname">can_restore</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.can_restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#60-62" title="goto source code">[src]</a></div></summary><div class='docblock'><p>If a new Panel is being created to replace an older one, all widgets have the chance to
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.can_restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.can_restore" class="fnname">can_restore</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.can_restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#61-63" title="goto source code">[src]</a></div></summary><div class='docblock'><p>If a new Panel is being created to replace an older one, all widgets have the chance to
preserve state from the previous version. <a href="widgets/trait.WidgetImpl.html#method.can_restore">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.restore" class="fnname">restore</a>(&amp;mut self, _: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, _prev: &amp;dyn <a class="trait" href="widgets/trait.WidgetImpl.html" title="trait widgetry::widgets::WidgetImpl">WidgetImpl</a>)</h4><a href="#method.restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#65-67" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Restore state from the previous version of this widget, with the same ID. Implementors must
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.restore" class="fnname">restore</a>(&amp;mut self, _: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, _prev: &amp;dyn <a class="trait" href="widgets/trait.WidgetImpl.html" title="trait widgetry::widgets::WidgetImpl">WidgetImpl</a>)</h4><a href="#method.restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#66-68" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Restore state from the previous version of this widget, with the same ID. Implementors must
downcast. <a href="widgets/trait.WidgetImpl.html#method.restore">Read more</a></p>
</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&lt;T&gt; !<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="widgets/stash/struct.Stash.html" title="struct widgetry::widgets::stash::Stash">Stash</a>&lt;T&gt;</h3><a href="#impl-RefUnwindSafe" class="anchor"></a></div><div id="impl-Send" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;T&gt; !<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="widgets/stash/struct.Stash.html" title="struct widgetry::widgets::stash::Stash">Stash</a>&lt;T&gt;</h3><a href="#impl-Send" class="anchor"></a></div><div id="impl-Sync" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;T&gt; !<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="widgets/stash/struct.Stash.html" title="struct widgetry::widgets::stash::Stash">Stash</a>&lt;T&gt;</h3><a href="#impl-Sync" class="anchor"></a></div><div id="impl-Unpin" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;T&gt; <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="widgets/stash/struct.Stash.html" title="struct widgetry::widgets::stash::Stash">Stash</a>&lt;T&gt;</h3><a href="#impl-Unpin" class="anchor"></a></div><div id="impl-UnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;T&gt; !<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="widgets/stash/struct.Stash.html" title="struct widgetry::widgets::stash::Stash">Stash</a>&lt;T&gt;</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</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>

View File

@ -17,9 +17,9 @@
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#tymethod.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, output: &amp;mut <a class="struct" href="widgets/struct.WidgetOutput.html" title="struct widgetry::widgets::WidgetOutput">WidgetOutput</a>)</h4><a href="#method.event" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/text_box.rs.html#107-154" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Your chance to react to an event. Any side effects outside of this widget are communicated
through the output. <a href="widgets/trait.WidgetImpl.html#tymethod.event">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#tymethod.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut <a class="struct" href="drawing/struct.GfxCtx.html" title="struct widgetry::drawing::GfxCtx">GfxCtx</a>&lt;'_&gt;)</h4><a href="#method.draw" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/text_box.rs.html#156-177" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Draw the widget. Be sure to draw relative to the top-left specified by <code>set_pos</code>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.can_restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.can_restore" class="fnname">can_restore</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.can_restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#60-62" title="goto source code">[src]</a></div></summary><div class='docblock'><p>If a new Panel is being created to replace an older one, all widgets have the chance to
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.can_restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.can_restore" class="fnname">can_restore</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.can_restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#61-63" title="goto source code">[src]</a></div></summary><div class='docblock'><p>If a new Panel is being created to replace an older one, all widgets have the chance to
preserve state from the previous version. <a href="widgets/trait.WidgetImpl.html#method.can_restore">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.restore" class="fnname">restore</a>(&amp;mut self, _: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, _prev: &amp;dyn <a class="trait" href="widgets/trait.WidgetImpl.html" title="trait widgetry::widgets::WidgetImpl">WidgetImpl</a>)</h4><a href="#method.restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#65-67" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Restore state from the previous version of this widget, with the same ID. Implementors must
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.restore" class="fnname">restore</a>(&amp;mut self, _: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, _prev: &amp;dyn <a class="trait" href="widgets/trait.WidgetImpl.html" title="trait widgetry::widgets::WidgetImpl">WidgetImpl</a>)</h4><a href="#method.restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#66-68" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Restore state from the previous version of this widget, with the same ID. Implementors must
downcast. <a href="widgets/trait.WidgetImpl.html#method.restore">Read more</a></p>
</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="struct" href="widgets/text_box/struct.TextBox.html" title="struct widgetry::widgets::text_box::TextBox">TextBox</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="widgets/text_box/struct.TextBox.html" title="struct widgetry::widgets::text_box::TextBox">TextBox</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="widgets/text_box/struct.TextBox.html" title="struct widgetry::widgets::text_box::TextBox">TextBox</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="widgets/text_box/struct.TextBox.html" title="struct widgetry::widgets::text_box::TextBox">TextBox</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="widgets/text_box/struct.TextBox.html" title="struct widgetry::widgets::text_box::TextBox">TextBox</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</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>

View File

@ -11,9 +11,9 @@
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#tymethod.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, output: &amp;mut <a class="struct" href="widgets/struct.WidgetOutput.html" title="struct widgetry::widgets::WidgetOutput">WidgetOutput</a>)</h4><a href="#method.event" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/toggle.rs.html#271-281" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Your chance to react to an event. Any side effects outside of this widget are communicated
through the output. <a href="widgets/trait.WidgetImpl.html#tymethod.event">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#tymethod.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut <a class="struct" href="drawing/struct.GfxCtx.html" title="struct widgetry::drawing::GfxCtx">GfxCtx</a>&lt;'_&gt;)</h4><a href="#method.draw" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/toggle.rs.html#283-285" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Draw the widget. Be sure to draw relative to the top-left specified by <code>set_pos</code>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.can_restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.can_restore" class="fnname">can_restore</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.can_restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#60-62" title="goto source code">[src]</a></div></summary><div class='docblock'><p>If a new Panel is being created to replace an older one, all widgets have the chance to
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.can_restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.can_restore" class="fnname">can_restore</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.can_restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#61-63" title="goto source code">[src]</a></div></summary><div class='docblock'><p>If a new Panel is being created to replace an older one, all widgets have the chance to
preserve state from the previous version. <a href="widgets/trait.WidgetImpl.html#method.can_restore">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.restore" class="fnname">restore</a>(&amp;mut self, _: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, _prev: &amp;dyn <a class="trait" href="widgets/trait.WidgetImpl.html" title="trait widgetry::widgets::WidgetImpl">WidgetImpl</a>)</h4><a href="#method.restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#65-67" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Restore state from the previous version of this widget, with the same ID. Implementors must
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.restore" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="widgets/trait.WidgetImpl.html#method.restore" class="fnname">restore</a>(&amp;mut self, _: &amp;mut <a class="struct" href="event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;, _prev: &amp;dyn <a class="trait" href="widgets/trait.WidgetImpl.html" title="trait widgetry::widgets::WidgetImpl">WidgetImpl</a>)</h4><a href="#method.restore" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#66-68" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Restore state from the previous version of this widget, with the same ID. Implementors must
downcast. <a href="widgets/trait.WidgetImpl.html#method.restore">Read more</a></p>
</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="struct" href="widgets/toggle/struct.Toggle.html" title="struct widgetry::widgets::toggle::Toggle">Toggle</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="widgets/toggle/struct.Toggle.html" title="struct widgetry::widgets::toggle::Toggle">Toggle</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="widgets/toggle/struct.Toggle.html" title="struct widgetry::widgets::toggle::Toggle">Toggle</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="widgets/toggle/struct.Toggle.html" title="struct widgetry::widgets::toggle::Toggle">Toggle</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="widgets/toggle/struct.Toggle.html" title="struct widgetry::widgets::toggle::Toggle">Toggle</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</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>

File diff suppressed because one or more lines are too long

View File

@ -1,13 +1,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 `WidgetOutput` struct in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, WidgetOutput"><title>WidgetOutput in widgetry - 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">&#9776;</div><a href='../widgetry/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct WidgetOutput</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield.outcome">outcome</a><a href="#structfield.redo_layout">redo_layout</a></div><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.new">new</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&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><h2 class="location">Other items in<br><a href="index.html">widgetry</a></h2><div id="sidebar-vars" data-name="WidgetOutput" 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">widgetry</a>::<wbr><a class="struct" href="#">WidgetOutput</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">&#x2212;</span>]</a></span><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#89-95" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct">pub struct WidgetOutput {
<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">&#9776;</div><a href='../widgetry/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct WidgetOutput</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield.outcome">outcome</a><a href="#structfield.redo_layout">redo_layout</a></div><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.new">new</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&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><h2 class="location">Other items in<br><a href="index.html">widgetry</a></h2><div id="sidebar-vars" data-name="WidgetOutput" 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">widgetry</a>::<wbr><a class="struct" href="#">WidgetOutput</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">&#x2212;</span>]</a></span><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#93-99" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct">pub struct WidgetOutput {
pub redo_layout: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a>,
pub outcome: <a class="enum" href="widgets/enum.Outcome.html" title="enum widgetry::widgets::Outcome">Outcome</a>,
}</pre></div><h2 id="fields" class="fields small-section-header">
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.redo_layout" class="structfield small-section-header"><a href="#structfield.redo_layout" class="anchor field"></a><code>redo_layout: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></code></span><div class="docblock"><p>This widget changed dimensions, so recalculate layout.</p>
</div><span id="structfield.outcome" class="structfield small-section-header"><a href="#structfield.outcome" class="anchor field"></a><code>outcome: <a class="enum" href="widgets/enum.Outcome.html" title="enum widgetry::widgets::Outcome">Outcome</a></code></span><div class="docblock"><p>This widget produced an Outcome, and event handling should immediately stop. Most widgets
shouldnt set this.</p>
</div><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="widgets/struct.WidgetOutput.html" title="struct widgetry::widgets::WidgetOutput">WidgetOutput</a></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#97-104" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.new" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.new" class="fnname">new</a>() -&gt; <a class="struct" href="widgets/struct.WidgetOutput.html" title="struct widgetry::widgets::WidgetOutput">WidgetOutput</a></h4><a href="#method.new" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#98-103" title="goto source code">[src]</a></div></div></details><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="widgets/struct.WidgetOutput.html" title="struct widgetry::widgets::WidgetOutput">WidgetOutput</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="widgets/struct.WidgetOutput.html" title="struct widgetry::widgets::WidgetOutput">WidgetOutput</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="widgets/struct.WidgetOutput.html" title="struct widgetry::widgets::WidgetOutput">WidgetOutput</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="widgets/struct.WidgetOutput.html" title="struct widgetry::widgets::WidgetOutput">WidgetOutput</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="widgets/struct.WidgetOutput.html" title="struct widgetry::widgets::WidgetOutput">WidgetOutput</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <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><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="widgets/struct.WidgetOutput.html" title="struct widgetry::widgets::WidgetOutput">WidgetOutput</a></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#101-108" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.new" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.new" class="fnname">new</a>() -&gt; <a class="struct" href="widgets/struct.WidgetOutput.html" title="struct widgetry::widgets::WidgetOutput">WidgetOutput</a></h4><a href="#method.new" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#102-107" title="goto source code">[src]</a></div></div></details><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="widgets/struct.WidgetOutput.html" title="struct widgetry::widgets::WidgetOutput">WidgetOutput</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="widgets/struct.WidgetOutput.html" title="struct widgetry::widgets::WidgetOutput">WidgetOutput</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="widgets/struct.WidgetOutput.html" title="struct widgetry::widgets::WidgetOutput">WidgetOutput</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="widgets/struct.WidgetOutput.html" title="struct widgetry::widgets::WidgetOutput">WidgetOutput</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="widgets/struct.WidgetOutput.html" title="struct widgetry::widgets::WidgetOutput">WidgetOutput</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</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>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;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-Downcast" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;T&gt; Downcast for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</span></h3><a href="#impl-Downcast" class="anchor"></a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into_any" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="#tymethod.into_any" class="fnname">into_any</a>(self: <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;T, <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static, <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;</h4><a href="#method.into_any" class="anchor"></a></div></summary><div class='docblock'><p>Convert <code>Box&lt;dyn Trait&gt;</code> (where <code>Trait: Downcast</code>) to <code>Box&lt;dyn Any&gt;</code>. <code>Box&lt;dyn Any&gt;</code> can

Some files were not shown because too many files have changed in this diff Show More