This commit is contained in:
dabreegster 2021-08-16 23:42:08 +00:00
parent 1a1abd0fde
commit 1cd33e8b4f
20 changed files with 126 additions and 56 deletions

View File

@ -334,8 +334,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"><h4 class="code-header">fn <a href="#tymethod.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, app: &amp;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>)</h4><a href="#method.draw-59" class="anchor"></a><a class="srclink" href="../../src/game/ungap/quick_sketch.rs.html#113-121" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Draw</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw_baselayer-58" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</h4><a href="#method.draw_baselayer-58" class="anchor"></a></div></summary><div class='docblock'><p>Specifies what to draw before draw()</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.on_destroy-58" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;mut </a>A)</h4><a href="#method.on_destroy-58" class="anchor"></a></div></summary><div class='docblock'><p>Before this state is popped or replaced, call this.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-State%3CApp%3E-59" class="impl has-srclink"><h3 class="code-header in-band">impl State&lt;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../ungap/struct.ExploreMap.html" title="struct game::ungap::ExploreMap">ExploreMap</a></h3><a href="#impl-State%3CApp%3E-59" class="anchor"></a><a class="srclink" href="../../src/game/ungap/mod.rs.html#58-256" title="goto source code">[src]</a></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"><h4 class="code-header">fn <a href="#tymethod.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="struct.App.html" title="struct game::app::App">App</a>) -&gt; Transition&lt;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>&gt;</h4><a href="#method.event-59" class="anchor"></a><a class="srclink" href="../../src/game/ungap/mod.rs.html#59-235" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Respond to a UI event, such as input or time passing.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw-60" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, app: &amp;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>)</h4><a href="#method.draw-60" class="anchor"></a><a class="srclink" href="../../src/game/ungap/mod.rs.html#237-255" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Draw</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-State%3CApp%3E-59" class="impl has-srclink"><h3 class="code-header in-band">impl State&lt;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../ungap/struct.ExploreMap.html" title="struct game::ungap::ExploreMap">ExploreMap</a></h3><a href="#impl-State%3CApp%3E-59" class="anchor"></a><a class="srclink" href="../../src/game/ungap/mod.rs.html#71-278" title="goto source code">[src]</a></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"><h4 class="code-header">fn <a href="#tymethod.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="struct.App.html" title="struct game::app::App">App</a>) -&gt; Transition&lt;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>&gt;</h4><a href="#method.event-59" class="anchor"></a><a class="srclink" href="../../src/game/ungap/mod.rs.html#72-257" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Respond to a UI event, such as input or time passing.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw-60" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, app: &amp;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>)</h4><a href="#method.draw-60" class="anchor"></a><a class="srclink" href="../../src/game/ungap/mod.rs.html#259-277" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Draw</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw_baselayer-59" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</h4><a href="#method.draw_baselayer-59" class="anchor"></a></div></summary><div class='docblock'><p>Specifies what to draw before draw()</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.on_destroy-59" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;mut </a>A)</h4><a href="#method.on_destroy-59" class="anchor"></a></div></summary><div class='docblock'><p>Before this state is popped or replaced, call this.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-State%3CApp%3E-6" class="impl has-srclink"><h3 class="code-header in-band">impl State&lt;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../debug/floodfill/struct.Floodfiller.html" title="struct game::debug::floodfill::Floodfiller">Floodfiller</a></h3><a href="#impl-State%3CApp%3E-6" class="anchor"></a><a class="srclink" href="../../src/game/debug/floodfill.rs.html#81-117" title="goto source code">[src]</a></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"><h4 class="code-header">fn <a href="#tymethod.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="struct.App.html" title="struct game::app::App">App</a>) -&gt; Transition&lt;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>&gt;</h4><a href="#method.event-6" class="anchor"></a><a class="srclink" href="../../src/game/debug/floodfill.rs.html#82-107" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Respond to a UI event, such as input or time passing.</p>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="The build time in RFC2822, UTC."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>BUILT_TIME_UTC in game::pregame::built_info - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a></h2><div id="sidebar-vars" data-name="BUILT_TIME_UTC" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="#">BUILT_TIME_UTC</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-7b2f388b02b372bc/out/built.rs.html#78" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const BUILT_TIME_UTC: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a> = r&quot;Mon, 16 Aug 2021 23:13:36 +0000&quot;;</pre><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The build time in RFC2822, UTC.</p>
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a></h2><div id="sidebar-vars" data-name="BUILT_TIME_UTC" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="#">BUILT_TIME_UTC</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-7b2f388b02b372bc/out/built.rs.html#78" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const BUILT_TIME_UTC: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a> = r&quot;Mon, 16 Aug 2021 23:40:57 +0000&quot;;</pre><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The build time in RFC2822, UTC.</p>
</div></details></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>

View File

@ -1,3 +1,3 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `make_legend` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, make_legend"><title>make_legend 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 fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../game/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">game</a>::<wbr><a href="index.html">ungap</a></h2><div id="sidebar-vars" data-name="make_legend" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">game</a>::<wbr><a href="index.html">ungap</a>::<wbr><a class="fn" href="#">make_legend</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/ungap/mod.rs.html#357-411" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn make_legend(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;elevation: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;nearby: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a><br>) -&gt; Panel</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="game" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../game/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">game</a>::<wbr><a href="index.html">ungap</a></h2><div id="sidebar-vars" data-name="make_legend" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">game</a>::<wbr><a href="index.html">ungap</a>::<wbr><a class="fn" href="#">make_legend</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/ungap/mod.rs.html#379-433" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn make_legend(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;elevation: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;nearby: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a><br>) -&gt; Panel</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="game" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>

View File

