mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-24 01:15:12 +03:00
deploy: 11df7f79c7
This commit is contained in:
parent
916879e8d8
commit
90c797e7ca
File diff suppressed because one or more lines are too long
@ -249,8 +249,8 @@ call this to handle all other events. <a href="#method.other_event">Read more</a
|
||||
</div><h4 id="method.draw-42" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&self, g: &mut GfxCtx<'_>, app: &<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>)</code><a class="srclink" href="../../src/game/sandbox/dashboards/parking_overhead.rs.html#101-104" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Draw</p>
|
||||
</div><h4 id="method.draw_baselayer-41" class="method hidden"><code>pub fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&self) -> DrawBaselayer</code></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</p>
|
||||
</div><h4 id="method.on_destroy-41" class="method hidden"><code>pub fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&mut self, &mut EventCtx<'_>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>A)</code></h4><div class='docblock hidden'><p>Before this state is popped or replaced, call this.</p>
|
||||
</div></div><h3 id="impl-State%3CApp%3E-42" class="impl"><code class="in-band">impl State<<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>> for <a class="struct" href="../../game/sandbox/dashboards/risks/struct.RiskSummaries.html" title="struct game::sandbox::dashboards::risks::RiskSummaries">RiskSummaries</a></code><a href="#impl-State%3CApp%3E-42" class="anchor"></a><a class="srclink" href="../../src/game/sandbox/dashboards/risks.rs.html#92-114" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.event-42" class="method hidden"><code>fn <a href="#method.event" class="fnname">event</a>(&mut self, ctx: &mut EventCtx<'_>, app: &mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>) -> Transition<<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>></code><a class="srclink" href="../../src/game/sandbox/dashboards/risks.rs.html#93-109" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
|
||||
</div><h4 id="method.draw-43" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&self, g: &mut GfxCtx<'_>, _app: &<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>)</code><a class="srclink" href="../../src/game/sandbox/dashboards/risks.rs.html#111-113" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Draw</p>
|
||||
</div></div><h3 id="impl-State%3CApp%3E-42" class="impl"><code class="in-band">impl State<<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>> for <a class="struct" href="../../game/sandbox/dashboards/risks/struct.RiskSummaries.html" title="struct game::sandbox::dashboards::risks::RiskSummaries">RiskSummaries</a></code><a href="#impl-State%3CApp%3E-42" class="anchor"></a><a class="srclink" href="../../src/game/sandbox/dashboards/risks.rs.html#90-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.event-42" class="method hidden"><code>fn <a href="#method.event" class="fnname">event</a>(&mut self, ctx: &mut EventCtx<'_>, app: &mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>) -> Transition<<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>></code><a class="srclink" href="../../src/game/sandbox/dashboards/risks.rs.html#91-107" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
|
||||
</div><h4 id="method.draw-43" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&self, g: &mut GfxCtx<'_>, _app: &<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>)</code><a class="srclink" href="../../src/game/sandbox/dashboards/risks.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Draw</p>
|
||||
</div><h4 id="method.draw_baselayer-42" class="method hidden"><code>pub fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&self) -> DrawBaselayer</code></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</p>
|
||||
</div><h4 id="method.on_destroy-42" class="method hidden"><code>pub fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&mut self, &mut EventCtx<'_>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>A)</code></h4><div class='docblock hidden'><p>Before this state is popped or replaced, call this.</p>
|
||||
</div></div><h3 id="impl-State%3CApp%3E-43" class="impl"><code class="in-band">impl State<<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>> for <a class="struct" href="../../game/sandbox/dashboards/selector/struct.RectangularSelector.html" title="struct game::sandbox::dashboards::selector::RectangularSelector">RectangularSelector</a></code><a href="#impl-State%3CApp%3E-43" class="anchor"></a><a class="srclink" href="../../src/game/sandbox/dashboards/selector.rs.html#58-116" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.event-43" class="method hidden"><code>fn <a href="#method.event" class="fnname">event</a>(&mut self, ctx: &mut EventCtx<'_>, _: &mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>) -> Transition<<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>></code><a class="srclink" href="../../src/game/sandbox/dashboards/selector.rs.html#59-103" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
|
||||
@ -261,8 +261,8 @@ call this to handle all other events. <a href="#method.other_event">Read more</a
|
||||
</div><h4 id="method.draw_baselayer-44" class="method hidden"><code>fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&self) -> DrawBaselayer</code><a class="srclink" href="../../src/game/sandbox/dashboards/traffic_signals.rs.html#136-138" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</p>
|
||||
</div><h4 id="method.draw-45" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&self, g: &mut GfxCtx<'_>, app: &<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>)</code><a class="srclink" href="../../src/game/sandbox/dashboards/traffic_signals.rs.html#140-154" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Draw</p>
|
||||
</div><h4 id="method.on_destroy-44" class="method hidden"><code>pub fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&mut self, &mut EventCtx<'_>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>A)</code></h4><div class='docblock hidden'><p>Before this state is popped or replaced, call this.</p>
|
||||
</div></div><h3 id="impl-State%3CApp%3E-45" class="impl"><code class="in-band">impl State<<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>> for <a class="struct" href="../../game/sandbox/dashboards/travel_times/struct.TravelTimes.html" title="struct game::sandbox::dashboards::travel_times::TravelTimes">TravelTimes</a></code><a href="#impl-State%3CApp%3E-45" class="anchor"></a><a class="srclink" href="../../src/game/sandbox/dashboards/travel_times.rs.html#75-117" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.event-45" class="method hidden"><code>fn <a href="#method.event" class="fnname">event</a>(&mut self, ctx: &mut EventCtx<'_>, app: &mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>) -> Transition<<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>></code><a class="srclink" href="../../src/game/sandbox/dashboards/travel_times.rs.html#76-112" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
|
||||
</div><h4 id="method.draw-46" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&self, g: &mut GfxCtx<'_>, _app: &<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>)</code><a class="srclink" href="../../src/game/sandbox/dashboards/travel_times.rs.html#114-116" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Draw</p>
|
||||
</div></div><h3 id="impl-State%3CApp%3E-45" class="impl"><code class="in-band">impl State<<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>> for <a class="struct" href="../../game/sandbox/dashboards/travel_times/struct.TravelTimes.html" title="struct game::sandbox::dashboards::travel_times::TravelTimes">TravelTimes</a></code><a href="#impl-State%3CApp%3E-45" class="anchor"></a><a class="srclink" href="../../src/game/sandbox/dashboards/travel_times.rs.html#111-157" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.event-45" class="method hidden"><code>fn <a href="#method.event" class="fnname">event</a>(&mut self, ctx: &mut EventCtx<'_>, app: &mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>) -> Transition<<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>></code><a class="srclink" href="../../src/game/sandbox/dashboards/travel_times.rs.html#112-152" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
|
||||
</div><h4 id="method.draw-46" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&self, g: &mut GfxCtx<'_>, _app: &<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>)</code><a class="srclink" href="../../src/game/sandbox/dashboards/travel_times.rs.html#154-156" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Draw</p>
|
||||
</div><h4 id="method.draw_baselayer-45" class="method hidden"><code>pub fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&self) -> DrawBaselayer</code></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</p>
|
||||
</div><h4 id="method.on_destroy-45" class="method hidden"><code>pub fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&mut self, &mut EventCtx<'_>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>A)</code></h4><div class='docblock hidden'><p>Before this state is popped or replaced, call this.</p>
|
||||
</div></div><h3 id="impl-State%3CApp%3E-46" class="impl"><code class="in-band">impl State<<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>> for <a class="struct" href="../../game/sandbox/dashboards/trip_table/struct.TripTable.html" title="struct game::sandbox::dashboards::trip_table::TripTable">TripTable</a></code><a href="#impl-State%3CApp%3E-46" class="anchor"></a><a class="srclink" href="../../src/game/sandbox/dashboards/trip_table.rs.html#120-209" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.event-46" class="method hidden"><code>fn <a href="#method.event" class="fnname">event</a>(&mut self, ctx: &mut EventCtx<'_>, app: &mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>) -> Transition<<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>></code><a class="srclink" href="../../src/game/sandbox/dashboards/trip_table.rs.html#121-194" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
|
||||
|
@ -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="The built-time in RFC2822, UTC"><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>game::pregame::built_info::BUILT_TIME_UTC - 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 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</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"><p class="location"><a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a></p><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"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><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" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../settings.html"><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></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-8fd4d727846ff3e4/out/built.rs.html#53" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const BUILT_TIME_UTC: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = "Tue, 18 May 2021 00:51:42 +0000";</pre><div class="docblock"><p>The built-time in RFC2822, UTC</p>
|
||||
<a id="settings-menu" href="../../../settings.html"><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></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-8fd4d727846ff3e4/out/built.rs.html#53" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const BUILT_TIME_UTC: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = "Tue, 18 May 2021 01:32:51 +0000";</pre><div class="docblock"><p>The built-time in RFC2822, UTC</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-js="../../../search-index.js"></div>
|
||||
<script src="../../../main.js"></script></body></html>
|
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `DashTab` enum in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, DashTab"><title>game::sandbox::dashboards::DashTab - 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 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Enum DashTab</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.ActiveTraffic">ActiveTraffic</a><a href="#variant.CommuterPatterns">CommuterPatterns</a><a href="#variant.ParkingOverhead">ParkingOverhead</a><a href="#variant.RiskSummaries">RiskSummaries</a><a href="#variant.TrafficSignals">TrafficSignals</a><a href="#variant.TransitRoutes">TransitRoutes</a><a href="#variant.TravelTimes">TravelTimes</a><a href="#variant.TripTable">TripTable</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.picker">picker</a><a href="#method.transition">transition</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Copy">Copy</a><a href="#impl-Debug">Debug</a><a href="#impl-PartialEq%3CDashTab%3E">PartialEq<DashTab></a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class="location"><a href="../../index.html">game</a>::<wbr><a href="../index.html">sandbox</a>::<wbr><a href="index.html">dashboards</a></p><div id="sidebar-vars" data-name="DashTab" 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"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><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" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../settings.html"><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">game</a>::<wbr><a href="../index.html">sandbox</a>::<wbr><a href="index.html">dashboards</a>::<wbr><a class="enum" href="">DashTab</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/game/sandbox/dashboards/mod.rs.html#22-31" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust enum">pub enum DashTab {
|
||||
<a id="settings-menu" href="../../../settings.html"><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">game</a>::<wbr><a href="../index.html">sandbox</a>::<wbr><a href="index.html">dashboards</a>::<wbr><a class="enum" href="">DashTab</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/game/sandbox/dashboards/mod.rs.html#23-32" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust enum">pub enum DashTab {
|
||||
TripTable,
|
||||
TravelTimes,
|
||||
RiskSummaries,
|
||||
@ -12,13 +12,13 @@
|
||||
TrafficSignals,
|
||||
}</pre></div><h2 id="variants" class="variants small-section-header">
|
||||
Variants<a href="#variants" class="anchor"></a></h2>
|
||||
<div id="variant.TripTable" class="variant small-section-header"><a href="#variant.TripTable" class="anchor field"></a><code>TripTable</code></div><div id="variant.TravelTimes" class="variant small-section-header"><a href="#variant.TravelTimes" class="anchor field"></a><code>TravelTimes</code></div><div id="variant.RiskSummaries" class="variant small-section-header"><a href="#variant.RiskSummaries" class="anchor field"></a><code>RiskSummaries</code></div><div id="variant.ParkingOverhead" class="variant small-section-header"><a href="#variant.ParkingOverhead" class="anchor field"></a><code>ParkingOverhead</code></div><div id="variant.ActiveTraffic" class="variant small-section-header"><a href="#variant.ActiveTraffic" class="anchor field"></a><code>ActiveTraffic</code></div><div id="variant.TransitRoutes" class="variant small-section-header"><a href="#variant.TransitRoutes" class="anchor field"></a><code>TransitRoutes</code></div><div id="variant.CommuterPatterns" class="variant small-section-header"><a href="#variant.CommuterPatterns" class="anchor field"></a><code>CommuterPatterns</code></div><div id="variant.TrafficSignals" class="variant small-section-header"><a href="#variant.TrafficSignals" class="anchor field"></a><code>TrafficSignals</code></div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="enum" href="../../../game/sandbox/dashboards/enum.DashTab.html" title="enum game::sandbox::dashboards::DashTab">DashTab</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../../src/game/sandbox/dashboards/mod.rs.html#33-84" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.picker" class="method"><code>pub fn <a href="#method.picker" class="fnname">picker</a>(self, ctx: &EventCtx<'_>, app: &<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>) -> Widget</code><a class="srclink" href="../../../src/game/sandbox/dashboards/mod.rs.html#34-58" title="goto source code">[src]</a></h4><h4 id="method.transition" class="method"><code>pub fn <a href="#method.transition" class="fnname">transition</a>(<br> self, <br> ctx: &mut EventCtx<'_>, <br> app: &mut <a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br> panel: &Panel<br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Transition<<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>>></code><a class="srclink" href="../../../src/game/sandbox/dashboards/mod.rs.html#60-83" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="../../../game/sandbox/dashboards/enum.DashTab.html" title="enum game::sandbox::dashboards::DashTab">DashTab</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../../src/game/sandbox/dashboards/mod.rs.html#21" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="enum" href="../../../game/sandbox/dashboards/enum.DashTab.html" title="enum game::sandbox::dashboards::DashTab">DashTab</a></code><a class="srclink" href="../../../src/game/sandbox/dashboards/mod.rs.html#21" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
<div id="variant.TripTable" class="variant small-section-header"><a href="#variant.TripTable" class="anchor field"></a><code>TripTable</code></div><div id="variant.TravelTimes" class="variant small-section-header"><a href="#variant.TravelTimes" class="anchor field"></a><code>TravelTimes</code></div><div id="variant.RiskSummaries" class="variant small-section-header"><a href="#variant.RiskSummaries" class="anchor field"></a><code>RiskSummaries</code></div><div id="variant.ParkingOverhead" class="variant small-section-header"><a href="#variant.ParkingOverhead" class="anchor field"></a><code>ParkingOverhead</code></div><div id="variant.ActiveTraffic" class="variant small-section-header"><a href="#variant.ActiveTraffic" class="anchor field"></a><code>ActiveTraffic</code></div><div id="variant.TransitRoutes" class="variant small-section-header"><a href="#variant.TransitRoutes" class="anchor field"></a><code>TransitRoutes</code></div><div id="variant.CommuterPatterns" class="variant small-section-header"><a href="#variant.CommuterPatterns" class="anchor field"></a><code>CommuterPatterns</code></div><div id="variant.TrafficSignals" class="variant small-section-header"><a href="#variant.TrafficSignals" class="anchor field"></a><code>TrafficSignals</code></div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="enum" href="../../../game/sandbox/dashboards/enum.DashTab.html" title="enum game::sandbox::dashboards::DashTab">DashTab</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../../src/game/sandbox/dashboards/mod.rs.html#34-85" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.picker" class="method"><code>pub fn <a href="#method.picker" class="fnname">picker</a>(self, ctx: &EventCtx<'_>, app: &<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>) -> Widget</code><a class="srclink" href="../../../src/game/sandbox/dashboards/mod.rs.html#35-59" title="goto source code">[src]</a></h4><h4 id="method.transition" class="method"><code>pub fn <a href="#method.transition" class="fnname">transition</a>(<br> self, <br> ctx: &mut EventCtx<'_>, <br> app: &mut <a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br> panel: &Panel<br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Transition<<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>>></code><a class="srclink" href="../../../src/game/sandbox/dashboards/mod.rs.html#61-84" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="../../../game/sandbox/dashboards/enum.DashTab.html" title="enum game::sandbox::dashboards::DashTab">DashTab</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../../src/game/sandbox/dashboards/mod.rs.html#22" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="enum" href="../../../game/sandbox/dashboards/enum.DashTab.html" title="enum game::sandbox::dashboards::DashTab">DashTab</a></code><a class="srclink" href="../../../src/game/sandbox/dashboards/mod.rs.html#22" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id="method.clone_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></div><h3 id="impl-Copy" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="enum" href="../../../game/sandbox/dashboards/enum.DashTab.html" title="enum game::sandbox::dashboards::DashTab">DashTab</a></code><a href="#impl-Copy" class="anchor"></a><a class="srclink" href="../../../src/game/sandbox/dashboards/mod.rs.html#21" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../../../game/sandbox/dashboards/enum.DashTab.html" title="enum game::sandbox::dashboards::DashTab">DashTab</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../../src/game/sandbox/dashboards/mod.rs.html#21" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../../src/game/sandbox/dashboards/mod.rs.html#21" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id="impl-PartialEq%3CDashTab%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="enum" href="../../../game/sandbox/dashboards/enum.DashTab.html" title="enum game::sandbox::dashboards::DashTab">DashTab</a>> for <a class="enum" href="../../../game/sandbox/dashboards/enum.DashTab.html" title="enum game::sandbox::dashboards::DashTab">DashTab</a></code><a href="#impl-PartialEq%3CDashTab%3E" class="anchor"></a><a class="srclink" href="../../../src/game/sandbox/dashboards/mod.rs.html#21" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.eq" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="enum" href="../../../game/sandbox/dashboards/enum.DashTab.html" title="enum game::sandbox::dashboards::DashTab">DashTab</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../../src/game/sandbox/dashboards/mod.rs.html#21" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
|
||||
</div></div><h3 id="impl-Copy" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="enum" href="../../../game/sandbox/dashboards/enum.DashTab.html" title="enum game::sandbox::dashboards::DashTab">DashTab</a></code><a href="#impl-Copy" class="anchor"></a><a class="srclink" href="../../../src/game/sandbox/dashboards/mod.rs.html#22" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../../../game/sandbox/dashboards/enum.DashTab.html" title="enum game::sandbox::dashboards::DashTab">DashTab</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../../src/game/sandbox/dashboards/mod.rs.html#22" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../../src/game/sandbox/dashboards/mod.rs.html#22" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id="impl-PartialEq%3CDashTab%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="enum" href="../../../game/sandbox/dashboards/enum.DashTab.html" title="enum game::sandbox::dashboards::DashTab">DashTab</a>> for <a class="enum" href="../../../game/sandbox/dashboards/enum.DashTab.html" title="enum game::sandbox::dashboards::DashTab">DashTab</a></code><a href="#impl-PartialEq%3CDashTab%3E" class="anchor"></a><a class="srclink" href="../../../src/game/sandbox/dashboards/mod.rs.html#22" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.eq" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="enum" href="../../../game/sandbox/dashboards/enum.DashTab.html" title="enum game::sandbox::dashboards::DashTab">DashTab</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../../src/game/sandbox/dashboards/mod.rs.html#22" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
|
||||
by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
||||
</div><h4 id="method.ne" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>pub fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
|
||||
</div></div><h3 id="impl-StructuralPartialEq" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="enum" href="../../../game/sandbox/dashboards/enum.DashTab.html" title="enum game::sandbox::dashboards::DashTab">DashTab</a></code><a href="#impl-StructuralPartialEq" class="anchor"></a><a class="srclink" href="../../../src/game/sandbox/dashboards/mod.rs.html#21" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="../../../game/sandbox/dashboards/enum.DashTab.html" title="enum game::sandbox::dashboards::DashTab">DashTab</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="../../../game/sandbox/dashboards/enum.DashTab.html" title="enum game::sandbox::dashboards::DashTab">DashTab</a></code><a href="#impl-Send" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="../../../game/sandbox/dashboards/enum.DashTab.html" title="enum game::sandbox::dashboards::DashTab">DashTab</a></code><a href="#impl-Sync" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="../../../game/sandbox/dashboards/enum.DashTab.html" title="enum game::sandbox::dashboards::DashTab">DashTab</a></code><a href="#impl-Unpin" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="../../../game/sandbox/dashboards/enum.DashTab.html" title="enum game::sandbox::dashboards::DashTab">DashTab</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#131-135" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id="impl-StructuralPartialEq" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="enum" href="../../../game/sandbox/dashboards/enum.DashTab.html" title="enum game::sandbox::dashboards::DashTab">DashTab</a></code><a href="#impl-StructuralPartialEq" class="anchor"></a><a class="srclink" href="../../../src/game/sandbox/dashboards/mod.rs.html#22" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="../../../game/sandbox/dashboards/enum.DashTab.html" title="enum game::sandbox::dashboards::DashTab">DashTab</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="../../../game/sandbox/dashboards/enum.DashTab.html" title="enum game::sandbox::dashboards::DashTab">DashTab</a></code><a href="#impl-Send" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="../../../game/sandbox/dashboards/enum.DashTab.html" title="enum game::sandbox::dashboards::DashTab">DashTab</a></code><a href="#impl-Sync" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="../../../game/sandbox/dashboards/enum.DashTab.html" title="enum game::sandbox::dashboards::DashTab">DashTab</a></code><a href="#impl-Unpin" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="../../../game/sandbox/dashboards/enum.DashTab.html" title="enum game::sandbox::dashboards::DashTab">DashTab</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#131-135" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||
</div></div><h3 id="impl-Downcast" class="impl"><code class="in-band">impl<T> Downcast for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a>, </span></code><a href="#impl-Downcast" class="anchor"></a></h3><div class="impl-items"><h4 id="method.into_any" class="method hidden"><code>pub fn <a href="#method.into_any" class="fnname">into_any</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><T, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>></code></h4><div class='docblock hidden'><p>Convert <code>Box<dyn Trait></code> (where <code>Trait: Downcast</code>) to <code>Box<dyn Any></code>. <code>Box<dyn Any></code> can
|
||||
|
@ -1,8 +1,8 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `dashboards` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, dashboards"><title>game::sandbox::dashboards - 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 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Module dashboards</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#reexports">Re-exports</a></li><li><a href="#modules">Modules</a></li><li><a href="#enums">Enums</a></li></ul></div><p class="location"><a href="../../index.html">game</a>::<wbr><a href="../index.html">sandbox</a></p><div id="sidebar-vars" data-name="dashboards" 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"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><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" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../settings.html"><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">sandbox</a>::<wbr><a class="mod" href="">dashboards</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/game/sandbox/dashboards/mod.rs.html#1-84" title="goto source code">[src]</a></span></h1><h2 id="reexports" class="section-header"><a href="#reexports">Re-exports</a></h2>
|
||||
<a id="settings-menu" href="../../../settings.html"><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">sandbox</a>::<wbr><a class="mod" href="">dashboards</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/game/sandbox/dashboards/mod.rs.html#1-85" title="goto source code">[src]</a></span></h1><h2 id="reexports" class="section-header"><a href="#reexports">Re-exports</a></h2>
|
||||
<table><tr><td><code>pub use commuter::<a class="struct" href="../../../game/sandbox/dashboards/commuter/struct.CommuterPatterns.html" title="struct game::sandbox::dashboards::commuter::CommuterPatterns">CommuterPatterns</a>;</code></td></tr><tr><td><code>pub use traffic_signals::<a class="struct" href="../../../game/sandbox/dashboards/traffic_signals/struct.TrafficSignalDemand.html" title="struct game::sandbox::dashboards::traffic_signals::TrafficSignalDemand">TrafficSignalDemand</a>;</code></td></tr><tr><td><code>pub use trip_table::<a class="struct" href="../../../game/sandbox/dashboards/trip_table/struct.TripTable.html" title="struct game::sandbox::dashboards::trip_table::TripTable">TripTable</a>;</code></td></tr></table><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2>
|
||||
<table><tr class="module-item"><td><a class="mod" href="commuter/index.html" title="game::sandbox::dashboards::commuter mod">commuter</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="generic_trip_table/index.html" title="game::sandbox::dashboards::generic_trip_table mod">generic_trip_table</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="misc/index.html" title="game::sandbox::dashboards::misc mod">misc</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="parking_overhead/index.html" title="game::sandbox::dashboards::parking_overhead mod">parking_overhead</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="risks/index.html" title="game::sandbox::dashboards::risks mod">risks</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="selector/index.html" title="game::sandbox::dashboards::selector mod">selector</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="traffic_signals/index.html" title="game::sandbox::dashboards::traffic_signals mod">traffic_signals</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="travel_times/index.html" title="game::sandbox::dashboards::travel_times mod">travel_times</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="trip_table/index.html" title="game::sandbox::dashboards::trip_table mod">trip_table</a></td><td class="docblock-short"></td></tr></table><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2>
|
||||
<table><tr class="module-item"><td><a class="mod" href="commuter/index.html" title="game::sandbox::dashboards::commuter mod">commuter</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="generic_trip_table/index.html" title="game::sandbox::dashboards::generic_trip_table mod">generic_trip_table</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="misc/index.html" title="game::sandbox::dashboards::misc mod">misc</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="parking_overhead/index.html" title="game::sandbox::dashboards::parking_overhead mod">parking_overhead</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="risks/index.html" title="game::sandbox::dashboards::risks mod">risks</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="selector/index.html" title="game::sandbox::dashboards::selector mod">selector</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="traffic_signals/index.html" title="game::sandbox::dashboards::traffic_signals mod">traffic_signals</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="travel_times/index.html" title="game::sandbox::dashboards::travel_times mod">travel_times</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="trip_problems/index.html" title="game::sandbox::dashboards::trip_problems mod">trip_problems</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="trip_table/index.html" title="game::sandbox::dashboards::trip_table mod">trip_table</a></td><td class="docblock-short"></td></tr></table><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2>
|
||||
<table><tr class="module-item"><td><a class="enum" href="enum.DashTab.html" title="game::sandbox::dashboards::DashTab enum">DashTab</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-js="../../../search-index.js"></div>
|
||||
<script src="../../../main.js"></script></body></html>
|
@ -1,5 +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 `bucketize_isizes` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, bucketize_isizes"><title>game::sandbox::dashboards::risks::bucketize_isizes - 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 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</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"><p class="location"><a href="../../../index.html">game</a>::<wbr><a href="../../index.html">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a href="index.html">risks</a></p><div id="sidebar-vars" data-name="bucketize_isizes" 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"><img src="../../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../../theme.js"></script><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" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../../settings.html"><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">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a href="index.html">risks</a>::<wbr><a class="fn" href="">bucketize_isizes</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../../src/game/sandbox/dashboards/risks.rs.html#417-451" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn bucketize_isizes(max_buckets: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, pts: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a>></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="game" data-search-js="../../../../search-index.js"></div>
|
||||
<script src="../../../../main.js"></script></body></html>
|
@ -1,5 +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 `safety_matrix` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, safety_matrix"><title>game::sandbox::dashboards::risks::safety_matrix - 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 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</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"><p class="location"><a href="../../../index.html">game</a>::<wbr><a href="../../index.html">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a href="index.html">risks</a></p><div id="sidebar-vars" data-name="safety_matrix" 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"><img src="../../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../../theme.js"></script><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" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../../settings.html"><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">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a href="index.html">risks</a>::<wbr><a class="fn" href="">safety_matrix</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../../src/game/sandbox/dashboards/risks.rs.html#120-203" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn safety_matrix(<br> ctx: &mut EventCtx<'_>, <br> app: &<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br> filter: &<a class="struct" href="../../../../game/sandbox/dashboards/risks/struct.Filter.html" title="struct game::sandbox::dashboards::risks::Filter">Filter</a>, <br> problem_type: <a class="enum" href="../../../../game/sandbox/dashboards/risks/enum.ProblemType.html" title="enum game::sandbox::dashboards::risks::ProblemType">ProblemType</a><br>) -> Widget</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="game" data-search-js="../../../../search-index.js"></div>
|
||||
<script src="../../../../main.js"></script></body></html>
|
@ -1,9 +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 `risks` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, risks"><title>game::sandbox::dashboards::risks - 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 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../../rust-logo.png' alt='logo'></div></a><p class="location">Module risks</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#functions">Functions</a></li></ul></div><p class="location"><a href="../../../index.html">game</a>::<wbr><a href="../../index.html">sandbox</a>::<wbr><a href="../index.html">dashboards</a></p><div id="sidebar-vars" data-name="risks" 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"><img src="../../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../../theme.js"></script><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" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../../settings.html"><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">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a class="mod" href="">risks</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../../src/game/sandbox/dashboards/risks.rs.html#1-498" 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.CLEAR_COLOR_SCALE.html" title="game::sandbox::dashboards::risks::CLEAR_COLOR_SCALE struct">CLEAR_COLOR_SCALE</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.Filter.html" title="game::sandbox::dashboards::risks::Filter struct">Filter</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.Matrix.html" title="game::sandbox::dashboards::risks::Matrix struct">Matrix</a></td><td class="docblock-short"><p>Aka a 2D histogram. Counts the number of matching points in each cell.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.MatrixOptions.html" title="game::sandbox::dashboards::risks::MatrixOptions struct">MatrixOptions</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.RiskSummaries.html" title="game::sandbox::dashboards::risks::RiskSummaries struct">RiskSummaries</a></td><td class="docblock-short"></td></tr></table><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2>
|
||||
<table><tr class="module-item"><td><a class="enum" href="enum.ProblemType.html" title="game::sandbox::dashboards::risks::ProblemType enum">ProblemType</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.bucketize_isizes.html" title="game::sandbox::dashboards::risks::bucketize_isizes fn">bucketize_isizes</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.safety_matrix.html" title="game::sandbox::dashboards::risks::safety_matrix fn">safety_matrix</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="game" data-search-js="../../../../search-index.js"></div>
|
||||
<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 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../../rust-logo.png' alt='logo'></div></a><p class="location">Module risks</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><p class="location"><a href="../../../index.html">game</a>::<wbr><a href="../../index.html">sandbox</a>::<wbr><a href="../index.html">dashboards</a></p><div id="sidebar-vars" data-name="risks" 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"><img src="../../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../../theme.js"></script><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" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../../settings.html"><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">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a class="mod" href="">risks</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../../src/game/sandbox/dashboards/risks.rs.html#1-126" 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.Filter.html" title="game::sandbox::dashboards::risks::Filter struct">Filter</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.RiskSummaries.html" title="game::sandbox::dashboards::risks::RiskSummaries struct">RiskSummaries</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="game" data-search-js="../../../../search-index.js"></div>
|
||||
<script src="../../../../main.js"></script></body></html>
|
@ -1 +1 @@
|
||||
initSidebarItems({"enum":[["ProblemType",""]],"fn":[["bucketize_isizes",""],["safety_matrix",""]],"struct":[["CLEAR_COLOR_SCALE",""],["Filter",""],["Matrix","Aka a 2D histogram. Counts the number of matching points in each cell."],["MatrixOptions",""],["RiskSummaries",""]]});
|
||||
initSidebarItems({"struct":[["Filter",""],["RiskSummaries",""]]});
|
File diff suppressed because one or more lines are too long
@ -1,11 +1,11 @@
|
||||
<!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 `RiskSummaries` struct in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, RiskSummaries"><title>game::sandbox::dashboards::risks::RiskSummaries - 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 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../../rust-logo.png' alt='logo'></div></a><p class="location">Struct RiskSummaries</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.panel">panel</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.new_state">new_state</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-State%3CApp%3E">State<App></a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Send">!Send</a><a href="#impl-Sync">!Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">!UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-Downcast">Downcast</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class="location"><a href="../../../index.html">game</a>::<wbr><a href="../../index.html">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a href="index.html">risks</a></p><div id="sidebar-vars" data-name="RiskSummaries" 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"><img src="../../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../../theme.js"></script><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" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../../settings.html"><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">game</a>::<wbr><a href="../../index.html">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a href="index.html">risks</a>::<wbr><a class="struct" href="">RiskSummaries</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../../src/game/sandbox/dashboards/risks.rs.html#16-18" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct RiskSummaries {
|
||||
<a id="settings-menu" href="../../../../settings.html"><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">game</a>::<wbr><a href="../../index.html">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a href="index.html">risks</a>::<wbr><a class="struct" href="">RiskSummaries</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../../src/game/sandbox/dashboards/risks.rs.html#10-12" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct RiskSummaries {
|
||||
panel: Panel,
|
||||
}</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: Panel</code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../../../../game/sandbox/dashboards/risks/struct.RiskSummaries.html" title="struct game::sandbox::dashboards::risks::RiskSummaries">RiskSummaries</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../../../src/game/sandbox/dashboards/risks.rs.html#20-90" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new_state" class="method"><code>pub fn <a href="#method.new_state" class="fnname">new_state</a>(<br> ctx: &mut EventCtx<'_>, <br> app: &<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br> include_no_changes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><br>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn State<<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>>></code><a class="srclink" href="../../../../src/game/sandbox/dashboards/risks.rs.html#21-89" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-State%3CApp%3E" class="impl"><code class="in-band">impl State<<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>> for <a class="struct" href="../../../../game/sandbox/dashboards/risks/struct.RiskSummaries.html" title="struct game::sandbox::dashboards::risks::RiskSummaries">RiskSummaries</a></code><a href="#impl-State%3CApp%3E" class="anchor"></a><a class="srclink" href="../../../../src/game/sandbox/dashboards/risks.rs.html#92-114" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.event" class="method hidden"><code>fn <a href="#method.event" class="fnname">event</a>(&mut self, ctx: &mut EventCtx<'_>, app: &mut <a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>) -> Transition<<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>></code><a class="srclink" href="../../../../src/game/sandbox/dashboards/risks.rs.html#93-109" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
|
||||
</div><h4 id="method.draw" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&self, g: &mut GfxCtx<'_>, _app: &<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>)</code><a class="srclink" href="../../../../src/game/sandbox/dashboards/risks.rs.html#111-113" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>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: Panel</code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../../../../game/sandbox/dashboards/risks/struct.RiskSummaries.html" title="struct game::sandbox::dashboards::risks::RiskSummaries">RiskSummaries</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../../../src/game/sandbox/dashboards/risks.rs.html#14-88" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new_state" class="method"><code>pub fn <a href="#method.new_state" class="fnname">new_state</a>(<br> ctx: &mut EventCtx<'_>, <br> app: &<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br> include_no_changes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><br>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn State<<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>>></code><a class="srclink" href="../../../../src/game/sandbox/dashboards/risks.rs.html#15-87" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-State%3CApp%3E" class="impl"><code class="in-band">impl State<<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>> for <a class="struct" href="../../../../game/sandbox/dashboards/risks/struct.RiskSummaries.html" title="struct game::sandbox::dashboards::risks::RiskSummaries">RiskSummaries</a></code><a href="#impl-State%3CApp%3E" class="anchor"></a><a class="srclink" href="../../../../src/game/sandbox/dashboards/risks.rs.html#90-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.event" class="method hidden"><code>fn <a href="#method.event" class="fnname">event</a>(&mut self, ctx: &mut EventCtx<'_>, app: &mut <a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>) -> Transition<<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>></code><a class="srclink" href="../../../../src/game/sandbox/dashboards/risks.rs.html#91-107" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
|
||||
</div><h4 id="method.draw" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&self, g: &mut GfxCtx<'_>, _app: &<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>)</code><a class="srclink" href="../../../../src/game/sandbox/dashboards/risks.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Draw</p>
|
||||
</div><h4 id="method.draw_baselayer" class="method hidden"><code>pub fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&self) -> DrawBaselayer</code></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</p>
|
||||
</div><h4 id="method.on_destroy" class="method hidden"><code>pub fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&mut self, &mut EventCtx<'_>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>A)</code></h4><div class='docblock hidden'><p>Before this state is popped or replaced, call this.</p>
|
||||
</div></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../../../game/sandbox/dashboards/risks/struct.RiskSummaries.html" title="struct game::sandbox::dashboards::risks::RiskSummaries">RiskSummaries</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../../../game/sandbox/dashboards/risks/struct.RiskSummaries.html" title="struct game::sandbox::dashboards::risks::RiskSummaries">RiskSummaries</a></code><a href="#impl-Send" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../../../game/sandbox/dashboards/risks/struct.RiskSummaries.html" title="struct game::sandbox::dashboards::risks::RiskSummaries">RiskSummaries</a></code><a href="#impl-Sync" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../../../game/sandbox/dashboards/risks/struct.RiskSummaries.html" title="struct game::sandbox::dashboards::risks::RiskSummaries">RiskSummaries</a></code><a href="#impl-Unpin" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../../../game/sandbox/dashboards/risks/struct.RiskSummaries.html" title="struct game::sandbox::dashboards::risks::RiskSummaries">RiskSummaries</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#131-135" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
|
@ -1 +1 @@
|
||||
initSidebarItems({"enum":[["DashTab",""]],"mod":[["commuter",""],["generic_trip_table",""],["misc",""],["parking_overhead",""],["risks",""],["selector",""],["traffic_signals",""],["travel_times",""],["trip_table",""]]});
|
||||
initSidebarItems({"enum":[["DashTab",""]],"mod":[["commuter",""],["generic_trip_table",""],["misc",""],["parking_overhead",""],["risks",""],["selector",""],["traffic_signals",""],["travel_times",""],["trip_problems",""],["trip_table",""]]});
|
@ -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 `contingency_table` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, contingency_table"><title>game::sandbox::dashboards::travel_times::contingency_table - 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 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</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"><p class="location"><a href="../../../index.html">game</a>::<wbr><a href="../../index.html">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a href="index.html">travel_times</a></p><div id="sidebar-vars" data-name="contingency_table" 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"><img src="../../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../../theme.js"></script><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" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../../settings.html"><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">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a href="index.html">travel_times</a>::<wbr><a class="fn" href="">contingency_table</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../../src/game/sandbox/dashboards/travel_times.rs.html#243-472" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn contingency_table(<br> ctx: &mut EventCtx<'_>, <br> app: &<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br> filter: &<a class="struct" href="../../../../game/sandbox/dashboards/travel_times/struct.Filter.html" title="struct game::sandbox::dashboards::travel_times::Filter">Filter</a><br>) -> Widget</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="game" data-search-js="../../../../search-index.js"></div>
|
||||
<a id="settings-menu" href="../../../../settings.html"><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">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a href="index.html">travel_times</a>::<wbr><a class="fn" href="">contingency_table</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../../src/game/sandbox/dashboards/travel_times.rs.html#281-512" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn contingency_table(<br> ctx: &mut EventCtx<'_>, <br> app: &<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br> filter: &<a class="struct" href="../../../../game/sandbox/dashboards/travel_times/struct.Filter.html" title="struct game::sandbox::dashboards::travel_times::Filter">Filter</a><br>) -> Widget</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="game" data-search-js="../../../../search-index.js"></div>
|
||||
<script src="../../../../main.js"></script></body></html>
|
@ -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 `export_times` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, export_times"><title>game::sandbox::dashboards::travel_times::export_times - 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 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</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"><p class="location"><a href="../../../index.html">game</a>::<wbr><a href="../../index.html">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a href="index.html">travel_times</a></p><div id="sidebar-vars" data-name="export_times" 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"><img src="../../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../../theme.js"></script><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" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../../settings.html"><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">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a href="index.html">travel_times</a>::<wbr><a class="fn" href="">export_times</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../../src/game/sandbox/dashboards/travel_times.rs.html#516-540" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn export_times(app: &<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>) -> <a class="type" href="https://docs.rs/anyhow/1.0.38/anyhow/type.Result.html" title="type anyhow::Result">Result</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="game" data-search-js="../../../../search-index.js"></div>
|
||||
<a id="settings-menu" href="../../../../settings.html"><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">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a href="index.html">travel_times</a>::<wbr><a class="fn" href="">export_times</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../../src/game/sandbox/dashboards/travel_times.rs.html#568-592" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn export_times(app: &<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>) -> <a class="type" href="https://docs.rs/anyhow/1.0.38/anyhow/type.Result.html" title="type anyhow::Result">Result</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="game" data-search-js="../../../../search-index.js"></div>
|
||||
<script src="../../../../main.js"></script></body></html>
|
@ -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 `pct_diff` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, pct_diff"><title>game::sandbox::dashboards::travel_times::pct_diff - 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 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</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"><p class="location"><a href="../../../index.html">game</a>::<wbr><a href="../../index.html">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a href="index.html">travel_times</a></p><div id="sidebar-vars" data-name="pct_diff" 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"><img src="../../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../../theme.js"></script><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" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../../settings.html"><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">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a href="index.html">travel_times</a>::<wbr><a class="fn" href="">pct_diff</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../../src/game/sandbox/dashboards/travel_times.rs.html#508-514" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn pct_diff(a: <a class="struct" href="../../../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>, b: <a class="struct" href="../../../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="game" data-search-js="../../../../search-index.js"></div>
|
||||
<a id="settings-menu" href="../../../../settings.html"><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">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a href="index.html">travel_times</a>::<wbr><a class="fn" href="">pct_diff</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../../src/game/sandbox/dashboards/travel_times.rs.html#560-566" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn pct_diff(a: <a class="struct" href="../../../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>, b: <a class="struct" href="../../../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="game" data-search-js="../../../../search-index.js"></div>
|
||||
<script src="../../../../main.js"></script></body></html>
|
@ -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 `scatter_plot` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, scatter_plot"><title>game::sandbox::dashboards::travel_times::scatter_plot - 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 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</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"><p class="location"><a href="../../../index.html">game</a>::<wbr><a href="../../index.html">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a href="index.html">travel_times</a></p><div id="sidebar-vars" data-name="scatter_plot" 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"><img src="../../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../../theme.js"></script><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" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../../settings.html"><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">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a href="index.html">travel_times</a>::<wbr><a class="fn" href="">scatter_plot</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../../src/game/sandbox/dashboards/travel_times.rs.html#216-241" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn scatter_plot(ctx: &mut EventCtx<'_>, app: &<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>, filter: &<a class="struct" href="../../../../game/sandbox/dashboards/travel_times/struct.Filter.html" title="struct game::sandbox::dashboards::travel_times::Filter">Filter</a>) -> Widget</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="game" data-search-js="../../../../search-index.js"></div>
|
||||
<a id="settings-menu" href="../../../../settings.html"><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">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a href="index.html">travel_times</a>::<wbr><a class="fn" href="">scatter_plot</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../../src/game/sandbox/dashboards/travel_times.rs.html#256-279" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn scatter_plot(ctx: &mut EventCtx<'_>, app: &<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>, filter: &<a class="struct" href="../../../../game/sandbox/dashboards/travel_times/struct.Filter.html" title="struct game::sandbox::dashboards::travel_times::Filter">Filter</a>) -> Widget</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="game" data-search-js="../../../../search-index.js"></div>
|
||||
<script src="../../../../main.js"></script></body></html>
|
@ -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 `summary_boxes` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, summary_boxes"><title>game::sandbox::dashboards::travel_times::summary_boxes - 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 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</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"><p class="location"><a href="../../../index.html">game</a>::<wbr><a href="../../index.html">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a href="index.html">travel_times</a></p><div id="sidebar-vars" data-name="summary_boxes" 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"><img src="../../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../../theme.js"></script><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" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../../settings.html"><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">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a href="index.html">travel_times</a>::<wbr><a class="fn" href="">summary_boxes</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../../src/game/sandbox/dashboards/travel_times.rs.html#119-214" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn summary_boxes(ctx: &mut EventCtx<'_>, app: &<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>, filter: &<a class="struct" href="../../../../game/sandbox/dashboards/travel_times/struct.Filter.html" title="struct game::sandbox::dashboards::travel_times::Filter">Filter</a>) -> Widget</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="game" data-search-js="../../../../search-index.js"></div>
|
||||
<a id="settings-menu" href="../../../../settings.html"><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">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a href="index.html">travel_times</a>::<wbr><a class="fn" href="">summary_boxes</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../../src/game/sandbox/dashboards/travel_times.rs.html#159-254" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn summary_boxes(ctx: &mut EventCtx<'_>, app: &<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>, filter: &<a class="struct" href="../../../../game/sandbox/dashboards/travel_times/struct.Filter.html" title="struct game::sandbox::dashboards::travel_times::Filter">Filter</a>) -> Widget</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="game" data-search-js="../../../../search-index.js"></div>
|
||||
<script src="../../../../main.js"></script></body></html>
|
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `travel_times` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, travel_times"><title>game::sandbox::dashboards::travel_times - 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 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../../rust-logo.png' alt='logo'></div></a><p class="location">Module travel_times</p><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><p class="location"><a href="../../../index.html">game</a>::<wbr><a href="../../index.html">sandbox</a>::<wbr><a href="../index.html">dashboards</a></p><div id="sidebar-vars" data-name="travel_times" 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"><img src="../../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../../theme.js"></script><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" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../../settings.html"><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">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a class="mod" href="">travel_times</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../../src/game/sandbox/dashboards/travel_times.rs.html#1-540" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
||||
<a id="settings-menu" href="../../../../settings.html"><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">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a class="mod" href="">travel_times</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../../src/game/sandbox/dashboards/travel_times.rs.html#1-592" 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.Filter.html" title="game::sandbox::dashboards::travel_times::Filter struct">Filter</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.TravelTimes.html" title="game::sandbox::dashboards::travel_times::TravelTimes struct">TravelTimes</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.contingency_table.html" title="game::sandbox::dashboards::travel_times::contingency_table fn">contingency_table</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.export_times.html" title="game::sandbox::dashboards::travel_times::export_times fn">export_times</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.pct_diff.html" title="game::sandbox::dashboards::travel_times::pct_diff fn">pct_diff</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.scatter_plot.html" title="game::sandbox::dashboards::travel_times::scatter_plot fn">scatter_plot</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.summary_boxes.html" title="game::sandbox::dashboards::travel_times::summary_boxes fn">summary_boxes</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="game" data-search-js="../../../../search-index.js"></div>
|
||||
<script src="../../../../main.js"></script></body></html>
|
File diff suppressed because one or more lines are too long
@ -1,11 +1,11 @@
|
||||
<!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 `TravelTimes` struct in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, TravelTimes"><title>game::sandbox::dashboards::travel_times::TravelTimes - 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 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../../rust-logo.png' alt='logo'></div></a><p class="location">Struct TravelTimes</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.panel">panel</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.new_state">new_state</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-State%3CApp%3E">State<App></a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Send">!Send</a><a href="#impl-Sync">!Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">!UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-Downcast">Downcast</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class="location"><a href="../../../index.html">game</a>::<wbr><a href="../../index.html">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a href="index.html">travel_times</a></p><div id="sidebar-vars" data-name="TravelTimes" 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"><img src="../../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../../theme.js"></script><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" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../../settings.html"><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">game</a>::<wbr><a href="../../index.html">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a href="index.html">travel_times</a>::<wbr><a class="struct" href="">TravelTimes</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../../src/game/sandbox/dashboards/travel_times.rs.html#20-22" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct TravelTimes {
|
||||
<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 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../../rust-logo.png' alt='logo'></div></a><p class="location">Struct TravelTimes</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.panel">panel</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.make_panel">make_panel</a><a href="#method.new_state">new_state</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-State%3CApp%3E">State<App></a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Send">!Send</a><a href="#impl-Sync">!Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">!UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-Downcast">Downcast</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class="location"><a href="../../../index.html">game</a>::<wbr><a href="../../index.html">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a href="index.html">travel_times</a></p><div id="sidebar-vars" data-name="TravelTimes" 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"><img src="../../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../../theme.js"></script><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" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../../settings.html"><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">game</a>::<wbr><a href="../../index.html">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a href="index.html">travel_times</a>::<wbr><a class="struct" href="">TravelTimes</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../../src/game/sandbox/dashboards/travel_times.rs.html#21-23" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct TravelTimes {
|
||||
panel: Panel,
|
||||
}</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: Panel</code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../../../../game/sandbox/dashboards/travel_times/struct.TravelTimes.html" title="struct game::sandbox::dashboards::travel_times::TravelTimes">TravelTimes</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../../../src/game/sandbox/dashboards/travel_times.rs.html#24-73" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new_state" class="method"><code>pub fn <a href="#method.new_state" class="fnname">new_state</a>(<br> ctx: &mut EventCtx<'_>, <br> app: &<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br> filter: <a class="struct" href="../../../../game/sandbox/dashboards/travel_times/struct.Filter.html" title="struct game::sandbox::dashboards::travel_times::Filter">Filter</a><br>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn State<<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>>></code><a class="srclink" href="../../../../src/game/sandbox/dashboards/travel_times.rs.html#25-72" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-State%3CApp%3E" class="impl"><code class="in-band">impl State<<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>> for <a class="struct" href="../../../../game/sandbox/dashboards/travel_times/struct.TravelTimes.html" title="struct game::sandbox::dashboards::travel_times::TravelTimes">TravelTimes</a></code><a href="#impl-State%3CApp%3E" class="anchor"></a><a class="srclink" href="../../../../src/game/sandbox/dashboards/travel_times.rs.html#75-117" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.event" class="method hidden"><code>fn <a href="#method.event" class="fnname">event</a>(&mut self, ctx: &mut EventCtx<'_>, app: &mut <a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>) -> Transition<<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>></code><a class="srclink" href="../../../../src/game/sandbox/dashboards/travel_times.rs.html#76-112" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
|
||||
</div><h4 id="method.draw" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&self, g: &mut GfxCtx<'_>, _app: &<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>)</code><a class="srclink" href="../../../../src/game/sandbox/dashboards/travel_times.rs.html#114-116" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>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: Panel</code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../../../../game/sandbox/dashboards/travel_times/struct.TravelTimes.html" title="struct game::sandbox::dashboards::travel_times::TravelTimes">TravelTimes</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../../../src/game/sandbox/dashboards/travel_times.rs.html#25-109" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new_state" class="method"><code>pub fn <a href="#method.new_state" class="fnname">new_state</a>(<br> ctx: &mut EventCtx<'_>, <br> app: &<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br> filter: <a class="struct" href="../../../../game/sandbox/dashboards/travel_times/struct.Filter.html" title="struct game::sandbox::dashboards::travel_times::Filter">Filter</a><br>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn State<<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>>></code><a class="srclink" href="../../../../src/game/sandbox/dashboards/travel_times.rs.html#26-30" title="goto source code">[src]</a></h4><h4 id="method.make_panel" class="method"><code>fn <a href="#method.make_panel" class="fnname">make_panel</a>(ctx: &mut EventCtx<'_>, app: &<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>, filter: <a class="struct" href="../../../../game/sandbox/dashboards/travel_times/struct.Filter.html" title="struct game::sandbox::dashboards::travel_times::Filter">Filter</a>) -> Panel</code><a class="srclink" href="../../../../src/game/sandbox/dashboards/travel_times.rs.html#32-108" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-State%3CApp%3E" class="impl"><code class="in-band">impl State<<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>> for <a class="struct" href="../../../../game/sandbox/dashboards/travel_times/struct.TravelTimes.html" title="struct game::sandbox::dashboards::travel_times::TravelTimes">TravelTimes</a></code><a href="#impl-State%3CApp%3E" class="anchor"></a><a class="srclink" href="../../../../src/game/sandbox/dashboards/travel_times.rs.html#111-157" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.event" class="method hidden"><code>fn <a href="#method.event" class="fnname">event</a>(&mut self, ctx: &mut EventCtx<'_>, app: &mut <a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>) -> Transition<<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>></code><a class="srclink" href="../../../../src/game/sandbox/dashboards/travel_times.rs.html#112-152" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
|
||||
</div><h4 id="method.draw" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&self, g: &mut GfxCtx<'_>, _app: &<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>)</code><a class="srclink" href="../../../../src/game/sandbox/dashboards/travel_times.rs.html#154-156" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Draw</p>
|
||||
</div><h4 id="method.draw_baselayer" class="method hidden"><code>pub fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&self) -> DrawBaselayer</code></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</p>
|
||||
</div><h4 id="method.on_destroy" class="method hidden"><code>pub fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&mut self, &mut EventCtx<'_>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>A)</code></h4><div class='docblock hidden'><p>Before this state is popped or replaced, call this.</p>
|
||||
</div></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../../../game/sandbox/dashboards/travel_times/struct.TravelTimes.html" title="struct game::sandbox::dashboards::travel_times::TravelTimes">TravelTimes</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../../../game/sandbox/dashboards/travel_times/struct.TravelTimes.html" title="struct game::sandbox::dashboards::travel_times::TravelTimes">TravelTimes</a></code><a href="#impl-Send" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../../../game/sandbox/dashboards/travel_times/struct.TravelTimes.html" title="struct game::sandbox::dashboards::travel_times::TravelTimes">TravelTimes</a></code><a href="#impl-Sync" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../../../game/sandbox/dashboards/travel_times/struct.TravelTimes.html" title="struct game::sandbox::dashboards::travel_times::TravelTimes">TravelTimes</a></code><a href="#impl-Unpin" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../../../game/sandbox/dashboards/travel_times/struct.TravelTimes.html" title="struct game::sandbox::dashboards::travel_times::TravelTimes">TravelTimes</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#131-135" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
|
@ -1,18 +1,18 @@
|
||||
<!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 `ProblemType` enum in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, ProblemType"><title>game::sandbox::dashboards::risks::ProblemType - 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">
|
||||
<!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 `ProblemType` enum in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, ProblemType"><title>game::sandbox::dashboards::trip_problems::ProblemType - 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 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../../rust-logo.png' alt='logo'></div></a><p class="location">Enum ProblemType</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.IntersectionDelay">IntersectionDelay</a><a href="#variant.LargeIntersectionCrossing">LargeIntersectionCrossing</a><a href="#variant.OvertakeDesired">OvertakeDesired</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.count">count</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Copy">Copy</a><a href="#impl-PartialEq%3CProblemType%3E">PartialEq<ProblemType></a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class="location"><a href="../../../index.html">game</a>::<wbr><a href="../../index.html">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a href="index.html">risks</a></p><div id="sidebar-vars" data-name="ProblemType" 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"><img src="../../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../../theme.js"></script><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" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../../settings.html"><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">game</a>::<wbr><a href="../../index.html">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a href="index.html">risks</a>::<wbr><a class="enum" href="">ProblemType</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../../src/game/sandbox/dashboards/risks.rs.html#206-210" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust enum">enum ProblemType {
|
||||
<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 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../../rust-logo.png' alt='logo'></div></a><p class="location">Enum ProblemType</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.IntersectionDelay">IntersectionDelay</a><a href="#variant.LargeIntersectionCrossing">LargeIntersectionCrossing</a><a href="#variant.OvertakeDesired">OvertakeDesired</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.count">count</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Copy">Copy</a><a href="#impl-PartialEq%3CProblemType%3E">PartialEq<ProblemType></a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class="location"><a href="../../../index.html">game</a>::<wbr><a href="../../index.html">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a href="index.html">trip_problems</a></p><div id="sidebar-vars" data-name="ProblemType" 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"><img src="../../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../../theme.js"></script><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" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../../settings.html"><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">game</a>::<wbr><a href="../../index.html">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a href="index.html">trip_problems</a>::<wbr><a class="enum" href="">ProblemType</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../../src/game/sandbox/dashboards/trip_problems.rs.html#12-16" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust enum">pub enum ProblemType {
|
||||
IntersectionDelay,
|
||||
LargeIntersectionCrossing,
|
||||
OvertakeDesired,
|
||||
}</pre></div><h2 id="variants" class="variants small-section-header">
|
||||
Variants<a href="#variants" class="anchor"></a></h2>
|
||||
<div id="variant.IntersectionDelay" class="variant small-section-header"><a href="#variant.IntersectionDelay" class="anchor field"></a><code>IntersectionDelay</code></div><div id="variant.LargeIntersectionCrossing" class="variant small-section-header"><a href="#variant.LargeIntersectionCrossing" class="anchor field"></a><code>LargeIntersectionCrossing</code></div><div id="variant.OvertakeDesired" class="variant small-section-header"><a href="#variant.OvertakeDesired" class="anchor field"></a><code>OvertakeDesired</code></div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="enum" href="../../../../game/sandbox/dashboards/risks/enum.ProblemType.html" title="enum game::sandbox::dashboards::risks::ProblemType">ProblemType</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../../../src/game/sandbox/dashboards/risks.rs.html#212-228" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.count" class="method"><code>fn <a href="#method.count" class="fnname">count</a>(self, problems: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a>, <a class="enum" href="../../../../sim/analytics/enum.Problem.html" title="enum sim::analytics::Problem">Problem</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class="srclink" href="../../../../src/game/sandbox/dashboards/risks.rs.html#213-227" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="../../../../game/sandbox/dashboards/risks/enum.ProblemType.html" title="enum game::sandbox::dashboards::risks::ProblemType">ProblemType</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../../../src/game/sandbox/dashboards/risks.rs.html#205" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="enum" href="../../../../game/sandbox/dashboards/risks/enum.ProblemType.html" title="enum game::sandbox::dashboards::risks::ProblemType">ProblemType</a></code><a class="srclink" href="../../../../src/game/sandbox/dashboards/risks.rs.html#205" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
<div id="variant.IntersectionDelay" class="variant small-section-header"><a href="#variant.IntersectionDelay" class="anchor field"></a><code>IntersectionDelay</code></div><div id="variant.LargeIntersectionCrossing" class="variant small-section-header"><a href="#variant.LargeIntersectionCrossing" class="anchor field"></a><code>LargeIntersectionCrossing</code></div><div id="variant.OvertakeDesired" class="variant small-section-header"><a href="#variant.OvertakeDesired" class="anchor field"></a><code>OvertakeDesired</code></div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="enum" href="../../../../game/sandbox/dashboards/trip_problems/enum.ProblemType.html" title="enum game::sandbox::dashboards::trip_problems::ProblemType">ProblemType</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../../../src/game/sandbox/dashboards/trip_problems.rs.html#18-34" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.count" class="method"><code>pub fn <a href="#method.count" class="fnname">count</a>(self, problems: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a>, <a class="enum" href="../../../../sim/analytics/enum.Problem.html" title="enum sim::analytics::Problem">Problem</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class="srclink" href="../../../../src/game/sandbox/dashboards/trip_problems.rs.html#19-33" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="../../../../game/sandbox/dashboards/trip_problems/enum.ProblemType.html" title="enum game::sandbox::dashboards::trip_problems::ProblemType">ProblemType</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../../../src/game/sandbox/dashboards/trip_problems.rs.html#11" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="enum" href="../../../../game/sandbox/dashboards/trip_problems/enum.ProblemType.html" title="enum game::sandbox::dashboards::trip_problems::ProblemType">ProblemType</a></code><a class="srclink" href="../../../../src/game/sandbox/dashboards/trip_problems.rs.html#11" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id="method.clone_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></div><h3 id="impl-Copy" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="enum" href="../../../../game/sandbox/dashboards/risks/enum.ProblemType.html" title="enum game::sandbox::dashboards::risks::ProblemType">ProblemType</a></code><a href="#impl-Copy" class="anchor"></a><a class="srclink" href="../../../../src/game/sandbox/dashboards/risks.rs.html#205" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-PartialEq%3CProblemType%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="enum" href="../../../../game/sandbox/dashboards/risks/enum.ProblemType.html" title="enum game::sandbox::dashboards::risks::ProblemType">ProblemType</a>> for <a class="enum" href="../../../../game/sandbox/dashboards/risks/enum.ProblemType.html" title="enum game::sandbox::dashboards::risks::ProblemType">ProblemType</a></code><a href="#impl-PartialEq%3CProblemType%3E" class="anchor"></a><a class="srclink" href="../../../../src/game/sandbox/dashboards/risks.rs.html#205" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.eq" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="enum" href="../../../../game/sandbox/dashboards/risks/enum.ProblemType.html" title="enum game::sandbox::dashboards::risks::ProblemType">ProblemType</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../../../src/game/sandbox/dashboards/risks.rs.html#205" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
|
||||
</div></div><h3 id="impl-Copy" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="enum" href="../../../../game/sandbox/dashboards/trip_problems/enum.ProblemType.html" title="enum game::sandbox::dashboards::trip_problems::ProblemType">ProblemType</a></code><a href="#impl-Copy" class="anchor"></a><a class="srclink" href="../../../../src/game/sandbox/dashboards/trip_problems.rs.html#11" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-PartialEq%3CProblemType%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="enum" href="../../../../game/sandbox/dashboards/trip_problems/enum.ProblemType.html" title="enum game::sandbox::dashboards::trip_problems::ProblemType">ProblemType</a>> for <a class="enum" href="../../../../game/sandbox/dashboards/trip_problems/enum.ProblemType.html" title="enum game::sandbox::dashboards::trip_problems::ProblemType">ProblemType</a></code><a href="#impl-PartialEq%3CProblemType%3E" class="anchor"></a><a class="srclink" href="../../../../src/game/sandbox/dashboards/trip_problems.rs.html#11" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.eq" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="enum" href="../../../../game/sandbox/dashboards/trip_problems/enum.ProblemType.html" title="enum game::sandbox::dashboards::trip_problems::ProblemType">ProblemType</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../../../src/game/sandbox/dashboards/trip_problems.rs.html#11" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
|
||||
by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
||||
</div><h4 id="method.ne" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>pub fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
|
||||
</div></div><h3 id="impl-StructuralPartialEq" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="enum" href="../../../../game/sandbox/dashboards/risks/enum.ProblemType.html" title="enum game::sandbox::dashboards::risks::ProblemType">ProblemType</a></code><a href="#impl-StructuralPartialEq" class="anchor"></a><a class="srclink" href="../../../../src/game/sandbox/dashboards/risks.rs.html#205" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="../../../../game/sandbox/dashboards/risks/enum.ProblemType.html" title="enum game::sandbox::dashboards::risks::ProblemType">ProblemType</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="../../../../game/sandbox/dashboards/risks/enum.ProblemType.html" title="enum game::sandbox::dashboards::risks::ProblemType">ProblemType</a></code><a href="#impl-Send" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="../../../../game/sandbox/dashboards/risks/enum.ProblemType.html" title="enum game::sandbox::dashboards::risks::ProblemType">ProblemType</a></code><a href="#impl-Sync" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="../../../../game/sandbox/dashboards/risks/enum.ProblemType.html" title="enum game::sandbox::dashboards::risks::ProblemType">ProblemType</a></code><a href="#impl-Unpin" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="../../../../game/sandbox/dashboards/risks/enum.ProblemType.html" title="enum game::sandbox::dashboards::risks::ProblemType">ProblemType</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#131-135" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id="impl-StructuralPartialEq" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="enum" href="../../../../game/sandbox/dashboards/trip_problems/enum.ProblemType.html" title="enum game::sandbox::dashboards::trip_problems::ProblemType">ProblemType</a></code><a href="#impl-StructuralPartialEq" class="anchor"></a><a class="srclink" href="../../../../src/game/sandbox/dashboards/trip_problems.rs.html#11" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="../../../../game/sandbox/dashboards/trip_problems/enum.ProblemType.html" title="enum game::sandbox::dashboards::trip_problems::ProblemType">ProblemType</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="../../../../game/sandbox/dashboards/trip_problems/enum.ProblemType.html" title="enum game::sandbox::dashboards::trip_problems::ProblemType">ProblemType</a></code><a href="#impl-Send" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="../../../../game/sandbox/dashboards/trip_problems/enum.ProblemType.html" title="enum game::sandbox::dashboards::trip_problems::ProblemType">ProblemType</a></code><a href="#impl-Sync" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="../../../../game/sandbox/dashboards/trip_problems/enum.ProblemType.html" title="enum game::sandbox::dashboards::trip_problems::ProblemType">ProblemType</a></code><a href="#impl-Unpin" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="../../../../game/sandbox/dashboards/trip_problems/enum.ProblemType.html" title="enum game::sandbox::dashboards::trip_problems::ProblemType">ProblemType</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#131-135" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||
</div></div><h3 id="impl-Downcast" class="impl"><code class="in-band">impl<T> Downcast for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a>, </span></code><a href="#impl-Downcast" class="anchor"></a></h3><div class="impl-items"><h4 id="method.into_any" class="method hidden"><code>pub fn <a href="#method.into_any" class="fnname">into_any</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><T, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>></code></h4><div class='docblock hidden'><p>Convert <code>Box<dyn Trait></code> (where <code>Trait: Downcast</code>) to <code>Box<dyn Any></code>. <code>Box<dyn Any></code> can
|
@ -0,0 +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 `bucketize_isizes` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, bucketize_isizes"><title>game::sandbox::dashboards::trip_problems::bucketize_isizes - 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 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</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"><p class="location"><a href="../../../index.html">game</a>::<wbr><a href="../../index.html">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a href="index.html">trip_problems</a></p><div id="sidebar-vars" data-name="bucketize_isizes" 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"><img src="../../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../../theme.js"></script><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" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../../settings.html"><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">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a href="index.html">trip_problems</a>::<wbr><a class="fn" href="">bucketize_isizes</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../../src/game/sandbox/dashboards/trip_problems.rs.html#305-339" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn bucketize_isizes(max_buckets: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, pts: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a>></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="game" data-search-js="../../../../search-index.js"></div>
|
||||
<script src="../../../../main.js"></script></body></html>
|
@ -0,0 +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 `problem_matrix` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, problem_matrix"><title>game::sandbox::dashboards::trip_problems::problem_matrix - 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 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</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"><p class="location"><a href="../../../index.html">game</a>::<wbr><a href="../../index.html">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a href="index.html">trip_problems</a></p><div id="sidebar-vars" data-name="problem_matrix" 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"><img src="../../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../../theme.js"></script><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" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../../settings.html"><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">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a href="index.html">trip_problems</a>::<wbr><a class="fn" href="">problem_matrix</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../../src/game/sandbox/dashboards/trip_problems.rs.html#84-162" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn problem_matrix(<br> ctx: &mut EventCtx<'_>, <br> app: &<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br> trips: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a><br>) -> Widget</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="game" data-search-js="../../../../search-index.js"></div>
|
||||
<script src="../../../../main.js"></script></body></html>
|
10
rustdoc/game/sandbox/dashboards/trip_problems/index.html
Normal file
10
rustdoc/game/sandbox/dashboards/trip_problems/index.html
Normal file
@ -0,0 +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="API documentation for the Rust `trip_problems` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, trip_problems"><title>game::sandbox::dashboards::trip_problems - 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 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../../rust-logo.png' alt='logo'></div></a><p class="location">Module trip_problems</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li></ul></div><p class="location"><a href="../../../index.html">game</a>::<wbr><a href="../../index.html">sandbox</a>::<wbr><a href="../index.html">dashboards</a></p><div id="sidebar-vars" data-name="trip_problems" 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"><img src="../../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../../theme.js"></script><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" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../../settings.html"><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">sandbox</a>::<wbr><a href="../index.html">dashboards</a>::<wbr><a class="mod" href="">trip_problems</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../../src/game/sandbox/dashboards/trip_problems.rs.html#1-386" 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.CLEAR_COLOR_SCALE.html" title="game::sandbox::dashboards::trip_problems::CLEAR_COLOR_SCALE struct">CLEAR_COLOR_SCALE</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.Matrix.html" title="game::sandbox::dashboards::trip_problems::Matrix struct">Matrix</a></td><td class="docblock-short"><p>Aka a 2D histogram. Counts the number of matching points in each cell.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.MatrixOptions.html" title="game::sandbox::dashboards::trip_problems::MatrixOptions struct">MatrixOptions</a></td><td class="docblock-short"></td></tr></table><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2>
|
||||
<table><tr class="module-item"><td><a class="enum" href="enum.ProblemType.html" title="game::sandbox::dashboards::trip_problems::ProblemType enum">ProblemType</a></td><td class="docblock-short"></td></tr></table><h2 id="traits" class="section-header"><a href="#traits">Traits</a></h2>
|
||||
<table><tr class="module-item"><td><a class="trait" href="trait.TripProblemFilter.html" title="game::sandbox::dashboards::trip_problems::TripProblemFilter trait">TripProblemFilter</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.bucketize_isizes.html" title="game::sandbox::dashboards::trip_problems::bucketize_isizes fn">bucketize_isizes</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.problem_matrix.html" title="game::sandbox::dashboards::trip_problems::problem_matrix fn">problem_matrix</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="game" data-search-js="../../../../search-index.js"></div>
|
||||
<script src="../../../../main.js"></script></body></html>
|
@ -0,0 +1 @@
|
||||
initSidebarItems({"enum":[["ProblemType",""]],"fn":[["bucketize_isizes",""],["problem_matrix",""]],"struct":[["CLEAR_COLOR_SCALE",""],["Matrix","Aka a 2D histogram. Counts the number of matching points in each cell."],["MatrixOptions",""]],"trait":[["TripProblemFilter",""]]});
|
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
@ -1,6 +1,6 @@
|
||||
(function() {var implementors = {};
|
||||
implementors["collisions"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"collisions/enum.Severity.html\" title=\"enum collisions::Severity\">Severity</a>","synthetic":false,"types":["collisions::Severity"]}];
|
||||
implementors["game"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"game/layer/pandemic/enum.Seir.html\" title=\"enum game::layer::pandemic::Seir\">Seir</a>","synthetic":false,"types":["game::layer::pandemic::Seir"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"game/layer/parking/enum.Loc.html\" title=\"enum game::layer::parking::Loc\">Loc</a>","synthetic":false,"types":["game::layer::parking::Loc"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"game/sandbox/dashboards/commuter/enum.BlockSelection.html\" title=\"enum game::sandbox::dashboards::commuter::BlockSelection\">BlockSelection</a>","synthetic":false,"types":["game::sandbox::dashboards::commuter::BlockSelection"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"game/sandbox/dashboards/risks/enum.ProblemType.html\" title=\"enum game::sandbox::dashboards::risks::ProblemType\">ProblemType</a>","synthetic":false,"types":["game::sandbox::dashboards::risks::ProblemType"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"game/sandbox/dashboards/enum.DashTab.html\" title=\"enum game::sandbox::dashboards::DashTab\">DashTab</a>","synthetic":false,"types":["game::sandbox::dashboards::DashTab"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"game/sandbox/gameplay/tutorial/struct.TutorialPointer.html\" title=\"struct game::sandbox::gameplay::tutorial::TutorialPointer\">TutorialPointer</a>","synthetic":false,"types":["game::sandbox::gameplay::tutorial::TutorialPointer"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"game/sandbox/gameplay/tutorial/enum.Task.html\" title=\"enum game::sandbox::gameplay::tutorial::Task\">Task</a>","synthetic":false,"types":["game::sandbox::gameplay::tutorial::Task"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"game/sandbox/speed/enum.SpeedSetting.html\" title=\"enum game::sandbox::speed::SpeedSetting\">SpeedSetting</a>","synthetic":false,"types":["game::sandbox::speed::SpeedSetting"]}];
|
||||
implementors["game"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"game/layer/pandemic/enum.Seir.html\" title=\"enum game::layer::pandemic::Seir\">Seir</a>","synthetic":false,"types":["game::layer::pandemic::Seir"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"game/layer/parking/enum.Loc.html\" title=\"enum game::layer::parking::Loc\">Loc</a>","synthetic":false,"types":["game::layer::parking::Loc"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"game/sandbox/dashboards/commuter/enum.BlockSelection.html\" title=\"enum game::sandbox::dashboards::commuter::BlockSelection\">BlockSelection</a>","synthetic":false,"types":["game::sandbox::dashboards::commuter::BlockSelection"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"game/sandbox/dashboards/trip_problems/enum.ProblemType.html\" title=\"enum game::sandbox::dashboards::trip_problems::ProblemType\">ProblemType</a>","synthetic":false,"types":["game::sandbox::dashboards::trip_problems::ProblemType"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"game/sandbox/dashboards/enum.DashTab.html\" title=\"enum game::sandbox::dashboards::DashTab\">DashTab</a>","synthetic":false,"types":["game::sandbox::dashboards::DashTab"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"game/sandbox/gameplay/tutorial/struct.TutorialPointer.html\" title=\"struct game::sandbox::gameplay::tutorial::TutorialPointer\">TutorialPointer</a>","synthetic":false,"types":["game::sandbox::gameplay::tutorial::TutorialPointer"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"game/sandbox/gameplay/tutorial/enum.Task.html\" title=\"enum game::sandbox::gameplay::tutorial::Task\">Task</a>","synthetic":false,"types":["game::sandbox::gameplay::tutorial::Task"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"game/sandbox/speed/enum.SpeedSetting.html\" title=\"enum game::sandbox::speed::SpeedSetting\">SpeedSetting</a>","synthetic":false,"types":["game::sandbox::speed::SpeedSetting"]}];
|
||||
implementors["geom"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"geom/angle/struct.Angle.html\" title=\"struct geom::angle::Angle\">Angle</a>","synthetic":false,"types":["geom::angle::Angle"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"geom/bounds/struct.Bounds.html\" title=\"struct geom::bounds::Bounds\">Bounds</a>","synthetic":false,"types":["geom::bounds::Bounds"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"geom/distance/struct.Distance.html\" title=\"struct geom::distance::Distance\">Distance</a>","synthetic":false,"types":["geom::distance::Distance"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"geom/duration/struct.Duration.html\" title=\"struct geom::duration::Duration\">Duration</a>","synthetic":false,"types":["geom::duration::Duration"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"geom/gps/struct.LonLat.html\" title=\"struct geom::gps::LonLat\">LonLat</a>","synthetic":false,"types":["geom::gps::LonLat"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"geom/percent/struct.Percent.html\" title=\"struct geom::percent::Percent\">Percent</a>","synthetic":false,"types":["geom::percent::Percent"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"geom/pt/struct.Pt2D.html\" title=\"struct geom::pt::Pt2D\">Pt2D</a>","synthetic":false,"types":["geom::pt::Pt2D"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"geom/pt/struct.HashablePt2D.html\" title=\"struct geom::pt::HashablePt2D\">HashablePt2D</a>","synthetic":false,"types":["geom::pt::HashablePt2D"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"geom/speed/struct.Speed.html\" title=\"struct geom::speed::Speed\">Speed</a>","synthetic":false,"types":["geom::speed::Speed"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"geom/stats/enum.Statistic.html\" title=\"enum geom::stats::Statistic\">Statistic</a>","synthetic":false,"types":["geom::stats::Statistic"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"geom/time/struct.Time.html\" title=\"struct geom::time::Time\">Time</a>","synthetic":false,"types":["geom::time::Time"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"geom/struct.CornerRadii.html\" title=\"struct geom::CornerRadii\">CornerRadii</a>","synthetic":false,"types":["geom::CornerRadii"]}];
|
||||
implementors["map_editor"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"map_editor/model/enum.ID.html\" title=\"enum map_editor::model::ID\">ID</a>","synthetic":false,"types":["map_editor::model::ID"]}];
|
||||
implementors["map_gui"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"map_gui/colors/enum.ColorSchemeChoice.html\" title=\"enum map_gui::colors::ColorSchemeChoice\">ColorSchemeChoice</a>","synthetic":false,"types":["map_gui::colors::ColorSchemeChoice"]}];
|
||||
|
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
@ -1,5 +1,5 @@
|
||||
(function() {var implementors = {};
|
||||
implementors["abstio"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a> for <a class=\"struct\" href=\"abstio/abst_paths/struct.ROOT_DIR.html\" title=\"struct abstio::abst_paths::ROOT_DIR\">ROOT_DIR</a>","synthetic":false,"types":["abstio::abst_paths::ROOT_DIR"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a> for <a class=\"struct\" href=\"abstio/abst_paths/struct.ROOT_PLAYER_DIR.html\" title=\"struct abstio::abst_paths::ROOT_PLAYER_DIR\">ROOT_PLAYER_DIR</a>","synthetic":false,"types":["abstio::abst_paths::ROOT_PLAYER_DIR"]}];
|
||||
implementors["game"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a> for <a class=\"struct\" href=\"game/sandbox/dashboards/risks/struct.CLEAR_COLOR_SCALE.html\" title=\"struct game::sandbox::dashboards::risks::CLEAR_COLOR_SCALE\">CLEAR_COLOR_SCALE</a>","synthetic":false,"types":["game::sandbox::dashboards::risks::CLEAR_COLOR_SCALE"]}];
|
||||
implementors["game"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a> for <a class=\"struct\" href=\"game/sandbox/dashboards/trip_problems/struct.CLEAR_COLOR_SCALE.html\" title=\"struct game::sandbox::dashboards::trip_problems::CLEAR_COLOR_SCALE\">CLEAR_COLOR_SCALE</a>","synthetic":false,"types":["game::sandbox::dashboards::trip_problems::CLEAR_COLOR_SCALE"]}];
|
||||
implementors["headless"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a> for <a class=\"struct\" href=\"headless/struct.MAP.html\" title=\"struct headless::MAP\">MAP</a>","synthetic":false,"types":["headless::MAP"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a> for <a class=\"struct\" href=\"headless/struct.SIM.html\" title=\"struct headless::SIM\">SIM</a>","synthetic":false,"types":["headless::SIM"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a> for <a class=\"struct\" href=\"headless/struct.LOAD.html\" title=\"struct headless::LOAD\">LOAD</a>","synthetic":false,"types":["headless::LOAD"]}];
|
||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
@ -0,0 +1,3 @@
|
||||
(function() {var implementors = {};
|
||||
implementors["game"] = [];
|
||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
@ -1,5 +1,5 @@
|
||||
(function() {var implementors = {};
|
||||
implementors["abstio"] = [{"text":"impl <a class=\"trait\" href=\"https://docs.rs/lazy_static/1.4.0/lazy_static/trait.LazyStatic.html\" title=\"trait lazy_static::LazyStatic\">LazyStatic</a> for <a class=\"struct\" href=\"abstio/abst_paths/struct.ROOT_DIR.html\" title=\"struct abstio::abst_paths::ROOT_DIR\">ROOT_DIR</a>","synthetic":false,"types":["abstio::abst_paths::ROOT_DIR"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/lazy_static/1.4.0/lazy_static/trait.LazyStatic.html\" title=\"trait lazy_static::LazyStatic\">LazyStatic</a> for <a class=\"struct\" href=\"abstio/abst_paths/struct.ROOT_PLAYER_DIR.html\" title=\"struct abstio::abst_paths::ROOT_PLAYER_DIR\">ROOT_PLAYER_DIR</a>","synthetic":false,"types":["abstio::abst_paths::ROOT_PLAYER_DIR"]}];
|
||||
implementors["game"] = [{"text":"impl <a class=\"trait\" href=\"https://docs.rs/lazy_static/1.4.0/lazy_static/trait.LazyStatic.html\" title=\"trait lazy_static::LazyStatic\">LazyStatic</a> for <a class=\"struct\" href=\"game/sandbox/dashboards/risks/struct.CLEAR_COLOR_SCALE.html\" title=\"struct game::sandbox::dashboards::risks::CLEAR_COLOR_SCALE\">CLEAR_COLOR_SCALE</a>","synthetic":false,"types":["game::sandbox::dashboards::risks::CLEAR_COLOR_SCALE"]}];
|
||||
implementors["game"] = [{"text":"impl <a class=\"trait\" href=\"https://docs.rs/lazy_static/1.4.0/lazy_static/trait.LazyStatic.html\" title=\"trait lazy_static::LazyStatic\">LazyStatic</a> for <a class=\"struct\" href=\"game/sandbox/dashboards/trip_problems/struct.CLEAR_COLOR_SCALE.html\" title=\"struct game::sandbox::dashboards::trip_problems::CLEAR_COLOR_SCALE\">CLEAR_COLOR_SCALE</a>","synthetic":false,"types":["game::sandbox::dashboards::trip_problems::CLEAR_COLOR_SCALE"]}];
|
||||
implementors["headless"] = [{"text":"impl <a class=\"trait\" href=\"https://docs.rs/lazy_static/1.4.0/lazy_static/trait.LazyStatic.html\" title=\"trait lazy_static::LazyStatic\">LazyStatic</a> for <a class=\"struct\" href=\"headless/struct.MAP.html\" title=\"struct headless::MAP\">MAP</a>","synthetic":false,"types":["headless::MAP"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/lazy_static/1.4.0/lazy_static/trait.LazyStatic.html\" title=\"trait lazy_static::LazyStatic\">LazyStatic</a> for <a class=\"struct\" href=\"headless/struct.SIM.html\" title=\"struct headless::SIM\">SIM</a>","synthetic":false,"types":["headless::SIM"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/lazy_static/1.4.0/lazy_static/trait.LazyStatic.html\" title=\"trait lazy_static::LazyStatic\">LazyStatic</a> for <a class=\"struct\" href=\"headless/struct.LOAD.html\" title=\"struct headless::LOAD\">LOAD</a>","synthetic":false,"types":["headless::LOAD"]}];
|
||||
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
@ -9,7 +9,7 @@ sourcesIndex["dump_map"] = {"name":"","files":["dump_map.rs"]};
|
||||
sourcesIndex["dump_scenario"] = {"name":"","files":["dump_scenario.rs"]};
|
||||
sourcesIndex["extract_cities"] = {"name":"","files":["extract_cities.rs"]};
|
||||
sourcesIndex["fifteen_min"] = {"name":"","files":["find_amenities.rs","find_home.rs","isochrone.rs","lib.rs","viewer.rs"]};
|
||||
sourcesIndex["game"] = {"name":"","dirs":[{"name":"challenges","files":["cutscene.rs","mod.rs","prebake.rs"]},{"name":"common","files":["mod.rs","warp.rs"]},{"name":"debug","files":["blocked_by.rs","floodfill.rs","mod.rs","objects.rs","path_counter.rs","polygons.rs","routes.rs","shared_row.rs","streetmix.rs","uber_turns.rs"]},{"name":"devtools","files":["collisions.rs","destinations.rs","kml.rs","mod.rs","polygon.rs","scenario.rs","story.rs"]},{"name":"edit","dirs":[{"name":"traffic_signals","files":["edits.rs","gmns.rs","mod.rs","offsets.rs","picker.rs","preview.rs"]}],"files":["bulk.rs","lanes.rs","mod.rs","roads.rs","routes.rs","select.rs","stop_signs.rs","validate.rs","zones.rs"]},{"name":"info","files":["building.rs","bus.rs","debug.rs","intersection.rs","lane.rs","mod.rs","parking_lot.rs","person.rs","trip.rs"]},{"name":"layer","files":["elevation.rs","favorites.rs","map.rs","mod.rs","pandemic.rs","parking.rs","population.rs","problems.rs","traffic.rs","transit.rs"]},{"name":"pregame","files":["mod.rs","proposals.rs"]},{"name":"sandbox","dirs":[{"name":"dashboards","files":["commuter.rs","generic_trip_table.rs","misc.rs","mod.rs","parking_overhead.rs","risks.rs","selector.rs","traffic_signals.rs","travel_times.rs","trip_table.rs"]},{"name":"gameplay","dirs":[{"name":"freeform","files":["grid2demand.rs","mod.rs","spawner.rs"]}],"files":["actdev.rs","commute.rs","fix_traffic_signals.rs","mod.rs","play_scenario.rs","tutorial.rs"]}],"files":["minimap.rs","misc_tools.rs","mod.rs","speed.rs","time_warp.rs"]}],"files":["app.rs","lib.rs"]};
|
||||
sourcesIndex["game"] = {"name":"","dirs":[{"name":"challenges","files":["cutscene.rs","mod.rs","prebake.rs"]},{"name":"common","files":["mod.rs","warp.rs"]},{"name":"debug","files":["blocked_by.rs","floodfill.rs","mod.rs","objects.rs","path_counter.rs","polygons.rs","routes.rs","shared_row.rs","streetmix.rs","uber_turns.rs"]},{"name":"devtools","files":["collisions.rs","destinations.rs","kml.rs","mod.rs","polygon.rs","scenario.rs","story.rs"]},{"name":"edit","dirs":[{"name":"traffic_signals","files":["edits.rs","gmns.rs","mod.rs","offsets.rs","picker.rs","preview.rs"]}],"files":["bulk.rs","lanes.rs","mod.rs","roads.rs","routes.rs","select.rs","stop_signs.rs","validate.rs","zones.rs"]},{"name":"info","files":["building.rs","bus.rs","debug.rs","intersection.rs","lane.rs","mod.rs","parking_lot.rs","person.rs","trip.rs"]},{"name":"layer","files":["elevation.rs","favorites.rs","map.rs","mod.rs","pandemic.rs","parking.rs","population.rs","problems.rs","traffic.rs","transit.rs"]},{"name":"pregame","files":["mod.rs","proposals.rs"]},{"name":"sandbox","dirs":[{"name":"dashboards","files":["commuter.rs","generic_trip_table.rs","misc.rs","mod.rs","parking_overhead.rs","risks.rs","selector.rs","traffic_signals.rs","travel_times.rs","trip_problems.rs","trip_table.rs"]},{"name":"gameplay","dirs":[{"name":"freeform","files":["grid2demand.rs","mod.rs","spawner.rs"]}],"files":["actdev.rs","commute.rs","fix_traffic_signals.rs","mod.rs","play_scenario.rs","tutorial.rs"]}],"files":["minimap.rs","misc_tools.rs","mod.rs","speed.rs","time_warp.rs"]}],"files":["app.rs","lib.rs"]};
|
||||
sourcesIndex["generate_houses"] = {"name":"","files":["generate_houses.rs"]};
|
||||
sourcesIndex["geojson_to_osmosis"] = {"name":"","files":["geojson_to_osmosis.rs"]};
|
||||
sourcesIndex["geom"] = {"name":"","files":["angle.rs","bounds.rs","circle.rs","distance.rs","duration.rs","find_closest.rs","gps.rs","lib.rs","line.rs","percent.rs","polygon.rs","polyline.rs","pt.rs","ring.rs","speed.rs","stats.rs","time.rs"]};
|
||||
|
@ -933,7 +933,7 @@
|
||||
}
|
||||
|
||||
<span class="comment">// Start of toolbar</span>
|
||||
<span class="ident">rows</span>.<span class="ident">push</span>(<span class="ident">Widget</span>::<span class="ident">horiz_separator</span>(<span class="ident">ctx</span>, <span class="number">0.3</span>).<span class="ident">margin_above</span>(<span class="number">10</span>));
|
||||
<span class="ident">rows</span>.<span class="ident">push</span>(<span class="ident">Widget</span>::<span class="ident">horiz_separator</span>(<span class="ident">ctx</span>, <span class="number">1.0</span>).<span class="ident">margin_above</span>(<span class="number">10</span>));
|
||||
|
||||
<span class="ident">rows</span>.<span class="ident">push</span>(<span class="ident">options_to_controls</span>(<span class="ident">ctx</span>, <span class="kw-2">&</span><span class="ident">isochrone</span>.<span class="ident">options</span>));
|
||||
<span class="ident">rows</span>.<span class="ident">push</span>(
|
||||
|
@ -122,7 +122,7 @@
|
||||
<span class="doccomment">/// The output of `rustdoc -V`</span>
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">RUSTDOC_VERSION</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"rustdoc 1.52.1 (9bc8c42bb 2021-05-09)"</span>;
|
||||
<span class="doccomment">/// The built-time in RFC2822, UTC</span>
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"Tue, 18 May 2021 00:51:42 +0000"</span>;
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"Tue, 18 May 2021 01:32:51 +0000"</span>;
|
||||
<span class="doccomment">/// The target architecture, given by `cfg!(target_arch)`.</span>
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CFG_TARGET_ARCH</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"x86_64"</span>;
|
||||
<span class="doccomment">/// The endianness, given by `cfg!(target_endian)`.</span>
|
||||
|
@ -961,7 +961,7 @@
|
||||
{
|
||||
<span class="ident">col</span>.<span class="ident">push</span>(<span class="ident">Widget</span>::<span class="ident">custom_row</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Widget</span>::<span class="ident">custom_row</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="ident">Line</span>(<span class="string">"Trip time"</span>).<span class="ident">secondary</span>().<span class="ident">into_widget</span>(<span class="ident">ctx</span>)])
|
||||
.<span class="ident">force_width_pct</span>(<span class="ident">ctx</span>, <span class="ident">col_width</span>),
|
||||
.<span class="ident">force_width_window_pct</span>(<span class="ident">ctx</span>, <span class="ident">col_width</span>),
|
||||
<span class="ident">Text</span>::<span class="ident">from_all</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Line</span>(<span class="ident">props</span>.<span class="ident">total_time</span>.<span class="ident">to_string</span>(<span class="kw-2">&</span><span class="ident">app</span>.<span class="ident">opts</span>.<span class="ident">units</span>)),
|
||||
<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(
|
||||
@ -977,7 +977,7 @@
|
||||
{
|
||||
<span class="ident">col</span>.<span class="ident">push</span>(<span class="ident">Widget</span>::<span class="ident">custom_row</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Widget</span>::<span class="ident">custom_row</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="ident">Line</span>(<span class="string">"Distance"</span>).<span class="ident">secondary</span>().<span class="ident">into_widget</span>(<span class="ident">ctx</span>)])
|
||||
.<span class="ident">force_width_pct</span>(<span class="ident">ctx</span>, <span class="ident">col_width</span>),
|
||||
.<span class="ident">force_width_window_pct</span>(<span class="ident">ctx</span>, <span class="ident">col_width</span>),
|
||||
<span class="ident">Text</span>::<span class="ident">from_all</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Line</span>(<span class="ident">props</span>.<span class="ident">dist_crossed</span>.<span class="ident">to_string</span>(<span class="kw-2">&</span><span class="ident">app</span>.<span class="ident">opts</span>.<span class="ident">units</span>)),
|
||||
<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">"/{}"</span>, <span class="ident">props</span>.<span class="ident">total_dist</span>.<span class="ident">to_string</span>(<span class="kw-2">&</span><span class="ident">app</span>.<span class="ident">opts</span>.<span class="ident">units</span>))).<span class="ident">secondary</span>(),
|
||||
@ -991,7 +991,7 @@
|
||||
.<span class="ident">secondary</span>()
|
||||
.<span class="ident">into_widget</span>(<span class="ident">ctx</span>)
|
||||
.<span class="ident">container</span>()
|
||||
.<span class="ident">force_width_pct</span>(<span class="ident">ctx</span>, <span class="ident">col_width</span>),
|
||||
.<span class="ident">force_width_window_pct</span>(<span class="ident">ctx</span>, <span class="ident">col_width</span>),
|
||||
<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="macro">format</span><span class="macro">!</span>(<span class="string">"{} here"</span>, <span class="ident">props</span>.<span class="ident">waiting_here</span>.<span class="ident">to_string</span>(<span class="kw-2">&</span><span class="ident">app</span>.<span class="ident">opts</span>.<span class="ident">units</span>)).<span class="ident">text_widget</span>(<span class="ident">ctx</span>),
|
||||
<span class="ident">Text</span>::<span class="ident">from_all</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
@ -1019,7 +1019,7 @@
|
||||
{
|
||||
<span class="ident">col</span>.<span class="ident">push</span>(<span class="ident">Widget</span>::<span class="ident">custom_row</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Widget</span>::<span class="ident">custom_row</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="ident">Line</span>(<span class="string">"Purpose"</span>).<span class="ident">secondary</span>().<span class="ident">into_widget</span>(<span class="ident">ctx</span>)])
|
||||
.<span class="ident">force_width_pct</span>(<span class="ident">ctx</span>, <span class="ident">col_width</span>),
|
||||
.<span class="ident">force_width_window_pct</span>(<span class="ident">ctx</span>, <span class="ident">col_width</span>),
|
||||
<span class="ident">Line</span>(<span class="ident">trip</span>.<span class="ident">purpose</span>.<span class="ident">to_string</span>()).<span class="ident">secondary</span>().<span class="ident">into_widget</span>(<span class="ident">ctx</span>),
|
||||
]));
|
||||
}
|
||||
@ -1202,7 +1202,7 @@
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">end_time</span>) <span class="op">=</span> <span class="ident">phases</span>.<span class="ident">last</span>().<span class="ident">as_ref</span>().<span class="ident">and_then</span>(<span class="op">|</span><span class="ident">p</span><span class="op">|</span> <span class="ident">p</span>.<span class="ident">end_time</span>) {
|
||||
<span class="ident">col</span>.<span class="ident">push</span>(<span class="ident">Widget</span>::<span class="ident">custom_row</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Widget</span>::<span class="ident">custom_row</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="ident">Line</span>(<span class="string">"Trip time"</span>).<span class="ident">secondary</span>().<span class="ident">into_widget</span>(<span class="ident">ctx</span>)])
|
||||
.<span class="ident">force_width_pct</span>(<span class="ident">ctx</span>, <span class="ident">col_width</span>),
|
||||
.<span class="ident">force_width_window_pct</span>(<span class="ident">ctx</span>, <span class="ident">col_width</span>),
|
||||
(<span class="ident">end_time</span> <span class="op">-</span> <span class="ident">trip</span>.<span class="ident">departure</span>)
|
||||
.<span class="ident">to_string</span>(<span class="kw-2">&</span><span class="ident">app</span>.<span class="ident">opts</span>.<span class="ident">units</span>)
|
||||
.<span class="ident">text_widget</span>(<span class="ident">ctx</span>),
|
||||
@ -1210,7 +1210,7 @@
|
||||
} <span class="kw">else</span> {
|
||||
<span class="ident">col</span>.<span class="ident">push</span>(<span class="ident">Widget</span>::<span class="ident">custom_row</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Widget</span>::<span class="ident">custom_row</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="ident">Line</span>(<span class="string">"Trip time"</span>).<span class="ident">secondary</span>().<span class="ident">into_widget</span>(<span class="ident">ctx</span>)])
|
||||
.<span class="ident">force_width_pct</span>(<span class="ident">ctx</span>, <span class="ident">col_width</span>),
|
||||
.<span class="ident">force_width_window_pct</span>(<span class="ident">ctx</span>, <span class="ident">col_width</span>),
|
||||
<span class="string">"Trip didn't complete before map changes"</span>.<span class="ident">text_widget</span>(<span class="ident">ctx</span>),
|
||||
]));
|
||||
}
|
||||
@ -1222,13 +1222,13 @@
|
||||
<span class="ident">Widget</span>::<span class="ident">custom_row</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="ident">Line</span>(<span class="string">"Total waiting time"</span>)
|
||||
.<span class="ident">secondary</span>()
|
||||
.<span class="ident">into_widget</span>(<span class="ident">ctx</span>)])
|
||||
.<span class="ident">force_width_pct</span>(<span class="ident">ctx</span>, <span class="ident">col_width</span>),
|
||||
.<span class="ident">force_width_window_pct</span>(<span class="ident">ctx</span>, <span class="ident">col_width</span>),
|
||||
<span class="ident">waiting</span>.<span class="ident">to_string</span>(<span class="kw-2">&</span><span class="ident">app</span>.<span class="ident">opts</span>.<span class="ident">units</span>).<span class="ident">text_widget</span>(<span class="ident">ctx</span>),
|
||||
]));
|
||||
|
||||
<span class="ident">col</span>.<span class="ident">push</span>(<span class="ident">Widget</span>::<span class="ident">custom_row</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Widget</span>::<span class="ident">custom_row</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="ident">Line</span>(<span class="string">"Purpose"</span>).<span class="ident">secondary</span>().<span class="ident">into_widget</span>(<span class="ident">ctx</span>)])
|
||||
.<span class="ident">force_width_pct</span>(<span class="ident">ctx</span>, <span class="ident">col_width</span>),
|
||||
.<span class="ident">force_width_window_pct</span>(<span class="ident">ctx</span>, <span class="ident">col_width</span>),
|
||||
<span class="ident">Line</span>(<span class="ident">trip</span>.<span class="ident">purpose</span>.<span class="ident">to_string</span>()).<span class="ident">secondary</span>().<span class="ident">into_widget</span>(<span class="ident">ctx</span>),
|
||||
]));
|
||||
}
|
||||
@ -1336,7 +1336,7 @@
|
||||
.<span class="ident">secondary</span>()
|
||||
.<span class="ident">into_widget</span>(<span class="ident">ctx</span>)
|
||||
.<span class="ident">container</span>()
|
||||
.<span class="ident">force_width_pct</span>(<span class="ident">ctx</span>, <span class="ident">col_width</span>),
|
||||
.<span class="ident">force_width_window_pct</span>(<span class="ident">ctx</span>, <span class="ident">col_width</span>),
|
||||
<span class="ident">txt</span>.<span class="ident">into_widget</span>(<span class="ident">ctx</span>),
|
||||
])
|
||||
} <span class="kw">else</span> {
|
||||
|
@ -85,6 +85,7 @@
|
||||
<span id="82">82</span>
|
||||
<span id="83">83</span>
|
||||
<span id="84">84</span>
|
||||
<span id="85">85</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="kw">pub</span> <span class="kw">use</span> <span class="ident">commuter</span>::<span class="ident">CommuterPatterns</span>;
|
||||
<span class="kw">pub</span> <span class="kw">use</span> <span class="ident">traffic_signals</span>::<span class="ident">TrafficSignalDemand</span>;
|
||||
@ -103,6 +104,7 @@
|
||||
<span class="kw">mod</span> <span class="ident">selector</span>;
|
||||
<span class="kw">mod</span> <span class="ident">traffic_signals</span>;
|
||||
<span class="kw">mod</span> <span class="ident">travel_times</span>;
|
||||
<span class="kw">mod</span> <span class="ident">trip_problems</span>;
|
||||
<span class="kw">mod</span> <span class="ident">trip_table</span>;
|
||||
|
||||
<span class="comment">// Oh the dashboards melted, but we still had the radio</span>
|
||||
|
@ -127,391 +127,13 @@
|
||||
<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>
|
||||
<span id="286">286</span>
|
||||
<span id="287">287</span>
|
||||
<span id="288">288</span>
|
||||
<span id="289">289</span>
|
||||
<span id="290">290</span>
|
||||
<span id="291">291</span>
|
||||
<span id="292">292</span>
|
||||
<span id="293">293</span>
|
||||
<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>
|
||||
<span id="299">299</span>
|
||||
<span id="300">300</span>
|
||||
<span id="301">301</span>
|
||||
<span id="302">302</span>
|
||||
<span id="303">303</span>
|
||||
<span id="304">304</span>
|
||||
<span id="305">305</span>
|
||||
<span id="306">306</span>
|
||||
<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>
|
||||
<span id="343">343</span>
|
||||
<span id="344">344</span>
|
||||
<span id="345">345</span>
|
||||
<span id="346">346</span>
|
||||
<span id="347">347</span>
|
||||
<span id="348">348</span>
|
||||
<span id="349">349</span>
|
||||
<span id="350">350</span>
|
||||
<span id="351">351</span>
|
||||
<span id="352">352</span>
|
||||
<span id="353">353</span>
|
||||
<span id="354">354</span>
|
||||
<span id="355">355</span>
|
||||
<span id="356">356</span>
|
||||
<span id="357">357</span>
|
||||
<span id="358">358</span>
|
||||
<span id="359">359</span>
|
||||
<span id="360">360</span>
|
||||
<span id="361">361</span>
|
||||
<span id="362">362</span>
|
||||
<span id="363">363</span>
|
||||
<span id="364">364</span>
|
||||
<span id="365">365</span>
|
||||
<span id="366">366</span>
|
||||
<span id="367">367</span>
|
||||
<span id="368">368</span>
|
||||
<span id="369">369</span>
|
||||
<span id="370">370</span>
|
||||
<span id="371">371</span>
|
||||
<span id="372">372</span>
|
||||
<span id="373">373</span>
|
||||
<span id="374">374</span>
|
||||
<span id="375">375</span>
|
||||
<span id="376">376</span>
|
||||
<span id="377">377</span>
|
||||
<span id="378">378</span>
|
||||
<span id="379">379</span>
|
||||
<span id="380">380</span>
|
||||
<span id="381">381</span>
|
||||
<span id="382">382</span>
|
||||
<span id="383">383</span>
|
||||
<span id="384">384</span>
|
||||
<span id="385">385</span>
|
||||
<span id="386">386</span>
|
||||
<span id="387">387</span>
|
||||
<span id="388">388</span>
|
||||
<span id="389">389</span>
|
||||
<span id="390">390</span>
|
||||
<span id="391">391</span>
|
||||
<span id="392">392</span>
|
||||
<span id="393">393</span>
|
||||
<span id="394">394</span>
|
||||
<span id="395">395</span>
|
||||
<span id="396">396</span>
|
||||
<span id="397">397</span>
|
||||
<span id="398">398</span>
|
||||
<span id="399">399</span>
|
||||
<span id="400">400</span>
|
||||
<span id="401">401</span>
|
||||
<span id="402">402</span>
|
||||
<span id="403">403</span>
|
||||
<span id="404">404</span>
|
||||
<span id="405">405</span>
|
||||
<span id="406">406</span>
|
||||
<span id="407">407</span>
|
||||
<span id="408">408</span>
|
||||
<span id="409">409</span>
|
||||
<span id="410">410</span>
|
||||
<span id="411">411</span>
|
||||
<span id="412">412</span>
|
||||
<span id="413">413</span>
|
||||
<span id="414">414</span>
|
||||
<span id="415">415</span>
|
||||
<span id="416">416</span>
|
||||
<span id="417">417</span>
|
||||
<span id="418">418</span>
|
||||
<span id="419">419</span>
|
||||
<span id="420">420</span>
|
||||
<span id="421">421</span>
|
||||
<span id="422">422</span>
|
||||
<span id="423">423</span>
|
||||
<span id="424">424</span>
|
||||
<span id="425">425</span>
|
||||
<span id="426">426</span>
|
||||
<span id="427">427</span>
|
||||
<span id="428">428</span>
|
||||
<span id="429">429</span>
|
||||
<span id="430">430</span>
|
||||
<span id="431">431</span>
|
||||
<span id="432">432</span>
|
||||
<span id="433">433</span>
|
||||
<span id="434">434</span>
|
||||
<span id="435">435</span>
|
||||
<span id="436">436</span>
|
||||
<span id="437">437</span>
|
||||
<span id="438">438</span>
|
||||
<span id="439">439</span>
|
||||
<span id="440">440</span>
|
||||
<span id="441">441</span>
|
||||
<span id="442">442</span>
|
||||
<span id="443">443</span>
|
||||
<span id="444">444</span>
|
||||
<span id="445">445</span>
|
||||
<span id="446">446</span>
|
||||
<span id="447">447</span>
|
||||
<span id="448">448</span>
|
||||
<span id="449">449</span>
|
||||
<span id="450">450</span>
|
||||
<span id="451">451</span>
|
||||
<span id="452">452</span>
|
||||
<span id="453">453</span>
|
||||
<span id="454">454</span>
|
||||
<span id="455">455</span>
|
||||
<span id="456">456</span>
|
||||
<span id="457">457</span>
|
||||
<span id="458">458</span>
|
||||
<span id="459">459</span>
|
||||
<span id="460">460</span>
|
||||
<span id="461">461</span>
|
||||
<span id="462">462</span>
|
||||
<span id="463">463</span>
|
||||
<span id="464">464</span>
|
||||
<span id="465">465</span>
|
||||
<span id="466">466</span>
|
||||
<span id="467">467</span>
|
||||
<span id="468">468</span>
|
||||
<span id="469">469</span>
|
||||
<span id="470">470</span>
|
||||
<span id="471">471</span>
|
||||
<span id="472">472</span>
|
||||
<span id="473">473</span>
|
||||
<span id="474">474</span>
|
||||
<span id="475">475</span>
|
||||
<span id="476">476</span>
|
||||
<span id="477">477</span>
|
||||
<span id="478">478</span>
|
||||
<span id="479">479</span>
|
||||
<span id="480">480</span>
|
||||
<span id="481">481</span>
|
||||
<span id="482">482</span>
|
||||
<span id="483">483</span>
|
||||
<span id="484">484</span>
|
||||
<span id="485">485</span>
|
||||
<span id="486">486</span>
|
||||
<span id="487">487</span>
|
||||
<span id="488">488</span>
|
||||
<span id="489">489</span>
|
||||
<span id="490">490</span>
|
||||
<span id="491">491</span>
|
||||
<span id="492">492</span>
|
||||
<span id="493">493</span>
|
||||
<span id="494">494</span>
|
||||
<span id="495">495</span>
|
||||
<span id="496">496</span>
|
||||
<span id="497">497</span>
|
||||
<span id="498">498</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">collections</span>::<span class="ident">BTreeSet</span>;
|
||||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">fmt</span>::<span class="ident">Display</span>;
|
||||
|
||||
<span class="kw">use</span> <span class="ident">abstutil</span>::{<span class="ident">abbreviated_format</span>, <span class="ident">prettyprint_usize</span>};
|
||||
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Angle</span>, <span class="ident">Duration</span>, <span class="ident">Polygon</span>, <span class="ident">Pt2D</span>, <span class="ident">Time</span>};
|
||||
<span class="kw">use</span> <span class="ident">map_gui</span>::<span class="ident">tools</span>::<span class="ident">ColorScale</span>;
|
||||
<span class="kw">use</span> <span class="ident">sim</span>::{<span class="ident">Problem</span>, <span class="ident">TripMode</span>};
|
||||
<span class="kw">use</span> <span class="ident">widgetry</span>::{
|
||||
<span class="ident">Color</span>, <span class="ident">DrawWithTooltips</span>, <span class="ident">EventCtx</span>, <span class="ident">GeomBatch</span>, <span class="ident">GeomBatchStack</span>, <span class="ident">GfxCtx</span>, <span class="ident">Image</span>, <span class="ident">Line</span>, <span class="ident">Outcome</span>,
|
||||
<span class="ident">Panel</span>, <span class="ident">State</span>, <span class="ident">Text</span>, <span class="ident">TextExt</span>, <span class="ident">Toggle</span>, <span class="ident">Widget</span>,
|
||||
};
|
||||
<span class="kw">use</span> <span class="ident">sim</span>::<span class="ident">TripMode</span>;
|
||||
<span class="kw">use</span> <span class="ident">widgetry</span>::{<span class="ident">EventCtx</span>, <span class="ident">GfxCtx</span>, <span class="ident">Image</span>, <span class="ident">Line</span>, <span class="ident">Outcome</span>, <span class="ident">Panel</span>, <span class="ident">State</span>, <span class="ident">TextExt</span>, <span class="ident">Toggle</span>, <span class="ident">Widget</span>};
|
||||
|
||||
<span class="kw">use</span> <span class="kw">super</span>::<span class="ident">trip_problems</span>::{<span class="ident">problem_matrix</span>, <span class="ident">ProblemType</span>, <span class="ident">TripProblemFilter</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>};
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">sandbox</span>::<span class="ident">dashboards</span>::<span class="ident">DashTab</span>;
|
||||
|
||||
@ -565,11 +187,11 @@
|
||||
.<span class="ident">small_heading</span>()
|
||||
.<span class="ident">into_widget</span>(<span class="ident">ctx</span>)
|
||||
.<span class="ident">centered_horiz</span>(),
|
||||
<span class="ident">safety_matrix</span>(
|
||||
<span class="ident">problem_matrix</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="ident">app</span>,
|
||||
<span class="kw-2">&</span><span class="ident">bike_filter</span>,
|
||||
<span class="ident">ProblemType</span>::<span class="ident">LargeIntersectionCrossing</span>,
|
||||
<span class="kw-2">&</span><span class="ident">bike_filter</span>
|
||||
.<span class="ident">trip_problems</span>(<span class="ident">app</span>, <span class="ident">ProblemType</span>::<span class="ident">LargeIntersectionCrossing</span>),
|
||||
),
|
||||
])
|
||||
.<span class="ident">section</span>(<span class="ident">ctx</span>),
|
||||
@ -578,7 +200,11 @@
|
||||
.<span class="ident">small_heading</span>()
|
||||
.<span class="ident">into_widget</span>(<span class="ident">ctx</span>)
|
||||
.<span class="ident">centered_horiz</span>(),
|
||||
<span class="ident">safety_matrix</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="kw-2">&</span><span class="ident">bike_filter</span>, <span class="ident">ProblemType</span>::<span class="ident">OvertakeDesired</span>),
|
||||
<span class="ident">problem_matrix</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="ident">app</span>,
|
||||
<span class="kw-2">&</span><span class="ident">bike_filter</span>.<span class="ident">trip_problems</span>(<span class="ident">app</span>, <span class="ident">ProblemType</span>::<span class="ident">OvertakeDesired</span>),
|
||||
),
|
||||
])
|
||||
.<span class="ident">section</span>(<span class="ident">ctx</span>),
|
||||
],
|
||||
@ -615,387 +241,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
<span class="ident">lazy_static</span>::<span class="macro">lazy_static</span><span class="macro">!</span> {
|
||||
<span class="kw">static</span> <span class="kw-2">ref</span> <span class="ident">CLEAR_COLOR_SCALE</span>: <span class="ident">ColorScale</span> <span class="op">=</span> <span class="ident">ColorScale</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="ident">Color</span>::<span class="ident">CLEAR</span>, <span class="ident">Color</span>::<span class="ident">CLEAR</span>]);
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">safety_matrix</span>(
|
||||
<span class="ident">ctx</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>,
|
||||
<span class="ident">app</span>: <span class="kw-2">&</span><span class="ident">App</span>,
|
||||
<span class="ident">filter</span>: <span class="kw-2">&</span><span class="ident">Filter</span>,
|
||||
<span class="ident">problem_type</span>: <span class="ident">ProblemType</span>,
|
||||
) <span class="op">-</span><span class="op">></span> <span class="ident">Widget</span> {
|
||||
<span class="kw">let</span> <span class="ident">points</span> <span class="op">=</span> <span class="ident">filter</span>.<span class="ident">get_trips</span>(<span class="ident">app</span>, <span class="ident">problem_type</span>);
|
||||
|
||||
<span class="kw">let</span> <span class="ident">duration_buckets</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Duration</span>::<span class="ident">ZERO</span>,
|
||||
<span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">5</span>),
|
||||
<span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">15</span>),
|
||||
<span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">30</span>),
|
||||
<span class="ident">Duration</span>::<span class="ident">hours</span>(<span class="number">1</span>),
|
||||
<span class="ident">Duration</span>::<span class="ident">hours</span>(<span class="number">2</span>),
|
||||
];
|
||||
|
||||
<span class="kw">let</span> <span class="ident">num_buckets</span> <span class="op">=</span> <span class="number">7</span>;
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">matrix</span> <span class="op">=</span> <span class="ident">Matrix</span>::<span class="ident">new</span>(<span class="ident">duration_buckets</span>, <span class="ident">bucketize_isizes</span>(<span class="ident">num_buckets</span>, <span class="kw-2">&</span><span class="ident">points</span>));
|
||||
<span class="kw">for</span> (<span class="ident">x</span>, <span class="ident">y</span>) <span class="kw">in</span> <span class="ident">points</span> {
|
||||
<span class="ident">matrix</span>.<span class="ident">add_pt</span>(<span class="ident">x</span>, <span class="ident">y</span>);
|
||||
}
|
||||
<span class="ident">matrix</span>.<span class="ident">draw</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="ident">app</span>,
|
||||
<span class="ident">MatrixOptions</span> {
|
||||
<span class="ident">total_width</span>: <span class="number">600.0</span>,
|
||||
<span class="ident">total_height</span>: <span class="number">600.0</span>,
|
||||
<span class="ident">color_scale_for_bucket</span>: <span class="ident">Box</span>::<span class="ident">new</span>(<span class="op">|</span><span class="ident">app</span>, <span class="kw">_</span>, <span class="ident">n</span><span class="op">|</span> <span class="kw">match</span> <span class="ident">n</span>.<span class="ident">cmp</span>(<span class="kw-2">&</span><span class="number">0</span>) {
|
||||
<span class="ident">std</span>::<span class="ident">cmp</span>::<span class="ident">Ordering</span>::<span class="ident">Equal</span> <span class="op">=</span><span class="op">></span> <span class="kw-2">&</span><span class="ident">CLEAR_COLOR_SCALE</span>,
|
||||
<span class="ident">std</span>::<span class="ident">cmp</span>::<span class="ident">Ordering</span>::<span class="ident">Less</span> <span class="op">=</span><span class="op">></span> <span class="kw-2">&</span><span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">good_to_bad_green</span>,
|
||||
<span class="ident">std</span>::<span class="ident">cmp</span>::<span class="ident">Ordering</span>::<span class="ident">Greater</span> <span class="op">=</span><span class="op">></span> <span class="kw-2">&</span><span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">good_to_bad_red</span>,
|
||||
}),
|
||||
<span class="ident">tooltip_for_bucket</span>: <span class="ident">Box</span>::<span class="ident">new</span>(<span class="op">|</span>(<span class="ident">t1</span>, <span class="ident">t2</span>), (<span class="ident">problems1</span>, <span class="ident">problems2</span>), <span class="ident">count</span><span class="op">|</span> {
|
||||
<span class="kw">let</span> <span class="ident">trip_string</span> <span class="op">=</span> <span class="kw">if</span> <span class="ident">count</span> <span class="op">=</span><span class="op">=</span> <span class="number">1</span> {
|
||||
<span class="string">"1 trip"</span>.<span class="ident">to_string</span>()
|
||||
} <span class="kw">else</span> {
|
||||
<span class="macro">format</span><span class="macro">!</span>(<span class="string">"{} trips"</span>, <span class="ident">prettyprint_usize</span>(<span class="ident">count</span>))
|
||||
};
|
||||
<span class="kw">let</span> <span class="ident">duration_string</span> <span class="op">=</span> <span class="kw">match</span> (<span class="ident">t1</span>, <span class="ident">t2</span>) {
|
||||
(<span class="prelude-val">None</span>, <span class="prelude-val">Some</span>(<span class="ident">end</span>)) <span class="op">=</span><span class="op">></span> <span class="macro">format</span><span class="macro">!</span>(<span class="string">"shorter than {}"</span>, <span class="ident">end</span>),
|
||||
(<span class="prelude-val">Some</span>(<span class="ident">start</span>), <span class="prelude-val">None</span>) <span class="op">=</span><span class="op">></span> <span class="macro">format</span><span class="macro">!</span>(<span class="string">"longer than {}"</span>, <span class="ident">start</span>),
|
||||
(<span class="prelude-val">Some</span>(<span class="ident">start</span>), <span class="prelude-val">Some</span>(<span class="ident">end</span>)) <span class="op">=</span><span class="op">></span> <span class="macro">format</span><span class="macro">!</span>(<span class="string">"between {} and {}"</span>, <span class="ident">start</span>, <span class="ident">end</span>),
|
||||
(<span class="prelude-val">None</span>, <span class="prelude-val">None</span>) <span class="op">=</span><span class="op">></span> {
|
||||
<span class="macro">unreachable</span><span class="macro">!</span>(<span class="string">"at least one end of the duration range must be specified"</span>)
|
||||
}
|
||||
};
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">txt</span> <span class="op">=</span> <span class="ident">Text</span>::<span class="ident">from</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">"{} {}"</span>, <span class="ident">trip_string</span>, <span class="ident">duration_string</span>));
|
||||
<span class="ident">txt</span>.<span class="ident">add_line</span>(<span class="kw">match</span> <span class="ident">problems1</span>.<span class="ident">cmp</span>(<span class="kw-2">&</span><span class="number">0</span>) {
|
||||
<span class="ident">std</span>::<span class="ident">cmp</span>::<span class="ident">Ordering</span>::<span class="ident">Equal</span> <span class="op">=</span><span class="op">></span> {
|
||||
<span class="string">"had no change in the number of problems encountered."</span>.<span class="ident">to_string</span>()
|
||||
}
|
||||
<span class="ident">std</span>::<span class="ident">cmp</span>::<span class="ident">Ordering</span>::<span class="ident">Less</span> <span class="op">=</span><span class="op">></span> {
|
||||
<span class="kw">if</span> <span class="ident">problems1</span>.<span class="ident">abs</span>() <span class="op">=</span><span class="op">=</span> <span class="ident">problems2</span>.<span class="ident">abs</span>() <span class="op">+</span> <span class="number">1</span> {
|
||||
<span class="kw">if</span> <span class="ident">problems1</span>.<span class="ident">abs</span>() <span class="op">=</span><span class="op">=</span> <span class="number">1</span> {
|
||||
<span class="string">"encountered 1 fewer problem."</span>.<span class="ident">to_string</span>()
|
||||
} <span class="kw">else</span> {
|
||||
<span class="macro">format</span><span class="macro">!</span>(<span class="string">"encountered {} fewer problems."</span>, <span class="ident">problems1</span>.<span class="ident">abs</span>())
|
||||
}
|
||||
} <span class="kw">else</span> {
|
||||
<span class="macro">format</span><span class="macro">!</span>(
|
||||
<span class="string">"encountered {}-{} fewer problems."</span>,
|
||||
<span class="ident">problems2</span>.<span class="ident">abs</span>() <span class="op">+</span> <span class="number">1</span>,
|
||||
<span class="ident">problems1</span>.<span class="ident">abs</span>()
|
||||
)
|
||||
}
|
||||
}
|
||||
<span class="ident">std</span>::<span class="ident">cmp</span>::<span class="ident">Ordering</span>::<span class="ident">Greater</span> <span class="op">=</span><span class="op">></span> {
|
||||
<span class="kw">if</span> <span class="ident">problems1</span> <span class="op">=</span><span class="op">=</span> <span class="ident">problems2</span> <span class="op">-</span> <span class="number">1</span> {
|
||||
<span class="kw">if</span> <span class="ident">problems1</span> <span class="op">=</span><span class="op">=</span> <span class="number">1</span> {
|
||||
<span class="string">"encountered 1 more problems."</span>.<span class="ident">to_string</span>()
|
||||
} <span class="kw">else</span> {
|
||||
<span class="macro">format</span><span class="macro">!</span>(<span class="string">"encountered {} more problems."</span>, <span class="ident">problems1</span>,)
|
||||
}
|
||||
} <span class="kw">else</span> {
|
||||
<span class="macro">format</span><span class="macro">!</span>(<span class="string">"encountered {}-{} more problems."</span>, <span class="ident">problems1</span>, <span class="ident">problems2</span> <span class="op">-</span> <span class="number">1</span>)
|
||||
}
|
||||
}
|
||||
});
|
||||
<span class="ident">txt</span>
|
||||
}),
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>, <span class="ident">Copy</span>, <span class="ident">PartialEq</span>)]</span>
|
||||
<span class="kw">enum</span> <span class="ident">ProblemType</span> {
|
||||
<span class="ident">IntersectionDelay</span>,
|
||||
<span class="ident">LargeIntersectionCrossing</span>,
|
||||
<span class="ident">OvertakeDesired</span>,
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">ProblemType</span> {
|
||||
<span class="kw">fn</span> <span class="ident">count</span>(<span class="self">self</span>, <span class="ident">problems</span>: <span class="kw-2">&</span>[(<span class="ident">Time</span>, <span class="ident">Problem</span>)]) <span class="op">-</span><span class="op">></span> <span class="ident">usize</span> {
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">cnt</span> <span class="op">=</span> <span class="number">0</span>;
|
||||
<span class="kw">for</span> (<span class="kw">_</span>, <span class="ident">problem</span>) <span class="kw">in</span> <span class="ident">problems</span> {
|
||||
<span class="kw">if</span> <span class="kw">match</span> <span class="ident">problem</span> {
|
||||
<span class="ident">Problem</span>::<span class="ident">IntersectionDelay</span>(<span class="kw">_</span>, <span class="kw">_</span>) <span class="op">=</span><span class="op">></span> <span class="self">self</span> <span class="op">=</span><span class="op">=</span> <span class="ident">ProblemType</span>::<span class="ident">IntersectionDelay</span>,
|
||||
<span class="ident">Problem</span>::<span class="ident">LargeIntersectionCrossing</span>(<span class="kw">_</span>) <span class="op">=</span><span class="op">></span> {
|
||||
<span class="self">self</span> <span class="op">=</span><span class="op">=</span> <span class="ident">ProblemType</span>::<span class="ident">LargeIntersectionCrossing</span>
|
||||
}
|
||||
<span class="ident">Problem</span>::<span class="ident">OvertakeDesired</span>(<span class="kw">_</span>) <span class="op">=</span><span class="op">></span> <span class="self">self</span> <span class="op">=</span><span class="op">=</span> <span class="ident">ProblemType</span>::<span class="ident">OvertakeDesired</span>,
|
||||
} {
|
||||
<span class="ident">cnt</span> <span class="op">+</span><span class="op">=</span> <span class="number">1</span>;
|
||||
}
|
||||
}
|
||||
<span class="ident">cnt</span>
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Filter</span> {
|
||||
<span class="ident">modes</span>: <span class="ident">BTreeSet</span><span class="op"><</span><span class="ident">TripMode</span><span class="op">></span>,
|
||||
<span class="ident">include_no_changes</span>: <span class="ident">bool</span>,
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">Filter</span> {
|
||||
<span class="comment">// Returns:</span>
|
||||
<span class="comment">// 1) trip duration after changes</span>
|
||||
<span class="comment">// 2) difference in number of matching problems, where positive means MORE problems after</span>
|
||||
<span class="comment">// changes</span>
|
||||
<span class="kw">fn</span> <span class="ident">get_trips</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">app</span>: <span class="kw-2">&</span><span class="ident">App</span>, <span class="ident">problem_type</span>: <span class="ident">ProblemType</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Vec</span><span class="op"><</span>(<span class="ident">Duration</span>, <span class="ident">isize</span>)<span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="ident">before</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">prebaked</span>();
|
||||
<span class="kw">let</span> <span class="ident">after</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">sim</span>.<span class="ident">get_analytics</span>();
|
||||
<span class="kw">let</span> <span class="ident">empty</span> <span class="op">=</span> <span class="ident">Vec</span>::<span class="ident">new</span>();
|
||||
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">points</span> <span class="op">=</span> <span class="ident">Vec</span>::<span class="ident">new</span>();
|
||||
<span class="kw">for</span> (<span class="ident">id</span>, <span class="kw">_</span>, <span class="ident">time_after</span>, <span class="ident">mode</span>) <span class="kw">in</span> <span class="ident">after</span>.<span class="ident">both_finished_trips</span>(<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">sim</span>.<span class="ident">time</span>(), <span class="ident">before</span>) {
|
||||
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">modes</span>.<span class="ident">contains</span>(<span class="kw-2">&</span><span class="ident">mode</span>) {
|
||||
<span class="kw">let</span> <span class="ident">count_before</span> <span class="op">=</span> <span class="ident">problem_type</span>
|
||||
.<span class="ident">count</span>(<span class="ident">before</span>.<span class="ident">problems_per_trip</span>.<span class="ident">get</span>(<span class="kw-2">&</span><span class="ident">id</span>).<span class="ident">unwrap_or</span>(<span class="kw-2">&</span><span class="ident">empty</span>))
|
||||
<span class="kw">as</span> <span class="ident">isize</span>;
|
||||
<span class="kw">let</span> <span class="ident">count_after</span> <span class="op">=</span>
|
||||
<span class="ident">problem_type</span>.<span class="ident">count</span>(<span class="ident">after</span>.<span class="ident">problems_per_trip</span>.<span class="ident">get</span>(<span class="kw-2">&</span><span class="ident">id</span>).<span class="ident">unwrap_or</span>(<span class="kw-2">&</span><span class="ident">empty</span>)) <span class="kw">as</span> <span class="ident">isize</span>;
|
||||
<span class="kw">if</span> <span class="op">!</span><span class="self">self</span>.<span class="ident">include_no_changes</span> <span class="op">&&</span> <span class="ident">count_after</span> <span class="op">=</span><span class="op">=</span> <span class="ident">count_before</span> {
|
||||
<span class="kw">continue</span>;
|
||||
<span class="kw">impl</span> <span class="ident">TripProblemFilter</span> <span class="kw">for</span> <span class="ident">Filter</span> {
|
||||
<span class="kw">fn</span> <span class="ident">includes_mode</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">mode</span>: <span class="kw-2">&</span><span class="ident">TripMode</span>) <span class="op">-</span><span class="op">></span> <span class="ident">bool</span> {
|
||||
<span class="self">self</span>.<span class="ident">modes</span>.<span class="ident">contains</span>(<span class="ident">mode</span>)
|
||||
}
|
||||
<span class="ident">points</span>.<span class="ident">push</span>((<span class="ident">time_after</span>, <span class="ident">count_after</span> <span class="op">-</span> <span class="ident">count_before</span>));
|
||||
}
|
||||
}
|
||||
<span class="ident">points</span>
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">finished_trip_count</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">app</span>: <span class="kw-2">&</span><span class="ident">App</span>) <span class="op">-</span><span class="op">></span> <span class="ident">usize</span> {
|
||||
<span class="kw">let</span> <span class="ident">before</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">prebaked</span>();
|
||||
<span class="kw">let</span> <span class="ident">after</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">sim</span>.<span class="ident">get_analytics</span>();
|
||||
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">count</span> <span class="op">=</span> <span class="number">0</span>;
|
||||
<span class="kw">for</span> (<span class="kw">_</span>, <span class="kw">_</span>, <span class="kw">_</span>, <span class="ident">mode</span>) <span class="kw">in</span> <span class="ident">after</span>.<span class="ident">both_finished_trips</span>(<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">sim</span>.<span class="ident">time</span>(), <span class="ident">before</span>) {
|
||||
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">modes</span>.<span class="ident">contains</span>(<span class="kw-2">&</span><span class="ident">mode</span>) {
|
||||
<span class="ident">count</span> <span class="op">+</span><span class="op">=</span> <span class="number">1</span>;
|
||||
}
|
||||
}
|
||||
<span class="ident">count</span>
|
||||
}
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Aka a 2D histogram. Counts the number of matching points in each cell.</span>
|
||||
<span class="kw">struct</span> <span class="ident">Matrix</span><span class="op"><</span><span class="ident">X</span>, <span class="ident">Y</span><span class="op">></span> {
|
||||
<span class="ident">counts</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">usize</span><span class="op">></span>,
|
||||
<span class="ident">buckets_x</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">X</span><span class="op">></span>,
|
||||
<span class="ident">buckets_y</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">Y</span><span class="op">></span>,
|
||||
}
|
||||
|
||||
<span class="kw">impl</span><span class="op"><</span><span class="ident">X</span>: <span class="ident">Copy</span> <span class="op">+</span> <span class="ident">PartialOrd</span> <span class="op">+</span> <span class="ident">Display</span>, <span class="ident">Y</span>: <span class="ident">Copy</span> <span class="op">+</span> <span class="ident">PartialOrd</span> <span class="op">+</span> <span class="ident">Display</span><span class="op">></span> <span class="ident">Matrix</span><span class="op"><</span><span class="ident">X</span>, <span class="ident">Y</span><span class="op">></span> {
|
||||
<span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">buckets_x</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">X</span><span class="op">></span>, <span class="ident">buckets_y</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">Y</span><span class="op">></span>) <span class="op">-</span><span class="op">></span> <span class="ident">Matrix</span><span class="op"><</span><span class="ident">X</span>, <span class="ident">Y</span><span class="op">></span> {
|
||||
<span class="ident">Matrix</span> {
|
||||
<span class="ident">counts</span>: <span class="ident">std</span>::<span class="ident">iter</span>::<span class="ident">repeat</span>(<span class="number">0</span>)
|
||||
.<span class="ident">take</span>(<span class="ident">buckets_x</span>.<span class="ident">len</span>() <span class="op">*</span> <span class="ident">buckets_y</span>.<span class="ident">len</span>())
|
||||
.<span class="ident">collect</span>(),
|
||||
<span class="ident">buckets_x</span>,
|
||||
<span class="ident">buckets_y</span>,
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">add_pt</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">x</span>: <span class="ident">X</span>, <span class="ident">y</span>: <span class="ident">Y</span>) {
|
||||
<span class="comment">// Find its bucket</span>
|
||||
<span class="comment">// TODO Unit test this</span>
|
||||
<span class="kw">let</span> <span class="ident">x_idx</span> <span class="op">=</span> <span class="self">self</span>
|
||||
.<span class="ident">buckets_x</span>
|
||||
.<span class="ident">iter</span>()
|
||||
.<span class="ident">position</span>(<span class="op">|</span><span class="ident">min</span><span class="op">|</span> <span class="kw-2">*</span><span class="ident">min</span> <span class="op">></span> <span class="ident">x</span>)
|
||||
.<span class="ident">unwrap_or</span>(<span class="self">self</span>.<span class="ident">buckets_x</span>.<span class="ident">len</span>())
|
||||
<span class="op">-</span> <span class="number">1</span>;
|
||||
<span class="kw">let</span> <span class="ident">y_idx</span> <span class="op">=</span> <span class="self">self</span>
|
||||
.<span class="ident">buckets_y</span>
|
||||
.<span class="ident">iter</span>()
|
||||
.<span class="ident">position</span>(<span class="op">|</span><span class="ident">min</span><span class="op">|</span> <span class="kw-2">*</span><span class="ident">min</span> <span class="op">></span> <span class="ident">y</span>)
|
||||
.<span class="ident">unwrap_or</span>(<span class="self">self</span>.<span class="ident">buckets_y</span>.<span class="ident">len</span>())
|
||||
<span class="op">-</span> <span class="number">1</span>;
|
||||
<span class="kw">let</span> <span class="ident">idx</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">idx</span>(<span class="ident">x_idx</span>, <span class="ident">y_idx</span>);
|
||||
<span class="self">self</span>.<span class="ident">counts</span>[<span class="ident">idx</span>] <span class="op">+</span><span class="op">=</span> <span class="number">1</span>;
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">idx</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">x</span>: <span class="ident">usize</span>, <span class="ident">y</span>: <span class="ident">usize</span>) <span class="op">-</span><span class="op">></span> <span class="ident">usize</span> {
|
||||
<span class="comment">// Row-major</span>
|
||||
<span class="ident">y</span> <span class="op">*</span> <span class="self">self</span>.<span class="ident">buckets_x</span>.<span class="ident">len</span>() <span class="op">+</span> <span class="ident">x</span>
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">draw</span>(<span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&</span><span class="ident">App</span>, <span class="ident">opts</span>: <span class="ident">MatrixOptions</span><span class="op"><</span><span class="ident">X</span>, <span class="ident">Y</span><span class="op">></span>) <span class="op">-</span><span class="op">></span> <span class="ident">Widget</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</span>::<span class="ident">new</span>();
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">tooltips</span> <span class="op">=</span> <span class="ident">Vec</span>::<span class="ident">new</span>();
|
||||
<span class="kw">let</span> <span class="ident">cell_width</span> <span class="op">=</span> <span class="ident">opts</span>.<span class="ident">total_width</span> <span class="op">/</span> (<span class="self">self</span>.<span class="ident">buckets_x</span>.<span class="ident">len</span>() <span class="kw">as</span> <span class="ident">f64</span>);
|
||||
<span class="kw">let</span> <span class="ident">cell_height</span> <span class="op">=</span> <span class="ident">opts</span>.<span class="ident">total_height</span> <span class="op">/</span> (<span class="self">self</span>.<span class="ident">buckets_y</span>.<span class="ident">len</span>() <span class="kw">as</span> <span class="ident">f64</span>);
|
||||
<span class="kw">let</span> <span class="ident">cell</span> <span class="op">=</span> <span class="ident">Polygon</span>::<span class="ident">rectangle</span>(<span class="ident">cell_width</span>, <span class="ident">cell_height</span>);
|
||||
|
||||
<span class="kw">let</span> <span class="ident">max_count</span> <span class="op">=</span> <span class="kw-2">*</span><span class="self">self</span>.<span class="ident">counts</span>.<span class="ident">iter</span>().<span class="ident">max</span>().<span class="ident">unwrap</span>() <span class="kw">as</span> <span class="ident">f64</span>;
|
||||
|
||||
<span class="kw">for</span> <span class="ident">x</span> <span class="kw">in</span> <span class="number">0</span>..<span class="self">self</span>.<span class="ident">buckets_x</span>.<span class="ident">len</span>() <span class="op">-</span> <span class="number">1</span> {
|
||||
<span class="kw">for</span> <span class="ident">y</span> <span class="kw">in</span> <span class="number">0</span>..<span class="self">self</span>.<span class="ident">buckets_y</span>.<span class="ident">len</span>() <span class="op">-</span> <span class="number">1</span> {
|
||||
<span class="kw">let</span> <span class="ident">is_first_xbucket</span> <span class="op">=</span> <span class="ident">x</span> <span class="op">=</span><span class="op">=</span> <span class="number">0</span>;
|
||||
<span class="kw">let</span> <span class="ident">is_last_xbucket</span> <span class="op">=</span> <span class="ident">x</span> <span class="op">=</span><span class="op">=</span> <span class="self">self</span>.<span class="ident">buckets_x</span>.<span class="ident">len</span>() <span class="op">-</span> <span class="number">2</span>;
|
||||
<span class="kw">let</span> <span class="ident">is_middle_ybucket</span> <span class="op">=</span> <span class="ident">y</span> <span class="op">+</span> <span class="number">1</span> <span class="op">=</span><span class="op">=</span> <span class="self">self</span>.<span class="ident">buckets_y</span>.<span class="ident">len</span>() <span class="op">/</span> <span class="number">2</span>;
|
||||
<span class="kw">let</span> <span class="ident">count</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">counts</span>[<span class="self">self</span>.<span class="ident">idx</span>(<span class="ident">x</span>, <span class="ident">y</span>)];
|
||||
<span class="kw">let</span> <span class="ident">color</span> <span class="op">=</span> <span class="kw">if</span> <span class="ident">count</span> <span class="op">=</span><span class="op">=</span> <span class="number">0</span> {
|
||||
<span class="ident">widgetry</span>::<span class="ident">Color</span>::<span class="ident">CLEAR</span>
|
||||
} <span class="kw">else</span> {
|
||||
<span class="kw">let</span> <span class="ident">density_pct</span> <span class="op">=</span> (<span class="ident">count</span> <span class="kw">as</span> <span class="ident">f64</span>) <span class="op">/</span> <span class="ident">max_count</span>;
|
||||
(<span class="ident">opts</span>.<span class="ident">color_scale_for_bucket</span>)(<span class="ident">app</span>, <span class="self">self</span>.<span class="ident">buckets_x</span>[<span class="ident">x</span>], <span class="self">self</span>.<span class="ident">buckets_y</span>[<span class="ident">y</span>])
|
||||
.<span class="ident">eval</span>(<span class="ident">density_pct</span>)
|
||||
};
|
||||
<span class="kw">let</span> <span class="ident">x1</span> <span class="op">=</span> <span class="ident">cell_width</span> <span class="op">*</span> (<span class="ident">x</span> <span class="kw">as</span> <span class="ident">f64</span>);
|
||||
<span class="kw">let</span> <span class="ident">y1</span> <span class="op">=</span> <span class="ident">cell_height</span> <span class="op">*</span> (<span class="ident">y</span> <span class="kw">as</span> <span class="ident">f64</span>);
|
||||
<span class="kw">let</span> <span class="ident">rect</span> <span class="op">=</span> <span class="ident">cell</span>.<span class="ident">clone</span>().<span class="ident">translate</span>(<span class="ident">x1</span>, <span class="ident">y1</span>);
|
||||
<span class="ident">batch</span>.<span class="ident">push</span>(<span class="ident">color</span>, <span class="ident">rect</span>.<span class="ident">clone</span>());
|
||||
<span class="ident">batch</span>.<span class="ident">append</span>(
|
||||
<span class="ident">Text</span>::<span class="ident">from</span>(<span class="kw">if</span> <span class="ident">count</span> <span class="op">=</span><span class="op">=</span> <span class="number">0</span> <span class="op">&&</span> <span class="ident">is_middle_ybucket</span> {
|
||||
<span class="string">"-"</span>.<span class="ident">to_string</span>()
|
||||
} <span class="kw">else</span> {
|
||||
<span class="ident">abbreviated_format</span>(<span class="ident">count</span>)
|
||||
})
|
||||
.<span class="ident">change_fg</span>(<span class="kw">if</span> <span class="ident">count</span> <span class="op">=</span><span class="op">=</span> <span class="number">0</span> <span class="op">|</span><span class="op">|</span> <span class="ident">is_middle_ybucket</span> {
|
||||
<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">text_primary_color</span>
|
||||
} <span class="kw">else</span> {
|
||||
<span class="ident">Color</span>::<span class="ident">WHITE</span>
|
||||
})
|
||||
.<span class="ident">render</span>(<span class="ident">ctx</span>)
|
||||
.<span class="ident">centered_on</span>(<span class="ident">Pt2D</span>::<span class="ident">new</span>(<span class="ident">x1</span> <span class="op">+</span> <span class="ident">cell_width</span> <span class="op">/</span> <span class="number">2.0</span>, <span class="ident">y1</span> <span class="op">+</span> <span class="ident">cell_height</span> <span class="op">/</span> <span class="number">2.0</span>)),
|
||||
);
|
||||
|
||||
<span class="kw">if</span> <span class="ident">count</span> <span class="op">!</span><span class="op">=</span> <span class="number">0</span> <span class="op">|</span><span class="op">|</span> <span class="op">!</span><span class="ident">is_middle_ybucket</span> {
|
||||
<span class="ident">tooltips</span>.<span class="ident">push</span>((
|
||||
<span class="ident">rect</span>,
|
||||
(<span class="ident">opts</span>.<span class="ident">tooltip_for_bucket</span>)(
|
||||
(
|
||||
<span class="kw">if</span> <span class="ident">is_first_xbucket</span> {
|
||||
<span class="prelude-val">None</span>
|
||||
} <span class="kw">else</span> {
|
||||
<span class="prelude-val">Some</span>(<span class="self">self</span>.<span class="ident">buckets_x</span>[<span class="ident">x</span>])
|
||||
},
|
||||
<span class="kw">if</span> <span class="ident">is_last_xbucket</span> {
|
||||
<span class="prelude-val">None</span>
|
||||
} <span class="kw">else</span> {
|
||||
<span class="prelude-val">Some</span>(<span class="self">self</span>.<span class="ident">buckets_x</span>[<span class="ident">x</span> <span class="op">+</span> <span class="number">1</span>])
|
||||
},
|
||||
),
|
||||
(<span class="self">self</span>.<span class="ident">buckets_y</span>[<span class="ident">y</span>], <span class="self">self</span>.<span class="ident">buckets_y</span>[<span class="ident">y</span> <span class="op">+</span> <span class="number">1</span>]),
|
||||
<span class="ident">count</span>,
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<span class="comment">// Axis Labels</span>
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">y_axis_label</span> <span class="op">=</span> <span class="ident">Text</span>::<span class="ident">from</span>(<span class="string">"More Problems <--------> Fewer Problems"</span>)
|
||||
.<span class="ident">change_fg</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">text_secondary_color</span>)
|
||||
.<span class="ident">render</span>(<span class="ident">ctx</span>)
|
||||
.<span class="ident">rotate</span>(<span class="ident">Angle</span>::<span class="ident">degrees</span>(<span class="op">-</span><span class="number">90.0</span>));
|
||||
<span class="ident">y_axis_label</span>.<span class="ident">autocrop_dims</span> <span class="op">=</span> <span class="bool-val">true</span>;
|
||||
<span class="ident">y_axis_label</span> <span class="op">=</span> <span class="ident">y_axis_label</span>.<span class="ident">autocrop</span>();
|
||||
|
||||
<span class="kw">let</span> <span class="ident">x_axis_label</span> <span class="op">=</span> <span class="ident">Text</span>::<span class="ident">from</span>(<span class="string">"Short Trips <--------> Long Trips"</span>)
|
||||
.<span class="ident">change_fg</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">text_secondary_color</span>)
|
||||
.<span class="ident">render</span>(<span class="ident">ctx</span>);
|
||||
|
||||
<span class="kw">let</span> <span class="ident">vmargin</span> <span class="op">=</span> <span class="number">32.0</span>;
|
||||
<span class="kw">for</span> (<span class="ident">polygon</span>, <span class="kw">_</span>) <span class="kw">in</span> <span class="ident">tooltips</span>.<span class="ident">iter_mut</span>() {
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">translated</span> <span class="op">=</span>
|
||||
<span class="ident">polygon</span>.<span class="ident">translate</span>(<span class="ident">vmargin</span> <span class="op">+</span> <span class="ident">y_axis_label</span>.<span class="ident">get_bounds</span>().<span class="ident">width</span>(), <span class="number">0.0</span>);
|
||||
<span class="ident">std</span>::<span class="ident">mem</span>::<span class="ident">swap</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">translated</span>, <span class="ident">polygon</span>);
|
||||
}
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">row</span> <span class="op">=</span> <span class="ident">GeomBatchStack</span>::<span class="ident">horizontal</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="ident">y_axis_label</span>, <span class="ident">batch</span>]);
|
||||
<span class="ident">row</span>.<span class="ident">set_spacing</span>(<span class="ident">vmargin</span>);
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">chart</span> <span class="op">=</span> <span class="ident">GeomBatchStack</span>::<span class="ident">vertical</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="ident">row</span>.<span class="ident">batch</span>(), <span class="ident">x_axis_label</span>]);
|
||||
<span class="ident">chart</span>.<span class="ident">set_spacing</span>(<span class="number">16</span>);
|
||||
|
||||
<span class="ident">DrawWithTooltips</span>::<span class="ident">new_widget</span>(<span class="ident">ctx</span>, <span class="ident">chart</span>.<span class="ident">batch</span>(), <span class="ident">tooltips</span>, <span class="ident">Box</span>::<span class="ident">new</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">GeomBatch</span>::<span class="ident">new</span>()))
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">struct</span> <span class="ident">MatrixOptions</span><span class="op"><</span><span class="ident">X</span>, <span class="ident">Y</span><span class="op">></span> {
|
||||
<span class="ident">total_width</span>: <span class="ident">f64</span>,
|
||||
<span class="ident">total_height</span>: <span class="ident">f64</span>,
|
||||
<span class="ident">color_scale_for_bucket</span>: <span class="ident">Box</span><span class="op"><</span><span class="kw">dyn</span> <span class="ident">Fn</span>(<span class="kw-2">&</span><span class="ident">App</span>, <span class="ident">X</span>, <span class="ident">Y</span>) <span class="op">-</span><span class="op">></span> <span class="kw-2">&</span><span class="ident">ColorScale</span><span class="op">></span>,
|
||||
<span class="ident">tooltip_for_bucket</span>: <span class="ident">Box</span><span class="op"><</span><span class="kw">dyn</span> <span class="ident">Fn</span>((<span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">X</span><span class="op">></span>, <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">X</span><span class="op">></span>), (<span class="ident">Y</span>, <span class="ident">Y</span>), <span class="ident">usize</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Text</span><span class="op">></span>,
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">bucketize_isizes</span>(<span class="ident">max_buckets</span>: <span class="ident">usize</span>, <span class="ident">pts</span>: <span class="kw-2">&</span>[(<span class="ident">Duration</span>, <span class="ident">isize</span>)]) <span class="op">-</span><span class="op">></span> <span class="ident">Vec</span><span class="op"><</span><span class="ident">isize</span><span class="op">></span> {
|
||||
<span class="macro">debug_assert</span><span class="macro">!</span>(
|
||||
<span class="ident">max_buckets</span> <span class="op">%</span> <span class="number">2</span> <span class="op">=</span><span class="op">=</span> <span class="number">1</span>,
|
||||
<span class="string">"num_buckets must be odd to have a symmetrical number of buckets around axis"</span>
|
||||
);
|
||||
<span class="macro">debug_assert</span><span class="macro">!</span>(<span class="ident">max_buckets</span> <span class="op">></span><span class="op">=</span> <span class="number">3</span>, <span class="string">"num_buckets must be at least 3"</span>);
|
||||
|
||||
<span class="kw">let</span> <span class="ident">positive_buckets</span> <span class="op">=</span> (<span class="ident">max_buckets</span> <span class="op">-</span> <span class="number">1</span>) <span class="op">/</span> <span class="number">2</span>;
|
||||
<span class="comment">// uniformly sized integer buckets</span>
|
||||
<span class="kw">let</span> <span class="ident">max</span> <span class="op">=</span> <span class="kw">match</span> <span class="ident">pts</span>.<span class="ident">iter</span>().<span class="ident">max_by_key</span>(<span class="op">|</span>(<span class="kw">_</span>, <span class="ident">cnt</span>)<span class="op">|</span> <span class="ident">cnt</span>.<span class="ident">abs</span>()) {
|
||||
<span class="prelude-val">Some</span>(<span class="ident">t</span>) <span class="kw">if</span> (<span class="ident">t</span>.<span class="number">1</span>.<span class="ident">abs</span>() <span class="kw">as</span> <span class="ident">usize</span>) <span class="op">></span><span class="op">=</span> <span class="ident">positive_buckets</span> <span class="op">=</span><span class="op">></span> <span class="ident">t</span>.<span class="number">1</span>.<span class="ident">abs</span>(),
|
||||
<span class="kw">_</span> <span class="op">=</span><span class="op">></span> {
|
||||
<span class="comment">// Enforce a bucket width of at least 1.</span>
|
||||
<span class="kw">let</span> <span class="ident">negative_buckets</span> <span class="op">=</span> <span class="op">-</span>(<span class="ident">positive_buckets</span> <span class="kw">as</span> <span class="ident">isize</span>);
|
||||
<span class="kw">return</span> (<span class="ident">negative_buckets</span>..<span class="op">=</span>(<span class="ident">positive_buckets</span> <span class="kw">as</span> <span class="ident">isize</span> <span class="op">+</span> <span class="number">1</span>)).<span class="ident">collect</span>();
|
||||
}
|
||||
};
|
||||
|
||||
<span class="kw">let</span> <span class="ident">bucket_size</span> <span class="op">=</span> (<span class="ident">max</span> <span class="kw">as</span> <span class="ident">f64</span> <span class="op">/</span> <span class="ident">positive_buckets</span> <span class="kw">as</span> <span class="ident">f64</span>).<span class="ident">ceil</span>() <span class="kw">as</span> <span class="ident">isize</span>;
|
||||
|
||||
<span class="comment">// we start with a 0-based bucket, and build the other buckets out from that.</span>
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buckets</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[<span class="number">0</span>];
|
||||
|
||||
<span class="kw">for</span> <span class="ident">i</span> <span class="kw">in</span> <span class="number">0</span>..<span class="op">=</span><span class="ident">positive_buckets</span> {
|
||||
<span class="comment">// the first positive bucket starts at `1`, to ensure that the 0 bucket stands alone</span>
|
||||
<span class="ident">buckets</span>.<span class="ident">push</span>(<span class="number">1</span> <span class="op">+</span> (<span class="ident">i</span> <span class="kw">as</span> <span class="ident">isize</span>) <span class="op">*</span> <span class="ident">bucket_size</span>);
|
||||
}
|
||||
<span class="kw">for</span> <span class="ident">i</span> <span class="kw">in</span> <span class="number">1</span>..<span class="op">=</span><span class="ident">positive_buckets</span> {
|
||||
<span class="ident">buckets</span>.<span class="ident">push</span>(<span class="op">-</span>(<span class="ident">i</span> <span class="kw">as</span> <span class="ident">isize</span>) <span class="op">*</span> <span class="ident">bucket_size</span>);
|
||||
}
|
||||
<span class="ident">buckets</span>.<span class="ident">sort_unstable</span>();
|
||||
<span class="macro">debug</span><span class="macro">!</span>(<span class="string">"buckets: {:?}"</span>, <span class="ident">buckets</span>);
|
||||
|
||||
<span class="ident">buckets</span>
|
||||
}
|
||||
|
||||
<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">test</span>)]</span>
|
||||
<span class="kw">mod</span> <span class="ident">tests</span> {
|
||||
<span class="kw">use</span> <span class="kw">super</span>::<span class="kw-2">*</span>;
|
||||
|
||||
<span class="attribute">#[<span class="ident">test</span>]</span>
|
||||
<span class="kw">fn</span> <span class="ident">test_bucketize_isizes</span>() {
|
||||
<span class="kw">let</span> <span class="ident">buckets</span> <span class="op">=</span> <span class="ident">bucketize_isizes</span>(
|
||||
<span class="number">7</span>,
|
||||
<span class="kw-2">&</span>[
|
||||
(<span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">3</span>), <span class="op">-</span><span class="number">3</span>),
|
||||
(<span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">3</span>), <span class="op">-</span><span class="number">3</span>),
|
||||
(<span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">3</span>), <span class="op">-</span><span class="number">1</span>),
|
||||
(<span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">3</span>), <span class="number">2</span>),
|
||||
(<span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">3</span>), <span class="number">5</span>),
|
||||
],
|
||||
);
|
||||
<span class="comment">// there should be an even number of buckets on either side of zero so as to center</span>
|
||||
<span class="comment">// our x-axis.</span>
|
||||
<span class="comment">//</span>
|
||||
<span class="comment">// there should always be a 0-1 bucket, ensuring that only '0' falls into the zero-bucket.</span>
|
||||
<span class="comment">//</span>
|
||||
<span class="comment">// all other buckets edges should be evenly spaced from the zero bucket</span>
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">buckets</span>, <span class="macro">vec</span><span class="macro">!</span>[<span class="op">-</span><span class="number">6</span>, <span class="op">-</span><span class="number">4</span>, <span class="op">-</span><span class="number">2</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">7</span>])
|
||||
}
|
||||
|
||||
<span class="attribute">#[<span class="ident">test</span>]</span>
|
||||
<span class="kw">fn</span> <span class="ident">test_bucketize_empty_isizes</span>() {
|
||||
<span class="kw">let</span> <span class="ident">buckets</span> <span class="op">=</span> <span class="ident">bucketize_isizes</span>(<span class="number">7</span>, <span class="kw-2">&</span>[]);
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">buckets</span>, <span class="macro">vec</span><span class="macro">!</span>[<span class="op">-</span><span class="number">2</span>, <span class="op">-</span><span class="number">1</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>])
|
||||
}
|
||||
|
||||
<span class="attribute">#[<span class="ident">test</span>]</span>
|
||||
<span class="kw">fn</span> <span class="ident">test_bucketize_small_isizes</span>() {
|
||||
<span class="kw">let</span> <span class="ident">buckets</span> <span class="op">=</span> <span class="ident">bucketize_isizes</span>(
|
||||
<span class="number">7</span>,
|
||||
<span class="kw-2">&</span>[
|
||||
(<span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">3</span>), <span class="op">-</span><span class="number">1</span>),
|
||||
(<span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">3</span>), <span class="op">-</span><span class="number">1</span>),
|
||||
(<span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">3</span>), <span class="number">0</span>),
|
||||
(<span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">3</span>), <span class="op">-</span><span class="number">1</span>),
|
||||
(<span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">3</span>), <span class="number">0</span>),
|
||||
],
|
||||
);
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">buckets</span>, <span class="macro">vec</span><span class="macro">!</span>[<span class="op">-</span><span class="number">3</span>, <span class="op">-</span><span class="number">2</span>, <span class="op">-</span><span class="number">1</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>])
|
||||
<span class="kw">fn</span> <span class="ident">include_no_changes</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">bool</span> {
|
||||
<span class="self">self</span>.<span class="ident">include_no_changes</span>
|
||||
}
|
||||
}
|
||||
</pre></div>
|
||||
|
@ -541,6 +541,58 @@
|
||||
<span id="538">538</span>
|
||||
<span id="539">539</span>
|
||||
<span id="540">540</span>
|
||||
<span id="541">541</span>
|
||||
<span id="542">542</span>
|
||||
<span id="543">543</span>
|
||||
<span id="544">544</span>
|
||||
<span id="545">545</span>
|
||||
<span id="546">546</span>
|
||||
<span id="547">547</span>
|
||||
<span id="548">548</span>
|
||||
<span id="549">549</span>
|
||||
<span id="550">550</span>
|
||||
<span id="551">551</span>
|
||||
<span id="552">552</span>
|
||||
<span id="553">553</span>
|
||||
<span id="554">554</span>
|
||||
<span id="555">555</span>
|
||||
<span id="556">556</span>
|
||||
<span id="557">557</span>
|
||||
<span id="558">558</span>
|
||||
<span id="559">559</span>
|
||||
<span id="560">560</span>
|
||||
<span id="561">561</span>
|
||||
<span id="562">562</span>
|
||||
<span id="563">563</span>
|
||||
<span id="564">564</span>
|
||||
<span id="565">565</span>
|
||||
<span id="566">566</span>
|
||||
<span id="567">567</span>
|
||||
<span id="568">568</span>
|
||||
<span id="569">569</span>
|
||||
<span id="570">570</span>
|
||||
<span id="571">571</span>
|
||||
<span id="572">572</span>
|
||||
<span id="573">573</span>
|
||||
<span id="574">574</span>
|
||||
<span id="575">575</span>
|
||||
<span id="576">576</span>
|
||||
<span id="577">577</span>
|
||||
<span id="578">578</span>
|
||||
<span id="579">579</span>
|
||||
<span id="580">580</span>
|
||||
<span id="581">581</span>
|
||||
<span id="582">582</span>
|
||||
<span id="583">583</span>
|
||||
<span id="584">584</span>
|
||||
<span id="585">585</span>
|
||||
<span id="586">586</span>
|
||||
<span id="587">587</span>
|
||||
<span id="588">588</span>
|
||||
<span id="589">589</span>
|
||||
<span id="590">590</span>
|
||||
<span id="591">591</span>
|
||||
<span id="592">592</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">collections</span>::<span class="ident">BTreeSet</span>;
|
||||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">fs</span>::<span class="ident">File</span>;
|
||||
@ -557,6 +609,7 @@
|
||||
<span class="ident">Panel</span>, <span class="ident">State</span>, <span class="ident">Text</span>, <span class="ident">TextExt</span>, <span class="ident">Toggle</span>, <span class="ident">Widget</span>,
|
||||
};
|
||||
|
||||
<span class="kw">use</span> <span class="kw">super</span>::<span class="ident">trip_problems</span>::{<span class="ident">problem_matrix</span>, <span class="ident">ProblemType</span>, <span class="ident">TripProblemFilter</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>};
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">common</span>::<span class="ident">color_for_mode</span>;
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">sandbox</span>::<span class="ident">dashboards</span>::<span class="ident">DashTab</span>;
|
||||
@ -567,6 +620,12 @@
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">TravelTimes</span> {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new_state</span>(<span class="ident">ctx</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&</span><span class="ident">App</span>, <span class="ident">filter</span>: <span class="ident">Filter</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Box</span><span class="op"><</span><span class="kw">dyn</span> <span class="ident">State</span><span class="op"><</span><span class="ident">App</span><span class="op">></span><span class="op">></span> {
|
||||
<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">TravelTimes</span> {
|
||||
<span class="ident">panel</span>: <span class="ident">TravelTimes</span>::<span class="ident">make_panel</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">filter</span>),
|
||||
})
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">make_panel</span>(<span class="ident">ctx</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&</span><span class="ident">App</span>, <span class="ident">filter</span>: <span class="ident">Filter</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Panel</span> {
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">filters</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[<span class="string">"Filters"</span>.<span class="ident">text_widget</span>(<span class="ident">ctx</span>)];
|
||||
<span class="kw">for</span> <span class="ident">mode</span> <span class="kw">in</span> <span class="ident">TripMode</span>::<span class="ident">all</span>() {
|
||||
<span class="ident">filters</span>.<span class="ident">push</span>(<span class="ident">Toggle</span>::<span class="ident">colored_checkbox</span>(
|
||||
@ -576,7 +635,26 @@
|
||||
<span class="ident">filter</span>.<span class="ident">modes</span>.<span class="ident">contains</span>(<span class="kw-2">&</span><span class="ident">mode</span>),
|
||||
));
|
||||
}
|
||||
<span class="ident">filters</span>.<span class="ident">push</span>(<span class="ident">Widget</span>::<span class="ident">dropdown</span>(
|
||||
|
||||
<span class="ident">filters</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">text</span>(<span class="string">"Export to CSV"</span>)
|
||||
.<span class="ident">build_def</span>(<span class="ident">ctx</span>)
|
||||
.<span class="ident">align_bottom</span>(),
|
||||
);
|
||||
|
||||
<span class="ident">Panel</span>::<span class="ident">new_builder</span>(<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">DashTab</span>::<span class="ident">TravelTimes</span>.<span class="ident">picker</span>(<span class="ident">ctx</span>, <span class="ident">app</span>),
|
||||
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="ident">filters</span>).<span class="ident">section</span>(<span class="ident">ctx</span>),
|
||||
<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">summary_boxes</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="kw-2">&</span><span class="ident">filter</span>),
|
||||
<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Text</span>::<span class="ident">from</span>(<span class="ident">Line</span>(<span class="string">"Travel Times"</span>).<span class="ident">small_heading</span>()).<span class="ident">into_widget</span>(<span class="ident">ctx</span>),
|
||||
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="string">"filter:"</span>.<span class="ident">text_widget</span>(<span class="ident">ctx</span>).<span class="ident">centered_vert</span>(),
|
||||
<span class="ident">Widget</span>::<span class="ident">dropdown</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="string">"filter"</span>,
|
||||
<span class="ident">filter</span>.<span class="ident">changes_pct</span>,
|
||||
@ -586,33 +664,43 @@
|
||||
<span class="ident">Choice</span>::<span class="ident">new</span>(<span class="string">"at least 10% change"</span>, <span class="prelude-val">Some</span>(<span class="number">0.1</span>)),
|
||||
<span class="ident">Choice</span>::<span class="ident">new</span>(<span class="string">"at least 50% change"</span>, <span class="prelude-val">Some</span>(<span class="number">0.5</span>)),
|
||||
],
|
||||
));
|
||||
<span class="ident">filters</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">text</span>(<span class="string">"Export to CSV"</span>)
|
||||
.<span class="ident">build_def</span>(<span class="ident">ctx</span>)
|
||||
.<span class="ident">align_bottom</span>(),
|
||||
);
|
||||
|
||||
<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">TravelTimes</span> {
|
||||
<span class="ident">panel</span>: <span class="ident">Panel</span>::<span class="ident">new_builder</span>(<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">DashTab</span>::<span class="ident">TravelTimes</span>.<span class="ident">picker</span>(<span class="ident">ctx</span>, <span class="ident">app</span>),
|
||||
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="ident">filters</span>).<span class="ident">section</span>(<span class="ident">ctx</span>),
|
||||
<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">summary_boxes</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="kw-2">&</span><span class="ident">filter</span>),
|
||||
),
|
||||
])
|
||||
.<span class="ident">margin_above</span>(<span class="number">8</span>),
|
||||
<span class="ident">Widget</span>::<span class="ident">horiz_separator</span>(<span class="ident">ctx</span>, <span class="number">1.0</span>),
|
||||
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">contingency_table</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="kw-2">&</span><span class="ident">filter</span>).<span class="ident">bg</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">section_bg</span>),
|
||||
<span class="ident">scatter_plot</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="kw-2">&</span><span class="ident">filter</span>).<span class="ident">bg</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">section_bg</span>),
|
||||
<span class="ident">scatter_plot</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="kw-2">&</span><span class="ident">filter</span>)
|
||||
.<span class="ident">bg</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">section_bg</span>)
|
||||
.<span class="ident">margin_left</span>(<span class="number">32</span>),
|
||||
]),
|
||||
])
|
||||
.<span class="ident">section</span>(<span class="ident">ctx</span>)
|
||||
.<span class="ident">evenly_spaced</span>(),
|
||||
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Text</span>::<span class="ident">from</span>(<span class="ident">Line</span>(<span class="string">"Intersection Delays"</span>).<span class="ident">small_heading</span>())
|
||||
.<span class="ident">into_widget</span>(<span class="ident">ctx</span>),
|
||||
<span class="ident">Toggle</span>::<span class="ident">checkbox</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="string">"include trips without any changes"</span>,
|
||||
<span class="prelude-val">None</span>,
|
||||
<span class="ident">filter</span>.<span class="ident">include_no_changes</span>(),
|
||||
),
|
||||
]),
|
||||
<span class="ident">problem_matrix</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="ident">app</span>,
|
||||
<span class="kw-2">&</span><span class="ident">filter</span>.<span class="ident">trip_problems</span>(<span class="ident">app</span>, <span class="ident">ProblemType</span>::<span class="ident">IntersectionDelay</span>),
|
||||
)
|
||||
.<span class="ident">margin_left</span>(<span class="number">32</span>),
|
||||
])
|
||||
.<span class="ident">section</span>(<span class="ident">ctx</span>),
|
||||
]),
|
||||
]),
|
||||
]))
|
||||
.<span class="ident">exact_size_percent</span>(<span class="number">90</span>, <span class="number">90</span>)
|
||||
.<span class="ident">build</span>(<span class="ident">ctx</span>),
|
||||
})
|
||||
.<span class="ident">build</span>(<span class="ident">ctx</span>)
|
||||
}
|
||||
}
|
||||
|
||||
@ -643,13 +731,17 @@
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">filter</span> <span class="op">=</span> <span class="ident">Filter</span> {
|
||||
<span class="ident">changes_pct</span>: <span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">dropdown_value</span>(<span class="string">"filter"</span>),
|
||||
<span class="ident">modes</span>: <span class="ident">BTreeSet</span>::<span class="ident">new</span>(),
|
||||
<span class="ident">include_no_changes</span>: <span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">is_checked</span>(<span class="string">"include trips without any changes"</span>),
|
||||
};
|
||||
<span class="kw">for</span> <span class="ident">m</span> <span class="kw">in</span> <span class="ident">TripMode</span>::<span class="ident">all</span>() {
|
||||
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">is_checked</span>(<span class="ident">m</span>.<span class="ident">ongoing_verb</span>()) {
|
||||
<span class="ident">filter</span>.<span class="ident">modes</span>.<span class="ident">insert</span>(<span class="ident">m</span>);
|
||||
}
|
||||
}
|
||||
<span class="ident">Transition</span>::<span class="ident">Replace</span>(<span class="ident">TravelTimes</span>::<span class="ident">new_state</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">filter</span>))
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">new_panel</span> <span class="op">=</span> <span class="ident">TravelTimes</span>::<span class="ident">make_panel</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">filter</span>);
|
||||
<span class="ident">new_panel</span>.<span class="ident">restore</span>(<span class="ident">ctx</span>, <span class="kw-2">&</span><span class="self">self</span>.<span class="ident">panel</span>);
|
||||
<span class="self">self</span>.<span class="ident">panel</span> <span class="op">=</span> <span class="ident">new_panel</span>;
|
||||
<span class="ident">Transition</span>::<span class="ident">Keep</span>
|
||||
}
|
||||
<span class="kw">_</span> <span class="op">=</span><span class="op">></span> <span class="ident">Transition</span>::<span class="ident">Keep</span>,
|
||||
}
|
||||
@ -780,8 +872,6 @@
|
||||
<span class="ident">points</span>,
|
||||
),
|
||||
])
|
||||
.<span class="ident">padding</span>(<span class="number">16</span>)
|
||||
.<span class="ident">outline</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">section_outline</span>)
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">contingency_table</span>(<span class="ident">ctx</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&</span><span class="ident">App</span>, <span class="ident">filter</span>: <span class="kw-2">&</span><span class="ident">Filter</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Widget</span> {
|
||||
@ -999,10 +1089,14 @@
|
||||
|
||||
<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Text</span>::<span class="ident">from_multiline</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Line</span>(<span class="string">"Time difference by trip length"</span>).<span class="ident">small_heading</span>(),
|
||||
<span class="ident">Line</span>(<span class="string">"Grouped by the length of the trip before your changes."</span>),
|
||||
<span class="ident">Line</span>(<span class="string">"Aggregate difference by trip length"</span>).<span class="ident">small_heading</span>(),
|
||||
<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(
|
||||
<span class="string">"Grouped by the length of the trip before\n\"{}\" changes."</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">edits_name</span>
|
||||
)),
|
||||
])
|
||||
.<span class="ident">into_widget</span>(<span class="ident">ctx</span>),
|
||||
.<span class="ident">into_widget</span>(<span class="ident">ctx</span>)
|
||||
.<span class="ident">container</span>(),
|
||||
<span class="ident">Line</span>(<span class="string">"Total Time Saved (faster)"</span>)
|
||||
.<span class="ident">secondary</span>()
|
||||
.<span class="ident">into_widget</span>(<span class="ident">ctx</span>),
|
||||
@ -1011,13 +1105,22 @@
|
||||
.<span class="ident">secondary</span>()
|
||||
.<span class="ident">into_widget</span>(<span class="ident">ctx</span>),
|
||||
])
|
||||
.<span class="ident">padding</span>(<span class="number">16</span>)
|
||||
.<span class="ident">outline</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">section_outline</span>)
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Filter</span> {
|
||||
<span class="ident">changes_pct</span>: <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">f64</span><span class="op">></span>,
|
||||
<span class="ident">modes</span>: <span class="ident">BTreeSet</span><span class="op"><</span><span class="ident">TripMode</span><span class="op">></span>,
|
||||
<span class="ident">include_no_changes</span>: <span class="ident">bool</span>,
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">TripProblemFilter</span> <span class="kw">for</span> <span class="ident">Filter</span> {
|
||||
<span class="kw">fn</span> <span class="ident">includes_mode</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">mode</span>: <span class="kw-2">&</span><span class="ident">TripMode</span>) <span class="op">-</span><span class="op">></span> <span class="ident">bool</span> {
|
||||
<span class="self">self</span>.<span class="ident">modes</span>.<span class="ident">contains</span>(<span class="ident">mode</span>)
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">include_no_changes</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">bool</span> {
|
||||
<span class="self">self</span>.<span class="ident">include_no_changes</span>
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">Filter</span> {
|
||||
@ -1025,6 +1128,7 @@
|
||||
<span class="ident">Filter</span> {
|
||||
<span class="ident">changes_pct</span>: <span class="prelude-val">None</span>,
|
||||
<span class="ident">modes</span>: <span class="ident">TripMode</span>::<span class="ident">all</span>().<span class="ident">into_iter</span>().<span class="ident">collect</span>(),
|
||||
<span class="ident">include_no_changes</span>: <span class="bool-val">false</span>,
|
||||
}
|
||||
}
|
||||
|
||||
|
779
rustdoc/src/game/sandbox/dashboards/trip_problems.rs.html
Normal file
779
rustdoc/src/game/sandbox/dashboards/trip_problems.rs.html
Normal file
@ -0,0 +1,779 @@
|
||||
<!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 `game/src/sandbox/dashboards/trip_problems.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>trip_problems.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 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../../game/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"><img src="../../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../../theme.js"></script><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" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../../settings.html"><img src="../../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><pre class="line-numbers"><span id="1"> 1</span>
|
||||
<span id="2"> 2</span>
|
||||
<span id="3"> 3</span>
|
||||
<span id="4"> 4</span>
|
||||
<span id="5"> 5</span>
|
||||
<span id="6"> 6</span>
|
||||
<span id="7"> 7</span>
|
||||
<span id="8"> 8</span>
|
||||
<span id="9"> 9</span>
|
||||
<span id="10"> 10</span>
|
||||
<span id="11"> 11</span>
|
||||
<span id="12"> 12</span>
|
||||
<span id="13"> 13</span>
|
||||
<span id="14"> 14</span>
|
||||
<span id="15"> 15</span>
|
||||
<span id="16"> 16</span>
|
||||
<span id="17"> 17</span>
|
||||
<span id="18"> 18</span>
|
||||
<span id="19"> 19</span>
|
||||
<span id="20"> 20</span>
|
||||
<span id="21"> 21</span>
|
||||
<span id="22"> 22</span>
|
||||
<span id="23"> 23</span>
|
||||
<span id="24"> 24</span>
|
||||
<span id="25"> 25</span>
|
||||
<span id="26"> 26</span>
|
||||
<span id="27"> 27</span>
|
||||
<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>
|
||||
<span id="286">286</span>
|
||||
<span id="287">287</span>
|
||||
<span id="288">288</span>
|
||||
<span id="289">289</span>
|
||||
<span id="290">290</span>
|
||||
<span id="291">291</span>
|
||||
<span id="292">292</span>
|
||||
<span id="293">293</span>
|
||||
<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>
|
||||
<span id="299">299</span>
|
||||
<span id="300">300</span>
|
||||
<span id="301">301</span>
|
||||
<span id="302">302</span>
|
||||
<span id="303">303</span>
|
||||
<span id="304">304</span>
|
||||
<span id="305">305</span>
|
||||
<span id="306">306</span>
|
||||
<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>
|
||||
<span id="343">343</span>
|
||||
<span id="344">344</span>
|
||||
<span id="345">345</span>
|
||||
<span id="346">346</span>
|
||||
<span id="347">347</span>
|
||||
<span id="348">348</span>
|
||||
<span id="349">349</span>
|
||||
<span id="350">350</span>
|
||||
<span id="351">351</span>
|
||||
<span id="352">352</span>
|
||||
<span id="353">353</span>
|
||||
<span id="354">354</span>
|
||||
<span id="355">355</span>
|
||||
<span id="356">356</span>
|
||||
<span id="357">357</span>
|
||||
<span id="358">358</span>
|
||||
<span id="359">359</span>
|
||||
<span id="360">360</span>
|
||||
<span id="361">361</span>
|
||||
<span id="362">362</span>
|
||||
<span id="363">363</span>
|
||||
<span id="364">364</span>
|
||||
<span id="365">365</span>
|
||||
<span id="366">366</span>
|
||||
<span id="367">367</span>
|
||||
<span id="368">368</span>
|
||||
<span id="369">369</span>
|
||||
<span id="370">370</span>
|
||||
<span id="371">371</span>
|
||||
<span id="372">372</span>
|
||||
<span id="373">373</span>
|
||||
<span id="374">374</span>
|
||||
<span id="375">375</span>
|
||||
<span id="376">376</span>
|
||||
<span id="377">377</span>
|
||||
<span id="378">378</span>
|
||||
<span id="379">379</span>
|
||||
<span id="380">380</span>
|
||||
<span id="381">381</span>
|
||||
<span id="382">382</span>
|
||||
<span id="383">383</span>
|
||||
<span id="384">384</span>
|
||||
<span id="385">385</span>
|
||||
<span id="386">386</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">fmt</span>::<span class="ident">Display</span>;
|
||||
|
||||
<span class="kw">use</span> <span class="ident">abstutil</span>::{<span class="ident">abbreviated_format</span>, <span class="ident">prettyprint_usize</span>};
|
||||
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Angle</span>, <span class="ident">Duration</span>, <span class="ident">Polygon</span>, <span class="ident">Pt2D</span>, <span class="ident">Time</span>};
|
||||
<span class="kw">use</span> <span class="ident">map_gui</span>::<span class="ident">tools</span>::<span class="ident">ColorScale</span>;
|
||||
<span class="kw">use</span> <span class="ident">sim</span>::{<span class="ident">Problem</span>, <span class="ident">TripMode</span>};
|
||||
<span class="kw">use</span> <span class="ident">widgetry</span>::{<span class="ident">Color</span>, <span class="ident">DrawWithTooltips</span>, <span class="ident">GeomBatch</span>, <span class="ident">GeomBatchStack</span>, <span class="ident">Text</span>, <span class="ident">Widget</span>};
|
||||
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::{<span class="ident">App</span>, <span class="ident">EventCtx</span>};
|
||||
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>, <span class="ident">Copy</span>, <span class="ident">PartialEq</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">enum</span> <span class="ident">ProblemType</span> {
|
||||
<span class="ident">IntersectionDelay</span>,
|
||||
<span class="ident">LargeIntersectionCrossing</span>,
|
||||
<span class="ident">OvertakeDesired</span>,
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">ProblemType</span> {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">count</span>(<span class="self">self</span>, <span class="ident">problems</span>: <span class="kw-2">&</span>[(<span class="ident">Time</span>, <span class="ident">Problem</span>)]) <span class="op">-</span><span class="op">></span> <span class="ident">usize</span> {
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">cnt</span> <span class="op">=</span> <span class="number">0</span>;
|
||||
<span class="kw">for</span> (<span class="kw">_</span>, <span class="ident">problem</span>) <span class="kw">in</span> <span class="ident">problems</span> {
|
||||
<span class="kw">if</span> <span class="kw">match</span> <span class="ident">problem</span> {
|
||||
<span class="ident">Problem</span>::<span class="ident">IntersectionDelay</span>(<span class="kw">_</span>, <span class="kw">_</span>) <span class="op">=</span><span class="op">></span> <span class="self">self</span> <span class="op">=</span><span class="op">=</span> <span class="ident">ProblemType</span>::<span class="ident">IntersectionDelay</span>,
|
||||
<span class="ident">Problem</span>::<span class="ident">LargeIntersectionCrossing</span>(<span class="kw">_</span>) <span class="op">=</span><span class="op">></span> {
|
||||
<span class="self">self</span> <span class="op">=</span><span class="op">=</span> <span class="ident">ProblemType</span>::<span class="ident">LargeIntersectionCrossing</span>
|
||||
}
|
||||
<span class="ident">Problem</span>::<span class="ident">OvertakeDesired</span>(<span class="kw">_</span>) <span class="op">=</span><span class="op">></span> <span class="self">self</span> <span class="op">=</span><span class="op">=</span> <span class="ident">ProblemType</span>::<span class="ident">OvertakeDesired</span>,
|
||||
} {
|
||||
<span class="ident">cnt</span> <span class="op">+</span><span class="op">=</span> <span class="number">1</span>;
|
||||
}
|
||||
}
|
||||
<span class="ident">cnt</span>
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">trait</span> <span class="ident">TripProblemFilter</span> {
|
||||
<span class="kw">fn</span> <span class="ident">includes_mode</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">mode</span>: <span class="kw-2">&</span><span class="ident">TripMode</span>) <span class="op">-</span><span class="op">></span> <span class="ident">bool</span>;
|
||||
<span class="kw">fn</span> <span class="ident">include_no_changes</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">bool</span>;
|
||||
|
||||
<span class="comment">// Returns:</span>
|
||||
<span class="comment">// 1) trip duration after changes</span>
|
||||
<span class="comment">// 2) difference in number of matching problems, where positive means MORE problems after</span>
|
||||
<span class="comment">// changes</span>
|
||||
<span class="kw">fn</span> <span class="ident">trip_problems</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">app</span>: <span class="kw-2">&</span><span class="ident">App</span>, <span class="ident">problem_type</span>: <span class="ident">ProblemType</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Vec</span><span class="op"><</span>(<span class="ident">Duration</span>, <span class="ident">isize</span>)<span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="ident">before</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">prebaked</span>();
|
||||
<span class="kw">let</span> <span class="ident">after</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">sim</span>.<span class="ident">get_analytics</span>();
|
||||
<span class="kw">let</span> <span class="ident">empty</span> <span class="op">=</span> <span class="ident">Vec</span>::<span class="ident">new</span>();
|
||||
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">points</span> <span class="op">=</span> <span class="ident">Vec</span>::<span class="ident">new</span>();
|
||||
<span class="kw">for</span> (<span class="ident">id</span>, <span class="kw">_</span>, <span class="ident">time_after</span>, <span class="ident">mode</span>) <span class="kw">in</span> <span class="ident">after</span>.<span class="ident">both_finished_trips</span>(<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">sim</span>.<span class="ident">time</span>(), <span class="ident">before</span>) {
|
||||
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">includes_mode</span>(<span class="kw-2">&</span><span class="ident">mode</span>) {
|
||||
<span class="kw">let</span> <span class="ident">count_before</span> <span class="op">=</span> <span class="ident">problem_type</span>
|
||||
.<span class="ident">count</span>(<span class="ident">before</span>.<span class="ident">problems_per_trip</span>.<span class="ident">get</span>(<span class="kw-2">&</span><span class="ident">id</span>).<span class="ident">unwrap_or</span>(<span class="kw-2">&</span><span class="ident">empty</span>))
|
||||
<span class="kw">as</span> <span class="ident">isize</span>;
|
||||
<span class="kw">let</span> <span class="ident">count_after</span> <span class="op">=</span>
|
||||
<span class="ident">problem_type</span>.<span class="ident">count</span>(<span class="ident">after</span>.<span class="ident">problems_per_trip</span>.<span class="ident">get</span>(<span class="kw-2">&</span><span class="ident">id</span>).<span class="ident">unwrap_or</span>(<span class="kw-2">&</span><span class="ident">empty</span>)) <span class="kw">as</span> <span class="ident">isize</span>;
|
||||
<span class="kw">if</span> <span class="op">!</span><span class="self">self</span>.<span class="ident">include_no_changes</span>() <span class="op">&&</span> <span class="ident">count_after</span> <span class="op">=</span><span class="op">=</span> <span class="ident">count_before</span> {
|
||||
<span class="kw">continue</span>;
|
||||
}
|
||||
<span class="ident">points</span>.<span class="ident">push</span>((<span class="ident">time_after</span>, <span class="ident">count_after</span> <span class="op">-</span> <span class="ident">count_before</span>));
|
||||
}
|
||||
}
|
||||
<span class="ident">points</span>
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">finished_trip_count</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">app</span>: <span class="kw-2">&</span><span class="ident">App</span>) <span class="op">-</span><span class="op">></span> <span class="ident">usize</span> {
|
||||
<span class="kw">let</span> <span class="ident">before</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">prebaked</span>();
|
||||
<span class="kw">let</span> <span class="ident">after</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">sim</span>.<span class="ident">get_analytics</span>();
|
||||
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">count</span> <span class="op">=</span> <span class="number">0</span>;
|
||||
<span class="kw">for</span> (<span class="kw">_</span>, <span class="kw">_</span>, <span class="kw">_</span>, <span class="ident">mode</span>) <span class="kw">in</span> <span class="ident">after</span>.<span class="ident">both_finished_trips</span>(<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">sim</span>.<span class="ident">time</span>(), <span class="ident">before</span>) {
|
||||
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">includes_mode</span>(<span class="kw-2">&</span><span class="ident">mode</span>) {
|
||||
<span class="ident">count</span> <span class="op">+</span><span class="op">=</span> <span class="number">1</span>;
|
||||
}
|
||||
}
|
||||
<span class="ident">count</span>
|
||||
}
|
||||
}
|
||||
|
||||
<span class="ident">lazy_static</span>::<span class="macro">lazy_static</span><span class="macro">!</span> {
|
||||
<span class="kw">static</span> <span class="kw-2">ref</span> <span class="ident">CLEAR_COLOR_SCALE</span>: <span class="ident">ColorScale</span> <span class="op">=</span> <span class="ident">ColorScale</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="ident">Color</span>::<span class="ident">CLEAR</span>, <span class="ident">Color</span>::<span class="ident">CLEAR</span>]);
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">problem_matrix</span>(<span class="ident">ctx</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&</span><span class="ident">App</span>, <span class="ident">trips</span>: <span class="kw-2">&</span>[(<span class="ident">Duration</span>, <span class="ident">isize</span>)]) <span class="op">-</span><span class="op">></span> <span class="ident">Widget</span> {
|
||||
<span class="kw">let</span> <span class="ident">points</span> <span class="op">=</span> <span class="ident">trips</span>;
|
||||
|
||||
<span class="kw">let</span> <span class="ident">duration_buckets</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Duration</span>::<span class="ident">ZERO</span>,
|
||||
<span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">5</span>),
|
||||
<span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">15</span>),
|
||||
<span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">30</span>),
|
||||
<span class="ident">Duration</span>::<span class="ident">hours</span>(<span class="number">1</span>),
|
||||
<span class="ident">Duration</span>::<span class="ident">hours</span>(<span class="number">2</span>),
|
||||
];
|
||||
|
||||
<span class="kw">let</span> <span class="ident">num_buckets</span> <span class="op">=</span> <span class="number">7</span>;
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">matrix</span> <span class="op">=</span> <span class="ident">Matrix</span>::<span class="ident">new</span>(<span class="ident">duration_buckets</span>, <span class="ident">bucketize_isizes</span>(<span class="ident">num_buckets</span>, <span class="kw-2">&</span><span class="ident">points</span>));
|
||||
<span class="kw">for</span> (<span class="ident">x</span>, <span class="ident">y</span>) <span class="kw">in</span> <span class="ident">points</span> {
|
||||
<span class="ident">matrix</span>.<span class="ident">add_pt</span>(<span class="kw-2">*</span><span class="ident">x</span>, <span class="kw-2">*</span><span class="ident">y</span>);
|
||||
}
|
||||
<span class="ident">matrix</span>.<span class="ident">draw</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="ident">app</span>,
|
||||
<span class="ident">MatrixOptions</span> {
|
||||
<span class="ident">total_width</span>: <span class="number">600.0</span>,
|
||||
<span class="ident">total_height</span>: <span class="number">600.0</span>,
|
||||
<span class="ident">color_scale_for_bucket</span>: <span class="ident">Box</span>::<span class="ident">new</span>(<span class="op">|</span><span class="ident">app</span>, <span class="kw">_</span>, <span class="ident">n</span><span class="op">|</span> <span class="kw">match</span> <span class="ident">n</span>.<span class="ident">cmp</span>(<span class="kw-2">&</span><span class="number">0</span>) {
|
||||
<span class="ident">std</span>::<span class="ident">cmp</span>::<span class="ident">Ordering</span>::<span class="ident">Equal</span> <span class="op">=</span><span class="op">></span> <span class="kw-2">&</span><span class="ident">CLEAR_COLOR_SCALE</span>,
|
||||
<span class="ident">std</span>::<span class="ident">cmp</span>::<span class="ident">Ordering</span>::<span class="ident">Less</span> <span class="op">=</span><span class="op">></span> <span class="kw-2">&</span><span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">good_to_bad_green</span>,
|
||||
<span class="ident">std</span>::<span class="ident">cmp</span>::<span class="ident">Ordering</span>::<span class="ident">Greater</span> <span class="op">=</span><span class="op">></span> <span class="kw-2">&</span><span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">good_to_bad_red</span>,
|
||||
}),
|
||||
<span class="ident">tooltip_for_bucket</span>: <span class="ident">Box</span>::<span class="ident">new</span>(<span class="op">|</span>(<span class="ident">t1</span>, <span class="ident">t2</span>), (<span class="ident">problems1</span>, <span class="ident">problems2</span>), <span class="ident">count</span><span class="op">|</span> {
|
||||
<span class="kw">let</span> <span class="ident">trip_string</span> <span class="op">=</span> <span class="kw">if</span> <span class="ident">count</span> <span class="op">=</span><span class="op">=</span> <span class="number">1</span> {
|
||||
<span class="string">"1 trip"</span>.<span class="ident">to_string</span>()
|
||||
} <span class="kw">else</span> {
|
||||
<span class="macro">format</span><span class="macro">!</span>(<span class="string">"{} trips"</span>, <span class="ident">prettyprint_usize</span>(<span class="ident">count</span>))
|
||||
};
|
||||
<span class="kw">let</span> <span class="ident">duration_string</span> <span class="op">=</span> <span class="kw">match</span> (<span class="ident">t1</span>, <span class="ident">t2</span>) {
|
||||
(<span class="prelude-val">None</span>, <span class="prelude-val">Some</span>(<span class="ident">end</span>)) <span class="op">=</span><span class="op">></span> <span class="macro">format</span><span class="macro">!</span>(<span class="string">"shorter than {}"</span>, <span class="ident">end</span>),
|
||||
(<span class="prelude-val">Some</span>(<span class="ident">start</span>), <span class="prelude-val">None</span>) <span class="op">=</span><span class="op">></span> <span class="macro">format</span><span class="macro">!</span>(<span class="string">"longer than {}"</span>, <span class="ident">start</span>),
|
||||
(<span class="prelude-val">Some</span>(<span class="ident">start</span>), <span class="prelude-val">Some</span>(<span class="ident">end</span>)) <span class="op">=</span><span class="op">></span> <span class="macro">format</span><span class="macro">!</span>(<span class="string">"between {} and {}"</span>, <span class="ident">start</span>, <span class="ident">end</span>),
|
||||
(<span class="prelude-val">None</span>, <span class="prelude-val">None</span>) <span class="op">=</span><span class="op">></span> {
|
||||
<span class="macro">unreachable</span><span class="macro">!</span>(<span class="string">"at least one end of the duration range must be specified"</span>)
|
||||
}
|
||||
};
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">txt</span> <span class="op">=</span> <span class="ident">Text</span>::<span class="ident">from</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">"{} {}"</span>, <span class="ident">trip_string</span>, <span class="ident">duration_string</span>));
|
||||
<span class="ident">txt</span>.<span class="ident">add_line</span>(<span class="kw">match</span> <span class="ident">problems1</span>.<span class="ident">cmp</span>(<span class="kw-2">&</span><span class="number">0</span>) {
|
||||
<span class="ident">std</span>::<span class="ident">cmp</span>::<span class="ident">Ordering</span>::<span class="ident">Equal</span> <span class="op">=</span><span class="op">></span> {
|
||||
<span class="string">"had no change in the number of problems encountered."</span>.<span class="ident">to_string</span>()
|
||||
}
|
||||
<span class="ident">std</span>::<span class="ident">cmp</span>::<span class="ident">Ordering</span>::<span class="ident">Less</span> <span class="op">=</span><span class="op">></span> {
|
||||
<span class="kw">if</span> <span class="ident">problems1</span>.<span class="ident">abs</span>() <span class="op">=</span><span class="op">=</span> <span class="ident">problems2</span>.<span class="ident">abs</span>() <span class="op">+</span> <span class="number">1</span> {
|
||||
<span class="kw">if</span> <span class="ident">problems1</span>.<span class="ident">abs</span>() <span class="op">=</span><span class="op">=</span> <span class="number">1</span> {
|
||||
<span class="string">"encountered 1 fewer problem."</span>.<span class="ident">to_string</span>()
|
||||
} <span class="kw">else</span> {
|
||||
<span class="macro">format</span><span class="macro">!</span>(<span class="string">"encountered {} fewer problems."</span>, <span class="ident">problems1</span>.<span class="ident">abs</span>())
|
||||
}
|
||||
} <span class="kw">else</span> {
|
||||
<span class="macro">format</span><span class="macro">!</span>(
|
||||
<span class="string">"encountered {}-{} fewer problems."</span>,
|
||||
<span class="ident">problems2</span>.<span class="ident">abs</span>() <span class="op">+</span> <span class="number">1</span>,
|
||||
<span class="ident">problems1</span>.<span class="ident">abs</span>()
|
||||
)
|
||||
}
|
||||
}
|
||||
<span class="ident">std</span>::<span class="ident">cmp</span>::<span class="ident">Ordering</span>::<span class="ident">Greater</span> <span class="op">=</span><span class="op">></span> {
|
||||
<span class="kw">if</span> <span class="ident">problems1</span> <span class="op">=</span><span class="op">=</span> <span class="ident">problems2</span> <span class="op">-</span> <span class="number">1</span> {
|
||||
<span class="kw">if</span> <span class="ident">problems1</span> <span class="op">=</span><span class="op">=</span> <span class="number">1</span> {
|
||||
<span class="string">"encountered 1 more problems."</span>.<span class="ident">to_string</span>()
|
||||
} <span class="kw">else</span> {
|
||||
<span class="macro">format</span><span class="macro">!</span>(<span class="string">"encountered {} more problems."</span>, <span class="ident">problems1</span>,)
|
||||
}
|
||||
} <span class="kw">else</span> {
|
||||
<span class="macro">format</span><span class="macro">!</span>(<span class="string">"encountered {}-{} more problems."</span>, <span class="ident">problems1</span>, <span class="ident">problems2</span> <span class="op">-</span> <span class="number">1</span>)
|
||||
}
|
||||
}
|
||||
});
|
||||
<span class="ident">txt</span>
|
||||
}),
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Aka a 2D histogram. Counts the number of matching points in each cell.</span>
|
||||
<span class="kw">struct</span> <span class="ident">Matrix</span><span class="op"><</span><span class="ident">X</span>, <span class="ident">Y</span><span class="op">></span> {
|
||||
<span class="ident">counts</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">usize</span><span class="op">></span>,
|
||||
<span class="ident">buckets_x</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">X</span><span class="op">></span>,
|
||||
<span class="ident">buckets_y</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">Y</span><span class="op">></span>,
|
||||
}
|
||||
|
||||
<span class="kw">impl</span><span class="op"><</span><span class="ident">X</span>: <span class="ident">Copy</span> <span class="op">+</span> <span class="ident">PartialOrd</span> <span class="op">+</span> <span class="ident">Display</span>, <span class="ident">Y</span>: <span class="ident">Copy</span> <span class="op">+</span> <span class="ident">PartialOrd</span> <span class="op">+</span> <span class="ident">Display</span><span class="op">></span> <span class="ident">Matrix</span><span class="op"><</span><span class="ident">X</span>, <span class="ident">Y</span><span class="op">></span> {
|
||||
<span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">buckets_x</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">X</span><span class="op">></span>, <span class="ident">buckets_y</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">Y</span><span class="op">></span>) <span class="op">-</span><span class="op">></span> <span class="ident">Matrix</span><span class="op"><</span><span class="ident">X</span>, <span class="ident">Y</span><span class="op">></span> {
|
||||
<span class="ident">Matrix</span> {
|
||||
<span class="ident">counts</span>: <span class="ident">std</span>::<span class="ident">iter</span>::<span class="ident">repeat</span>(<span class="number">0</span>)
|
||||
.<span class="ident">take</span>(<span class="ident">buckets_x</span>.<span class="ident">len</span>() <span class="op">*</span> <span class="ident">buckets_y</span>.<span class="ident">len</span>())
|
||||
.<span class="ident">collect</span>(),
|
||||
<span class="ident">buckets_x</span>,
|
||||
<span class="ident">buckets_y</span>,
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">add_pt</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">x</span>: <span class="ident">X</span>, <span class="ident">y</span>: <span class="ident">Y</span>) {
|
||||
<span class="comment">// Find its bucket</span>
|
||||
<span class="comment">// TODO Unit test this</span>
|
||||
<span class="kw">let</span> <span class="ident">x_idx</span> <span class="op">=</span> <span class="self">self</span>
|
||||
.<span class="ident">buckets_x</span>
|
||||
.<span class="ident">iter</span>()
|
||||
.<span class="ident">position</span>(<span class="op">|</span><span class="ident">min</span><span class="op">|</span> <span class="kw-2">*</span><span class="ident">min</span> <span class="op">></span> <span class="ident">x</span>)
|
||||
.<span class="ident">unwrap_or</span>(<span class="self">self</span>.<span class="ident">buckets_x</span>.<span class="ident">len</span>())
|
||||
<span class="op">-</span> <span class="number">1</span>;
|
||||
<span class="kw">let</span> <span class="ident">y_idx</span> <span class="op">=</span> <span class="self">self</span>
|
||||
.<span class="ident">buckets_y</span>
|
||||
.<span class="ident">iter</span>()
|
||||
.<span class="ident">position</span>(<span class="op">|</span><span class="ident">min</span><span class="op">|</span> <span class="kw-2">*</span><span class="ident">min</span> <span class="op">></span> <span class="ident">y</span>)
|
||||
.<span class="ident">unwrap_or</span>(<span class="self">self</span>.<span class="ident">buckets_y</span>.<span class="ident">len</span>())
|
||||
<span class="op">-</span> <span class="number">1</span>;
|
||||
<span class="kw">let</span> <span class="ident">idx</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">idx</span>(<span class="ident">x_idx</span>, <span class="ident">y_idx</span>);
|
||||
<span class="self">self</span>.<span class="ident">counts</span>[<span class="ident">idx</span>] <span class="op">+</span><span class="op">=</span> <span class="number">1</span>;
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">idx</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">x</span>: <span class="ident">usize</span>, <span class="ident">y</span>: <span class="ident">usize</span>) <span class="op">-</span><span class="op">></span> <span class="ident">usize</span> {
|
||||
<span class="comment">// Row-major</span>
|
||||
<span class="ident">y</span> <span class="op">*</span> <span class="self">self</span>.<span class="ident">buckets_x</span>.<span class="ident">len</span>() <span class="op">+</span> <span class="ident">x</span>
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">draw</span>(<span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&</span><span class="ident">App</span>, <span class="ident">opts</span>: <span class="ident">MatrixOptions</span><span class="op"><</span><span class="ident">X</span>, <span class="ident">Y</span><span class="op">></span>) <span class="op">-</span><span class="op">></span> <span class="ident">Widget</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</span>::<span class="ident">new</span>();
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">tooltips</span> <span class="op">=</span> <span class="ident">Vec</span>::<span class="ident">new</span>();
|
||||
<span class="kw">let</span> <span class="ident">cell_width</span> <span class="op">=</span> <span class="ident">opts</span>.<span class="ident">total_width</span> <span class="op">/</span> (<span class="self">self</span>.<span class="ident">buckets_x</span>.<span class="ident">len</span>() <span class="kw">as</span> <span class="ident">f64</span>);
|
||||
<span class="kw">let</span> <span class="ident">cell_height</span> <span class="op">=</span> <span class="ident">opts</span>.<span class="ident">total_height</span> <span class="op">/</span> (<span class="self">self</span>.<span class="ident">buckets_y</span>.<span class="ident">len</span>() <span class="kw">as</span> <span class="ident">f64</span>);
|
||||
<span class="kw">let</span> <span class="ident">cell</span> <span class="op">=</span> <span class="ident">Polygon</span>::<span class="ident">rectangle</span>(<span class="ident">cell_width</span>, <span class="ident">cell_height</span>);
|
||||
|
||||
<span class="kw">let</span> <span class="ident">max_count</span> <span class="op">=</span> <span class="kw-2">*</span><span class="self">self</span>.<span class="ident">counts</span>.<span class="ident">iter</span>().<span class="ident">max</span>().<span class="ident">unwrap</span>() <span class="kw">as</span> <span class="ident">f64</span>;
|
||||
|
||||
<span class="kw">for</span> <span class="ident">x</span> <span class="kw">in</span> <span class="number">0</span>..<span class="self">self</span>.<span class="ident">buckets_x</span>.<span class="ident">len</span>() <span class="op">-</span> <span class="number">1</span> {
|
||||
<span class="kw">for</span> <span class="ident">y</span> <span class="kw">in</span> <span class="number">0</span>..<span class="self">self</span>.<span class="ident">buckets_y</span>.<span class="ident">len</span>() <span class="op">-</span> <span class="number">1</span> {
|
||||
<span class="kw">let</span> <span class="ident">is_first_xbucket</span> <span class="op">=</span> <span class="ident">x</span> <span class="op">=</span><span class="op">=</span> <span class="number">0</span>;
|
||||
<span class="kw">let</span> <span class="ident">is_last_xbucket</span> <span class="op">=</span> <span class="ident">x</span> <span class="op">=</span><span class="op">=</span> <span class="self">self</span>.<span class="ident">buckets_x</span>.<span class="ident">len</span>() <span class="op">-</span> <span class="number">2</span>;
|
||||
<span class="kw">let</span> <span class="ident">is_middle_ybucket</span> <span class="op">=</span> <span class="ident">y</span> <span class="op">+</span> <span class="number">1</span> <span class="op">=</span><span class="op">=</span> <span class="self">self</span>.<span class="ident">buckets_y</span>.<span class="ident">len</span>() <span class="op">/</span> <span class="number">2</span>;
|
||||
<span class="kw">let</span> <span class="ident">count</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">counts</span>[<span class="self">self</span>.<span class="ident">idx</span>(<span class="ident">x</span>, <span class="ident">y</span>)];
|
||||
<span class="kw">let</span> <span class="ident">color</span> <span class="op">=</span> <span class="kw">if</span> <span class="ident">count</span> <span class="op">=</span><span class="op">=</span> <span class="number">0</span> {
|
||||
<span class="ident">widgetry</span>::<span class="ident">Color</span>::<span class="ident">CLEAR</span>
|
||||
} <span class="kw">else</span> {
|
||||
<span class="kw">let</span> <span class="ident">density_pct</span> <span class="op">=</span> (<span class="ident">count</span> <span class="kw">as</span> <span class="ident">f64</span>) <span class="op">/</span> <span class="ident">max_count</span>;
|
||||
(<span class="ident">opts</span>.<span class="ident">color_scale_for_bucket</span>)(<span class="ident">app</span>, <span class="self">self</span>.<span class="ident">buckets_x</span>[<span class="ident">x</span>], <span class="self">self</span>.<span class="ident">buckets_y</span>[<span class="ident">y</span>])
|
||||
.<span class="ident">eval</span>(<span class="ident">density_pct</span>)
|
||||
};
|
||||
<span class="kw">let</span> <span class="ident">x1</span> <span class="op">=</span> <span class="ident">cell_width</span> <span class="op">*</span> (<span class="ident">x</span> <span class="kw">as</span> <span class="ident">f64</span>);
|
||||
<span class="kw">let</span> <span class="ident">y1</span> <span class="op">=</span> <span class="ident">cell_height</span> <span class="op">*</span> (<span class="ident">y</span> <span class="kw">as</span> <span class="ident">f64</span>);
|
||||
<span class="kw">let</span> <span class="ident">rect</span> <span class="op">=</span> <span class="ident">cell</span>.<span class="ident">clone</span>().<span class="ident">translate</span>(<span class="ident">x1</span>, <span class="ident">y1</span>);
|
||||
<span class="ident">batch</span>.<span class="ident">push</span>(<span class="ident">color</span>, <span class="ident">rect</span>.<span class="ident">clone</span>());
|
||||
<span class="ident">batch</span>.<span class="ident">append</span>(
|
||||
<span class="ident">Text</span>::<span class="ident">from</span>(<span class="kw">if</span> <span class="ident">count</span> <span class="op">=</span><span class="op">=</span> <span class="number">0</span> <span class="op">&&</span> <span class="ident">is_middle_ybucket</span> {
|
||||
<span class="string">"-"</span>.<span class="ident">to_string</span>()
|
||||
} <span class="kw">else</span> {
|
||||
<span class="ident">abbreviated_format</span>(<span class="ident">count</span>)
|
||||
})
|
||||
.<span class="ident">change_fg</span>(<span class="kw">if</span> <span class="ident">count</span> <span class="op">=</span><span class="op">=</span> <span class="number">0</span> <span class="op">|</span><span class="op">|</span> <span class="ident">is_middle_ybucket</span> {
|
||||
<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">text_primary_color</span>
|
||||
} <span class="kw">else</span> {
|
||||
<span class="ident">Color</span>::<span class="ident">WHITE</span>
|
||||
})
|
||||
.<span class="ident">render</span>(<span class="ident">ctx</span>)
|
||||
.<span class="ident">centered_on</span>(<span class="ident">Pt2D</span>::<span class="ident">new</span>(<span class="ident">x1</span> <span class="op">+</span> <span class="ident">cell_width</span> <span class="op">/</span> <span class="number">2.0</span>, <span class="ident">y1</span> <span class="op">+</span> <span class="ident">cell_height</span> <span class="op">/</span> <span class="number">2.0</span>)),
|
||||
);
|
||||
|
||||
<span class="kw">if</span> <span class="ident">count</span> <span class="op">!</span><span class="op">=</span> <span class="number">0</span> <span class="op">|</span><span class="op">|</span> <span class="op">!</span><span class="ident">is_middle_ybucket</span> {
|
||||
<span class="ident">tooltips</span>.<span class="ident">push</span>((
|
||||
<span class="ident">rect</span>,
|
||||
(<span class="ident">opts</span>.<span class="ident">tooltip_for_bucket</span>)(
|
||||
(
|
||||
<span class="kw">if</span> <span class="ident">is_first_xbucket</span> {
|
||||
<span class="prelude-val">None</span>
|
||||
} <span class="kw">else</span> {
|
||||
<span class="prelude-val">Some</span>(<span class="self">self</span>.<span class="ident">buckets_x</span>[<span class="ident">x</span>])
|
||||
},
|
||||
<span class="kw">if</span> <span class="ident">is_last_xbucket</span> {
|
||||
<span class="prelude-val">None</span>
|
||||
} <span class="kw">else</span> {
|
||||
<span class="prelude-val">Some</span>(<span class="self">self</span>.<span class="ident">buckets_x</span>[<span class="ident">x</span> <span class="op">+</span> <span class="number">1</span>])
|
||||
},
|
||||
),
|
||||
(<span class="self">self</span>.<span class="ident">buckets_y</span>[<span class="ident">y</span>], <span class="self">self</span>.<span class="ident">buckets_y</span>[<span class="ident">y</span> <span class="op">+</span> <span class="number">1</span>]),
|
||||
<span class="ident">count</span>,
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<span class="comment">// Axis Labels</span>
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">y_axis_label</span> <span class="op">=</span> <span class="ident">Text</span>::<span class="ident">from</span>(<span class="string">"More Problems <--------> Fewer Problems"</span>)
|
||||
.<span class="ident">change_fg</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">text_secondary_color</span>)
|
||||
.<span class="ident">render</span>(<span class="ident">ctx</span>)
|
||||
.<span class="ident">rotate</span>(<span class="ident">Angle</span>::<span class="ident">degrees</span>(<span class="op">-</span><span class="number">90.0</span>));
|
||||
<span class="ident">y_axis_label</span>.<span class="ident">autocrop_dims</span> <span class="op">=</span> <span class="bool-val">true</span>;
|
||||
<span class="ident">y_axis_label</span> <span class="op">=</span> <span class="ident">y_axis_label</span>.<span class="ident">autocrop</span>();
|
||||
|
||||
<span class="kw">let</span> <span class="ident">x_axis_label</span> <span class="op">=</span> <span class="ident">Text</span>::<span class="ident">from</span>(<span class="string">" Short Trips <--------> Long Trips"</span>)
|
||||
.<span class="ident">change_fg</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">text_secondary_color</span>)
|
||||
.<span class="ident">render</span>(<span class="ident">ctx</span>);
|
||||
|
||||
<span class="kw">let</span> <span class="ident">vmargin</span> <span class="op">=</span> <span class="number">32.0</span>;
|
||||
<span class="kw">for</span> (<span class="ident">polygon</span>, <span class="kw">_</span>) <span class="kw">in</span> <span class="ident">tooltips</span>.<span class="ident">iter_mut</span>() {
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">translated</span> <span class="op">=</span>
|
||||
<span class="ident">polygon</span>.<span class="ident">translate</span>(<span class="ident">vmargin</span> <span class="op">+</span> <span class="ident">y_axis_label</span>.<span class="ident">get_bounds</span>().<span class="ident">width</span>(), <span class="number">0.0</span>);
|
||||
<span class="ident">std</span>::<span class="ident">mem</span>::<span class="ident">swap</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">translated</span>, <span class="ident">polygon</span>);
|
||||
}
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">row</span> <span class="op">=</span> <span class="ident">GeomBatchStack</span>::<span class="ident">horizontal</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="ident">y_axis_label</span>, <span class="ident">batch</span>]);
|
||||
<span class="ident">row</span>.<span class="ident">set_spacing</span>(<span class="ident">vmargin</span>);
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">chart</span> <span class="op">=</span> <span class="ident">GeomBatchStack</span>::<span class="ident">vertical</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="ident">row</span>.<span class="ident">batch</span>(), <span class="ident">x_axis_label</span>]);
|
||||
<span class="ident">chart</span>.<span class="ident">set_spacing</span>(<span class="number">16</span>);
|
||||
|
||||
<span class="ident">DrawWithTooltips</span>::<span class="ident">new_widget</span>(<span class="ident">ctx</span>, <span class="ident">chart</span>.<span class="ident">batch</span>(), <span class="ident">tooltips</span>, <span class="ident">Box</span>::<span class="ident">new</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">GeomBatch</span>::<span class="ident">new</span>()))
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">struct</span> <span class="ident">MatrixOptions</span><span class="op"><</span><span class="ident">X</span>, <span class="ident">Y</span><span class="op">></span> {
|
||||
<span class="ident">total_width</span>: <span class="ident">f64</span>,
|
||||
<span class="ident">total_height</span>: <span class="ident">f64</span>,
|
||||
<span class="ident">color_scale_for_bucket</span>: <span class="ident">Box</span><span class="op"><</span><span class="kw">dyn</span> <span class="ident">Fn</span>(<span class="kw-2">&</span><span class="ident">App</span>, <span class="ident">X</span>, <span class="ident">Y</span>) <span class="op">-</span><span class="op">></span> <span class="kw-2">&</span><span class="ident">ColorScale</span><span class="op">></span>,
|
||||
<span class="ident">tooltip_for_bucket</span>: <span class="ident">Box</span><span class="op"><</span><span class="kw">dyn</span> <span class="ident">Fn</span>((<span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">X</span><span class="op">></span>, <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">X</span><span class="op">></span>), (<span class="ident">Y</span>, <span class="ident">Y</span>), <span class="ident">usize</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Text</span><span class="op">></span>,
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">bucketize_isizes</span>(<span class="ident">max_buckets</span>: <span class="ident">usize</span>, <span class="ident">pts</span>: <span class="kw-2">&</span>[(<span class="ident">Duration</span>, <span class="ident">isize</span>)]) <span class="op">-</span><span class="op">></span> <span class="ident">Vec</span><span class="op"><</span><span class="ident">isize</span><span class="op">></span> {
|
||||
<span class="macro">debug_assert</span><span class="macro">!</span>(
|
||||
<span class="ident">max_buckets</span> <span class="op">%</span> <span class="number">2</span> <span class="op">=</span><span class="op">=</span> <span class="number">1</span>,
|
||||
<span class="string">"num_buckets must be odd to have a symmetrical number of buckets around axis"</span>
|
||||
);
|
||||
<span class="macro">debug_assert</span><span class="macro">!</span>(<span class="ident">max_buckets</span> <span class="op">></span><span class="op">=</span> <span class="number">3</span>, <span class="string">"num_buckets must be at least 3"</span>);
|
||||
|
||||
<span class="kw">let</span> <span class="ident">positive_buckets</span> <span class="op">=</span> (<span class="ident">max_buckets</span> <span class="op">-</span> <span class="number">1</span>) <span class="op">/</span> <span class="number">2</span>;
|
||||
<span class="comment">// uniformly sized integer buckets</span>
|
||||
<span class="kw">let</span> <span class="ident">max</span> <span class="op">=</span> <span class="kw">match</span> <span class="ident">pts</span>.<span class="ident">iter</span>().<span class="ident">max_by_key</span>(<span class="op">|</span>(<span class="kw">_</span>, <span class="ident">cnt</span>)<span class="op">|</span> <span class="ident">cnt</span>.<span class="ident">abs</span>()) {
|
||||
<span class="prelude-val">Some</span>(<span class="ident">t</span>) <span class="kw">if</span> (<span class="ident">t</span>.<span class="number">1</span>.<span class="ident">abs</span>() <span class="kw">as</span> <span class="ident">usize</span>) <span class="op">></span><span class="op">=</span> <span class="ident">positive_buckets</span> <span class="op">=</span><span class="op">></span> <span class="ident">t</span>.<span class="number">1</span>.<span class="ident">abs</span>(),
|
||||
<span class="kw">_</span> <span class="op">=</span><span class="op">></span> {
|
||||
<span class="comment">// Enforce a bucket width of at least 1.</span>
|
||||
<span class="kw">let</span> <span class="ident">negative_buckets</span> <span class="op">=</span> <span class="op">-</span>(<span class="ident">positive_buckets</span> <span class="kw">as</span> <span class="ident">isize</span>);
|
||||
<span class="kw">return</span> (<span class="ident">negative_buckets</span>..<span class="op">=</span>(<span class="ident">positive_buckets</span> <span class="kw">as</span> <span class="ident">isize</span> <span class="op">+</span> <span class="number">1</span>)).<span class="ident">collect</span>();
|
||||
}
|
||||
};
|
||||
|
||||
<span class="kw">let</span> <span class="ident">bucket_size</span> <span class="op">=</span> (<span class="ident">max</span> <span class="kw">as</span> <span class="ident">f64</span> <span class="op">/</span> <span class="ident">positive_buckets</span> <span class="kw">as</span> <span class="ident">f64</span>).<span class="ident">ceil</span>() <span class="kw">as</span> <span class="ident">isize</span>;
|
||||
|
||||
<span class="comment">// we start with a 0-based bucket, and build the other buckets out from that.</span>
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buckets</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[<span class="number">0</span>];
|
||||
|
||||
<span class="kw">for</span> <span class="ident">i</span> <span class="kw">in</span> <span class="number">0</span>..<span class="op">=</span><span class="ident">positive_buckets</span> {
|
||||
<span class="comment">// the first positive bucket starts at `1`, to ensure that the 0 bucket stands alone</span>
|
||||
<span class="ident">buckets</span>.<span class="ident">push</span>(<span class="number">1</span> <span class="op">+</span> (<span class="ident">i</span> <span class="kw">as</span> <span class="ident">isize</span>) <span class="op">*</span> <span class="ident">bucket_size</span>);
|
||||
}
|
||||
<span class="kw">for</span> <span class="ident">i</span> <span class="kw">in</span> <span class="number">1</span>..<span class="op">=</span><span class="ident">positive_buckets</span> {
|
||||
<span class="ident">buckets</span>.<span class="ident">push</span>(<span class="op">-</span>(<span class="ident">i</span> <span class="kw">as</span> <span class="ident">isize</span>) <span class="op">*</span> <span class="ident">bucket_size</span>);
|
||||
}
|
||||
<span class="ident">buckets</span>.<span class="ident">sort_unstable</span>();
|
||||
<span class="macro">debug</span><span class="macro">!</span>(<span class="string">"buckets: {:?}"</span>, <span class="ident">buckets</span>);
|
||||
|
||||
<span class="ident">buckets</span>
|
||||
}
|
||||
|
||||
<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">test</span>)]</span>
|
||||
<span class="kw">mod</span> <span class="ident">tests</span> {
|
||||
<span class="kw">use</span> <span class="kw">super</span>::<span class="kw-2">*</span>;
|
||||
|
||||
<span class="attribute">#[<span class="ident">test</span>]</span>
|
||||
<span class="kw">fn</span> <span class="ident">test_bucketize_isizes</span>() {
|
||||
<span class="kw">let</span> <span class="ident">buckets</span> <span class="op">=</span> <span class="ident">bucketize_isizes</span>(
|
||||
<span class="number">7</span>,
|
||||
<span class="kw-2">&</span><span class="macro">vec</span><span class="macro">!</span>[
|
||||
(<span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">3</span>), <span class="op">-</span><span class="number">3</span>),
|
||||
(<span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">3</span>), <span class="op">-</span><span class="number">3</span>),
|
||||
(<span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">3</span>), <span class="op">-</span><span class="number">1</span>),
|
||||
(<span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">3</span>), <span class="number">2</span>),
|
||||
(<span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">3</span>), <span class="number">5</span>),
|
||||
],
|
||||
);
|
||||
<span class="comment">// there should be an even number of buckets on either side of zero so as to center</span>
|
||||
<span class="comment">// our x-axis.</span>
|
||||
<span class="comment">//</span>
|
||||
<span class="comment">// there should always be a 0-1 bucket, ensuring that only '0' falls into the zero-bucket.</span>
|
||||
<span class="comment">//</span>
|
||||
<span class="comment">// all other buckets edges should be evenly spaced from the zero bucket</span>
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">buckets</span>, <span class="macro">vec</span><span class="macro">!</span>[<span class="op">-</span><span class="number">6</span>, <span class="op">-</span><span class="number">4</span>, <span class="op">-</span><span class="number">2</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">7</span>])
|
||||
}
|
||||
|
||||
<span class="attribute">#[<span class="ident">test</span>]</span>
|
||||
<span class="kw">fn</span> <span class="ident">test_bucketize_empty_isizes</span>() {
|
||||
<span class="kw">let</span> <span class="ident">buckets</span> <span class="op">=</span> <span class="ident">bucketize_isizes</span>(<span class="number">7</span>, <span class="kw-2">&</span><span class="macro">vec</span><span class="macro">!</span>[]);
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">buckets</span>, <span class="macro">vec</span><span class="macro">!</span>[<span class="op">-</span><span class="number">2</span>, <span class="op">-</span><span class="number">1</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>])
|
||||
}
|
||||
|
||||
<span class="attribute">#[<span class="ident">test</span>]</span>
|
||||
<span class="kw">fn</span> <span class="ident">test_bucketize_small_isizes</span>() {
|
||||
<span class="kw">let</span> <span class="ident">buckets</span> <span class="op">=</span> <span class="ident">bucketize_isizes</span>(
|
||||
<span class="number">7</span>,
|
||||
<span class="kw-2">&</span><span class="macro">vec</span><span class="macro">!</span>[
|
||||
(<span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">3</span>), <span class="op">-</span><span class="number">1</span>),
|
||||
(<span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">3</span>), <span class="op">-</span><span class="number">1</span>),
|
||||
(<span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">3</span>), <span class="number">0</span>),
|
||||
(<span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">3</span>), <span class="op">-</span><span class="number">1</span>),
|
||||
(<span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">3</span>), <span class="number">0</span>),
|
||||
],
|
||||
);
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">buckets</span>, <span class="macro">vec</span><span class="macro">!</span>[<span class="op">-</span><span class="number">3</span>, <span class="op">-</span><span class="number">2</span>, <span class="op">-</span><span class="number">1</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>])
|
||||
}
|
||||
}
|
||||
</pre></div>
|
||||
</section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="game" data-search-js="../../../../search-index.js"></div>
|
||||
<script src="../../../../main.js"></script><script src="../../../../source-script.js"></script><script src="../../../../source-files.js"></script></body></html>
|
@ -785,7 +785,7 @@
|
||||
.<span class="ident">text</span>(<span class="string">"Repeat schedule multiple days"</span>)
|
||||
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
|
||||
]));
|
||||
<span class="ident">rows</span>.<span class="ident">push</span>(<span class="ident">Widget</span>::<span class="ident">horiz_separator</span>(<span class="ident">ctx</span>, <span class="number">0.5</span>));
|
||||
<span class="ident">rows</span>.<span class="ident">push</span>(<span class="ident">Widget</span>::<span class="ident">horiz_separator</span>(<span class="ident">ctx</span>, <span class="number">1.0</span>));
|
||||
<span class="ident">rows</span>.<span class="ident">push</span>(
|
||||
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">ctx</span>.<span class="ident">style</span>()
|
||||
@ -939,7 +939,7 @@
|
||||
<span class="string">"Departing until:"</span>.<span class="ident">text_widget</span>(<span class="ident">ctx</span>),
|
||||
<span class="ident">Slider</span>::<span class="ident">area</span>(<span class="ident">ctx</span>, <span class="number">0.25</span> <span class="op">*</span> <span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">window_width</span>, <span class="number">0.3</span>).<span class="ident">named</span>(<span class="string">"depart to"</span>),
|
||||
]),
|
||||
<span class="ident">Widget</span>::<span class="ident">horiz_separator</span>(<span class="ident">ctx</span>, <span class="number">0.5</span>),
|
||||
<span class="ident">Widget</span>::<span class="ident">horiz_separator</span>(<span class="ident">ctx</span>, <span class="number">1.0</span>),
|
||||
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="string">"Change to trip type:"</span>.<span class="ident">text_widget</span>(<span class="ident">ctx</span>),
|
||||
<span class="ident">Widget</span>::<span class="ident">dropdown</span>(<span class="ident">ctx</span>, <span class="string">"to_mode"</span>, <span class="prelude-val">Some</span>(<span class="ident">TripMode</span>::<span class="ident">Bike</span>), {
|
||||
|
@ -575,9 +575,9 @@
|
||||
.<span class="ident">build_widget</span>(<span class="ident">ctx</span>, <span class="string">"search"</span>),
|
||||
<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_plain</span>.<span class="ident">text</span>(<span class="string">"About"</span>).<span class="ident">build_def</span>(<span class="ident">ctx</span>),
|
||||
]),
|
||||
<span class="ident">Widget</span>::<span class="ident">horiz_separator</span>(<span class="ident">ctx</span>, <span class="number">0.3</span>),
|
||||
<span class="ident">Widget</span>::<span class="ident">horiz_separator</span>(<span class="ident">ctx</span>, <span class="number">1.0</span>),
|
||||
<span class="self">self</span>.<span class="ident">calculate_tags</span>(<span class="ident">ctx</span>, <span class="ident">app</span>),
|
||||
<span class="ident">Widget</span>::<span class="ident">horiz_separator</span>(<span class="ident">ctx</span>, <span class="number">0.3</span>),
|
||||
<span class="ident">Widget</span>::<span class="ident">horiz_separator</span>(<span class="ident">ctx</span>, <span class="number">1.0</span>),
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="kw-2">ref</span> <span class="ident">b</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">businesses</span> {
|
||||
<span class="ident">biz_search_panel</span>.<span class="ident">unwrap_or_else</span>(<span class="op">|</span><span class="op">|</span> <span class="ident">b</span>.<span class="ident">render</span>(<span class="ident">ctx</span>).<span class="ident">named</span>(<span class="string">"Search for businesses"</span>))
|
||||
} <span class="kw">else</span> {
|
||||
|
@ -460,7 +460,7 @@
|
||||
.<span class="ident">bg</span>(<span class="ident">Color</span>::<span class="ident">BLACK</span>)
|
||||
.<span class="ident">padding</span>(<span class="number">15</span>)
|
||||
.<span class="ident">outline</span>((<span class="number">5.0</span>, <span class="ident">Color</span>::<span class="ident">YELLOW</span>))
|
||||
.<span class="ident">force_width_pct</span>(<span class="self">self</span>, <span class="ident">Percent</span>::<span class="ident">int</span>(<span class="number">30</span>))
|
||||
.<span class="ident">force_width_window_pct</span>(<span class="self">self</span>, <span class="ident">Percent</span>::<span class="ident">int</span>(<span class="number">30</span>))
|
||||
.<span class="ident">margin_below</span>(<span class="number">5</span>),
|
||||
<span class="ident">GeomBatch</span>::<span class="ident">from</span>(<span class="macro">vec</span><span class="macro">!</span>[(<span class="ident">Color</span>::<span class="ident">grey</span>(<span class="number">0.5</span>), <span class="ident">Polygon</span>::<span class="ident">rectangle</span>(<span class="number">10.0</span>, <span class="number">100.0</span>))])
|
||||
.<span class="ident">into_widget</span>(<span class="self">self</span>)
|
||||
|
@ -850,6 +850,13 @@
|
||||
<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><div class="example-wrap"><pre class="rust ">
|
||||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">collections</span>::<span class="ident">HashSet</span>;
|
||||
|
||||
@ -1057,11 +1064,15 @@
|
||||
<span class="self">self</span>.<span class="ident">layout</span>.<span class="ident">style</span>.<span class="ident">size</span>.<span class="ident">width</span> <span class="op">=</span> <span class="ident">Dimension</span>::<span class="ident">Points</span>(<span class="ident">width</span> <span class="kw">as</span> <span class="ident">f32</span>);
|
||||
<span class="self">self</span>
|
||||
}
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">force_width_pct</span>(<span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&</span><span class="ident">EventCtx</span>, <span class="ident">width</span>: <span class="ident">Percent</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Widget</span> {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">force_width_window_pct</span>(<span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&</span><span class="ident">EventCtx</span>, <span class="ident">width</span>: <span class="ident">Percent</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Widget</span> {
|
||||
<span class="self">self</span>.<span class="ident">layout</span>.<span class="ident">style</span>.<span class="ident">size</span>.<span class="ident">width</span> <span class="op">=</span>
|
||||
<span class="ident">Dimension</span>::<span class="ident">Points</span>((<span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">window_width</span> <span class="op">*</span> <span class="ident">width</span>.<span class="ident">inner</span>()) <span class="kw">as</span> <span class="ident">f32</span>);
|
||||
<span class="self">self</span>
|
||||
}
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">force_width_parent_pct</span>(<span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">width</span>: <span class="ident">f64</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Widget</span> {
|
||||
<span class="self">self</span>.<span class="ident">layout</span>.<span class="ident">style</span>.<span class="ident">size</span>.<span class="ident">width</span> <span class="op">=</span> <span class="ident">Dimension</span>::<span class="ident">Percent</span>(<span class="ident">width</span> <span class="kw">as</span> <span class="ident">f32</span>);
|
||||
<span class="self">self</span>
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Needed for force_width.</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">get_width_for_forcing</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">f64</span> {
|
||||
@ -1363,12 +1374,15 @@
|
||||
(<span class="ident">batch</span>, <span class="ident">hitbox</span>)
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">horiz_separator</span>(<span class="ident">ctx</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">pct_width</span>: <span class="ident">f64</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Widget</span> {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">horiz_separator</span>(<span class="ident">ctx</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">pct_container_width</span>: <span class="ident">f64</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Widget</span> {
|
||||
<span class="ident">GeomBatch</span>::<span class="ident">from</span>(<span class="macro">vec</span><span class="macro">!</span>[(
|
||||
<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_outline</span>.<span class="ident">fg</span>,
|
||||
<span class="ident">Polygon</span>::<span class="ident">rectangle</span>(<span class="ident">pct_width</span> <span class="op">*</span> <span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">window_width</span>, <span class="number">2.0</span>),
|
||||
<span class="ident">Polygon</span>::<span class="ident">rectangle</span>(<span class="number">0.0</span>, <span class="number">2.0</span>),
|
||||
)])
|
||||
.<span class="ident">into_widget</span>(<span class="ident">ctx</span>)
|
||||
.<span class="ident">container</span>()
|
||||
.<span class="ident">bg</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_outline</span>.<span class="ident">fg</span>)
|
||||
.<span class="ident">force_width_parent_pct</span>(<span class="ident">pct_container_width</span>)
|
||||
.<span class="ident">centered_horiz</span>()
|
||||
}
|
||||
|
||||
|
@ -1,23 +1,23 @@
|
||||
<!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>widgetry::EdgeInsets - 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 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../widgetry/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Struct EdgeInsets</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><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><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.uniform">uniform</a><a href="#method.zero">zero</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Copy">Copy</a><a href="#impl-Debug">Debug</a><a href="#impl-Default">Default</a><a href="#impl-From%3CEdgeInsets%3E">From<EdgeInsets></a><a href="#impl-From%3Cf64%3E">From<f64></a><a href="#impl-From%3Cusize%3E">From<usize></a><a href="#impl-PartialEq%3CEdgeInsets%3E">PartialEq<EdgeInsets></a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-IsDefault">IsDefault</a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><p class="location"><a href="index.html">widgetry</a></p><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"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><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" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../settings.html"><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></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#791-796" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct EdgeInsets {
|
||||
<a id="settings-menu" href="../settings.html"><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></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#798-803" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct EdgeInsets {
|
||||
pub top: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>,
|
||||
pub left: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>,
|
||||
pub bottom: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>,
|
||||
pub right: <a class="primitive" href="https://doc.rust-lang.org/nightly/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/nightly/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/nightly/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/nightly/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/nightly/std/primitive.f64.html">f64</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#798-816" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.zero" class="method"><code>pub fn <a href="#method.zero" class="fnname">zero</a>() -> Self</code><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#799-806" title="goto source code">[src]</a></h4><h4 id="method.uniform" class="method"><code>pub fn <a href="#method.uniform" class="fnname">uniform</a>(inset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> Self</code><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#808-815" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#790" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#790" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
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/nightly/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/nightly/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/nightly/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/nightly/std/primitive.f64.html">f64</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#805-823" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.zero" class="method"><code>pub fn <a href="#method.zero" class="fnname">zero</a>() -> Self</code><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#806-813" title="goto source code">[src]</a></h4><h4 id="method.uniform" class="method"><code>pub fn <a href="#method.uniform" class="fnname">uniform</a>(inset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> Self</code><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#815-822" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#797" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#797" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id="method.clone_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></div><h3 id="impl-Copy" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-Copy" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#790" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#790" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#790" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id="impl-Default" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-Default" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#790" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.default" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default" class="fnname">default</a>() -> <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#790" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></p>
|
||||
</div></div><h3 id="impl-From%3CEdgeInsets%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a>> for Rect<Dimension></code><a href="#impl-From%3CEdgeInsets%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#840-849" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from-2" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(insets: <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a>) -> Rect<Dimension></code><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#841-848" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-From%3Cf64%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>> for <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-From%3Cf64%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#829-838" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from-1" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(uniform_size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#830-837" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-From%3Cusize%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>> for <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-From%3Cusize%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#818-827" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(uniform_size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#819-826" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-PartialEq%3CEdgeInsets%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a>> for <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-PartialEq%3CEdgeInsets%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#790" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.eq" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#790" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
|
||||
</div></div><h3 id="impl-Copy" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-Copy" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#797" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#797" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#797" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id="impl-Default" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-Default" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#797" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.default" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default" class="fnname">default</a>() -> <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#797" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></p>
|
||||
</div></div><h3 id="impl-From%3CEdgeInsets%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a>> for Rect<Dimension></code><a href="#impl-From%3CEdgeInsets%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#847-856" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from-2" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(insets: <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a>) -> Rect<Dimension></code><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#848-855" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-From%3Cf64%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>> for <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-From%3Cf64%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#836-845" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from-1" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(uniform_size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#837-844" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-From%3Cusize%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>> for <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-From%3Cusize%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#825-834" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(uniform_size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#826-833" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-PartialEq%3CEdgeInsets%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a>> for <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-PartialEq%3CEdgeInsets%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#797" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.eq" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#797" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
|
||||
by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
||||
</div><h4 id="method.ne" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: &<a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#790" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
|
||||
</div></div><h3 id="impl-StructuralPartialEq" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-StructuralPartialEq" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#790" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-Send" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-Sync" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-Unpin" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#131-135" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div><h4 id="method.ne" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: &<a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#797" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
|
||||
</div></div><h3 id="impl-StructuralPartialEq" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-StructuralPartialEq" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/mod.rs.html#797" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-Send" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-Sync" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-Unpin" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#131-135" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||
</div></div><h3 id="impl-Downcast" class="impl"><code class="in-band">impl<T> Downcast for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a>, </span></code><a href="#impl-Downcast" class="anchor"></a></h3><div class="impl-items"><h4 id="method.into_any" class="method hidden"><code>pub fn <a href="#method.into_any" class="fnname">into_any</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><T, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>></code></h4><div class='docblock hidden'><p>Convert <code>Box<dyn Trait></code> (where <code>Trait: Downcast</code>) to <code>Box<dyn Any></code>. <code>Box<dyn Any></code> can
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `widgets` mod in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, widgets"><title>widgetry::widgets - 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 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module widgets</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#reexports">Re-exports</a></li><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#constants">Constants</a></li><li><a href="#traits">Traits</a></li></ul></div><p class="location"><a href="../index.html">widgetry</a></p><div id="sidebar-vars" data-name="widgets" 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"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><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" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><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="">widgets</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#1-849" title="goto source code">[src]</a></span></h1><h2 id="reexports" class="section-header"><a href="#reexports">Re-exports</a></h2>
|
||||
<a id="settings-menu" href="../../settings.html"><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="">widgets</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#1-856" title="goto source code">[src]</a></span></h1><h2 id="reexports" class="section-header"><a href="#reexports">Re-exports</a></h2>
|
||||
<table><tr><td><code>pub use crate::widgets::panel::<a class="struct" href="../../widgetry/widgets/panel/struct.Panel.html" title="struct widgetry::widgets::panel::Panel">Panel</a>;</code></td></tr></table><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2>
|
||||
<table><tr class="module-item"><td><a class="mod" href="autocomplete/index.html" title="widgetry::widgets::autocomplete mod">autocomplete</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="button/index.html" title="widgetry::widgets::button mod">button</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="compare_times/index.html" title="widgetry::widgets::compare_times mod">compare_times</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="containers/index.html" title="widgetry::widgets::containers mod">containers</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="dropdown/index.html" title="widgetry::widgets::dropdown mod">dropdown</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="fan_chart/index.html" title="widgetry::widgets::fan_chart mod">fan_chart</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="filler/index.html" title="widgetry::widgets::filler mod">filler</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="image/index.html" title="widgetry::widgets::image mod">image</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="just_draw/index.html" title="widgetry::widgets::just_draw mod">just_draw</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="line_plot/index.html" title="widgetry::widgets::line_plot mod">line_plot</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="menu/index.html" title="widgetry::widgets::menu mod">menu</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="panel/index.html" title="widgetry::widgets::panel mod">panel</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="persistent_split/index.html" title="widgetry::widgets::persistent_split mod">persistent_split</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="plots/index.html" title="widgetry::widgets::plots mod">plots</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="scatter_plot/index.html" title="widgetry::widgets::scatter_plot mod">scatter_plot</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="slider/index.html" title="widgetry::widgets::slider mod">slider</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="spinner/index.html" title="widgetry::widgets::spinner mod">spinner</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="stash/index.html" title="widgetry::widgets::stash mod">stash</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="table/index.html" title="widgetry::widgets::table mod">table</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="tabs/index.html" title="widgetry::widgets::tabs mod">tabs</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="text_box/index.html" title="widgetry::widgets::text_box mod">text_box</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="toggle/index.html" title="widgetry::widgets::toggle mod">toggle</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.EdgeInsets.html" title="widgetry::widgets::EdgeInsets struct">EdgeInsets</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.LayoutStyle.html" title="widgetry::widgets::LayoutStyle struct">LayoutStyle</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.Widget.html" title="widgetry::widgets::Widget struct">Widget</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.WidgetOutput.html" title="widgetry::widgets::WidgetOutput struct">WidgetOutput</a></td><td class="docblock-short"></td></tr></table><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2>
|
||||
|
@ -1,23 +1,23 @@
|
||||
<!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>widgetry::widgets::EdgeInsets - 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 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Struct EdgeInsets</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><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><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.uniform">uniform</a><a href="#method.zero">zero</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Copy">Copy</a><a href="#impl-Debug">Debug</a><a href="#impl-Default">Default</a><a href="#impl-From%3CEdgeInsets%3E">From<EdgeInsets></a><a href="#impl-From%3Cf64%3E">From<f64></a><a href="#impl-From%3Cusize%3E">From<usize></a><a href="#impl-PartialEq%3CEdgeInsets%3E">PartialEq<EdgeInsets></a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-IsDefault">IsDefault</a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><p class="location"><a href="../index.html">widgetry</a>::<wbr><a href="index.html">widgets</a></p><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"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><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" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><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">widgets</a>::<wbr><a class="struct" href="">EdgeInsets</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#791-796" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct EdgeInsets {
|
||||
<a id="settings-menu" href="../../settings.html"><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">widgets</a>::<wbr><a class="struct" href="">EdgeInsets</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#798-803" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct EdgeInsets {
|
||||
pub top: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>,
|
||||
pub left: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>,
|
||||
pub bottom: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>,
|
||||
pub right: <a class="primitive" href="https://doc.rust-lang.org/nightly/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/nightly/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/nightly/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/nightly/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/nightly/std/primitive.f64.html">f64</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#798-816" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.zero" class="method"><code>pub fn <a href="#method.zero" class="fnname">zero</a>() -> Self</code><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#799-806" title="goto source code">[src]</a></h4><h4 id="method.uniform" class="method"><code>pub fn <a href="#method.uniform" class="fnname">uniform</a>(inset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> Self</code><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#808-815" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#790" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#790" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
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/nightly/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/nightly/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/nightly/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/nightly/std/primitive.f64.html">f64</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#805-823" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.zero" class="method"><code>pub fn <a href="#method.zero" class="fnname">zero</a>() -> Self</code><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#806-813" title="goto source code">[src]</a></h4><h4 id="method.uniform" class="method"><code>pub fn <a href="#method.uniform" class="fnname">uniform</a>(inset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> Self</code><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#815-822" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#797" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#797" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id="method.clone_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></div><h3 id="impl-Copy" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-Copy" class="anchor"></a><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#790" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#790" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#790" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id="impl-Default" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-Default" class="anchor"></a><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#790" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.default" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default" class="fnname">default</a>() -> <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#790" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></p>
|
||||
</div></div><h3 id="impl-From%3CEdgeInsets%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a>> for Rect<Dimension></code><a href="#impl-From%3CEdgeInsets%3E" class="anchor"></a><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#840-849" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from-2" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(insets: <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a>) -> Rect<Dimension></code><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#841-848" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-From%3Cf64%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>> for <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-From%3Cf64%3E" class="anchor"></a><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#829-838" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from-1" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(uniform_size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#830-837" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-From%3Cusize%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>> for <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-From%3Cusize%3E" class="anchor"></a><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#818-827" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(uniform_size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#819-826" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-PartialEq%3CEdgeInsets%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a>> for <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-PartialEq%3CEdgeInsets%3E" class="anchor"></a><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#790" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.eq" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#790" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
|
||||
</div></div><h3 id="impl-Copy" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-Copy" class="anchor"></a><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#797" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#797" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#797" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id="impl-Default" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-Default" class="anchor"></a><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#797" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.default" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default" class="fnname">default</a>() -> <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#797" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></p>
|
||||
</div></div><h3 id="impl-From%3CEdgeInsets%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a>> for Rect<Dimension></code><a href="#impl-From%3CEdgeInsets%3E" class="anchor"></a><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#847-856" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from-2" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(insets: <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a>) -> Rect<Dimension></code><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#848-855" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-From%3Cf64%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>> for <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-From%3Cf64%3E" class="anchor"></a><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#836-845" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from-1" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(uniform_size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#837-844" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-From%3Cusize%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>> for <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-From%3Cusize%3E" class="anchor"></a><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#825-834" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(uniform_size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#826-833" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-PartialEq%3CEdgeInsets%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a>> for <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-PartialEq%3CEdgeInsets%3E" class="anchor"></a><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#797" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.eq" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#797" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
|
||||
by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
||||
</div><h4 id="method.ne" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: &<a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#790" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
|
||||
</div></div><h3 id="impl-StructuralPartialEq" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-StructuralPartialEq" class="anchor"></a><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#790" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-Send" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-Sync" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-Unpin" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#131-135" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div><h4 id="method.ne" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: &<a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#797" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
|
||||
</div></div><h3 id="impl-StructuralPartialEq" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-StructuralPartialEq" class="anchor"></a><a class="srclink" href="../../src/widgetry/widgets/mod.rs.html#797" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-Send" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-Sync" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-Unpin" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#131-135" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||
</div></div><h3 id="impl-Downcast" class="impl"><code class="in-band">impl<T> Downcast for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a>, </span></code><a href="#impl-Downcast" class="anchor"></a></h3><div class="impl-items"><h4 id="method.into_any" class="method hidden"><code>pub fn <a href="#method.into_any" class="fnname">into_any</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><T, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>></code></h4><div class='docblock hidden'><p>Convert <code>Box<dyn Trait></code> (where <code>Trait: Downcast</code>) to <code>Box<dyn Any></code>. <code>Box<dyn Any></code> can
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user