mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-25 23:43:25 +03:00
deploy: f14b7eb9e7
This commit is contained in:
parent
73e49a1ec5
commit
6cb14631ef
File diff suppressed because one or more lines are too long
@ -347,8 +347,8 @@ call this to handle all other events. <a href="#method.other_event">Read more</a
|
|||||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw-59" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ungap/explore.rs.html#136-139" title="goto source code">[src]</a></div><a href="#method.draw-59" class="anchor"></a><h4 class="code-header">fn <a class="fnname">draw</a>(&self, g: &mut GfxCtx<'_>, app: &<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>)</h4></div></summary><div class='docblock'><p>Draw</p>
|
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw-59" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ungap/explore.rs.html#136-139" title="goto source code">[src]</a></div><a href="#method.draw-59" class="anchor"></a><h4 class="code-header">fn <a class="fnname">draw</a>(&self, g: &mut GfxCtx<'_>, app: &<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>)</h4></div></summary><div class='docblock'><p>Draw</p>
|
||||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw_baselayer-58" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.draw_baselayer-58" class="anchor"></a><h4 class="code-header">fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&self) -> DrawBaselayer</h4></div></summary><div class='docblock'><p>Specifies what to draw before draw()</p>
|
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw_baselayer-58" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.draw_baselayer-58" class="anchor"></a><h4 class="code-header">fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&self) -> DrawBaselayer</h4></div></summary><div class='docblock'><p>Specifies what to draw before draw()</p>
|
||||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.on_destroy-58" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.on_destroy-58" class="anchor"></a><h4 class="code-header">fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&mut self, &mut EventCtx<'_>, <a class="primitive" href="https://doc.rust-lang.org/1.55.0/std/primitive.reference.html">&mut </a>A)</h4></div></summary><div class='docblock'><p>Before this state is popped or replaced, call this.</p>
|
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.on_destroy-58" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.on_destroy-58" class="anchor"></a><h4 class="code-header">fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&mut self, &mut EventCtx<'_>, <a class="primitive" href="https://doc.rust-lang.org/1.55.0/std/primitive.reference.html">&mut </a>A)</h4></div></summary><div class='docblock'><p>Before this state is popped or replaced, call this.</p>
|
||||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-State%3CApp%3E-59" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ungap/predict.rs.html#65-88" title="goto source code">[src]</a></div><a href="#impl-State%3CApp%3E-59" class="anchor"></a><h3 class="code-header in-band">impl State<<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>> for <a class="struct" href="../ungap/predict/struct.ShowGaps.html" title="struct game::ungap::predict::ShowGaps">ShowGaps</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event-59" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ungap/predict.rs.html#66-83" title="goto source code">[src]</a></div><a href="#method.event-59" class="anchor"></a><h4 class="code-header">fn <a class="fnname">event</a>(&mut self, ctx: &mut EventCtx<'_>, app: &mut <a class="struct" href="struct.App.html" title="struct game::app::App">App</a>) -> Transition<<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>></h4></div></summary><div class='docblock'><p>Respond to a UI event, such as input or time passing.</p>
|
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-State%3CApp%3E-59" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ungap/predict.rs.html#77-139" title="goto source code">[src]</a></div><a href="#impl-State%3CApp%3E-59" class="anchor"></a><h3 class="code-header in-band">impl State<<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>> for <a class="struct" href="../ungap/predict/struct.ShowGaps.html" title="struct game::ungap::predict::ShowGaps">ShowGaps</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event-59" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ungap/predict.rs.html#78-123" title="goto source code">[src]</a></div><a href="#method.event-59" class="anchor"></a><h4 class="code-header">fn <a class="fnname">event</a>(&mut self, ctx: &mut EventCtx<'_>, app: &mut <a class="struct" href="struct.App.html" title="struct game::app::App">App</a>) -> Transition<<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>></h4></div></summary><div class='docblock'><p>Respond to a UI event, such as input or time passing.</p>
|
||||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw-60" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ungap/predict.rs.html#85-87" title="goto source code">[src]</a></div><a href="#method.draw-60" class="anchor"></a><h4 class="code-header">fn <a class="fnname">draw</a>(&self, g: &mut GfxCtx<'_>, _: &<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>)</h4></div></summary><div class='docblock'><p>Draw</p>
|
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw-60" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ungap/predict.rs.html#125-138" title="goto source code">[src]</a></div><a href="#method.draw-60" class="anchor"></a><h4 class="code-header">fn <a class="fnname">draw</a>(&self, g: &mut GfxCtx<'_>, app: &<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>)</h4></div></summary><div class='docblock'><p>Draw</p>
|
||||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw_baselayer-59" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.draw_baselayer-59" class="anchor"></a><h4 class="code-header">fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&self) -> DrawBaselayer</h4></div></summary><div class='docblock'><p>Specifies what to draw before draw()</p>
|
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw_baselayer-59" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.draw_baselayer-59" class="anchor"></a><h4 class="code-header">fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&self) -> DrawBaselayer</h4></div></summary><div class='docblock'><p>Specifies what to draw before draw()</p>
|
||||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.on_destroy-59" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.on_destroy-59" class="anchor"></a><h4 class="code-header">fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&mut self, &mut EventCtx<'_>, <a class="primitive" href="https://doc.rust-lang.org/1.55.0/std/primitive.reference.html">&mut </a>A)</h4></div></summary><div class='docblock'><p>Before this state is popped or replaced, call this.</p>
|
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.on_destroy-59" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.on_destroy-59" class="anchor"></a><h4 class="code-header">fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&mut self, &mut EventCtx<'_>, <a class="primitive" href="https://doc.rust-lang.org/1.55.0/std/primitive.reference.html">&mut </a>A)</h4></div></summary><div class='docblock'><p>Before this state is popped or replaced, call this.</p>
|
||||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-State%3CApp%3E-6" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/debug/floodfill.rs.html#81-117" title="goto source code">[src]</a></div><a href="#impl-State%3CApp%3E-6" class="anchor"></a><h3 class="code-header in-band">impl State<<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>> for <a class="struct" href="../debug/floodfill/struct.Floodfiller.html" title="struct game::debug::floodfill::Floodfiller">Floodfiller</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event-6" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/debug/floodfill.rs.html#82-107" title="goto source code">[src]</a></div><a href="#method.event-6" class="anchor"></a><h4 class="code-header">fn <a class="fnname">event</a>(&mut self, ctx: &mut EventCtx<'_>, app: &mut <a class="struct" href="struct.App.html" title="struct game::app::App">App</a>) -> Transition<<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>></h4></div></summary><div class='docblock'><p>Respond to a UI event, such as input or time passing.</p>
|
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-State%3CApp%3E-6" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/debug/floodfill.rs.html#81-117" title="goto source code">[src]</a></div><a href="#impl-State%3CApp%3E-6" class="anchor"></a><h3 class="code-header in-band">impl State<<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>> for <a class="struct" href="../debug/floodfill/struct.Floodfiller.html" title="struct game::debug::floodfill::Floodfiller">Floodfiller</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event-6" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/debug/floodfill.rs.html#82-107" title="goto source code">[src]</a></div><a href="#method.event-6" class="anchor"></a><h4 class="code-header">fn <a class="fnname">event</a>(&mut self, ctx: &mut EventCtx<'_>, app: &mut <a class="struct" href="struct.App.html" title="struct game::app::App">App</a>) -> Transition<<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>></h4></div></summary><div class='docblock'><p>Respond to a UI event, such as input or time passing.</p>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="The build time in RFC2822, UTC."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>BUILT_TIME_UTC in game::pregame::built_info - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a></h2><div id="sidebar-vars" data-name="BUILT_TIME_UTC" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input"name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="#">BUILT_TIME_UTC</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-0716a03cc01a18cb/out/built.rs.html#78" 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/1.55.0/std/primitive.str.html">str</a> = r"Mon, 20 Sep 2021 17:18:19 +0000";</pre><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The build time in RFC2822, UTC.</p>
|
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="The build time in RFC2822, UTC."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>BUILT_TIME_UTC in game::pregame::built_info - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a></h2><div id="sidebar-vars" data-name="BUILT_TIME_UTC" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input"name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="#">BUILT_TIME_UTC</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-0716a03cc01a18cb/out/built.rs.html#78" 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/1.55.0/std/primitive.str.html">str</a> = r"Mon, 20 Sep 2021 21:50:47 +0000";</pre><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The build time in RFC2822, UTC.</p>
|
||||||
</div></details></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
|
</div></details></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
|
||||||
<script src="../../../main.js"></script>
|
<script src="../../../main.js"></script>
|
||||||
</body></html>
|
</body></html>
|
@ -1,3 +1,3 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `make_top_panel` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, make_top_panel"><title>make_top_panel in game::ungap::predict - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">game</a>::<wbr><a href="../index.html">ungap</a>::<wbr><a href="index.html">predict</a></h2><div id="sidebar-vars" data-name="make_top_panel" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input"name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></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">ungap</a>::<wbr><a href="index.html">predict</a>::<wbr><a class="fn" href="#">make_top_panel</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/game/ungap/predict.rs.html#90-102" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn make_top_panel(ctx: &mut EventCtx<'_>, app: &<a class="struct" href="../../app/struct.App.html" title="struct game::app::App">App</a>) -> Panel</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
|
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `make_top_panel` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, make_top_panel"><title>make_top_panel in game::ungap::predict - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">game</a>::<wbr><a href="../index.html">ungap</a>::<wbr><a href="index.html">predict</a></h2><div id="sidebar-vars" data-name="make_top_panel" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input"name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></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">ungap</a>::<wbr><a href="index.html">predict</a>::<wbr><a class="fn" href="#">make_top_panel</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/game/ungap/predict.rs.html#141-163" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn make_top_panel(ctx: &mut EventCtx<'_>, app: &<a class="struct" href="../../app/struct.App.html" title="struct game::app::App">App</a>) -> Panel</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
|
||||||
<script src="../../../main.js"></script>
|
<script src="../../../main.js"></script>
|
||||||
</body></html>
|
</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 `predict` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, predict"><title>game::ungap::predict - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module predict</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="predict" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input"name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></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">ungap</a>::<wbr><a class="mod" href="#">predict</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/game/ungap/predict.rs.html#1-198" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
<!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 `predict` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, predict"><title>game::ungap::predict - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module predict</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="predict" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input"name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></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">ungap</a>::<wbr><a class="mod" href="#">predict</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/game/ungap/predict.rs.html#1-403" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
||||||
<div class="item-table"><div class="item-left module-item"><a class="struct" href="struct.CandidateTrip.html" title="game::ungap::predict::CandidateTrip struct">CandidateTrip</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="struct" href="struct.Filters.html" title="game::ungap::predict::Filters struct">Filters</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="struct" href="struct.ModeShiftData.html" title="game::ungap::predict::ModeShiftData struct">ModeShiftData</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="struct" href="struct.ShowGaps.html" title="game::ungap::predict::ShowGaps struct">ShowGaps</a></div><div class="item-right docblock-short"></div></div><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>
|
<div class="item-table"><div class="item-left module-item"><a class="struct" href="struct.CandidateTrip.html" title="game::ungap::predict::CandidateTrip struct">CandidateTrip</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="struct" href="struct.Filters.html" title="game::ungap::predict::Filters struct">Filters</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="struct" href="struct.ModeShiftData.html" title="game::ungap::predict::ModeShiftData struct">ModeShiftData</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="struct" href="struct.NetworkGaps.html" title="game::ungap::predict::NetworkGaps struct">NetworkGaps</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="struct" href="struct.ShowGaps.html" title="game::ungap::predict::ShowGaps struct">ShowGaps</a></div><div class="item-right docblock-short"></div></div><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>
|
||||||
<div class="item-table"><div class="item-left module-item"><a class="fn" href="fn.make_top_panel.html" title="game::ungap::predict::make_top_panel fn">make_top_panel</a></div><div class="item-right docblock-short"></div></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
|
<div class="item-table"><div class="item-left module-item"><a class="fn" href="fn.make_top_panel.html" title="game::ungap::predict::make_top_panel fn">make_top_panel</a></div><div class="item-right docblock-short"></div></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
|
||||||
<script src="../../../main.js"></script>
|
<script src="../../../main.js"></script>
|
||||||
</body></html>
|
</body></html>
|
@ -1 +1 @@
|
|||||||
initSidebarItems({"fn":[["make_top_panel",""]],"struct":[["CandidateTrip",""],["Filters",""],["ModeShiftData",""],["ShowGaps",""]]});
|
initSidebarItems({"fn":[["make_top_panel",""]],"struct":[["CandidateTrip",""],["Filters",""],["ModeShiftData",""],["NetworkGaps",""],["ShowGaps",""]]});
|
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
31
rustdoc/game/ungap/predict/struct.NetworkGaps.html
Normal file
31
rustdoc/game/ungap/predict/struct.NetworkGaps.html
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<!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 `NetworkGaps` struct in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, NetworkGaps"><title>NetworkGaps in game::ungap::predict - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct NetworkGaps</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield.count_per_road">count_per_road</a><a href="#structfield.draw_unzoomed">draw_unzoomed</a><a href="#structfield.draw_zoomed">draw_zoomed</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Send">!Send</a><a href="#impl-Sync">!Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-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-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><h2 class="location">Other items in<br><a href="../../index.html">game</a>::<wbr><a href="../index.html">ungap</a>::<wbr><a href="index.html">predict</a></h2><div id="sidebar-vars" data-name="NetworkGaps" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input"name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></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">ungap</a>::<wbr><a href="index.html">predict</a>::<wbr><a class="struct" href="#">NetworkGaps</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/game/ungap/predict.rs.html#194-198" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct">struct NetworkGaps {
|
||||||
|
draw_unzoomed: Drawable,
|
||||||
|
draw_zoomed: Drawable,
|
||||||
|
count_per_road: <a class="struct" href="../../../abstutil/collections/struct.Counter.html" title="struct abstutil::collections::Counter">Counter</a><<a class="struct" href="../../../map_model/objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>>,
|
||||||
|
}</pre></div><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.draw_unzoomed" class="structfield small-section-header"><a href="#structfield.draw_unzoomed" class="anchor field"></a><code>draw_unzoomed: Drawable</code></span><span id="structfield.draw_zoomed" class="structfield small-section-header"><a href="#structfield.draw_zoomed" class="anchor field"></a><code>draw_zoomed: Drawable</code></span><span id="structfield.count_per_road" class="structfield small-section-header"><a href="#structfield.count_per_road" class="anchor field"></a><code>count_per_road: <a class="struct" href="../../../abstutil/collections/struct.Counter.html" title="struct abstutil::collections::Counter">Counter</a><<a class="struct" href="../../../map_model/objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>></code></span><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-RefUnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl !<a class="trait" href="https://doc.rust-lang.org/1.55.0/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.NetworkGaps.html" title="struct game::ungap::predict::NetworkGaps">NetworkGaps</a></h3></div><div id="impl-Send" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Send" class="anchor"></a><h3 class="code-header in-band">impl !<a class="trait" href="https://doc.rust-lang.org/1.55.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.NetworkGaps.html" title="struct game::ungap::predict::NetworkGaps">NetworkGaps</a></h3></div><div id="impl-Sync" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Sync" class="anchor"></a><h3 class="code-header in-band">impl !<a class="trait" href="https://doc.rust-lang.org/1.55.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.NetworkGaps.html" title="struct game::ungap::predict::NetworkGaps">NetworkGaps</a></h3></div><div id="impl-Unpin" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Unpin" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.55.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.NetworkGaps.html" title="struct game::ungap::predict::NetworkGaps">NetworkGaps</a></h3></div><div id="impl-UnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-UnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.55.0/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.NetworkGaps.html" title="struct game::ungap::predict::NetworkGaps">NetworkGaps</a></h3></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Any" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.55.0/src/core/any.rs.html#132-136" title="goto source code">[src]</a></div><a href="#impl-Any" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.55.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.55.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.55.0/src/core/any.rs.html#133" title="goto source code">[src]</a></div><a href="#method.type_id" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.55.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.55.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.55.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||||
|
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Borrow%3CT%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.55.0/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></div><a href="#impl-Borrow%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.55.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.55.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.55.0/src/core/borrow.rs.html#210" title="goto source code">[src]</a></div><a href="#method.borrow" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.55.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.55.0/std/primitive.reference.html">&</a>T</h4></div></summary><div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.55.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||||
|
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-BorrowMut%3CT%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.55.0/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></div><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.55.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.55.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow_mut" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.55.0/src/core/borrow.rs.html#217" title="goto source code">[src]</a></div><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.55.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.55.0/std/primitive.reference.html">&mut </a>T</h4></div></summary><div class='docblock'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.55.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||||
|
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Downcast" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Downcast" class="anchor"></a><h3 class="code-header in-band">impl<T> Downcast for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.55.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into_any" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.into_any" class="anchor"></a><h4 class="code-header">pub fn <a class="fnname">into_any</a>(self: <a class="struct" href="https://doc.rust-lang.org/1.55.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><T, <a class="struct" href="https://doc.rust-lang.org/1.55.0/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>>) -> <a class="struct" href="https://doc.rust-lang.org/1.55.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/1.55.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static, <a class="struct" href="https://doc.rust-lang.org/1.55.0/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>></h4></div></summary><div class='docblock'><p>Convert <code>Box<dyn Trait></code> (where <code>Trait: Downcast</code>) to <code>Box<dyn Any></code>. <code>Box<dyn Any></code> can
|
||||||
|
then be further <code>downcast</code> into <code>Box<ConcreteType></code> where <code>ConcreteType</code> implements <code>Trait</code>. <a href="#tymethod.into_any">Read more</a></p>
|
||||||
|
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into_any_rc" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.into_any_rc" class="anchor"></a><h4 class="code-header">pub fn <a class="fnname">into_any_rc</a>(self: <a class="struct" href="https://doc.rust-lang.org/1.55.0/alloc/rc/struct.Rc.html" title="struct alloc::rc::Rc">Rc</a><T>) -> <a class="struct" href="https://doc.rust-lang.org/1.55.0/alloc/rc/struct.Rc.html" title="struct alloc::rc::Rc">Rc</a><dyn <a class="trait" href="https://doc.rust-lang.org/1.55.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static></h4></div></summary><div class='docblock'><p>Convert <code>Rc<Trait></code> (where <code>Trait: Downcast</code>) to <code>Rc<Any></code>. <code>Rc<Any></code> can then be
|
||||||
|
further <code>downcast</code> into <code>Rc<ConcreteType></code> where <code>ConcreteType</code> implements <code>Trait</code>. <a href="#tymethod.into_any_rc">Read more</a></p>
|
||||||
|
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.as_any" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.as_any" class="anchor"></a><h4 class="code-header">pub fn <a class="fnname">as_any</a>(&self) -> &(dyn <a class="trait" href="https://doc.rust-lang.org/1.55.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static)</h4></div></summary><div class='docblock'><p>Convert <code>&Trait</code> (where <code>Trait: Downcast</code>) to <code>&Any</code>. This is needed since Rust cannot
|
||||||
|
generate <code>&Any</code>’s vtable from <code>&Trait</code>’s. <a href="#tymethod.as_any">Read more</a></p>
|
||||||
|
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.as_any_mut" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.as_any_mut" class="anchor"></a><h4 class="code-header">pub fn <a class="fnname">as_any_mut</a>(&mut self) -> &mut (dyn <a class="trait" href="https://doc.rust-lang.org/1.55.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static)</h4></div></summary><div class='docblock'><p>Convert <code>&mut Trait</code> (where <code>Trait: Downcast</code>) to <code>&Any</code>. This is needed since Rust cannot
|
||||||
|
generate <code>&mut Any</code>’s vtable from <code>&mut Trait</code>’s. <a href="#tymethod.as_any_mut">Read more</a></p>
|
||||||
|
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-DowncastSync" class="impl has-srclink"><div class="rightside"></div><a href="#impl-DowncastSync" class="anchor"></a><h3 class="code-header in-band">impl<T> DowncastSync for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.55.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + <a class="trait" href="https://doc.rust-lang.org/1.55.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.55.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into_any_arc" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.into_any_arc" class="anchor"></a><h4 class="code-header">pub fn <a class="fnname">into_any_arc</a>(self: <a class="struct" href="https://doc.rust-lang.org/1.55.0/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a><T>) -> <a class="struct" href="https://doc.rust-lang.org/1.55.0/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a><dyn <a class="trait" href="https://doc.rust-lang.org/1.55.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + <a class="trait" href="https://doc.rust-lang.org/1.55.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.55.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static></h4></div></summary><div class='docblock'><p>Convert <code>Arc<Trait></code> (where <code>Trait: Downcast</code>) to <code>Arc<Any></code>. <code>Arc<Any></code> can then be
|
||||||
|
further <code>downcast</code> into <code>Arc<ConcreteType></code> where <code>ConcreteType</code> implements <code>Trait</code>. <a href="#tymethod.into_any_arc">Read more</a></p>
|
||||||
|
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-From%3CT%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.55.0/src/core/convert/mod.rs.html#546-550" title="goto source code">[src]</a></div><a href="#impl-From%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.55.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.55.0/src/core/convert/mod.rs.html#547" title="goto source code">[src]</a></div><a href="#method.from" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.55.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4></div></summary><div class='docblock'><p>Performs the conversion.</p>
|
||||||
|
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Instrument" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://docs.rs/tracing/0.1.26/src/tracing/instrument.rs.html#155" title="goto source code">[src]</a></div><a href="#impl-Instrument" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://docs.rs/tracing/0.1.26/tracing/instrument/trait.Instrument.html" title="trait tracing::instrument::Instrument">Instrument</a> for T</h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.instrument" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://docs.rs/tracing/0.1.26/src/tracing/instrument.rs.html#38" title="goto source code">[src]</a></div><a href="#method.instrument" class="anchor"></a><h4 class="code-header">fn <a href="https://docs.rs/tracing/0.1.26/tracing/instrument/trait.Instrument.html#method.instrument" class="fnname">instrument</a>(self, span: <a class="struct" href="https://docs.rs/tracing/0.1.26/tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -> <a class="struct" href="https://docs.rs/tracing/0.1.26/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></h4></div></summary><div class='docblock'><p>Instruments this type with the provided <code>Span</code>, returning an
|
||||||
|
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.26/tracing/instrument/trait.Instrument.html#method.instrument">Read more</a></p>
|
||||||
|
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.in_current_span" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://docs.rs/tracing/0.1.26/src/tracing/instrument.rs.html#74" title="goto source code">[src]</a></div><a href="#method.in_current_span" class="anchor"></a><h4 class="code-header">fn <a href="https://docs.rs/tracing/0.1.26/tracing/instrument/trait.Instrument.html#method.in_current_span" class="fnname">in_current_span</a>(self) -> <a class="struct" href="https://docs.rs/tracing/0.1.26/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></h4></div></summary><div class='docblock'><p>Instruments this type with the <a href="../struct.Span.html#method.current">current</a> <code>Span</code>, returning an
|
||||||
|
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.26/tracing/instrument/trait.Instrument.html#method.in_current_span">Read more</a></p>
|
||||||
|
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Into%3CU%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.55.0/src/core/convert/mod.rs.html#535-542" title="goto source code">[src]</a></div><a href="#impl-Into%3CU%3E" class="anchor"></a><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.55.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.55.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.55.0/src/core/convert/mod.rs.html#539" title="goto source code">[src]</a></div><a href="#method.into" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.55.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4></div></summary><div class='docblock'><p>Performs the conversion.</p>
|
||||||
|
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Same%3CT%3E" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Same%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> Same<T> for T</h3></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Output" class="type trait-impl has-srclink"><a href="#associatedtype.Output" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Output" class="type">Output</a> = T</h4></div></summary><div class='docblock'><p>Should always be <code>Self</code></p>
|
||||||
|
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-TryFrom%3CU%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.55.0/src/core/convert/mod.rs.html#583-592" title="goto source code">[src]</a></div><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.55.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.55.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error" class="type trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.55.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.55.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||||||
|
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_from" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.55.0/src/core/convert/mod.rs.html#589" title="goto source code">[src]</a></div><a href="#method.try_from" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.55.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.55.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.55.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/1.55.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></div></summary><div class='docblock'><p>Performs the conversion.</p>
|
||||||
|
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-TryInto%3CU%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.55.0/src/core/convert/mod.rs.html#569-578" title="goto source code">[src]</a></div><a href="#impl-TryInto%3CU%3E" class="anchor"></a><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.55.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.55.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error-1" class="type trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.55.0/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.55.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.55.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||||||
|
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_into" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.55.0/src/core/convert/mod.rs.html#575" title="goto source code">[src]</a></div><a href="#method.try_into" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.55.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.55.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.55.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.55.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></div></summary><div class='docblock'><p>Performs the conversion.</p>
|
||||||
|
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-VZip%3CV%3E" class="impl has-srclink"><div class="rightside"></div><a href="#impl-VZip%3CV%3E" class="anchor"></a><h3 class="code-header in-band">impl<V, T> VZip<V> for T <span class="where fmt-newline">where<br> V: MultiLane<T>, </span></h3></div></summary><div class="impl-items"><div id="method.vzip" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.vzip" class="anchor"></a><h4 class="code-header">pub fn <a class="fnname">vzip</a>(self) -> V</h4></div></div></details></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
|
||||||
|
<script src="../../../main.js"></script>
|
||||||
|
</body></html>
|
File diff suppressed because one or more lines are too long
@ -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 `TakeLayers` trait in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, TakeLayers"><title>TakeLayers in game::ungap - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../game/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Trait TakeLayers</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#required-methods">Required Methods</a></h3><div class="sidebar-links"><a href="#tymethod.take_layers">take_layers</a></div><h3 class="sidebar-title"><a href="#implementors">Implementors</a></h3></div><h2 class="location">Other items in<br><a href="../index.html">game</a>::<wbr><a href="index.html">ungap</a></h2><div id="sidebar-vars" data-name="TakeLayers" data-ty="trait" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input"name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Trait <a href="../index.html">game</a>::<wbr><a href="index.html">ungap</a>::<wbr><a class="trait" href="#">TakeLayers</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/game/ungap/mod.rs.html#31-33" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust trait">pub trait TakeLayers {
|
<!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 `TakeLayers` trait in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, TakeLayers"><title>TakeLayers in game::ungap - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../game/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Trait TakeLayers</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#required-methods">Required Methods</a></h3><div class="sidebar-links"><a href="#tymethod.take_layers">take_layers</a></div><h3 class="sidebar-title"><a href="#implementors">Implementors</a></h3></div><h2 class="location">Other items in<br><a href="../index.html">game</a>::<wbr><a href="index.html">ungap</a></h2><div id="sidebar-vars" data-name="TakeLayers" data-ty="trait" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input"name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Trait <a href="../index.html">game</a>::<wbr><a href="index.html">ungap</a>::<wbr><a class="trait" href="#">TakeLayers</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/game/ungap/mod.rs.html#31-33" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust trait">pub trait TakeLayers {
|
||||||
fn <a href="#tymethod.take_layers" class="fnname">take_layers</a>(self) -> <a class="struct" href="layers/struct.Layers.html" title="struct game::ungap::layers::Layers">Layers</a>;
|
fn <a href="#tymethod.take_layers" class="fnname">take_layers</a>(self) -> <a class="struct" href="layers/struct.Layers.html" title="struct game::ungap::layers::Layers">Layers</a>;
|
||||||
}</pre></div><h2 id="required-methods" class="small-section-header">Required methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><div id="tymethod.take_layers" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ungap/mod.rs.html#32" title="goto source code">[src]</a></div><h4 class="code-header">fn <a href="#tymethod.take_layers" class="fnname">take_layers</a>(self) -> <a class="struct" href="layers/struct.Layers.html" title="struct game::ungap::layers::Layers">Layers</a></h4></div></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><div id="impl-TakeLayers" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ungap/explore.rs.html#22-26" title="goto source code">[src]</a></div><a href="#impl-TakeLayers" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.TakeLayers.html" title="trait game::ungap::TakeLayers">TakeLayers</a> for <a class="struct" href="explore/struct.ExploreMap.html" title="struct game::ungap::explore::ExploreMap">ExploreMap</a></h3></div><div id="impl-TakeLayers-1" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ungap/predict.rs.html#19-23" title="goto source code">[src]</a></div><a href="#impl-TakeLayers-1" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.TakeLayers.html" title="trait game::ungap::TakeLayers">TakeLayers</a> for <a class="struct" href="predict/struct.ShowGaps.html" title="struct game::ungap::predict::ShowGaps">ShowGaps</a></h3></div><div id="impl-TakeLayers-2" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ungap/quick_sketch.rs.html#22-26" title="goto source code">[src]</a></div><a href="#impl-TakeLayers-2" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.TakeLayers.html" title="trait game::ungap::TakeLayers">TakeLayers</a> for <a class="struct" href="quick_sketch/struct.QuickSketch.html" title="struct game::ungap::quick_sketch::QuickSketch">QuickSketch</a></h3></div><div id="impl-TakeLayers-3" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ungap/route.rs.html#32-36" title="goto source code">[src]</a></div><a href="#impl-TakeLayers-3" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.TakeLayers.html" title="trait game::ungap::TakeLayers">TakeLayers</a> for <a class="struct" href="route/struct.RoutePlanner.html" title="struct game::ungap::route::RoutePlanner">RoutePlanner</a></h3></div></div><script type="text/javascript" src="../../implementors/game/ungap/trait.TakeLayers.js" async></script></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="game" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
|
}</pre></div><h2 id="required-methods" class="small-section-header">Required methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><div id="tymethod.take_layers" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ungap/mod.rs.html#32" title="goto source code">[src]</a></div><h4 class="code-header">fn <a href="#tymethod.take_layers" class="fnname">take_layers</a>(self) -> <a class="struct" href="layers/struct.Layers.html" title="struct game::ungap::layers::Layers">Layers</a></h4></div></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><div id="impl-TakeLayers" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ungap/explore.rs.html#22-26" title="goto source code">[src]</a></div><a href="#impl-TakeLayers" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.TakeLayers.html" title="trait game::ungap::TakeLayers">TakeLayers</a> for <a class="struct" href="explore/struct.ExploreMap.html" title="struct game::ungap::explore::ExploreMap">ExploreMap</a></h3></div><div id="impl-TakeLayers-1" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ungap/predict.rs.html#24-28" title="goto source code">[src]</a></div><a href="#impl-TakeLayers-1" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.TakeLayers.html" title="trait game::ungap::TakeLayers">TakeLayers</a> for <a class="struct" href="predict/struct.ShowGaps.html" title="struct game::ungap::predict::ShowGaps">ShowGaps</a></h3></div><div id="impl-TakeLayers-2" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ungap/quick_sketch.rs.html#22-26" title="goto source code">[src]</a></div><a href="#impl-TakeLayers-2" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.TakeLayers.html" title="trait game::ungap::TakeLayers">TakeLayers</a> for <a class="struct" href="quick_sketch/struct.QuickSketch.html" title="struct game::ungap::quick_sketch::QuickSketch">QuickSketch</a></h3></div><div id="impl-TakeLayers-3" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ungap/route.rs.html#32-36" title="goto source code">[src]</a></div><a href="#impl-TakeLayers-3" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.TakeLayers.html" title="trait game::ungap::TakeLayers">TakeLayers</a> for <a class="struct" href="route/struct.RoutePlanner.html" title="struct game::ungap::route::RoutePlanner">RoutePlanner</a></h3></div></div><script type="text/javascript" src="../../implementors/game/ungap/trait.TakeLayers.js" async></script></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="game" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
|
||||||
<script src="../../main.js"></script>
|
<script src="../../main.js"></script>
|
||||||
</body></html>
|
</body></html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
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
@ -175,7 +175,7 @@
|
|||||||
<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">r"rustdoc 1.55.0 (c8dfcfe04 2021-09-06)"</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">r"rustdoc 1.55.0 (c8dfcfe04 2021-09-06)"</span>;
|
||||||
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#"The build time in RFC2822, UTC."#</span>]</span>
|
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#"The build time in RFC2822, UTC."#</span>]</span>
|
||||||
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</span>
|
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</span>
|
||||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r"Mon, 20 Sep 2021 17:18:19 +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">r"Mon, 20 Sep 2021 21:50:47 +0000"</span>;
|
||||||
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#"The target architecture, given by `CARGO_CFG_TARGET_ARCH`."#</span>]</span>
|
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#"The target architecture, given by `CARGO_CFG_TARGET_ARCH`."#</span>]</span>
|
||||||
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</span>
|
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</span>
|
||||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CFG_TARGET_ARCH</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r"x86_64"</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">r"x86_64"</span>;
|
||||||
|
@ -196,15 +196,224 @@
|
|||||||
<span id="196">196</span>
|
<span id="196">196</span>
|
||||||
<span id="197">197</span>
|
<span id="197">197</span>
|
||||||
<span id="198">198</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>
|
||||||
</pre><pre class="rust">
|
</pre><pre class="rust">
|
||||||
<span class="kw">use</span> <span class="ident">abstutil::Timer</span>;
|
<span class="kw">use</span> <span class="ident">std::collections::HashSet</span>;
|
||||||
|
|
||||||
|
<span class="kw">use</span> <span class="ident">abstutil</span>::{<span class="ident">prettyprint_usize</span>, <span class="ident">Counter</span>, <span class="ident">Timer</span>};
|
||||||
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Distance</span>, <span class="ident">Duration</span>};
|
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Distance</span>, <span class="ident">Duration</span>};
|
||||||
<span class="kw">use</span> <span class="ident">map_gui::load::FileLoader</span>;
|
<span class="kw">use</span> <span class="ident">map_gui::load::FileLoader</span>;
|
||||||
<span class="kw">use</span> <span class="ident">map_model::Position</span>;
|
<span class="kw">use</span> <span class="ident">map_gui::tools::ColorNetwork</span>;
|
||||||
|
<span class="kw">use</span> <span class="ident">map_gui::ID</span>;
|
||||||
|
<span class="kw">use</span> <span class="ident">map_model</span>::{<span class="ident">PathRequest</span>, <span class="ident">PathStepV2</span>, <span class="ident">RoadID</span>};
|
||||||
<span class="kw">use</span> <span class="ident">sim</span>::{<span class="ident">Scenario</span>, <span class="ident">TripEndpoint</span>, <span class="ident">TripMode</span>};
|
<span class="kw">use</span> <span class="ident">sim</span>::{<span class="ident">Scenario</span>, <span class="ident">TripEndpoint</span>, <span class="ident">TripMode</span>};
|
||||||
<span class="kw">use</span> <span class="ident">widgetry</span>::{
|
<span class="kw">use</span> <span class="ident">widgetry</span>::{
|
||||||
<span class="ident">EventCtx</span>, <span class="ident">GfxCtx</span>, <span class="ident">HorizontalAlignment</span>, <span class="ident">Outcome</span>, <span class="ident">Panel</span>, <span class="ident">State</span>, <span class="ident">TextExt</span>, <span class="ident">VerticalAlignment</span>,
|
<span class="ident">Drawable</span>, <span class="ident">EventCtx</span>, <span class="ident">GfxCtx</span>, <span class="ident">HorizontalAlignment</span>, <span class="ident">Line</span>, <span class="ident">Outcome</span>, <span class="ident">Panel</span>, <span class="ident">Spinner</span>, <span class="ident">State</span>, <span class="ident">Text</span>,
|
||||||
<span class="ident">Widget</span>,
|
<span class="ident">TextExt</span>, <span class="ident">VerticalAlignment</span>, <span class="ident">Widget</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">::app</span>::{<span class="ident">App</span>, <span class="ident">Transition</span>};
|
||||||
@ -213,6 +422,7 @@
|
|||||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">ShowGaps</span> {
|
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">ShowGaps</span> {
|
||||||
<span class="ident">top_panel</span>: <span class="ident">Panel</span>,
|
<span class="ident">top_panel</span>: <span class="ident">Panel</span>,
|
||||||
<span class="ident">layers</span>: <span class="ident">Layers</span>,
|
<span class="ident">layers</span>: <span class="ident">Layers</span>,
|
||||||
|
<span class="ident">tooltip</span>: <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Text</span><span class="op">></span>,
|
||||||
}
|
}
|
||||||
|
|
||||||
<span class="kw">impl</span> <span class="ident">TakeLayers</span> <span class="kw">for</span> <span class="ident">ShowGaps</span> {
|
<span class="kw">impl</span> <span class="ident">TakeLayers</span> <span class="kw">for</span> <span class="ident">ShowGaps</span> {
|
||||||
@ -228,6 +438,7 @@
|
|||||||
<span class="kw">return</span> <span class="ident">Box::new</span>(<span class="ident">ShowGaps</span> {
|
<span class="kw">return</span> <span class="ident">Box::new</span>(<span class="ident">ShowGaps</span> {
|
||||||
<span class="ident">top_panel</span>: <span class="ident">make_top_panel</span>(<span class="ident">ctx</span>, <span class="ident">app</span>),
|
<span class="ident">top_panel</span>: <span class="ident">make_top_panel</span>(<span class="ident">ctx</span>, <span class="ident">app</span>),
|
||||||
<span class="ident">layers</span>,
|
<span class="ident">layers</span>,
|
||||||
|
<span class="ident">tooltip</span>: <span class="prelude-val">None</span>,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -240,6 +451,12 @@
|
|||||||
<span class="ident">ModeShiftData</span> {
|
<span class="ident">ModeShiftData</span> {
|
||||||
<span class="ident">all_candidate_trips</span>: <span class="ident">Vec::new</span>(),
|
<span class="ident">all_candidate_trips</span>: <span class="ident">Vec::new</span>(),
|
||||||
<span class="ident">filters</span>: <span class="ident">Filters::default</span>(),
|
<span class="ident">filters</span>: <span class="ident">Filters::default</span>(),
|
||||||
|
<span class="ident">gaps</span>: <span class="ident">NetworkGaps</span> {
|
||||||
|
<span class="ident">draw_unzoomed</span>: <span class="ident">Drawable::empty</span>(<span class="ident">ctx</span>),
|
||||||
|
<span class="ident">draw_zoomed</span>: <span class="ident">Drawable::empty</span>(<span class="ident">ctx</span>),
|
||||||
|
<span class="ident">count_per_road</span>: <span class="ident">Counter::new</span>(),
|
||||||
|
},
|
||||||
|
<span class="ident">num_filtered_trips</span>: <span class="number">0</span>,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
<span class="ident">ShowGaps::new_state</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">layers</span>)
|
<span class="ident">ShowGaps::new_state</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">layers</span>)
|
||||||
@ -250,8 +467,8 @@
|
|||||||
<span class="ident">Box::new</span>(<span class="op">|</span><span class="ident">ctx</span>, <span class="ident">app</span>, <span class="kw">_</span>, <span class="ident">maybe_scenario</span><span class="op">|</span> {
|
<span class="ident">Box::new</span>(<span class="op">|</span><span class="ident">ctx</span>, <span class="ident">app</span>, <span class="kw">_</span>, <span class="ident">maybe_scenario</span><span class="op">|</span> {
|
||||||
<span class="comment">// TODO Handle corrupt files</span>
|
<span class="comment">// TODO Handle corrupt files</span>
|
||||||
<span class="kw">let</span> <span class="ident">scenario</span> <span class="op">=</span> <span class="ident">maybe_scenario</span>.<span class="ident">unwrap</span>();
|
<span class="kw">let</span> <span class="ident">scenario</span> <span class="op">=</span> <span class="ident">maybe_scenario</span>.<span class="ident">unwrap</span>();
|
||||||
<span class="kw">let</span> <span class="ident">data</span> <span class="op">=</span> <span class="ident">ctx</span>.<span class="ident">loading_screen</span>(<span class="string">"predict mode shift"</span>, <span class="op">|</span><span class="kw">_</span>, <span class="ident">timer</span><span class="op">|</span> {
|
<span class="kw">let</span> <span class="ident">data</span> <span class="op">=</span> <span class="ident">ctx</span>.<span class="ident">loading_screen</span>(<span class="string">"predict mode shift"</span>, <span class="op">|</span><span class="ident">ctx</span>, <span class="ident">timer</span><span class="op">|</span> {
|
||||||
<span class="ident">ModeShiftData::from_scenario</span>(<span class="ident">app</span>, <span class="ident">scenario</span>, <span class="ident">timer</span>)
|
<span class="ident">ModeShiftData::from_scenario</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">scenario</span>, <span class="ident">timer</span>)
|
||||||
});
|
});
|
||||||
<span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">mode_shift</span>.<span class="ident">set</span>(<span class="ident">map_name</span>, <span class="ident">data</span>);
|
<span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">mode_shift</span>.<span class="ident">set</span>(<span class="ident">map_name</span>, <span class="ident">data</span>);
|
||||||
<span class="ident">Transition::Replace</span>(<span class="ident">ShowGaps::new_state</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">layers</span>))
|
<span class="ident">Transition::Replace</span>(<span class="ident">ShowGaps::new_state</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">layers</span>))
|
||||||
@ -264,6 +481,24 @@
|
|||||||
<span class="kw">impl</span> <span class="ident">State</span><span class="op"><</span><span class="ident">App</span><span class="op">></span> <span class="kw">for</span> <span class="ident">ShowGaps</span> {
|
<span class="kw">impl</span> <span class="ident">State</span><span class="op"><</span><span class="ident">App</span><span class="op">></span> <span class="kw">for</span> <span class="ident">ShowGaps</span> {
|
||||||
<span class="kw">fn</span> <span class="ident">event</span>(<span class="kw-2">&</span><span class="kw-2">mut</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="kw-2">mut</span> <span class="ident">App</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Transition</span> {
|
<span class="kw">fn</span> <span class="ident">event</span>(<span class="kw-2">&</span><span class="kw-2">mut</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="kw-2">mut</span> <span class="ident">App</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Transition</span> {
|
||||||
<span class="ident">ctx</span>.<span class="ident">canvas_movement</span>();
|
<span class="ident">ctx</span>.<span class="ident">canvas_movement</span>();
|
||||||
|
<span class="kw">if</span> <span class="ident">ctx</span>.<span class="ident">redo_mouseover</span>() {
|
||||||
|
<span class="self">self</span>.<span class="ident">tooltip</span> <span class="op">=</span> <span class="prelude-val">None</span>;
|
||||||
|
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">r</span>) <span class="op">=</span> <span class="kw">match</span> <span class="ident">app</span>.<span class="ident">mouseover_unzoomed_roads_and_intersections</span>(<span class="ident">ctx</span>) {
|
||||||
|
<span class="prelude-val">Some</span>(<span class="ident">ID::Road</span>(<span class="ident">r</span>)) <span class="op">=</span><span class="op">></span> <span class="prelude-val">Some</span>(<span class="ident">r</span>),
|
||||||
|
<span class="prelude-val">Some</span>(<span class="ident">ID::Lane</span>(<span class="ident">l</span>)) <span class="op">=</span><span class="op">></span> <span class="prelude-val">Some</span>(<span class="ident">l</span>.<span class="ident">road</span>),
|
||||||
|
<span class="kw">_</span> <span class="op">=</span><span class="op">></span> <span class="prelude-val">None</span>,
|
||||||
|
} {
|
||||||
|
<span class="kw">let</span> <span class="ident">data</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">mode_shift</span>.<span class="ident">value</span>().<span class="ident">unwrap</span>();
|
||||||
|
<span class="kw">let</span> <span class="ident">count</span> <span class="op">=</span> <span class="ident">data</span>.<span class="ident">gaps</span>.<span class="ident">count_per_road</span>.<span class="ident">get</span>(<span class="ident">r</span>);
|
||||||
|
<span class="kw">if</span> <span class="ident">count</span> <span class="op">></span> <span class="number">0</span> {
|
||||||
|
<span class="comment">// TODO Word more precisely... or less verbosely.</span>
|
||||||
|
<span class="self">self</span>.<span class="ident">tooltip</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Text::from</span>(<span class="ident">Line</span>(<span class="macro">format!</span>(
|
||||||
|
<span class="string">"{} trips might cross this high-stress road"</span>,
|
||||||
|
<span class="ident">prettyprint_usize</span>(<span class="ident">count</span>)
|
||||||
|
))));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
<span class="kw">match</span> <span class="self">self</span>.<span class="ident">top_panel</span>.<span class="ident">event</span>(<span class="ident">ctx</span>) {
|
<span class="kw">match</span> <span class="self">self</span>.<span class="ident">top_panel</span>.<span class="ident">event</span>(<span class="ident">ctx</span>) {
|
||||||
<span class="ident">Outcome::Clicked</span>(<span class="ident">x</span>) <span class="op">=</span><span class="op">></span> {
|
<span class="ident">Outcome::Clicked</span>(<span class="ident">x</span>) <span class="op">=</span><span class="op">></span> {
|
||||||
@ -271,6 +506,16 @@
|
|||||||
.<span class="ident">handle_action</span>::<span class="op"><</span><span class="ident">ShowGaps</span><span class="op">></span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="kw-2">&</span><span class="ident">x</span>)
|
.<span class="ident">handle_action</span>::<span class="op"><</span><span class="ident">ShowGaps</span><span class="op">></span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="kw-2">&</span><span class="ident">x</span>)
|
||||||
.<span class="ident">unwrap</span>();
|
.<span class="ident">unwrap</span>();
|
||||||
}
|
}
|
||||||
|
<span class="ident">Outcome::Changed</span>(<span class="kw">_</span>) <span class="op">=</span><span class="op">></span> {
|
||||||
|
<span class="kw">let</span> (<span class="ident">map_name</span>, <span class="kw-2">mut</span> <span class="ident">data</span>) <span class="op">=</span> <span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">mode_shift</span>.<span class="ident">take</span>().<span class="ident">unwrap</span>();
|
||||||
|
<span class="ident">data</span>.<span class="ident">filters</span> <span class="op">=</span> <span class="ident">Filters::from_controls</span>(<span class="kw-2">&</span><span class="self">self</span>.<span class="ident">top_panel</span>);
|
||||||
|
<span class="ident">ctx</span>.<span class="ident">loading_screen</span>(<span class="string">"update mode shift"</span>, <span class="op">|</span><span class="ident">ctx</span>, <span class="ident">timer</span><span class="op">|</span> {
|
||||||
|
<span class="ident">data</span>.<span class="ident">recalculate_gaps</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">timer</span>)
|
||||||
|
});
|
||||||
|
<span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">mode_shift</span>.<span class="ident">set</span>(<span class="ident">map_name</span>, <span class="ident">data</span>);
|
||||||
|
<span class="comment">// TODO This is heavy-handed for just updating the counter</span>
|
||||||
|
<span class="self">self</span>.<span class="ident">top_panel</span> <span class="op">=</span> <span class="ident">make_top_panel</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
|
||||||
|
}
|
||||||
<span class="kw">_</span> <span class="op">=</span><span class="op">></span> {}
|
<span class="kw">_</span> <span class="op">=</span><span class="op">></span> {}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -281,8 +526,19 @@
|
|||||||
<span class="ident">Transition::Keep</span>
|
<span class="ident">Transition::Keep</span>
|
||||||
}
|
}
|
||||||
|
|
||||||
<span class="kw">fn</span> <span class="ident">draw</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">g</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">GfxCtx</span>, <span class="kw">_</span>: <span class="kw-2">&</span><span class="ident">App</span>) {
|
<span class="kw">fn</span> <span class="ident">draw</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">g</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">GfxCtx</span>, <span class="ident">app</span>: <span class="kw-2">&</span><span class="ident">App</span>) {
|
||||||
<span class="self">self</span>.<span class="ident">top_panel</span>.<span class="ident">draw</span>(<span class="ident">g</span>);
|
<span class="self">self</span>.<span class="ident">top_panel</span>.<span class="ident">draw</span>(<span class="ident">g</span>);
|
||||||
|
<span class="self">self</span>.<span class="ident">layers</span>.<span class="ident">draw</span>(<span class="ident">g</span>, <span class="ident">app</span>);
|
||||||
|
|
||||||
|
<span class="kw">let</span> <span class="ident">data</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">mode_shift</span>.<span class="ident">value</span>().<span class="ident">unwrap</span>();
|
||||||
|
<span class="kw">if</span> <span class="ident">g</span>.<span class="ident">canvas</span>.<span class="ident">cam_zoom</span> <span class="op"><</span> <span class="ident">app</span>.<span class="ident">opts</span>.<span class="ident">min_zoom_for_detail</span> {
|
||||||
|
<span class="ident">g</span>.<span class="ident">redraw</span>(<span class="kw-2">&</span><span class="ident">data</span>.<span class="ident">gaps</span>.<span class="ident">draw_unzoomed</span>);
|
||||||
|
} <span class="kw">else</span> {
|
||||||
|
<span class="ident">g</span>.<span class="ident">redraw</span>(<span class="kw-2">&</span><span class="ident">data</span>.<span class="ident">gaps</span>.<span class="ident">draw_zoomed</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">txt</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">tooltip</span> {
|
||||||
|
<span class="ident">g</span>.<span class="ident">draw_mouse_tooltip</span>(<span class="ident">txt</span>.<span class="ident">clone</span>());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -292,7 +548,17 @@
|
|||||||
<span class="ident">Tab::PredictImpact</span>.<span class="ident">make_header</span>(<span class="ident">ctx</span>, <span class="ident">app</span>),
|
<span class="ident">Tab::PredictImpact</span>.<span class="ident">make_header</span>(<span class="ident">ctx</span>, <span class="ident">app</span>),
|
||||||
<span class="comment">// TODO Info button with popup explaining all the assumptions... (where scenario data comes</span>
|
<span class="comment">// TODO Info button with popup explaining all the assumptions... (where scenario data comes</span>
|
||||||
<span class="comment">// from, only driving -> cycling, no off-map starts or ends, etc)</span>
|
<span class="comment">// from, only driving -> cycling, no off-map starts or ends, etc)</span>
|
||||||
<span class="ident">abstutil::prettyprint_usize</span>(<span class="ident">data</span>.<span class="ident">all_candidate_trips</span>.<span class="ident">len</span>()).<span class="ident">text_widget</span>(<span class="ident">ctx</span>),
|
<span class="macro">format!</span>(
|
||||||
|
<span class="string">"{} candidate trips before filtering"</span>,
|
||||||
|
<span class="ident">prettyprint_usize</span>(<span class="ident">data</span>.<span class="ident">all_candidate_trips</span>.<span class="ident">len</span>())
|
||||||
|
)
|
||||||
|
.<span class="ident">text_widget</span>(<span class="ident">ctx</span>),
|
||||||
|
<span class="ident">data</span>.<span class="ident">filters</span>.<span class="ident">to_controls</span>(<span class="ident">ctx</span>),
|
||||||
|
<span class="macro">format!</span>(
|
||||||
|
<span class="string">"{} trips after filtering"</span>,
|
||||||
|
<span class="ident">prettyprint_usize</span>(<span class="ident">data</span>.<span class="ident">num_filtered_trips</span>)
|
||||||
|
)
|
||||||
|
.<span class="ident">text_widget</span>(<span class="ident">ctx</span>),
|
||||||
];
|
];
|
||||||
|
|
||||||
<span class="ident">Panel::new_builder</span>(<span class="ident">Widget::col</span>(<span class="ident">col</span>))
|
<span class="ident">Panel::new_builder</span>(<span class="ident">Widget::col</span>(<span class="ident">col</span>))
|
||||||
@ -308,11 +574,20 @@
|
|||||||
<span class="comment">// Calculated from the unedited map, not yet filtered.</span>
|
<span class="comment">// Calculated from the unedited map, not yet filtered.</span>
|
||||||
<span class="ident">all_candidate_trips</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">CandidateTrip</span><span class="op">></span>,
|
<span class="ident">all_candidate_trips</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">CandidateTrip</span><span class="op">></span>,
|
||||||
<span class="ident">filters</span>: <span class="ident">Filters</span>,
|
<span class="ident">filters</span>: <span class="ident">Filters</span>,
|
||||||
<span class="comment">// TODO Network gaps, counts (or total trip distances?) per road. Relative to the unedited map,</span>
|
<span class="comment">// From the unedited map, filtered</span>
|
||||||
<span class="comment">// but with filters applied.</span>
|
<span class="ident">gaps</span>: <span class="ident">NetworkGaps</span>,
|
||||||
|
<span class="ident">num_filtered_trips</span>: <span class="ident">usize</span>,
|
||||||
<span class="comment">// TODO Then a score, comparing those gaps with the current map edits.</span>
|
<span class="comment">// TODO Then a score, comparing those gaps with the current map edits.</span>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<span class="kw">struct</span> <span class="ident">CandidateTrip</span> {
|
||||||
|
<span class="ident">bike_req</span>: <span class="ident">PathRequest</span>,
|
||||||
|
<span class="ident">estimated_driving_time</span>: <span class="ident">Duration</span>,
|
||||||
|
<span class="ident">estimated_biking_time</span>: <span class="ident">Duration</span>,
|
||||||
|
<span class="ident">biking_distance</span>: <span class="ident">Distance</span>,
|
||||||
|
<span class="ident">total_elevation_gain</span>: <span class="ident">Distance</span>,
|
||||||
|
}
|
||||||
|
|
||||||
<span class="kw">struct</span> <span class="ident">Filters</span> {
|
<span class="kw">struct</span> <span class="ident">Filters</span> {
|
||||||
<span class="ident">max_driving_time</span>: <span class="ident">Duration</span>,
|
<span class="ident">max_driving_time</span>: <span class="ident">Duration</span>,
|
||||||
<span class="ident">max_biking_time</span>: <span class="ident">Duration</span>,
|
<span class="ident">max_biking_time</span>: <span class="ident">Duration</span>,
|
||||||
@ -320,6 +595,12 @@
|
|||||||
<span class="ident">max_elevation_gain</span>: <span class="ident">Distance</span>,
|
<span class="ident">max_elevation_gain</span>: <span class="ident">Distance</span>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<span class="kw">struct</span> <span class="ident">NetworkGaps</span> {
|
||||||
|
<span class="ident">draw_unzoomed</span>: <span class="ident">Drawable</span>,
|
||||||
|
<span class="ident">draw_zoomed</span>: <span class="ident">Drawable</span>,
|
||||||
|
<span class="ident">count_per_road</span>: <span class="ident">Counter</span><span class="op"><</span><span class="ident">RoadID</span><span class="op">></span>,
|
||||||
|
}
|
||||||
|
|
||||||
<span class="kw">impl</span> <span class="ident">Filters</span> {
|
<span class="kw">impl</span> <span class="ident">Filters</span> {
|
||||||
<span class="kw">fn</span> <span class="ident">default</span>() <span class="op">-</span><span class="op">></span> <span class="ident">Filters</span> {
|
<span class="kw">fn</span> <span class="ident">default</span>() <span class="op">-</span><span class="op">></span> <span class="ident">Filters</span> {
|
||||||
<span class="ident">Filters</span> {
|
<span class="ident">Filters</span> {
|
||||||
@ -329,21 +610,82 @@
|
|||||||
<span class="ident">max_elevation_gain</span>: <span class="ident">Distance::feet</span>(<span class="number">30.0</span>),
|
<span class="ident">max_elevation_gain</span>: <span class="ident">Distance::feet</span>(<span class="number">30.0</span>),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
<span class="kw">struct</span> <span class="ident">CandidateTrip</span> {
|
<span class="kw">fn</span> <span class="ident">apply</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">x</span>: <span class="kw-2">&</span><span class="ident">CandidateTrip</span>) <span class="op">-</span><span class="op">></span> <span class="ident">bool</span> {
|
||||||
<span class="ident">bike_from</span>: <span class="ident">Position</span>,
|
<span class="ident">x</span>.<span class="ident">estimated_driving_time</span> <span class="op"><</span><span class="op">=</span> <span class="self">self</span>.<span class="ident">max_driving_time</span>
|
||||||
<span class="ident">bike_to</span>: <span class="ident">Position</span>,
|
<span class="op">&&</span> <span class="ident">x</span>.<span class="ident">estimated_biking_time</span> <span class="op"><</span><span class="op">=</span> <span class="self">self</span>.<span class="ident">max_biking_time</span>
|
||||||
|
<span class="op">&&</span> <span class="ident">x</span>.<span class="ident">biking_distance</span> <span class="op"><</span><span class="op">=</span> <span class="self">self</span>.<span class="ident">max_biking_distance</span>
|
||||||
|
<span class="op">&&</span> <span class="ident">x</span>.<span class="ident">total_elevation_gain</span> <span class="op"><</span><span class="op">=</span> <span class="self">self</span>.<span class="ident">max_elevation_gain</span>
|
||||||
|
}
|
||||||
|
|
||||||
<span class="ident">estimated_driving_time</span>: <span class="ident">Duration</span>,
|
<span class="kw">fn</span> <span class="ident">to_controls</span>(<span class="kw-2">&</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="op">-</span><span class="op">></span> <span class="ident">Widget</span> {
|
||||||
<span class="ident">estimated_biking_time</span>: <span class="ident">Duration</span>,
|
<span class="ident">Widget::col</span>(<span class="macro">vec!</span>[
|
||||||
<span class="ident">biking_distance</span>: <span class="ident">Distance</span>,
|
<span class="ident">Widget::custom_row</span>(<span class="macro">vec!</span>[
|
||||||
<span class="ident">total_elevation_gain</span>: <span class="ident">Distance</span>,
|
<span class="ident">Widget::row</span>(<span class="macro">vec!</span>[
|
||||||
<span class="ident">total_elevation_loss</span>: <span class="ident">Distance</span>,
|
<span class="string">"Max driving time"</span>.<span class="ident">text_widget</span>(<span class="ident">ctx</span>).<span class="ident">centered_vert</span>(),
|
||||||
|
<span class="ident">Spinner::widget</span>(
|
||||||
|
<span class="ident">ctx</span>,
|
||||||
|
<span class="string">"max_driving_time"</span>,
|
||||||
|
(<span class="ident">Duration::ZERO</span>, <span class="ident">Duration::hours</span>(<span class="number">12</span>)),
|
||||||
|
<span class="self">self</span>.<span class="ident">max_driving_time</span>,
|
||||||
|
<span class="ident">Duration::minutes</span>(<span class="number">1</span>),
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
<span class="ident">Widget::row</span>(<span class="macro">vec!</span>[
|
||||||
|
<span class="string">"Max biking time"</span>.<span class="ident">text_widget</span>(<span class="ident">ctx</span>).<span class="ident">centered_vert</span>(),
|
||||||
|
<span class="ident">Spinner::widget</span>(
|
||||||
|
<span class="ident">ctx</span>,
|
||||||
|
<span class="string">"max_biking_time"</span>,
|
||||||
|
(<span class="ident">Duration::ZERO</span>, <span class="ident">Duration::hours</span>(<span class="number">12</span>)),
|
||||||
|
<span class="self">self</span>.<span class="ident">max_biking_time</span>,
|
||||||
|
<span class="ident">Duration::minutes</span>(<span class="number">1</span>),
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
])
|
||||||
|
.<span class="ident">evenly_spaced</span>(),
|
||||||
|
<span class="ident">Widget::custom_row</span>(<span class="macro">vec!</span>[
|
||||||
|
<span class="ident">Widget::row</span>(<span class="macro">vec!</span>[
|
||||||
|
<span class="string">"Max biking distance"</span>.<span class="ident">text_widget</span>(<span class="ident">ctx</span>).<span class="ident">centered_vert</span>(),
|
||||||
|
<span class="ident">Spinner::widget</span>(
|
||||||
|
<span class="ident">ctx</span>,
|
||||||
|
<span class="string">"max_biking_distance"</span>,
|
||||||
|
(<span class="ident">Distance::ZERO</span>, <span class="ident">Distance::miles</span>(<span class="number">20.0</span>)),
|
||||||
|
<span class="self">self</span>.<span class="ident">max_biking_distance</span>,
|
||||||
|
<span class="ident">Distance::miles</span>(<span class="number">0.1</span>),
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
<span class="ident">Widget::row</span>(<span class="macro">vec!</span>[
|
||||||
|
<span class="string">"Max elevation gain"</span>.<span class="ident">text_widget</span>(<span class="ident">ctx</span>).<span class="ident">centered_vert</span>(),
|
||||||
|
<span class="ident">Spinner::widget</span>(
|
||||||
|
<span class="ident">ctx</span>,
|
||||||
|
<span class="string">"max_elevation_gain"</span>,
|
||||||
|
(<span class="ident">Distance::ZERO</span>, <span class="ident">Distance::feet</span>(<span class="number">500.0</span>)),
|
||||||
|
<span class="self">self</span>.<span class="ident">max_elevation_gain</span>,
|
||||||
|
<span class="ident">Distance::feet</span>(<span class="number">10.0</span>),
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
])
|
||||||
|
.<span class="ident">evenly_spaced</span>(),
|
||||||
|
])
|
||||||
|
}
|
||||||
|
|
||||||
|
<span class="kw">fn</span> <span class="ident">from_controls</span>(<span class="ident">panel</span>: <span class="kw-2">&</span><span class="ident">Panel</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Filters</span> {
|
||||||
|
<span class="ident">Filters</span> {
|
||||||
|
<span class="ident">max_driving_time</span>: <span class="ident">panel</span>.<span class="ident">spinner</span>(<span class="string">"max_driving_time"</span>),
|
||||||
|
<span class="ident">max_biking_time</span>: <span class="ident">panel</span>.<span class="ident">spinner</span>(<span class="string">"max_biking_time"</span>),
|
||||||
|
<span class="ident">max_biking_distance</span>: <span class="ident">panel</span>.<span class="ident">spinner</span>(<span class="string">"max_biking_distance"</span>),
|
||||||
|
<span class="ident">max_elevation_gain</span>: <span class="ident">panel</span>.<span class="ident">spinner</span>(<span class="string">"max_elevation_gain"</span>),
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
<span class="kw">impl</span> <span class="ident">ModeShiftData</span> {
|
<span class="kw">impl</span> <span class="ident">ModeShiftData</span> {
|
||||||
<span class="kw">fn</span> <span class="ident">from_scenario</span>(<span class="ident">app</span>: <span class="kw-2">&</span><span class="ident">App</span>, <span class="ident">scenario</span>: <span class="ident">Scenario</span>, <span class="ident">timer</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">Timer</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ModeShiftData</span> {
|
<span class="kw">fn</span> <span class="ident">from_scenario</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">scenario</span>: <span class="ident">Scenario</span>,
|
||||||
|
<span class="ident">timer</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">Timer</span>,
|
||||||
|
) <span class="op">-</span><span class="op">></span> <span class="ident">ModeShiftData</span> {
|
||||||
<span class="kw">let</span> <span class="ident">map</span> <span class="op">=</span> <span class="ident">app</span>
|
<span class="kw">let</span> <span class="ident">map</span> <span class="op">=</span> <span class="ident">app</span>
|
||||||
.<span class="ident">primary</span>
|
.<span class="ident">primary</span>
|
||||||
.<span class="ident">unedited_map</span>
|
.<span class="ident">unedited_map</span>
|
||||||
@ -368,18 +710,14 @@
|
|||||||
<span class="ident">TripEndpoint::path_req</span>(<span class="ident">trip</span>.<span class="ident">origin</span>, <span class="ident">trip</span>.<span class="ident">destination</span>, <span class="ident">TripMode::Bike</span>, <span class="ident">map</span>)
|
<span class="ident">TripEndpoint::path_req</span>(<span class="ident">trip</span>.<span class="ident">origin</span>, <span class="ident">trip</span>.<span class="ident">destination</span>, <span class="ident">TripMode::Bike</span>, <span class="ident">map</span>)
|
||||||
.<span class="ident">and_then</span>(<span class="op">|</span><span class="ident">req</span><span class="op">|</span> <span class="ident">map</span>.<span class="ident">pathfind</span>(<span class="ident">req</span>).<span class="ident">ok</span>()),
|
.<span class="ident">and_then</span>(<span class="op">|</span><span class="ident">req</span><span class="op">|</span> <span class="ident">map</span>.<span class="ident">pathfind</span>(<span class="ident">req</span>).<span class="ident">ok</span>()),
|
||||||
) {
|
) {
|
||||||
<span class="kw">let</span> (<span class="ident">total_elevation_gain</span>, <span class="ident">total_elevation_loss</span>) <span class="op">=</span>
|
<span class="kw">let</span> (<span class="ident">total_elevation_gain</span>, <span class="kw">_</span>) <span class="op">=</span> <span class="ident">biking_path</span>.<span class="ident">get_total_elevation_change</span>(<span class="ident">map</span>);
|
||||||
<span class="ident">biking_path</span>.<span class="ident">get_total_elevation_change</span>(<span class="ident">map</span>);
|
|
||||||
<span class="prelude-val">Some</span>(<span class="ident">CandidateTrip</span> {
|
<span class="prelude-val">Some</span>(<span class="ident">CandidateTrip</span> {
|
||||||
<span class="ident">bike_from</span>: <span class="ident">biking_path</span>.<span class="ident">get_req</span>().<span class="ident">start</span>,
|
<span class="ident">bike_req</span>: <span class="ident">biking_path</span>.<span class="ident">get_req</span>().<span class="ident">clone</span>(),
|
||||||
<span class="ident">bike_to</span>: <span class="ident">biking_path</span>.<span class="ident">get_req</span>().<span class="ident">end</span>,
|
|
||||||
|
|
||||||
<span class="ident">estimated_driving_time</span>: <span class="ident">driving_path</span>.<span class="ident">estimate_duration</span>(<span class="ident">map</span>, <span class="prelude-val">None</span>),
|
<span class="ident">estimated_driving_time</span>: <span class="ident">driving_path</span>.<span class="ident">estimate_duration</span>(<span class="ident">map</span>, <span class="prelude-val">None</span>),
|
||||||
<span class="ident">estimated_biking_time</span>: <span class="ident">biking_path</span>
|
<span class="ident">estimated_biking_time</span>: <span class="ident">biking_path</span>
|
||||||
.<span class="ident">estimate_duration</span>(<span class="ident">map</span>, <span class="prelude-val">Some</span>(<span class="ident">map_model::MAX_BIKE_SPEED</span>)),
|
.<span class="ident">estimate_duration</span>(<span class="ident">map</span>, <span class="prelude-val">Some</span>(<span class="ident">map_model::MAX_BIKE_SPEED</span>)),
|
||||||
<span class="ident">biking_distance</span>: <span class="ident">biking_path</span>.<span class="ident">total_length</span>(),
|
<span class="ident">biking_distance</span>: <span class="ident">biking_path</span>.<span class="ident">total_length</span>(),
|
||||||
<span class="ident">total_elevation_gain</span>,
|
<span class="ident">total_elevation_gain</span>,
|
||||||
<span class="ident">total_elevation_loss</span>,
|
|
||||||
})
|
})
|
||||||
} <span class="kw">else</span> {
|
} <span class="kw">else</span> {
|
||||||
<span class="prelude-val">None</span>
|
<span class="prelude-val">None</span>
|
||||||
@ -389,10 +727,82 @@
|
|||||||
.<span class="ident">into_iter</span>()
|
.<span class="ident">into_iter</span>()
|
||||||
.<span class="ident">flatten</span>()
|
.<span class="ident">flatten</span>()
|
||||||
.<span class="ident">collect</span>();
|
.<span class="ident">collect</span>();
|
||||||
<span class="ident">ModeShiftData</span> {
|
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">data</span> <span class="op">=</span> <span class="ident">ModeShiftData</span> {
|
||||||
<span class="ident">filters</span>: <span class="ident">Filters::default</span>(),
|
<span class="ident">filters</span>: <span class="ident">Filters::default</span>(),
|
||||||
<span class="ident">all_candidate_trips</span>,
|
<span class="ident">all_candidate_trips</span>,
|
||||||
|
<span class="ident">gaps</span>: <span class="ident">NetworkGaps</span> {
|
||||||
|
<span class="ident">draw_unzoomed</span>: <span class="ident">Drawable::empty</span>(<span class="ident">ctx</span>),
|
||||||
|
<span class="ident">draw_zoomed</span>: <span class="ident">Drawable::empty</span>(<span class="ident">ctx</span>),
|
||||||
|
<span class="ident">count_per_road</span>: <span class="ident">Counter::new</span>(),
|
||||||
|
},
|
||||||
|
<span class="ident">num_filtered_trips</span>: <span class="number">0</span>,
|
||||||
|
};
|
||||||
|
<span class="ident">data</span>.<span class="ident">recalculate_gaps</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">timer</span>);
|
||||||
|
<span class="ident">data</span>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<span class="kw">fn</span> <span class="ident">recalculate_gaps</span>(<span class="kw-2">&</span><span class="kw-2">mut</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">timer</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">Timer</span>) {
|
||||||
|
<span class="kw">let</span> <span class="ident">map</span> <span class="op">=</span> <span class="ident">app</span>
|
||||||
|
.<span class="ident">primary</span>
|
||||||
|
.<span class="ident">unedited_map</span>
|
||||||
|
.<span class="ident">as_ref</span>()
|
||||||
|
.<span class="ident">unwrap_or</span>(<span class="kw-2">&</span><span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>);
|
||||||
|
|
||||||
|
<span class="comment">// Find all high-stress roads, since we'll filter by them next</span>
|
||||||
|
<span class="kw">let</span> <span class="ident">high_stress</span>: <span class="ident">HashSet</span><span class="op"><</span><span class="ident">RoadID</span><span class="op">></span> <span class="op">=</span> <span class="ident">map</span>
|
||||||
|
.<span class="ident">all_roads</span>()
|
||||||
|
.<span class="ident">iter</span>()
|
||||||
|
.<span class="ident">filter_map</span>(<span class="op">|</span><span class="ident">r</span><span class="op">|</span> {
|
||||||
|
<span class="kw">if</span> <span class="ident">r</span>.<span class="ident">high_stress_for_bikes</span>(<span class="ident">map</span>) {
|
||||||
|
<span class="prelude-val">Some</span>(<span class="ident">r</span>.<span class="ident">id</span>)
|
||||||
|
} <span class="kw">else</span> {
|
||||||
|
<span class="prelude-val">None</span>
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.<span class="ident">collect</span>();
|
||||||
|
|
||||||
|
<span class="kw">let</span> <span class="ident">filtered_requests</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">PathRequest</span><span class="op">></span> <span class="op">=</span> <span class="self">self</span>
|
||||||
|
.<span class="ident">all_candidate_trips</span>
|
||||||
|
.<span class="ident">iter</span>()
|
||||||
|
.<span class="ident">filter_map</span>(<span class="op">|</span><span class="ident">trip</span><span class="op">|</span> {
|
||||||
|
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">filters</span>.<span class="ident">apply</span>(<span class="ident">trip</span>) {
|
||||||
|
<span class="prelude-val">Some</span>(<span class="ident">trip</span>.<span class="ident">bike_req</span>.<span class="ident">clone</span>())
|
||||||
|
} <span class="kw">else</span> {
|
||||||
|
<span class="prelude-val">None</span>
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.<span class="ident">collect</span>();
|
||||||
|
<span class="self">self</span>.<span class="ident">num_filtered_trips</span> <span class="op">=</span> <span class="ident">filtered_requests</span>.<span class="ident">len</span>();
|
||||||
|
|
||||||
|
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">count_per_road</span> <span class="op">=</span> <span class="ident">Counter::new</span>();
|
||||||
|
<span class="kw">for</span> <span class="ident">path</span> <span class="kw">in</span> <span class="ident">timer</span>
|
||||||
|
.<span class="ident">parallelize</span>(<span class="string">"calculate routes"</span>, <span class="ident">filtered_requests</span>, <span class="op">|</span><span class="ident">req</span><span class="op">|</span> {
|
||||||
|
<span class="ident">map</span>.<span class="ident">pathfind_v2</span>(<span class="ident">req</span>)
|
||||||
|
})
|
||||||
|
.<span class="ident">into_iter</span>()
|
||||||
|
.<span class="ident">flatten</span>()
|
||||||
|
{
|
||||||
|
<span class="kw">for</span> <span class="ident">step</span> <span class="kw">in</span> <span class="ident">path</span>.<span class="ident">get_steps</span>() {
|
||||||
|
<span class="comment">// No Contraflow steps for bike paths</span>
|
||||||
|
<span class="kw">if</span> <span class="kw">let</span> <span class="ident">PathStepV2::Along</span>(<span class="ident">dr</span>) <span class="op">=</span> <span class="ident">step</span> {
|
||||||
|
<span class="kw">if</span> <span class="ident">high_stress</span>.<span class="ident">contains</span>(<span class="kw-2">&</span><span class="ident">dr</span>.<span class="ident">id</span>) {
|
||||||
|
<span class="ident">count_per_road</span>.<span class="ident">inc</span>(<span class="ident">dr</span>.<span class="ident">id</span>);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">colorer</span> <span class="op">=</span> <span class="ident">ColorNetwork::new</span>(<span class="ident">app</span>);
|
||||||
|
<span class="ident">colorer</span>.<span class="ident">ranked_roads</span>(<span class="ident">count_per_road</span>.<span class="ident">clone</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="comment">// The Colorer fades the map as the very first thing in the batch, but we don't want to do</span>
|
||||||
|
<span class="comment">// that twice.</span>
|
||||||
|
<span class="ident">colorer</span>.<span class="ident">unzoomed</span>.<span class="ident">shift</span>();
|
||||||
|
<span class="kw">let</span> (<span class="ident">draw_unzoomed</span>, <span class="ident">draw_zoomed</span>) <span class="op">=</span> <span class="ident">colorer</span>.<span class="ident">build</span>(<span class="ident">ctx</span>);
|
||||||
|
<span class="self">self</span>.<span class="ident">gaps</span> <span class="op">=</span> <span class="ident">NetworkGaps</span> {
|
||||||
|
<span class="ident">draw_unzoomed</span>,
|
||||||
|
<span class="ident">draw_zoomed</span>,
|
||||||
|
<span class="ident">count_per_road</span>,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
@ -48,6 +48,11 @@
|
|||||||
<span id="48">48</span>
|
<span id="48">48</span>
|
||||||
<span id="49">49</span>
|
<span id="49">49</span>
|
||||||
<span id="50">50</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>
|
||||||
</pre><pre class="rust">
|
</pre><pre class="rust">
|
||||||
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">screenshot</span>;
|
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">screenshot</span>;
|
||||||
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">warper</span>;
|
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">warper</span>;
|
||||||
@ -92,6 +97,11 @@
|
|||||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">clear</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>) {
|
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">clear</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>) {
|
||||||
<span class="self">self</span>.<span class="ident">contents</span> <span class="op">=</span> <span class="prelude-val">None</span>;
|
<span class="self">self</span>.<span class="ident">contents</span> <span class="op">=</span> <span class="prelude-val">None</span>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<span class="doccomment">/// Clears the current pair and returns it.</span>
|
||||||
|
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">take</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span>(<span class="ident">K</span>, <span class="ident">V</span>)<span class="op">></span> {
|
||||||
|
<span class="self">self</span>.<span class="ident">contents</span>.<span class="ident">take</span>()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
<span class="kw">impl</span><span class="op"><</span><span class="ident">K</span>: <span class="ident">PartialEq</span> <span class="op">+</span> <span class="ident">Clone</span>, <span class="ident">V</span><span class="op">></span> <span class="ident">Default</span> <span class="kw">for</span> <span class="ident">Cached</span><span class="op"><</span><span class="ident">K</span>, <span class="ident">V</span><span class="op">></span> {
|
<span class="kw">impl</span><span class="op"><</span><span class="ident">K</span>: <span class="ident">PartialEq</span> <span class="op">+</span> <span class="ident">Clone</span>, <span class="ident">V</span><span class="op">></span> <span class="ident">Default</span> <span class="kw">for</span> <span class="ident">Cached</span><span class="op"><</span><span class="ident">K</span>, <span class="ident">V</span><span class="op">></span> {
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `tools` mod in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, tools"><title>widgetry::tools - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module tools</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li></ul></div><div id="sidebar-vars" data-name="tools" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input"name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></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="#">tools</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/widgetry/tools/mod.rs.html#1-50" title="goto source code">[src]</a></span></h1><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2>
|
<!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 `tools` mod in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, tools"><title>widgetry::tools - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module tools</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li></ul></div><div id="sidebar-vars" data-name="tools" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input"name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></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="#">tools</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/widgetry/tools/mod.rs.html#1-55" title="goto source code">[src]</a></span></h1><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2>
|
||||||
<div class="item-table"><div class="item-left module-item"><a class="mod" href="screenshot/index.html" title="widgetry::tools::screenshot mod">screenshot</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="mod" href="warper/index.html" title="widgetry::tools::warper mod">warper</a></div><div class="item-right docblock-short"></div></div><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
<div class="item-table"><div class="item-left module-item"><a class="mod" href="screenshot/index.html" title="widgetry::tools::screenshot mod">screenshot</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="mod" href="warper/index.html" title="widgetry::tools::warper mod">warper</a></div><div class="item-right docblock-short"></div></div><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
||||||
<div class="item-table"><div class="item-left module-item"><a class="struct" href="struct.Cached.html" title="widgetry::tools::Cached struct">Cached</a></div><div class="item-right docblock-short"><p>Store a cached key/value pair, only recalculating when the key changes.</p>
|
<div class="item-table"><div class="item-left module-item"><a class="struct" href="struct.Cached.html" title="widgetry::tools::Cached struct">Cached</a></div><div class="item-right docblock-short"><p>Store a cached key/value pair, only recalculating when the key changes.</p>
|
||||||
</div></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="widgetry" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
|
</div></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="widgetry" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user