@ -1,3 +1,3 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `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 - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../game/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">game</a>::<wbr><a href="index.html">ungap</a></h2><div id="sidebar-vars" data-name="make_top_panel" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">game</a>::<wbr><a href="index.html">ungap</a>::<wbr><a class="fn" href="#">make_top_panel</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/ungap/mod.rs.html#258-355" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn make_top_panel(ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>) -&gt; Panel</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="game" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../game/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">game</a>::<wbr><a href="index.html">ungap</a></h2><div id="sidebar-vars" data-name="make_top_panel" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">game</a>::<wbr><a href="index.html">ungap</a>::<wbr><a class="fn" href="#">make_top_panel</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/ungap/mod.rs.html#280-377" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn make_top_panel(ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>) -&gt; Panel</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="game" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>

View File

@ -1,3 +1,3 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `share_proposal` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, share_proposal"><title>share_proposal 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 fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../game/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">game</a>::<wbr><a href="index.html">ungap</a></h2><div id="sidebar-vars" data-name="share_proposal" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">game</a>::<wbr><a href="index.html">ungap</a>::<wbr><a class="fn" href="#">share_proposal</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/ungap/mod.rs.html#413-441" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn share_proposal(ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn State&lt;<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>&gt;&gt;</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="game" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../game/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">game</a>::<wbr><a href="index.html">ungap</a></h2><div id="sidebar-vars" data-name="share_proposal" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">game</a>::<wbr><a href="index.html">ungap</a>::<wbr><a class="fn" href="#">share_proposal</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/ungap/mod.rs.html#435-463" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn share_proposal(ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn State&lt;<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>&gt;&gt;</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="game" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>

View File

@ -1,6 +1,6 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `ungap` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, ungap"><title>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 mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../game/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module ungap</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#constants">Constants</a></li><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="ungap" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">game</a>::<wbr><a class="mod" href="#">ungap</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/ungap/mod.rs.html#1-441" title="goto source code">[src]</a></span></h1><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2>
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../game/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module ungap</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#constants">Constants</a></li><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="ungap" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">game</a>::<wbr><a class="mod" href="#">ungap</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/ungap/mod.rs.html#1-463" title="goto source code">[src]</a></span></h1><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2>
<table><tr class="module-item"><td><a class="mod" href="layers/index.html" title="game::ungap::layers mod">layers</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="magnifying/index.html" title="game::ungap::magnifying mod">magnifying</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="nearby/index.html" title="game::ungap::nearby mod">nearby</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="quick_sketch/index.html" title="game::ungap::quick_sketch mod">quick_sketch</a></td><td class="docblock-short"></td></tr></table><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<table><tr class="module-item"><td><a class="struct" href="struct.ExploreMap.html" title="game::ungap::ExploreMap struct">ExploreMap</a></td><td class="docblock-short"></td></tr></table><h2 id="constants" class="section-header"><a href="#constants">Constants</a></h2>
<table><tr class="module-item"><td><a class="constant" href="constant.PROPOSAL_HOST_URL.html" title="game::ungap::PROPOSAL_HOST_URL constant">PROPOSAL_HOST_URL</a></td><td class="docblock-short"></td></tr></table><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>

View File

@ -10,8 +10,8 @@
nearby: <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="nearby/struct.Nearby.html" title="struct game::ungap::nearby::Nearby">Nearby</a>&gt;,
map_edit_key: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.usize.html">usize</a>,
}</pre></div><h2 id="fields" class="fields small-section-header">
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.top_panel" class="structfield small-section-header"><a href="#structfield.top_panel" class="anchor field"></a><code>top_panel: Panel</code></span><span id="structfield.legend" class="structfield small-section-header"><a href="#structfield.legend" class="anchor field"></a><code>legend: Panel</code></span><span id="structfield.magnifying_glass" class="structfield small-section-header"><a href="#structfield.magnifying_glass" class="anchor field"></a><code>magnifying_glass: <a class="struct" href="magnifying/struct.MagnifyingGlass.html" title="struct game::ungap::magnifying::MagnifyingGlass">MagnifyingGlass</a></code></span><span id="structfield.network_layer" class="structfield small-section-header"><a href="#structfield.network_layer" class="anchor field"></a><code>network_layer: <a class="struct" href="layers/struct.DrawNetworkLayer.html" title="struct game::ungap::layers::DrawNetworkLayer">DrawNetworkLayer</a></code></span><span id="structfield.edits_layer" class="structfield small-section-header"><a href="#structfield.edits_layer" class="anchor field"></a><code>edits_layer: Drawable</code></span><span id="structfield.elevation" class="structfield small-section-header"><a href="#structfield.elevation" class="anchor field"></a><code>elevation: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></code></span><span id="structfield.nearby" class="structfield small-section-header"><a href="#structfield.nearby" class="anchor field"></a><code>nearby: <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="nearby/struct.Nearby.html" title="struct game::ungap::nearby::Nearby">Nearby</a>&gt;</code></span><span id="structfield.map_edit_key" class="structfield small-section-header"><a href="#structfield.map_edit_key" class="anchor field"></a><code>map_edit_key: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.usize.html">usize</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="struct" href="struct.ExploreMap.html" title="struct game::ungap::ExploreMap">ExploreMap</a></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/game/ungap/mod.rs.html#40-56" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.new_state" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.new_state" class="fnname">new_state</a>(ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn State&lt;<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>&gt;&gt;</h4><a href="#method.new_state" class="anchor"></a><a class="srclink" href="../../src/game/ungap/mod.rs.html#41-55" title="goto source code">[src]</a></div></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-State%3CApp%3E" class="impl has-srclink"><h3 class="code-header in-band">impl State&lt;<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="struct.ExploreMap.html" title="struct game::ungap::ExploreMap">ExploreMap</a></h3><a href="#impl-State%3CApp%3E" class="anchor"></a><a class="srclink" href="../../src/game/ungap/mod.rs.html#58-256" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>) -&gt; Transition&lt;<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>&gt;</h4><a href="#method.event" class="anchor"></a><a class="srclink" href="../../src/game/ungap/mod.rs.html#59-235" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Respond to a UI event, such as input or time passing.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>)</h4><a href="#method.draw" class="anchor"></a><a class="srclink" href="../../src/game/ungap/mod.rs.html#237-255" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Draw</p>
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.top_panel" class="structfield small-section-header"><a href="#structfield.top_panel" class="anchor field"></a><code>top_panel: Panel</code></span><span id="structfield.legend" class="structfield small-section-header"><a href="#structfield.legend" class="anchor field"></a><code>legend: Panel</code></span><span id="structfield.magnifying_glass" class="structfield small-section-header"><a href="#structfield.magnifying_glass" class="anchor field"></a><code>magnifying_glass: <a class="struct" href="magnifying/struct.MagnifyingGlass.html" title="struct game::ungap::magnifying::MagnifyingGlass">MagnifyingGlass</a></code></span><span id="structfield.network_layer" class="structfield small-section-header"><a href="#structfield.network_layer" class="anchor field"></a><code>network_layer: <a class="struct" href="layers/struct.DrawNetworkLayer.html" title="struct game::ungap::layers::DrawNetworkLayer">DrawNetworkLayer</a></code></span><span id="structfield.edits_layer" class="structfield small-section-header"><a href="#structfield.edits_layer" class="anchor field"></a><code>edits_layer: Drawable</code></span><span id="structfield.elevation" class="structfield small-section-header"><a href="#structfield.elevation" class="anchor field"></a><code>elevation: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></code></span><span id="structfield.nearby" class="structfield small-section-header"><a href="#structfield.nearby" class="anchor field"></a><code>nearby: <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="nearby/struct.Nearby.html" title="struct game::ungap::nearby::Nearby">Nearby</a>&gt;</code></span><span id="structfield.map_edit_key" class="structfield small-section-header"><a href="#structfield.map_edit_key" class="anchor field"></a><code>map_edit_key: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.usize.html">usize</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="struct" href="struct.ExploreMap.html" title="struct game::ungap::ExploreMap">ExploreMap</a></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/game/ungap/mod.rs.html#40-69" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.new_state" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.new_state" class="fnname">new_state</a>(ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn State&lt;<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>&gt;&gt;</h4><a href="#method.new_state" class="anchor"></a><a class="srclink" href="../../src/game/ungap/mod.rs.html#41-68" title="goto source code">[src]</a></div></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-State%3CApp%3E" class="impl has-srclink"><h3 class="code-header in-band">impl State&lt;<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="struct.ExploreMap.html" title="struct game::ungap::ExploreMap">ExploreMap</a></h3><a href="#impl-State%3CApp%3E" class="anchor"></a><a class="srclink" href="../../src/game/ungap/mod.rs.html#71-278" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>) -&gt; Transition&lt;<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>&gt;</h4><a href="#method.event" class="anchor"></a><a class="srclink" href="../../src/game/ungap/mod.rs.html#72-257" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Respond to a UI event, such as input or time passing.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>)</h4><a href="#method.draw" class="anchor"></a><a class="srclink" href="../../src/game/ungap/mod.rs.html#259-277" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Draw</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw_baselayer" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</h4><a href="#method.draw_baselayer" class="anchor"></a></div></summary><div class='docblock'><p>Specifies what to draw before draw()</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.on_destroy" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;mut </a>A)</h4><a href="#method.on_destroy" class="anchor"></a></div></summary><div class='docblock'><p>Before this state is popped or replaced, call this.</p>
</div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl !<a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.ExploreMap.html" title="struct game::ungap::ExploreMap">ExploreMap</a></h3><a href="#impl-RefUnwindSafe" class="anchor"></a></div><div id="impl-Send" class="impl has-srclink"><h3 class="code-header in-band">impl !<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.ExploreMap.html" title="struct game::ungap::ExploreMap">ExploreMap</a></h3><a href="#impl-Send" class="anchor"></a></div><div id="impl-Sync" class="impl has-srclink"><h3 class="code-header in-band">impl !<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.ExploreMap.html" title="struct game::ungap::ExploreMap">ExploreMap</a></h3><a href="#impl-Sync" class="anchor"></a></div><div id="impl-Unpin" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.ExploreMap.html" title="struct game::ungap::ExploreMap">ExploreMap</a></h3><a href="#impl-Unpin" class="anchor"></a></div><div id="impl-UnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl !<a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.ExploreMap.html" title="struct game::ungap::ExploreMap">ExploreMap</a></h3><a href="#impl-UnwindSafe" class="anchor"></a></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Any" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></h3><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#131-135" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.54.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4><a href="#method.type_id" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#132" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>

File diff suppressed because one or more lines are too long

View File

@ -1,14 +1,16 @@
<!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="Utilities for reflecting the current map and viewport in the URL on the web. No effect on native."><meta name="keywords" content="rust, rustlang, rust-lang, URLManager"><title>URLManager in map_gui::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 struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../map_gui/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct URLManager</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.parse_center_camera">parse_center_camera</a><a href="#method.update_url_cam">update_url_cam</a><a href="#method.update_url_free_param">update_url_free_param</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><h2 class="location">Other items in<br><a href="../index.html">map_gui</a>::<wbr><a href="index.html">tools</a></h2><div id="sidebar-vars" data-name="URLManager" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">map_gui</a>::<wbr><a href="index.html">tools</a>::<wbr><a class="struct" href="#">URLManager</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/map_gui/tools/url.rs.html#10" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct">pub struct URLManager;</pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Utilities for reflecting the current map and viewport in the URL on the web. No effect on
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../map_gui/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct URLManager</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.parse_center_camera">parse_center_camera</a><a href="#method.update_url_cam">update_url_cam</a><a href="#method.update_url_free_param">update_url_free_param</a><a href="#method.update_url_param">update_url_param</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><h2 class="location">Other items in<br><a href="../index.html">map_gui</a>::<wbr><a href="index.html">tools</a></h2><div id="sidebar-vars" data-name="URLManager" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">map_gui</a>::<wbr><a href="index.html">tools</a>::<wbr><a class="struct" href="#">URLManager</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/map_gui/tools/url.rs.html#10" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct">pub struct URLManager;</pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Utilities for reflecting the current map and viewport in the URL on the web. No effect on
native.</p>
</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="struct" href="url/struct.URLManager.html" title="struct map_gui::tools::url::URLManager">URLManager</a></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/map_gui/tools/url.rs.html#12-76" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.update_url_free_param" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.update_url_free_param" class="fnname">update_url_free_param</a>(free_param: <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt;</h4><a href="#method.update_url_free_param" class="anchor"></a><a class="srclink" href="../../src/map_gui/tools/url.rs.html#15-17" title="goto source code">[src]</a></div></summary><div class="docblock"><p>This does nothing on native. On web, it modifies the current URL to change the first free
</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="struct" href="url/struct.URLManager.html" title="struct map_gui::tools::url::URLManager">URLManager</a></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/map_gui/tools/url.rs.html#12-82" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.update_url_free_param" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.update_url_free_param" class="fnname">update_url_free_param</a>(free_param: <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt;</h4><a href="#method.update_url_free_param" class="anchor"></a><a class="srclink" href="../../src/map_gui/tools/url.rs.html#15-17" title="goto source code">[src]</a></div></summary><div class="docblock"><p>This does nothing on native. On web, it modifies the current URL to change the first free
parameter in the HTTP GET params to the specified value, adding it if needed.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.update_url_cam" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.update_url_cam" class="fnname">update_url_cam</a>&lt;A:&nbsp;<a class="trait" href="../trait.AppLike.html" title="trait map_gui::AppLike">AppLike</a>&gt;(ctx: &amp;EventCtx&lt;'_&gt;, app: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</a>A) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt;</h4><a href="#method.update_url_cam" class="anchor"></a><a class="srclink" href="../../src/map_gui/tools/url.rs.html#23-39" title="goto source code">[src]</a></div></summary><div class="docblock"><p>This does nothing on native. On web, it modifies the current URL to set cam to an
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.update_url_param" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.update_url_param" class="fnname">update_url_param</a>(key: <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, value: <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt;</h4><a href="#method.update_url_param" class="anchor"></a><a class="srclink" href="../../src/map_gui/tools/url.rs.html#21-23" title="goto source code">[src]</a></div></summary><div class="docblock"><p>This does nothing on native. On web, it modifies the current URL to change the first named
parameter in the HTTP GET params to the specified value, adding it if needed.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.update_url_cam" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.update_url_cam" class="fnname">update_url_cam</a>&lt;A:&nbsp;<a class="trait" href="../trait.AppLike.html" title="trait map_gui::AppLike">AppLike</a>&gt;(ctx: &amp;EventCtx&lt;'_&gt;, app: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</a>A) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt;</h4><a href="#method.update_url_cam" class="anchor"></a><a class="srclink" href="../../src/map_gui/tools/url.rs.html#29-45" title="goto source code">[src]</a></div></summary><div class="docblock"><p>This does nothing on native. On web, it modifies the current URL to set cam to an
OSM-style <code>zoom/lat/lon</code> string
(https://wiki.openstreetmap.org/wiki/Browsing#Other_URL_tricks) based on the current
viewport.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.parse_center_camera" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.parse_center_camera" class="fnname">parse_center_camera</a>&lt;A:&nbsp;<a class="trait" href="../trait.AppLike.html" title="trait map_gui::AppLike">AppLike</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;app: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</a>A, <br>&nbsp;&nbsp;&nbsp;&nbsp;raw: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.tuple.html">(</a><a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>, <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.tuple.html">)</a>&gt;</h4><a href="#method.parse_center_camera" class="anchor"></a><a class="srclink" href="../../src/map_gui/tools/url.rs.html#45-75" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Parse an OSM-style <code>zoom/lat/lon</code> string
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.parse_center_camera" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.parse_center_camera" class="fnname">parse_center_camera</a>&lt;A:&nbsp;<a class="trait" href="../trait.AppLike.html" title="trait map_gui::AppLike">AppLike</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;app: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</a>A, <br>&nbsp;&nbsp;&nbsp;&nbsp;raw: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.tuple.html">(</a><a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>, <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.tuple.html">)</a>&gt;</h4><a href="#method.parse_center_camera" class="anchor"></a><a class="srclink" href="../../src/map_gui/tools/url.rs.html#51-81" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Parse an OSM-style <code>zoom/lat/lon</code> string
(https://wiki.openstreetmap.org/wiki/Browsing#Other_URL_tricks), returning the map point to
center on and the camera zoom.</p>
</div></details></div></details><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="url/struct.URLManager.html" title="struct map_gui::tools::url::URLManager">URLManager</a></h3><a href="#impl-RefUnwindSafe" class="anchor"></a></div><div id="impl-Send" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="url/struct.URLManager.html" title="struct map_gui::tools::url::URLManager">URLManager</a></h3><a href="#impl-Send" class="anchor"></a></div><div id="impl-Sync" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="url/struct.URLManager.html" title="struct map_gui::tools::url::URLManager">URLManager</a></h3><a href="#impl-Sync" class="anchor"></a></div><div id="impl-Unpin" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="url/struct.URLManager.html" title="struct map_gui::tools::url::URLManager">URLManager</a></h3><a href="#impl-Unpin" class="anchor"></a></div><div id="impl-UnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="url/struct.URLManager.html" title="struct map_gui::tools::url::URLManager">URLManager</a></h3><a href="#impl-UnwindSafe" class="anchor"></a></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Any" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></h3><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#131-135" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.54.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4><a href="#method.type_id" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#132" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>

View File

@ -1,3 +0,0 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `change_url_cam` fn in crate `map_gui`."><meta name="keywords" content="rust, rustlang, rust-lang, change_url_cam"><title>change_url_cam in map_gui::tools::url - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../map_gui/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">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">url</a></h2><div id="sidebar-vars" data-name="change_url_cam" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">url</a>::<wbr><a class="fn" href="#">change_url_cam</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/tools/url.rs.html#145-176" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn change_url_cam(url: <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, cam: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_gui" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>

View File

@ -1,3 +1,3 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `change_url_free_param` fn in crate `map_gui`."><meta name="keywords" content="rust, rustlang, rust-lang, change_url_free_param"><title>change_url_free_param in map_gui::tools::url - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../map_gui/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">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">url</a></h2><div id="sidebar-vars" data-name="change_url_free_param" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">url</a>::<wbr><a class="fn" href="#">change_url_free_param</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/tools/url.rs.html#109-143" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn change_url_free_param(url: <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, free_param: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_gui" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../map_gui/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">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">url</a></h2><div id="sidebar-vars" data-name="change_url_free_param" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">url</a>::<wbr><a class="fn" href="#">change_url_free_param</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/tools/url.rs.html#115-149" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn change_url_free_param(url: <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, free_param: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_gui" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>

View File

@ -0,0 +1,3 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `change_url_param` fn in crate `map_gui`."><meta name="keywords" content="rust, rustlang, rust-lang, change_url_param"><title>change_url_param in map_gui::tools::url - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../map_gui/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">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">url</a></h2><div id="sidebar-vars" data-name="change_url_param" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">url</a>::<wbr><a class="fn" href="#">change_url_param</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/tools/url.rs.html#151-182" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn change_url_param(url: <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, key: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a>, value: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_gui" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>

View File

@ -1,3 +1,3 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `update_url` fn in crate `map_gui`."><meta name="keywords" content="rust, rustlang, rust-lang, update_url"><title>update_url in map_gui::tools::url - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../map_gui/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">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">url</a></h2><div id="sidebar-vars" data-name="update_url" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">url</a>::<wbr><a class="fn" href="#">update_url</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/tools/url.rs.html#79-107" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn update_url(transform: <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(<a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt;</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_gui" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../map_gui/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">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">url</a></h2><div id="sidebar-vars" data-name="update_url" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">url</a>::<wbr><a class="fn" href="#">update_url</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/tools/url.rs.html#85-113" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn update_url(transform: <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(<a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt;</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_gui" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `url` mod in crate `map_gui`."><meta name="keywords" content="rust, rustlang, rust-lang, url"><title>map_gui::tools::url - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../map_gui/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module url</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="url" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a class="mod" href="#">url</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/tools/url.rs.html#1-223" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../map_gui/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module url</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="url" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a class="mod" href="#">url</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/tools/url.rs.html#1-234" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<table><tr class="module-item"><td><a class="struct" href="struct.URLManager.html" title="map_gui::tools::url::URLManager struct">URLManager</a></td><td class="docblock-short"><p>Utilities for reflecting the current map and viewport in the URL on the web. No effect on
native.</p>
</td></tr></table><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>
<table><tr class="module-item"><td><a class="fn" href="fn.change_url_cam.html" title="map_gui::tools::url::change_url_cam fn">change_url_cam</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.change_url_free_param.html" title="map_gui::tools::url::change_url_free_param fn">change_url_free_param</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.update_url.html" title="map_gui::tools::url::update_url fn">update_url</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_gui" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>
<table><tr class="module-item"><td><a class="fn" href="fn.change_url_free_param.html" title="map_gui::tools::url::change_url_free_param fn">change_url_free_param</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.change_url_param.html" title="map_gui::tools::url::change_url_param fn">change_url_param</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.update_url.html" title="map_gui::tools::url::update_url fn">update_url</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_gui" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>

View File

@ -1 +1 @@
initSidebarItems({"fn":[["change_url_cam",""],["change_url_free_param",""],["update_url",""]],"struct":[["URLManager","Utilities for reflecting the current map and viewport in the URL on the web. No effect on native."]]});
initSidebarItems({"fn":[["change_url_free_param",""],["change_url_param",""],["update_url",""]],"struct":[["URLManager","Utilities for reflecting the current map and viewport in the URL on the web. No effect on native."]]});

View File

@ -1,14 +1,16 @@
<!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="Utilities for reflecting the current map and viewport in the URL on the web. No effect on native."><meta name="keywords" content="rust, rustlang, rust-lang, URLManager"><title>URLManager in map_gui::tools::url - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../map_gui/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct URLManager</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.parse_center_camera">parse_center_camera</a><a href="#method.update_url_cam">update_url_cam</a><a href="#method.update_url_free_param">update_url_free_param</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><h2 class="location">Other items in<br><a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">url</a></h2><div id="sidebar-vars" data-name="URLManager" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">url</a>::<wbr><a class="struct" href="#">URLManager</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/tools/url.rs.html#10" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct">pub struct URLManager;</pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Utilities for reflecting the current map and viewport in the URL on the web. No effect on
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../map_gui/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct URLManager</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.parse_center_camera">parse_center_camera</a><a href="#method.update_url_cam">update_url_cam</a><a href="#method.update_url_free_param">update_url_free_param</a><a href="#method.update_url_param">update_url_param</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><h2 class="location">Other items in<br><a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">url</a></h2><div id="sidebar-vars" data-name="URLManager" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a href="index.html">url</a>::<wbr><a class="struct" href="#">URLManager</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/tools/url.rs.html#10" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct">pub struct URLManager;</pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Utilities for reflecting the current map and viewport in the URL on the web. No effect on
native.</p>
</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="struct" href="struct.URLManager.html" title="struct map_gui::tools::url::URLManager">URLManager</a></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../../../src/map_gui/tools/url.rs.html#12-76" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.update_url_free_param" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.update_url_free_param" class="fnname">update_url_free_param</a>(free_param: <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt;</h4><a href="#method.update_url_free_param" class="anchor"></a><a class="srclink" href="../../../src/map_gui/tools/url.rs.html#15-17" title="goto source code">[src]</a></div></summary><div class="docblock"><p>This does nothing on native. On web, it modifies the current URL to change the first free
</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="struct" href="struct.URLManager.html" title="struct map_gui::tools::url::URLManager">URLManager</a></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../../../src/map_gui/tools/url.rs.html#12-82" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.update_url_free_param" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.update_url_free_param" class="fnname">update_url_free_param</a>(free_param: <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt;</h4><a href="#method.update_url_free_param" class="anchor"></a><a class="srclink" href="../../../src/map_gui/tools/url.rs.html#15-17" title="goto source code">[src]</a></div></summary><div class="docblock"><p>This does nothing on native. On web, it modifies the current URL to change the first free
parameter in the HTTP GET params to the specified value, adding it if needed.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.update_url_cam" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.update_url_cam" class="fnname">update_url_cam</a>&lt;A:&nbsp;<a class="trait" href="../../trait.AppLike.html" title="trait map_gui::AppLike">AppLike</a>&gt;(ctx: &amp;EventCtx&lt;'_&gt;, app: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</a>A) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt;</h4><a href="#method.update_url_cam" class="anchor"></a><a class="srclink" href="../../../src/map_gui/tools/url.rs.html#23-39" title="goto source code">[src]</a></div></summary><div class="docblock"><p>This does nothing on native. On web, it modifies the current URL to set cam to an
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.update_url_param" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.update_url_param" class="fnname">update_url_param</a>(key: <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, value: <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt;</h4><a href="#method.update_url_param" class="anchor"></a><a class="srclink" href="../../../src/map_gui/tools/url.rs.html#21-23" title="goto source code">[src]</a></div></summary><div class="docblock"><p>This does nothing on native. On web, it modifies the current URL to change the first named
parameter in the HTTP GET params to the specified value, adding it if needed.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.update_url_cam" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.update_url_cam" class="fnname">update_url_cam</a>&lt;A:&nbsp;<a class="trait" href="../../trait.AppLike.html" title="trait map_gui::AppLike">AppLike</a>&gt;(ctx: &amp;EventCtx&lt;'_&gt;, app: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</a>A) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt;</h4><a href="#method.update_url_cam" class="anchor"></a><a class="srclink" href="../../../src/map_gui/tools/url.rs.html#29-45" title="goto source code">[src]</a></div></summary><div class="docblock"><p>This does nothing on native. On web, it modifies the current URL to set cam to an
OSM-style <code>zoom/lat/lon</code> string
(https://wiki.openstreetmap.org/wiki/Browsing#Other_URL_tricks) based on the current
viewport.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.parse_center_camera" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.parse_center_camera" class="fnname">parse_center_camera</a>&lt;A:&nbsp;<a class="trait" href="../../trait.AppLike.html" title="trait map_gui::AppLike">AppLike</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;app: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</a>A, <br>&nbsp;&nbsp;&nbsp;&nbsp;raw: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.tuple.html">(</a><a class="struct" href="../../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>, <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.tuple.html">)</a>&gt;</h4><a href="#method.parse_center_camera" class="anchor"></a><a class="srclink" href="../../../src/map_gui/tools/url.rs.html#45-75" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Parse an OSM-style <code>zoom/lat/lon</code> string
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.parse_center_camera" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.parse_center_camera" class="fnname">parse_center_camera</a>&lt;A:&nbsp;<a class="trait" href="../../trait.AppLike.html" title="trait map_gui::AppLike">AppLike</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;app: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</a>A, <br>&nbsp;&nbsp;&nbsp;&nbsp;raw: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.tuple.html">(</a><a class="struct" href="../../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>, <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.tuple.html">)</a>&gt;</h4><a href="#method.parse_center_camera" class="anchor"></a><a class="srclink" href="../../../src/map_gui/tools/url.rs.html#51-81" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Parse an OSM-style <code>zoom/lat/lon</code> string
(https://wiki.openstreetmap.org/wiki/Browsing#Other_URL_tricks), returning the map point to
center on and the camera zoom.</p>
</div></details></div></details><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.URLManager.html" title="struct map_gui::tools::url::URLManager">URLManager</a></h3><a href="#impl-RefUnwindSafe" class="anchor"></a></div><div id="impl-Send" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.URLManager.html" title="struct map_gui::tools::url::URLManager">URLManager</a></h3><a href="#impl-Send" class="anchor"></a></div><div id="impl-Sync" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.URLManager.html" title="struct map_gui::tools::url::URLManager">URLManager</a></h3><a href="#impl-Sync" class="anchor"></a></div><div id="impl-Unpin" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.URLManager.html" title="struct map_gui::tools::url::URLManager">URLManager</a></h3><a href="#impl-Unpin" class="anchor"></a></div><div id="impl-UnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.URLManager.html" title="struct map_gui::tools::url::URLManager">URLManager</a></h3><a href="#impl-UnwindSafe" class="anchor"></a></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Any" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></h3><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#131-135" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.54.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4><a href="#method.type_id" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#132" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>

File diff suppressed because one or more lines are too long

View File

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

View File

@ -441,6 +441,28 @@
<span id="439">439</span>
<span id="440">440</span>
<span id="441">441</span>
<span id="442">442</span>
<span id="443">443</span>
<span id="444">444</span>
<span id="445">445</span>
<span id="446">446</span>
<span id="447">447</span>
<span id="448">448</span>
<span id="449">449</span>
<span id="450">450</span>
<span id="451">451</span>
<span id="452">452</span>
<span id="453">453</span>
<span id="454">454</span>
<span id="455">455</span>
<span id="456">456</span>
<span id="457">457</span>
<span id="458">458</span>
<span id="459">459</span>
<span id="460">460</span>
<span id="461">461</span>
<span id="462">462</span>
<span id="463">463</span>
</pre><pre class="rust">
<span class="kw">mod</span> <span class="ident">layers</span>;
<span class="kw">mod</span> <span class="ident">magnifying</span>;
@ -450,7 +472,7 @@
<span class="kw">use</span> <span class="ident">abstutil::prettyprint_usize</span>;
<span class="kw">use</span> <span class="ident">geom::Distance</span>;
<span class="kw">use</span> <span class="ident">map_gui::load::FutureLoader</span>;
<span class="kw">use</span> <span class="ident">map_gui::tools</span>::{<span class="ident">nice_map_name</span>, <span class="ident">CityPicker</span>, <span class="ident">ColorLegend</span>, <span class="ident">PopupMsg</span>};
<span class="kw">use</span> <span class="ident">map_gui::tools</span>::{<span class="ident">nice_map_name</span>, <span class="ident">CityPicker</span>, <span class="ident">ColorLegend</span>, <span class="ident">PopupMsg</span>, <span class="ident">URLManager</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">EditCmd</span>, <span class="ident">LaneType</span>};
<span class="kw">use</span> <span class="ident">widgetry</span>::{
@ -485,35 +507,57 @@
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new_state</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">App</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Box</span><span class="op">&lt;</span><span class="kw">dyn</span> <span class="ident">State</span><span class="op">&lt;</span><span class="ident">App</span><span class="op">&gt;</span><span class="op">&gt;</span> {
<span class="ident">app</span>.<span class="ident">opts</span>.<span class="ident">show_building_driveways</span> <span class="op">=</span> <span class="bool-val">false</span>;
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Err</span>(<span class="ident">err</span>) <span class="op">=</span> <span class="ident">URLManager::update_url_free_param</span>(
<span class="ident">app</span>.<span class="ident">primary</span>
.<span class="ident">map</span>
.<span class="ident">get_name</span>()
.<span class="ident">path</span>()
.<span class="ident">strip_prefix</span>(<span class="kw-2">&amp;</span><span class="ident">abstio::path</span>(<span class="string">&quot;&quot;</span>))
.<span class="ident">unwrap</span>()
.<span class="ident">to_string</span>(),
) {
<span class="macro">warn!</span>(<span class="string">&quot;Couldn&#39;t update URL: {}&quot;</span>, <span class="ident">err</span>);
}
<span class="ident">Box::new</span>(<span class="ident">ExploreMap</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">Panel::empty</span>(<span class="ident">ctx</span>),
<span class="ident">legend</span>: <span class="ident">make_legend</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="bool-val">false</span>, <span class="bool-val">false</span>),
<span class="ident">magnifying_glass</span>: <span class="ident">MagnifyingGlass::new</span>(<span class="ident">ctx</span>),
<span class="ident">network_layer</span>: <span class="ident">DrawNetworkLayer::new</span>(),
<span class="ident">edits_layer</span>: <span class="ident">render_edits</span>(<span class="ident">ctx</span>, <span class="ident">app</span>),
<span class="ident">edits_layer</span>: <span class="ident">Drawable::empty</span>(<span class="ident">ctx</span>),
<span class="ident">elevation</span>: <span class="bool-val">false</span>,
<span class="ident">nearby</span>: <span class="prelude-val">None</span>,
<span class="ident">map_edit_key</span>: <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">get_edits_change_key</span>(),
<span class="comment">// Start with a bogus value, so we fix up the URL when changing maps</span>
<span class="ident">map_edit_key</span>: <span class="ident">usize::MAX</span>,
})
}
}
<span class="kw">impl</span> <span class="ident">State</span><span class="op">&lt;</span><span class="ident">App</span><span class="op">&gt;</span> <span class="kw">for</span> <span class="ident">ExploreMap</span> {
<span class="kw">fn</span> <span class="ident">event</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">App</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Transition</span> {
{
<span class="comment">// We would normally use Cached, but so many values depend on one key, so this is more</span>
<span class="comment">// clear.</span>
<span class="kw">let</span> <span class="ident">key</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">get_edits_change_key</span>();
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">map_edit_key</span> <span class="op">!</span><span class="op">=</span> <span class="ident">key</span> {
<span class="self">self</span>.<span class="ident">map_edit_key</span> <span class="op">=</span> <span class="ident">key</span>;
<span class="self">self</span>.<span class="ident">network_layer</span>.<span class="ident">clear</span>();
<span class="self">self</span>.<span class="ident">edits_layer</span> <span class="op">=</span> <span class="ident">render_edits</span>(<span class="ident">ctx</span>, <span class="ident">app</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="comment">// We would normally use Cached, but so many values depend on one key, so this is more</span>
<span class="comment">// clear.</span>
<span class="kw">let</span> <span class="ident">key</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">get_edits_change_key</span>();
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">map_edit_key</span> <span class="op">!</span><span class="op">=</span> <span class="ident">key</span> {
<span class="self">self</span>.<span class="ident">map_edit_key</span> <span class="op">=</span> <span class="ident">key</span>;
<span class="self">self</span>.<span class="ident">network_layer</span>.<span class="ident">clear</span>();
<span class="self">self</span>.<span class="ident">edits_layer</span> <span class="op">=</span> <span class="ident">render_edits</span>(<span class="ident">ctx</span>, <span class="ident">app</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">if</span> <span class="kw">let</span> <span class="prelude-val">Err</span>(<span class="ident">err</span>) <span class="op">=</span> <span class="ident">URLManager::update_url_param</span>(
<span class="string">&quot;--edits&quot;</span>.<span class="ident">to_string</span>(),
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">get_edits</span>().<span class="ident">edits_name</span>.<span class="ident">clone</span>(),
) {
<span class="macro">warn!</span>(<span class="string">&quot;Couldn&#39;t update URL: {}&quot;</span>, <span class="ident">err</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">canvas_movement</span>() {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Err</span>(<span class="ident">err</span>) <span class="op">=</span> <span class="ident">URLManager::update_url_cam</span>(<span class="ident">ctx</span>, <span class="ident">app</span>) {
<span class="macro">warn!</span>(<span class="string">&quot;Couldn&#39;t update URL: {}&quot;</span>, <span class="ident">err</span>);
}
}
<span class="self">self</span>.<span class="ident">magnifying_glass</span>.<span class="ident">event</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);

View File

@ -223,6 +223,17 @@
<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>
</pre><pre class="rust">
<span class="kw">use</span> <span class="ident">anyhow::Result</span>;
@ -242,6 +253,12 @@
<span class="ident">update_url</span>(<span class="ident">Box::new</span>(<span class="kw">move</span> <span class="op">|</span><span class="ident">url</span><span class="op">|</span> <span class="ident">change_url_free_param</span>(<span class="ident">url</span>, <span class="kw-2">&amp;</span><span class="ident">free_param</span>)))
}
<span class="doccomment">/// This does nothing on native. On web, it modifies the current URL to change the first named</span>
<span class="doccomment">/// parameter in the HTTP GET params to the specified value, adding it if needed.</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">update_url_param</span>(<span class="ident">key</span>: <span class="ident">String</span>, <span class="ident">value</span>: <span class="ident">String</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Result</span><span class="op">&lt;</span>()<span class="op">&gt;</span> {
<span class="ident">update_url</span>(<span class="ident">Box::new</span>(<span class="kw">move</span> <span class="op">|</span><span class="ident">url</span><span class="op">|</span> <span class="ident">change_url_param</span>(<span class="ident">url</span>, <span class="kw-2">&amp;</span><span class="ident">key</span>, <span class="kw-2">&amp;</span><span class="ident">value</span>)))
}
<span class="doccomment">/// This does nothing on native. On web, it modifies the current URL to set --cam to an</span>
<span class="doccomment">/// OSM-style `zoom/lat/lon` string</span>
<span class="doccomment">/// (https://wiki.openstreetmap.org/wiki/Browsing#Other_URL_tricks) based on the current</span>
@ -261,7 +278,7 @@
<span class="comment">// Trim precision</span>
<span class="kw">let</span> <span class="ident">cam</span> <span class="op">=</span> <span class="macro">format!</span>(<span class="string">&quot;{:.2}/{:.5}/{:.5}&quot;</span>, <span class="ident">zoom_lvl</span>, <span class="ident">center</span>.<span class="ident">y</span>(), <span class="ident">center</span>.<span class="ident">x</span>());
<span class="ident">update_url</span>(<span class="ident">Box::new</span>(<span class="kw">move</span> <span class="op">|</span><span class="ident">url</span><span class="op">|</span> <span class="ident">change_url_cam</span>(<span class="ident">url</span>, <span class="kw-2">&amp;</span><span class="ident">cam</span>)))
<span class="ident">update_url</span>(<span class="ident">Box::new</span>(<span class="kw">move</span> <span class="op">|</span><span class="ident">url</span><span class="op">|</span> <span class="ident">change_url_param</span>(<span class="ident">url</span>, <span class="string">&quot;--cam&quot;</span>, <span class="kw-2">&amp;</span><span class="ident">cam</span>)))
}
<span class="doccomment">/// Parse an OSM-style `zoom/lat/lon` string</span>
@ -368,15 +385,15 @@
<span class="macro">format!</span>(<span class="string">&quot;{}?{}&quot;</span>, <span class="ident">url_parts</span>[<span class="number">0</span>], <span class="ident">query_params</span>)
}
<span class="kw">fn</span> <span class="ident">change_url_cam</span>(<span class="ident">url</span>: <span class="ident">String</span>, <span class="ident">cam</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">String</span> {
<span class="kw">fn</span> <span class="ident">change_url_param</span>(<span class="ident">url</span>: <span class="ident">String</span>, <span class="ident">key</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>, <span class="ident">value</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">String</span> {
<span class="comment">// The URL parsing crates I checked had lots of dependencies and didn&#39;t even expose such a nice</span>
<span class="comment">// API for doing this anyway.</span>
<span class="kw">let</span> <span class="ident">url_parts</span> <span class="op">=</span> <span class="ident">url</span>.<span class="ident">split</span>(<span class="string">&#39;?&#39;</span>).<span class="ident">collect</span>::<span class="op">&lt;</span><span class="ident">Vec</span><span class="op">&lt;</span><span class="kw">_</span><span class="op">&gt;</span><span class="op">&gt;</span>();
<span class="kw">if</span> <span class="ident">url_parts</span>.<span class="ident">len</span>() <span class="op">=</span><span class="op">=</span> <span class="number">1</span> {
<span class="kw">return</span> <span class="macro">format!</span>(<span class="string">&quot;{}?--cam={}&quot;</span>, <span class="ident">url</span>, <span class="ident">cam</span>);
<span class="kw">return</span> <span class="macro">format!</span>(<span class="string">&quot;{}?{}={}&quot;</span>, <span class="ident">url</span>, <span class="ident">key</span>, <span class="ident">value</span>);
}
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">query_params</span> <span class="op">=</span> <span class="ident">String::new</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">found_cam</span> <span class="op">=</span> <span class="bool-val">false</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">found_key</span> <span class="op">=</span> <span class="bool-val">false</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">first</span> <span class="op">=</span> <span class="bool-val">true</span>;
<span class="kw">for</span> <span class="ident">x</span> <span class="kw">in</span> <span class="ident">url_parts</span>[<span class="number">1</span>].<span class="ident">split</span>(<span class="string">&#39;&amp;&#39;</span>) {
<span class="kw">if</span> <span class="op">!</span><span class="ident">first</span> {
@ -384,18 +401,18 @@
}
<span class="ident">first</span> <span class="op">=</span> <span class="bool-val">false</span>;
<span class="kw">if</span> <span class="ident">x</span>.<span class="ident">starts_with</span>(<span class="string">&quot;--cam=&quot;</span>) {
<span class="ident">query_params</span>.<span class="ident">push_str</span>(<span class="kw-2">&amp;</span><span class="macro">format!</span>(<span class="string">&quot;--cam={}&quot;</span>, <span class="ident">cam</span>));
<span class="ident">found_cam</span> <span class="op">=</span> <span class="bool-val">true</span>;
<span class="kw">if</span> <span class="ident">x</span>.<span class="ident">starts_with</span>(<span class="ident">key</span>) {
<span class="ident">query_params</span>.<span class="ident">push_str</span>(<span class="kw-2">&amp;</span><span class="macro">format!</span>(<span class="string">&quot;{}={}&quot;</span>, <span class="ident">key</span>, <span class="ident">value</span>));
<span class="ident">found_key</span> <span class="op">=</span> <span class="bool-val">true</span>;
} <span class="kw">else</span> {
<span class="ident">query_params</span>.<span class="ident">push_str</span>(<span class="ident">x</span>);
}
}
<span class="kw">if</span> <span class="op">!</span><span class="ident">found_cam</span> {
<span class="kw">if</span> <span class="op">!</span><span class="ident">found_key</span> {
<span class="kw">if</span> <span class="op">!</span><span class="ident">first</span> {
<span class="ident">query_params</span>.<span class="ident">push</span>(<span class="string">&#39;&amp;&#39;</span>);
}
<span class="ident">query_params</span>.<span class="ident">push_str</span>(<span class="kw-2">&amp;</span><span class="macro">format!</span>(<span class="string">&quot;--cam={}&quot;</span>, <span class="ident">cam</span>));
<span class="ident">query_params</span>.<span class="ident">push_str</span>(<span class="kw-2">&amp;</span><span class="macro">format!</span>(<span class="string">&quot;{}={}&quot;</span>, <span class="ident">key</span>, <span class="ident">value</span>));
}
<span class="macro">format!</span>(<span class="string">&quot;{}?{}&quot;</span>, <span class="ident">url_parts</span>[<span class="number">0</span>], <span class="ident">query_params</span>)
@ -431,19 +448,24 @@
}
<span class="attribute">#[<span class="ident">test</span>]</span>
<span class="kw">fn</span> <span class="ident">test_change_url_cam</span>() {
<span class="kw">use</span> <span class="kw">super</span><span class="ident">::change_url_cam</span>;
<span class="kw">fn</span> <span class="ident">test_change_url_param</span>() {
<span class="kw">use</span> <span class="kw">super</span><span class="ident">::change_url_param</span>;
<span class="macro">assert_eq!</span>(
<span class="string">&quot;http://0.0.0.0:8000/?--dev&amp;seattle/maps/montlake.bin&amp;--cam=16.6/53.78449/-1.70701&quot;</span>,
<span class="ident">change_url_cam</span>(
<span class="ident">change_url_param</span>(
<span class="string">&quot;http://0.0.0.0:8000/?--dev&amp;seattle/maps/montlake.bin&quot;</span>.<span class="ident">to_string</span>(),
<span class="string">&quot;--cam&quot;</span>,
<span class="string">&quot;16.6/53.78449/-1.70701&quot;</span>
)
);
<span class="macro">assert_eq!</span>(
<span class="string">&quot;http://0.0.0.0:8000?--cam=16.6/53.78449/-1.70701&quot;</span>,
<span class="ident">change_url_cam</span>(<span class="string">&quot;http://0.0.0.0:8000&quot;</span>.<span class="ident">to_string</span>(), <span class="string">&quot;16.6/53.78449/-1.70701&quot;</span>)
<span class="ident">change_url_param</span>(
<span class="string">&quot;http://0.0.0.0:8000&quot;</span>.<span class="ident">to_string</span>(),
<span class="string">&quot;--cam&quot;</span>,
<span class="string">&quot;16.6/53.78449/-1.70701&quot;</span>
)
);
}
}