This commit is contained in:
dabreegster 2021-05-24 22:04:53 +00:00
parent ee4d688b38
commit 16543ed9df
32 changed files with 347 additions and 142 deletions

File diff suppressed because one or more lines are too long

View File

@ -86,9 +86,9 @@ the event and immediately apply the transition. <a href="#method.panel_changed">
</div><h4 id="method.on_mouseover-7" class="method hidden"><code>pub fn <a href="#method.on_mouseover" class="fnname">on_mouseover</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A)</code></h4><div class='docblock hidden'><p>Called when the mouse has moved.</p>
</div><h4 id="method.other_event-7" class="method hidden"><code>pub fn <a href="#method.other_event" class="fnname">other_event</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A) -&gt; Transition&lt;A&gt;</code></h4><div class='docblock hidden'><p>If a panel <code>on_click</code> event didnt occur and <code>panel_changed</code> didnt return transition, then
call this to handle all other events. <a href="#method.other_event">Read more</a></p>
</div><h4 id="method.draw_baselayer-64" class="method hidden"><code>pub fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</code></h4></div><h3 id="impl-SimpleState%3CApp%3E-8" class="impl"><code class="in-band">impl SimpleState&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../../game/sandbox/gameplay/freeform/struct.ChangeScenario.html" title="struct game::sandbox::gameplay::freeform::ChangeScenario">ChangeScenario</a></code><a href="#impl-SimpleState%3CApp%3E-8" class="anchor"></a><a class="srclink" href="../../src/game/sandbox/gameplay/freeform/mod.rs.html#290-332" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.on_click-8" class="method hidden"><code>fn <a href="#method.on_click" class="fnname">on_click</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;x: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;_: &amp;Panel<br>) -&gt; Transition&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;</code><a class="srclink" href="../../src/game/sandbox/gameplay/freeform/mod.rs.html#291-327" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Called when something on the panel has been clicked. Since the action is just a string,
</div><h4 id="method.draw_baselayer-64" class="method hidden"><code>pub fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</code></h4></div><h3 id="impl-SimpleState%3CApp%3E-8" class="impl"><code class="in-band">impl SimpleState&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../../game/sandbox/gameplay/freeform/struct.ChangeScenario.html" title="struct game::sandbox::gameplay::freeform::ChangeScenario">ChangeScenario</a></code><a href="#impl-SimpleState%3CApp%3E-8" class="anchor"></a><a class="srclink" href="../../src/game/sandbox/gameplay/freeform/mod.rs.html#294-347" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.on_click-8" class="method hidden"><code>fn <a href="#method.on_click" class="fnname">on_click</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;x: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;_: &amp;Panel<br>) -&gt; Transition&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;</code><a class="srclink" href="../../src/game/sandbox/gameplay/freeform/mod.rs.html#295-342" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Called when something on the panel has been clicked. Since the action is just a string,
the fallback case can just use <code>unreachable!()</code>. <a href="#tymethod.on_click">Read more</a></p>
</div><h4 id="method.draw-66" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>)</code><a class="srclink" href="../../src/game/sandbox/gameplay/freeform/mod.rs.html#329-331" title="goto source code">[src]</a></h4><h4 id="method.panel_changed-9" class="method hidden"><code>pub fn <a href="#method.panel_changed" class="fnname">panel_changed</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A, <br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut Panel<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Transition&lt;A&gt;&gt;</code></h4><div class='docblock hidden'><p>Called when something on the panel has changed. If a transition is returned, stop handling
</div><h4 id="method.draw-66" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>)</code><a class="srclink" href="../../src/game/sandbox/gameplay/freeform/mod.rs.html#344-346" title="goto source code">[src]</a></h4><h4 id="method.panel_changed-9" class="method hidden"><code>pub fn <a href="#method.panel_changed" class="fnname">panel_changed</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A, <br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut Panel<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Transition&lt;A&gt;&gt;</code></h4><div class='docblock hidden'><p>Called when something on the panel has changed. If a transition is returned, stop handling
the event and immediately apply the transition. <a href="#method.panel_changed">Read more</a></p>
</div><h4 id="method.on_mouseover-8" class="method hidden"><code>pub fn <a href="#method.on_mouseover" class="fnname">on_mouseover</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A)</code></h4><div class='docblock hidden'><p>Called when the mouse has moved.</p>
</div><h4 id="method.other_event-8" class="method hidden"><code>pub fn <a href="#method.other_event" class="fnname">other_event</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A) -&gt; Transition&lt;A&gt;</code></h4><div class='docblock hidden'><p>If a panel <code>on_click</code> event didnt occur and <code>panel_changed</code> didnt return transition, then

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="The build time in RFC2822, UTC."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>game::pregame::built_info::BUILT_TIME_UTC - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#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"><p class="location"><a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a></p><div id="sidebar-vars" data-name="BUILT_TIME_UTC" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="">BUILT_TIME_UTC</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-5c43cf842746ecf2/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/nightly/std/primitive.str.html">str</a> = r&quot;Mon, 24 May 2021 17:20:41 +0000&quot;;</pre><div class="docblock"><p>The build time in RFC2822, UTC.</p>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="">BUILT_TIME_UTC</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-5c43cf842746ecf2/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/nightly/std/primitive.str.html">str</a> = r&quot;Mon, 24 May 2021 22:02:49 +0000&quot;;</pre><div class="docblock"><p>The build time in RFC2822, UTC.</p>
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-js="../../../search-index.js"></div>
<script src="../../../main.js"></script></body></html>

View File

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

View File

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

View File

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

View File

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

View File

@ -1,6 +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 `grid2demand` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, grid2demand"><title>game::sandbox::gameplay::freeform::grid2demand - Rust</title><link rel="stylesheet" type="text/css" href="../../../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../../../storage.js"></script><script src="../../../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../../../rust-logo.png' alt='logo'></div></a><p class="location">Module grid2demand</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#functions">Functions</a></li></ul></div><p class="location"><a href="../../../../index.html">game</a>::<wbr><a href="../../../index.html">sandbox</a>::<wbr><a href="../../index.html">gameplay</a>::<wbr><a href="../index.html">freeform</a></p><div id="sidebar-vars" data-name="grid2demand" data-ty="mod" data-relpath="../"></div><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../../../settings.html"><img src="../../../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../../../index.html">game</a>::<wbr><a href="../../../index.html">sandbox</a>::<wbr><a href="../../index.html">gameplay</a>::<wbr><a href="../index.html">freeform</a>::<wbr><a class="mod" href="">grid2demand</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../../../src/game/sandbox/gameplay/freeform/grid2demand.rs.html#3-49" title="goto source code">[src]</a></span></h1><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>
<table><tr class="module-item"><td><a class="fn" href="fn.import.html" title="game::sandbox::gameplay::freeform::grid2demand::import fn">import</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../../../" data-current-crate="game" data-search-js="../../../../../search-index.js"></div>
<script src="../../../../../main.js"></script></body></html>

View File

@ -1 +0,0 @@
initSidebarItems({"fn":[["import",""]]});

View File

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

View File

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

View File

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

View File

@ -0,0 +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 `importers` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, importers"><title>game::sandbox::gameplay::freeform::importers - Rust</title><link rel="stylesheet" type="text/css" href="../../../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../../../storage.js"></script><script src="../../../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../../../rust-logo.png' alt='logo'></div></a><p class="location">Module importers</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div><p class="location"><a href="../../../../index.html">game</a>::<wbr><a href="../../../index.html">sandbox</a>::<wbr><a href="../../index.html">gameplay</a>::<wbr><a href="../index.html">freeform</a></p><div id="sidebar-vars" data-name="importers" data-ty="mod" data-relpath="../"></div><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../../../settings.html"><img src="../../../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../../../index.html">game</a>::<wbr><a href="../../../index.html">sandbox</a>::<wbr><a href="../../index.html">gameplay</a>::<wbr><a href="../index.html">freeform</a>::<wbr><a class="mod" href="">importers</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../../../src/game/sandbox/gameplay/freeform/importers.rs.html#3-114" 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.Input.html" title="game::sandbox::gameplay::freeform::importers::Input struct">Input</a></td><td class="docblock-short"></td></tr></table><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>
<table><tr class="module-item"><td><a class="fn" href="fn.import_grid2demand.html" title="game::sandbox::gameplay::freeform::importers::import_grid2demand fn">import_grid2demand</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.import_json.html" title="game::sandbox::gameplay::freeform::importers::import_json fn">import_json</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.import_json_scenario.html" title="game::sandbox::gameplay::freeform::importers::import_json_scenario fn">import_json_scenario</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../../../" data-current-crate="game" data-search-js="../../../../../search-index.js"></div>
<script src="../../../../../main.js"></script></body></html>

View File

@ -0,0 +1 @@
initSidebarItems({"fn":[["import_grid2demand",""],["import_json",""],["import_json_scenario",""]],"struct":[["Input",""]]});

View File

@ -0,0 +1,34 @@
<!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 `Input` struct in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, Input"><title>game::sandbox::gameplay::freeform::importers::Input - Rust</title><link rel="stylesheet" type="text/css" href="../../../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../../../storage.js"></script><script src="../../../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../../../rust-logo.png' alt='logo'></div></a><p class="location">Struct Input</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.people">people</a><a href="#structfield.scenario_name">scenario_name</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Deserialize%3C%27de%3E">Deserialize&lt;&#39;de&gt;</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-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><p class="location"><a href="../../../../index.html">game</a>::<wbr><a href="../../../index.html">sandbox</a>::<wbr><a href="../../index.html">gameplay</a>::<wbr><a href="../index.html">freeform</a>::<wbr><a href="index.html">importers</a></p><div id="sidebar-vars" data-name="Input" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../../../settings.html"><img src="../../../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../../../../index.html">game</a>::<wbr><a href="../../../index.html">sandbox</a>::<wbr><a href="../../index.html">gameplay</a>::<wbr><a href="../index.html">freeform</a>::<wbr><a href="index.html">importers</a>::<wbr><a class="struct" href="">Input</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../../../src/game/sandbox/gameplay/freeform/importers.rs.html#111-114" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">struct Input {
scenario_name: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>,
people: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../../../../sim/make/external/struct.ExternalPerson.html" title="struct sim::make::external::ExternalPerson">ExternalPerson</a>&gt;,
}</pre></div><h2 id="fields" class="fields small-section-header">
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.scenario_name" class="structfield small-section-header"><a href="#structfield.scenario_name" class="anchor field"></a><code>scenario_name: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code></span><span id="structfield.people" class="structfield small-section-header"><a href="#structfield.people" class="anchor field"></a><code>people: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../../../../sim/make/external/struct.ExternalPerson.html" title="struct sim::make::external::ExternalPerson">ExternalPerson</a>&gt;</code></span><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Deserialize%3C%27de%3E" class="impl"><code class="in-band">impl&lt;'de&gt; <a class="trait" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt; for <a class="struct" href="../../../../../game/sandbox/gameplay/freeform/importers/struct.Input.html" title="struct game::sandbox::gameplay::freeform::importers::Input">Input</a></code><a href="#impl-Deserialize%3C%27de%3E" class="anchor"></a><a class="srclink" href="../../../../../src/game/sandbox/gameplay/freeform/importers.rs.html#110" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.deserialize" class="method hidden"><code>fn <a href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html#tymethod.deserialize" class="fnname">deserialize</a>&lt;__D&gt;(__deserializer: __D) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, __D::<a class="type" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__D: <a class="trait" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a>&lt;'de&gt;,&nbsp;</span></code><a class="srclink" href="../../../../../src/game/sandbox/gameplay/freeform/importers.rs.html#110" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
</div></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../../../../game/sandbox/gameplay/freeform/importers/struct.Input.html" title="struct game::sandbox::gameplay::freeform::importers::Input">Input</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../../../../game/sandbox/gameplay/freeform/importers/struct.Input.html" title="struct game::sandbox::gameplay::freeform::importers::Input">Input</a></code><a href="#impl-Send" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../../../../game/sandbox/gameplay/freeform/importers/struct.Input.html" title="struct game::sandbox::gameplay::freeform::importers::Input">Input</a></code><a href="#impl-Sync" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../../../../game/sandbox/gameplay/freeform/importers/struct.Input.html" title="struct game::sandbox::gameplay::freeform::importers::Input">Input</a></code><a href="#impl-Unpin" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../../../../game/sandbox/gameplay/freeform/importers/struct.Input.html" title="struct game::sandbox::gameplay::freeform::importers::Input">Input</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#131-135" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></div><h3 id="impl-DeserializeOwned" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://docs.rs/serde/1.0.126/serde/de/trait.DeserializeOwned.html" title="trait serde::de::DeserializeOwned">DeserializeOwned</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: for&lt;'de&gt; <a class="trait" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt;,&nbsp;</span></code><a href="#impl-DeserializeOwned" class="anchor"></a><a class="srclink" href="https://docs.rs/serde/1.0.126/src/serde/de/mod.rs.html#603" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Downcast" class="impl"><code class="in-band">impl&lt;T&gt; Downcast for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a>,&nbsp;</span></code><a href="#impl-Downcast" class="anchor"></a></h3><div class="impl-items"><h4 id="method.into_any" class="method hidden"><code>pub fn <a href="#method.into_any" class="fnname">into_any</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;T, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;</code></h4><div class='docblock hidden'><p>Convert <code>Box&lt;dyn Trait&gt;</code> (where <code>Trait: Downcast</code>) to <code>Box&lt;dyn Any&gt;</code>. <code>Box&lt;dyn Any&gt;</code> can
then be further <code>downcast</code> into <code>Box&lt;ConcreteType&gt;</code> where <code>ConcreteType</code> implements <code>Trait</code>. <a href="#tymethod.into_any">Read more</a></p>
</div><h4 id="method.into_any_rc" class="method hidden"><code>pub fn <a href="#method.into_any_rc" class="fnname">into_any_rc</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html" title="struct alloc::rc::Rc">Rc</a>&lt;T&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html" title="struct alloc::rc::Rc">Rc</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static&gt;</code></h4><div class='docblock hidden'><p>Convert <code>Rc&lt;Trait&gt;</code> (where <code>Trait: Downcast</code>) to <code>Rc&lt;Any&gt;</code>. <code>Rc&lt;Any&gt;</code> can then be
further <code>downcast</code> into <code>Rc&lt;ConcreteType&gt;</code> where <code>ConcreteType</code> implements <code>Trait</code>. <a href="#tymethod.into_any_rc">Read more</a></p>
</div><h4 id="method.as_any" class="method hidden"><code>pub fn <a href="#method.as_any" class="fnname">as_any</a>(&amp;self) -&gt; &amp;(dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static)</code></h4><div class='docblock hidden'><p>Convert <code>&amp;Trait</code> (where <code>Trait: Downcast</code>) to <code>&amp;Any</code>. This is needed since Rust cannot
generate <code>&amp;Any</code>s vtable from <code>&amp;Trait</code>s. <a href="#tymethod.as_any">Read more</a></p>
</div><h4 id="method.as_any_mut" class="method hidden"><code>pub fn <a href="#method.as_any_mut" class="fnname">as_any_mut</a>(&amp;mut self) -&gt; &amp;mut (dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static)</code></h4><div class='docblock hidden'><p>Convert <code>&amp;mut Trait</code> (where <code>Trait: Downcast</code>) to <code>&amp;Any</code>. This is needed since Rust cannot
generate <code>&amp;mut Any</code>s vtable from <code>&amp;mut Trait</code>s. <a href="#tymethod.as_any_mut">Read more</a></p>
</div></div><h3 id="impl-DowncastSync" class="impl"><code class="in-band">impl&lt;T&gt; DowncastSync for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,&nbsp;</span></code><a href="#impl-DowncastSync" class="anchor"></a></h3><div class="impl-items"><h4 id="method.into_any_arc" class="method hidden"><code>pub fn <a href="#method.into_any_arc" class="fnname">into_any_arc</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a>&lt;T&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>&gt;</code></h4><div class='docblock hidden'><p>Convert <code>Arc&lt;Trait&gt;</code> (where <code>Trait: Downcast</code>) to <code>Arc&lt;Any&gt;</code>. <code>Arc&lt;Any&gt;</code> can then be
further <code>downcast</code> into <code>Arc&lt;ConcreteType&gt;</code> where <code>ConcreteType</code> implements <code>Trait</code>. <a href="#tymethod.into_any_arc">Read more</a></p>
</div></div><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#544-548" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -&gt; T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id="impl-Instrument" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://docs.rs/tracing/0.1.26/tracing/instrument/trait.Instrument.html" title="trait tracing::instrument::Instrument">Instrument</a> for T</code><a href="#impl-Instrument" class="anchor"></a><a class="srclink" href="https://docs.rs/tracing/0.1.26/src/tracing/instrument.rs.html#155" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.instrument" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing/0.1.26/tracing/instrument/trait.Instrument.html#method.instrument" class="fnname">instrument</a>(self, span: <a class="struct" href="https://docs.rs/tracing/0.1.26/tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -&gt; <a class="struct" href="https://docs.rs/tracing/0.1.26/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a>&lt;Self&gt;</code><a class="srclink" href="https://docs.rs/tracing/0.1.26/src/tracing/instrument.rs.html#38" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the provided <code>Span</code>, returning an
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.26/tracing/instrument/trait.Instrument.html#method.instrument">Read more</a></p>
</div><h4 id="method.in_current_span" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing/0.1.26/tracing/instrument/trait.Instrument.html#method.in_current_span" class="fnname">in_current_span</a>(self) -&gt; <a class="struct" href="https://docs.rs/tracing/0.1.26/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a>&lt;Self&gt;</code><a class="srclink" href="https://docs.rs/tracing/0.1.26/src/tracing/instrument.rs.html#74" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the <a href="../struct.Span.html#method.current">current</a> <code>Span</code>, returning an
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.26/tracing/instrument/trait.Instrument.html#method.in_current_span">Read more</a></p>
</div></div><h3 id="impl-Into%3CU%3E" class="impl"><code class="in-band">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,&nbsp;</span></code><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#533-540" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -&gt; U</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#537" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id="impl-Same%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; Same&lt;T&gt; for T</code><a href="#impl-Same%3CT%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="associatedtype.Output" class="type"><code>type <a href="#associatedtype.Output" class="type">Output</a> = T</code></h4><div class='docblock'><p>Should always be <code>Self</code></p>
</div></div><h3 id="impl-TryFrom%3CU%3E" class="impl"><code class="in-band">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,&nbsp;</span></code><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#581-590" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id="method.try_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#587" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id="impl-TryInto%3CU%3E" class="impl"><code class="in-band">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,&nbsp;</span></code><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#567-576" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error-1" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id="method.try_into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#573" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id="impl-VZip%3CV%3E" class="impl"><code class="in-band">impl&lt;V, T&gt; VZip&lt;V&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;V: MultiLane&lt;T&gt;,&nbsp;</span></code><a href="#impl-VZip%3CV%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="method.vzip" class="method hidden"><code>pub fn <a href="#method.vzip" class="fnname">vzip</a>(self) -&gt; V</code></h4></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../../../" data-current-crate="game" data-search-js="../../../../../search-index.js"></div>
<script src="../../../../../main.js"></script></body></html>

View File

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

View File

@ -1 +1 @@
initSidebarItems({"fn":[["actions",""],["execute",""],["spawn_agents_around",""]],"mod":[["grid2demand",""],["spawner",""]],"struct":[["ChangeScenario",""],["Freeform",""]]});
initSidebarItems({"fn":[["actions",""],["execute",""],["spawn_agents_around",""]],"mod":[["importers",""],["spawner",""]],"struct":[["ChangeScenario",""],["Freeform",""]]});

View File

@ -1,9 +1,9 @@
<!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 `ChangeScenario` struct in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, ChangeScenario"><title>game::sandbox::gameplay::freeform::ChangeScenario - Rust</title><link rel="stylesheet" type="text/css" href="../../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../../storage.js"></script><script src="../../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../../rust-logo.png' alt='logo'></div></a><p class="location">Struct ChangeScenario</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.new_state">new_state</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-SimpleState%3CApp%3E">SimpleState&lt;App&gt;</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&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><p class="location"><a href="../../../index.html">game</a>::<wbr><a href="../../index.html">sandbox</a>::<wbr><a href="../index.html">gameplay</a>::<wbr><a href="index.html">freeform</a></p><div id="sidebar-vars" data-name="ChangeScenario" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../../settings.html"><img src="../../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../../../index.html">game</a>::<wbr><a href="../../index.html">sandbox</a>::<wbr><a href="../index.html">gameplay</a>::<wbr><a href="index.html">freeform</a>::<wbr><a class="struct" href="">ChangeScenario</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../../src/game/sandbox/gameplay/freeform/mod.rs.html#181" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct ChangeScenario;</pre></div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../../../../game/sandbox/gameplay/freeform/struct.ChangeScenario.html" title="struct game::sandbox::gameplay::freeform::ChangeScenario">ChangeScenario</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../../../src/game/sandbox/gameplay/freeform/mod.rs.html#183-288" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new_state" class="method"><code>pub fn <a href="#method.new_state" class="fnname">new_state</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;current_scenario: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn State&lt;<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;&gt;</code><a class="srclink" href="../../../../src/game/sandbox/gameplay/freeform/mod.rs.html#184-287" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-SimpleState%3CApp%3E" class="impl"><code class="in-band">impl SimpleState&lt;<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../../../../game/sandbox/gameplay/freeform/struct.ChangeScenario.html" title="struct game::sandbox::gameplay::freeform::ChangeScenario">ChangeScenario</a></code><a href="#impl-SimpleState%3CApp%3E" class="anchor"></a><a class="srclink" href="../../../../src/game/sandbox/gameplay/freeform/mod.rs.html#290-332" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.on_click" class="method hidden"><code>fn <a href="#method.on_click" class="fnname">on_click</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;mut <a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;x: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;_: &amp;Panel<br>) -&gt; Transition&lt;<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;</code><a class="srclink" href="../../../../src/game/sandbox/gameplay/freeform/mod.rs.html#291-327" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Called when something on the panel has been clicked. Since the action is just a string,
<a id="settings-menu" href="../../../../settings.html"><img src="../../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../../../index.html">game</a>::<wbr><a href="../../index.html">sandbox</a>::<wbr><a href="../index.html">gameplay</a>::<wbr><a href="index.html">freeform</a>::<wbr><a class="struct" href="">ChangeScenario</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../../src/game/sandbox/gameplay/freeform/mod.rs.html#181" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct ChangeScenario;</pre></div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../../../../game/sandbox/gameplay/freeform/struct.ChangeScenario.html" title="struct game::sandbox::gameplay::freeform::ChangeScenario">ChangeScenario</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../../../src/game/sandbox/gameplay/freeform/mod.rs.html#183-292" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new_state" class="method"><code>pub fn <a href="#method.new_state" class="fnname">new_state</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;current_scenario: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn State&lt;<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;&gt;</code><a class="srclink" href="../../../../src/game/sandbox/gameplay/freeform/mod.rs.html#184-291" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-SimpleState%3CApp%3E" class="impl"><code class="in-band">impl SimpleState&lt;<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../../../../game/sandbox/gameplay/freeform/struct.ChangeScenario.html" title="struct game::sandbox::gameplay::freeform::ChangeScenario">ChangeScenario</a></code><a href="#impl-SimpleState%3CApp%3E" class="anchor"></a><a class="srclink" href="../../../../src/game/sandbox/gameplay/freeform/mod.rs.html#294-347" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.on_click" class="method hidden"><code>fn <a href="#method.on_click" class="fnname">on_click</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;mut <a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;x: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;_: &amp;Panel<br>) -&gt; Transition&lt;<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;</code><a class="srclink" href="../../../../src/game/sandbox/gameplay/freeform/mod.rs.html#295-342" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Called when something on the panel has been clicked. Since the action is just a string,
the fallback case can just use <code>unreachable!()</code>. <a href="#tymethod.on_click">Read more</a></p>
</div><h4 id="method.draw" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>)</code><a class="srclink" href="../../../../src/game/sandbox/gameplay/freeform/mod.rs.html#329-331" title="goto source code">[src]</a></h4><h4 id="method.panel_changed" class="method hidden"><code>pub fn <a href="#method.panel_changed" class="fnname">panel_changed</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A, <br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut Panel<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Transition&lt;A&gt;&gt;</code></h4><div class='docblock hidden'><p>Called when something on the panel has changed. If a transition is returned, stop handling
</div><h4 id="method.draw" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>)</code><a class="srclink" href="../../../../src/game/sandbox/gameplay/freeform/mod.rs.html#344-346" title="goto source code">[src]</a></h4><h4 id="method.panel_changed" class="method hidden"><code>pub fn <a href="#method.panel_changed" class="fnname">panel_changed</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A, <br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut Panel<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Transition&lt;A&gt;&gt;</code></h4><div class='docblock hidden'><p>Called when something on the panel has changed. If a transition is returned, stop handling
the event and immediately apply the transition. <a href="#method.panel_changed">Read more</a></p>
</div><h4 id="method.on_mouseover" class="method hidden"><code>pub fn <a href="#method.on_mouseover" class="fnname">on_mouseover</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A)</code></h4><div class='docblock hidden'><p>Called when the mouse has moved.</p>
</div><h4 id="method.other_event" class="method hidden"><code>pub fn <a href="#method.other_event" class="fnname">other_event</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A) -&gt; Transition&lt;A&gt;</code></h4><div class='docblock hidden'><p>If a panel <code>on_click</code> event didnt occur and <code>panel_changed</code> didnt return transition, then

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -9,7 +9,7 @@ sourcesIndex["dump_map"] = {"name":"","files":["dump_map.rs"]};
sourcesIndex["dump_scenario"] = {"name":"","files":["dump_scenario.rs"]};
sourcesIndex["extract_cities"] = {"name":"","files":["extract_cities.rs"]};
sourcesIndex["fifteen_min"] = {"name":"","files":["find_amenities.rs","find_home.rs","isochrone.rs","lib.rs","viewer.rs"]};
sourcesIndex["game"] = {"name":"","dirs":[{"name":"challenges","files":["cutscene.rs","mod.rs","prebake.rs"]},{"name":"common","files":["mod.rs","select.rs","warp.rs"]},{"name":"debug","files":["blocked_by.rs","floodfill.rs","mod.rs","objects.rs","path_counter.rs","polygons.rs","routes.rs","select_roads.rs","shared_row.rs","streetmix.rs","uber_turns.rs"]},{"name":"devtools","files":["collisions.rs","destinations.rs","kml.rs","mod.rs","polygon.rs","scenario.rs","story.rs"]},{"name":"edit","dirs":[{"name":"traffic_signals","files":["edits.rs","gmns.rs","mod.rs","offsets.rs","picker.rs","preview.rs"]}],"files":["mod.rs","multiple_roads.rs","roads.rs","routes.rs","stop_signs.rs","validate.rs","zones.rs"]},{"name":"info","files":["building.rs","bus.rs","debug.rs","intersection.rs","lane.rs","mod.rs","parking_lot.rs","person.rs","trip.rs"]},{"name":"layer","files":["elevation.rs","favorites.rs","map.rs","mod.rs","pandemic.rs","parking.rs","population.rs","problems.rs","traffic.rs","transit.rs"]},{"name":"pregame","files":["mod.rs","proposals.rs"]},{"name":"sandbox","dirs":[{"name":"dashboards","files":["commuter.rs","generic_trip_table.rs","misc.rs","mod.rs","parking_overhead.rs","risks.rs","selector.rs","traffic_signals.rs","travel_times.rs","trip_problems.rs","trip_table.rs"]},{"name":"gameplay","dirs":[{"name":"freeform","files":["grid2demand.rs","mod.rs","spawner.rs"]}],"files":["actdev.rs","commute.rs","fix_traffic_signals.rs","mod.rs","play_scenario.rs","tutorial.rs"]}],"files":["minimap.rs","misc_tools.rs","mod.rs","speed.rs","time_warp.rs"]}],"files":["app.rs","lib.rs"]};
sourcesIndex["game"] = {"name":"","dirs":[{"name":"challenges","files":["cutscene.rs","mod.rs","prebake.rs"]},{"name":"common","files":["mod.rs","select.rs","warp.rs"]},{"name":"debug","files":["blocked_by.rs","floodfill.rs","mod.rs","objects.rs","path_counter.rs","polygons.rs","routes.rs","select_roads.rs","shared_row.rs","streetmix.rs","uber_turns.rs"]},{"name":"devtools","files":["collisions.rs","destinations.rs","kml.rs","mod.rs","polygon.rs","scenario.rs","story.rs"]},{"name":"edit","dirs":[{"name":"traffic_signals","files":["edits.rs","gmns.rs","mod.rs","offsets.rs","picker.rs","preview.rs"]}],"files":["mod.rs","multiple_roads.rs","roads.rs","routes.rs","stop_signs.rs","validate.rs","zones.rs"]},{"name":"info","files":["building.rs","bus.rs","debug.rs","intersection.rs","lane.rs","mod.rs","parking_lot.rs","person.rs","trip.rs"]},{"name":"layer","files":["elevation.rs","favorites.rs","map.rs","mod.rs","pandemic.rs","parking.rs","population.rs","problems.rs","traffic.rs","transit.rs"]},{"name":"pregame","files":["mod.rs","proposals.rs"]},{"name":"sandbox","dirs":[{"name":"dashboards","files":["commuter.rs","generic_trip_table.rs","misc.rs","mod.rs","parking_overhead.rs","risks.rs","selector.rs","traffic_signals.rs","travel_times.rs","trip_problems.rs","trip_table.rs"]},{"name":"gameplay","dirs":[{"name":"freeform","files":["importers.rs","mod.rs","spawner.rs"]}],"files":["actdev.rs","commute.rs","fix_traffic_signals.rs","mod.rs","play_scenario.rs","tutorial.rs"]}],"files":["minimap.rs","misc_tools.rs","mod.rs","speed.rs","time_warp.rs"]}],"files":["app.rs","lib.rs"]};
sourcesIndex["generate_houses"] = {"name":"","files":["generate_houses.rs"]};
sourcesIndex["geojson_to_osmosis"] = {"name":"","files":["geojson_to_osmosis.rs"]};
sourcesIndex["geom"] = {"name":"","files":["angle.rs","bounds.rs","circle.rs","distance.rs","duration.rs","find_closest.rs","gps.rs","lib.rs","line.rs","percent.rs","polygon.rs","polyline.rs","pt.rs","ring.rs","speed.rs","stats.rs","time.rs"]};

View File

@ -100,7 +100,7 @@
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">maybe_read_json</span><span class="op">&lt;</span><span class="ident">T</span>: <span class="ident">DeserializeOwned</span><span class="op">&gt;</span>(<span class="ident">path</span>: <span class="ident">String</span>, <span class="ident">timer</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">Timer</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">T</span><span class="op">&gt;</span> {
<span class="kw">if</span> <span class="op">!</span><span class="ident">path</span>.<span class="ident">ends_with</span>(<span class="string">&quot;.json&quot;</span>) <span class="op">&amp;&amp;</span> <span class="op">!</span><span class="ident">path</span>.<span class="ident">ends_with</span>(<span class="string">&quot;.geojson&quot;</span>) {
<span class="macro">panic</span><span class="macro">!</span>(<span class="string">&quot;read_json needs {} to end with .json or .geojson&quot;</span>, <span class="ident">path</span>);
<span class="macro">bail</span><span class="macro">!</span>(<span class="string">&quot;read_json needs {} to end with .json or .geojson&quot;</span>, <span class="ident">path</span>);
}
<span class="ident">timer</span>.<span class="ident">start</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;parse {}&quot;</span>, <span class="ident">path</span>));

View File

@ -178,7 +178,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.52.1 (9bc8c42bb 2021-05-09)&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, 24 May 2021 17:20:41 +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, 24 May 2021 22:02:49 +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

@ -1,105 +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="Source of the Rust file `game/src/sandbox/gameplay/freeform/grid2demand.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>grid2demand.rs - source</title><link rel="stylesheet" type="text/css" href="../../../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../../../storage.js"></script><script src="../../../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../../../down-arrow.svg");}</style></head><body class="rustdoc source"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../../../rust-logo.png' alt='logo'></div></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../../../settings.html"><img src="../../../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><pre class="line-numbers"><span id="1"> 1</span>
<span id="2"> 2</span>
<span id="3"> 3</span>
<span id="4"> 4</span>
<span id="5"> 5</span>
<span id="6"> 6</span>
<span id="7"> 7</span>
<span id="8"> 8</span>
<span id="9"> 9</span>
<span id="10">10</span>
<span id="11">11</span>
<span id="12">12</span>
<span id="13">13</span>
<span id="14">14</span>
<span id="15">15</span>
<span id="16">16</span>
<span id="17">17</span>
<span id="18">18</span>
<span id="19">19</span>
<span id="20">20</span>
<span id="21">21</span>
<span id="22">22</span>
<span id="23">23</span>
<span id="24">24</span>
<span id="25">25</span>
<span id="26">26</span>
<span id="27">27</span>
<span id="28">28</span>
<span id="29">29</span>
<span id="30">30</span>
<span id="31">31</span>
<span id="32">32</span>
<span id="33">33</span>
<span id="34">34</span>
<span id="35">35</span>
<span id="36">36</span>
<span id="37">37</span>
<span id="38">38</span>
<span id="39">39</span>
<span id="40">40</span>
<span id="41">41</span>
<span id="42">42</span>
<span id="43">43</span>
<span id="44">44</span>
<span id="45">45</span>
<span id="46">46</span>
<span id="47">47</span>
<span id="48">48</span>
<span id="49">49</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="comment">// TODO This doesn&#39;t really belong in gameplay/freeform</span>
<span class="kw">use</span> <span class="ident">map_gui</span>::<span class="ident">tools</span>::{<span class="ident">find_exe</span>, <span class="ident">FilePicker</span>, <span class="ident">RunCommand</span>};
<span class="kw">use</span> <span class="ident">widgetry</span>::<span class="ident">EventCtx</span>;
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">app</span>::<span class="ident">Transition</span>;
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">sandbox</span>::<span class="ident">gameplay</span>::<span class="ident">GameplayMode</span>;
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">sandbox</span>::<span class="ident">SandboxMode</span>;
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">import</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="op">-</span><span class="op">&gt;</span> <span class="ident">Transition</span> {
<span class="ident">Transition</span>::<span class="ident">Push</span>(<span class="ident">FilePicker</span>::<span class="ident">new_state</span>(
<span class="ident">ctx</span>,
<span class="prelude-val">None</span>,
<span class="ident">Box</span>::<span class="ident">new</span>(<span class="op">|</span><span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">maybe_path</span><span class="op">|</span> {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Ok</span>(<span class="prelude-val">Some</span>(<span class="ident">path</span>)) <span class="op">=</span> <span class="ident">maybe_path</span> {
<span class="ident">Transition</span>::<span class="ident">Replace</span>(<span class="ident">RunCommand</span>::<span class="ident">new_state</span>(
<span class="ident">ctx</span>,
<span class="ident">app</span>,
<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">find_exe</span>(<span class="string">&quot;import_grid2demand&quot;</span>),
<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;--map={}&quot;</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="macro">format</span><span class="macro">!</span>(<span class="string">&quot;--input={}&quot;</span>, <span class="ident">path</span>),
],
<span class="ident">Box</span>::<span class="ident">new</span>(<span class="op">|</span><span class="kw">_</span>, <span class="ident">app</span>, <span class="ident">success</span>, <span class="kw">_</span><span class="op">|</span> {
<span class="kw">if</span> <span class="ident">success</span> {
<span class="comment">// Clear out the cached scenario. If we repeatedly use this import, the</span>
<span class="comment">// scenario name is always the same, but the file is changing.</span>
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">scenario</span> <span class="op">=</span> <span class="prelude-val">None</span>;
<span class="ident">Transition</span>::<span class="ident">Replace</span>(<span class="ident">SandboxMode</span>::<span class="ident">simple_new</span>(
<span class="ident">app</span>,
<span class="ident">GameplayMode</span>::<span class="ident">PlayScenario</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">clone</span>(),
<span class="string">&quot;grid2demand&quot;</span>.<span class="ident">to_string</span>(),
<span class="ident">Vec</span>::<span class="ident">new</span>(),
),
))
} <span class="kw">else</span> {
<span class="comment">// The popup already explained the failure</span>
<span class="ident">Transition</span>::<span class="ident">Keep</span>
}
}),
))
} <span class="kw">else</span> {
<span class="comment">// The user didn&#39;t pick a file, so stay on the scenario picker</span>
<span class="ident">Transition</span>::<span class="ident">Pop</span>
}
}),
))
}
</pre></div>
</section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../../../" data-current-crate="game" data-search-js="../../../../../search-index.js"></div>
<script src="../../../../../main.js"></script><script src="../../../../../source-script.js"></script><script src="../../../../../source-files.js"></script></body></html>

View File

@ -0,0 +1,235 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `game/src/sandbox/gameplay/freeform/importers.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>importers.rs - source</title><link rel="stylesheet" type="text/css" href="../../../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../../../storage.js"></script><script src="../../../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../../../down-arrow.svg");}</style></head><body class="rustdoc source"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../../../rust-logo.png' alt='logo'></div></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../../../settings.html"><img src="../../../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><pre class="line-numbers"><span id="1"> 1</span>
<span id="2"> 2</span>
<span id="3"> 3</span>
<span id="4"> 4</span>
<span id="5"> 5</span>
<span id="6"> 6</span>
<span id="7"> 7</span>
<span id="8"> 8</span>
<span id="9"> 9</span>
<span id="10"> 10</span>
<span id="11"> 11</span>
<span id="12"> 12</span>
<span id="13"> 13</span>
<span id="14"> 14</span>
<span id="15"> 15</span>
<span id="16"> 16</span>
<span id="17"> 17</span>
<span id="18"> 18</span>
<span id="19"> 19</span>
<span id="20"> 20</span>
<span id="21"> 21</span>
<span id="22"> 22</span>
<span id="23"> 23</span>
<span id="24"> 24</span>
<span id="25"> 25</span>
<span id="26"> 26</span>
<span id="27"> 27</span>
<span id="28"> 28</span>
<span id="29"> 29</span>
<span id="30"> 30</span>
<span id="31"> 31</span>
<span id="32"> 32</span>
<span id="33"> 33</span>
<span id="34"> 34</span>
<span id="35"> 35</span>
<span id="36"> 36</span>
<span id="37"> 37</span>
<span id="38"> 38</span>
<span id="39"> 39</span>
<span id="40"> 40</span>
<span id="41"> 41</span>
<span id="42"> 42</span>
<span id="43"> 43</span>
<span id="44"> 44</span>
<span id="45"> 45</span>
<span id="46"> 46</span>
<span id="47"> 47</span>
<span id="48"> 48</span>
<span id="49"> 49</span>
<span id="50"> 50</span>
<span id="51"> 51</span>
<span id="52"> 52</span>
<span id="53"> 53</span>
<span id="54"> 54</span>
<span id="55"> 55</span>
<span id="56"> 56</span>
<span id="57"> 57</span>
<span id="58"> 58</span>
<span id="59"> 59</span>
<span id="60"> 60</span>
<span id="61"> 61</span>
<span id="62"> 62</span>
<span id="63"> 63</span>
<span id="64"> 64</span>
<span id="65"> 65</span>
<span id="66"> 66</span>
<span id="67"> 67</span>
<span id="68"> 68</span>
<span id="69"> 69</span>
<span id="70"> 70</span>
<span id="71"> 71</span>
<span id="72"> 72</span>
<span id="73"> 73</span>
<span id="74"> 74</span>
<span id="75"> 75</span>
<span id="76"> 76</span>
<span id="77"> 77</span>
<span id="78"> 78</span>
<span id="79"> 79</span>
<span id="80"> 80</span>
<span id="81"> 81</span>
<span id="82"> 82</span>
<span id="83"> 83</span>
<span id="84"> 84</span>
<span id="85"> 85</span>
<span id="86"> 86</span>
<span id="87"> 87</span>
<span id="88"> 88</span>
<span id="89"> 89</span>
<span id="90"> 90</span>
<span id="91"> 91</span>
<span id="92"> 92</span>
<span id="93"> 93</span>
<span id="94"> 94</span>
<span id="95"> 95</span>
<span id="96"> 96</span>
<span id="97"> 97</span>
<span id="98"> 98</span>
<span id="99"> 99</span>
<span id="100">100</span>
<span id="101">101</span>
<span id="102">102</span>
<span id="103">103</span>
<span id="104">104</span>
<span id="105">105</span>
<span id="106">106</span>
<span id="107">107</span>
<span id="108">108</span>
<span id="109">109</span>
<span id="110">110</span>
<span id="111">111</span>
<span id="112">112</span>
<span id="113">113</span>
<span id="114">114</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="comment">// TODO This doesn&#39;t really belong in gameplay/freeform</span>
<span class="kw">use</span> <span class="ident">anyhow</span>::<span class="prelude-ty">Result</span>;
<span class="kw">use</span> <span class="ident">serde</span>::<span class="ident">Deserialize</span>;
<span class="kw">use</span> <span class="ident">abstutil</span>::<span class="ident">Timer</span>;
<span class="kw">use</span> <span class="ident">map_gui</span>::<span class="ident">tools</span>::{<span class="ident">find_exe</span>, <span class="ident">FilePicker</span>, <span class="ident">PopupMsg</span>, <span class="ident">RunCommand</span>};
<span class="kw">use</span> <span class="ident">map_model</span>::<span class="ident">Map</span>;
<span class="kw">use</span> <span class="ident">sim</span>::{<span class="ident">ExternalPerson</span>, <span class="ident">Scenario</span>};
<span class="kw">use</span> <span class="ident">widgetry</span>::<span class="ident">EventCtx</span>;
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">app</span>::<span class="ident">Transition</span>;
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">sandbox</span>::<span class="ident">gameplay</span>::<span class="ident">GameplayMode</span>;
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">sandbox</span>::<span class="ident">SandboxMode</span>;
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">import_grid2demand</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="op">-</span><span class="op">&gt;</span> <span class="ident">Transition</span> {
<span class="ident">Transition</span>::<span class="ident">Push</span>(<span class="ident">FilePicker</span>::<span class="ident">new_state</span>(
<span class="ident">ctx</span>,
<span class="prelude-val">None</span>,
<span class="ident">Box</span>::<span class="ident">new</span>(<span class="op">|</span><span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">maybe_path</span><span class="op">|</span> {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Ok</span>(<span class="prelude-val">Some</span>(<span class="ident">path</span>)) <span class="op">=</span> <span class="ident">maybe_path</span> {
<span class="ident">Transition</span>::<span class="ident">Replace</span>(<span class="ident">RunCommand</span>::<span class="ident">new_state</span>(
<span class="ident">ctx</span>,
<span class="ident">app</span>,
<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">find_exe</span>(<span class="string">&quot;import_grid2demand&quot;</span>),
<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;--map={}&quot;</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="macro">format</span><span class="macro">!</span>(<span class="string">&quot;--input={}&quot;</span>, <span class="ident">path</span>),
],
<span class="ident">Box</span>::<span class="ident">new</span>(<span class="op">|</span><span class="kw">_</span>, <span class="ident">app</span>, <span class="ident">success</span>, <span class="kw">_</span><span class="op">|</span> {
<span class="kw">if</span> <span class="ident">success</span> {
<span class="comment">// Clear out the cached scenario. If we repeatedly use this import, the</span>
<span class="comment">// scenario name is always the same, but the file is changing.</span>
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">scenario</span> <span class="op">=</span> <span class="prelude-val">None</span>;
<span class="ident">Transition</span>::<span class="ident">Replace</span>(<span class="ident">SandboxMode</span>::<span class="ident">simple_new</span>(
<span class="ident">app</span>,
<span class="ident">GameplayMode</span>::<span class="ident">PlayScenario</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">clone</span>(),
<span class="string">&quot;grid2demand&quot;</span>.<span class="ident">to_string</span>(),
<span class="ident">Vec</span>::<span class="ident">new</span>(),
),
))
} <span class="kw">else</span> {
<span class="comment">// The popup already explained the failure</span>
<span class="ident">Transition</span>::<span class="ident">Keep</span>
}
}),
))
} <span class="kw">else</span> {
<span class="comment">// The user didn&#39;t pick a file, so stay on the scenario picker</span>
<span class="ident">Transition</span>::<span class="ident">Pop</span>
}
}),
))
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">import_json</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="op">-</span><span class="op">&gt;</span> <span class="ident">Transition</span> {
<span class="ident">Transition</span>::<span class="ident">Push</span>(<span class="ident">FilePicker</span>::<span class="ident">new_state</span>(
<span class="ident">ctx</span>,
<span class="prelude-val">None</span>,
<span class="ident">Box</span>::<span class="ident">new</span>(<span class="op">|</span><span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">maybe_path</span><span class="op">|</span> {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Ok</span>(<span class="prelude-val">Some</span>(<span class="ident">path</span>)) <span class="op">=</span> <span class="ident">maybe_path</span> {
<span class="kw">let</span> <span class="ident">result</span> <span class="op">=</span> <span class="ident">ctx</span>.<span class="ident">loading_screen</span>(<span class="string">&quot;import JSON scenario&quot;</span>, <span class="op">|</span><span class="kw">_</span>, <span class="kw-2">mut</span> <span class="ident">timer</span><span class="op">|</span> {
<span class="ident">import_json_scenario</span>(<span class="kw-2">&amp;</span><span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>, <span class="ident">path</span>, <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">timer</span>)
});
<span class="kw">match</span> <span class="ident">result</span> {
<span class="prelude-val">Ok</span>(<span class="ident">scenario_name</span>) <span class="op">=</span><span class="op">&gt;</span> {
<span class="comment">// Clear out the cached scenario. If we repeatedly use this import, the</span>
<span class="comment">// scenario name is always the same, but the file is changing.</span>
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">scenario</span> <span class="op">=</span> <span class="prelude-val">None</span>;
<span class="ident">Transition</span>::<span class="ident">Replace</span>(<span class="ident">SandboxMode</span>::<span class="ident">simple_new</span>(
<span class="ident">app</span>,
<span class="ident">GameplayMode</span>::<span class="ident">PlayScenario</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">clone</span>(),
<span class="ident">scenario_name</span>,
<span class="ident">Vec</span>::<span class="ident">new</span>(),
),
))
}
<span class="prelude-val">Err</span>(<span class="ident">err</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="ident">Transition</span>::<span class="ident">Replace</span>(<span class="ident">PopupMsg</span>::<span class="ident">new_state</span>(
<span class="ident">ctx</span>,
<span class="string">&quot;Error&quot;</span>,
<span class="macro">vec</span><span class="macro">!</span>[<span class="ident">err</span>.<span class="ident">to_string</span>()],
)),
}
} <span class="kw">else</span> {
<span class="comment">// The user didn&#39;t pick a file, so stay on the scenario picker</span>
<span class="ident">Transition</span>::<span class="ident">Pop</span>
}
}),
))
}
<span class="comment">// This works the same as importer/src/bin/import_traffic.rs. We should decide how to share</span>
<span class="comment">// behavior between UI and CLI tools.</span>
<span class="kw">fn</span> <span class="ident">import_json_scenario</span>(<span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>, <span class="ident">input</span>: <span class="ident">String</span>, <span class="ident">timer</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">Timer</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">String</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">skip_problems</span> <span class="op">=</span> <span class="bool-val">true</span>;
<span class="kw">let</span> <span class="ident">input</span>: <span class="ident">Input</span> <span class="op">=</span> <span class="ident">abstio</span>::<span class="ident">maybe_read_json</span>(<span class="ident">input</span>, <span class="ident">timer</span>)<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">Scenario</span>::<span class="ident">empty</span>(<span class="ident">map</span>, <span class="kw-2">&amp;</span><span class="ident">input</span>.<span class="ident">scenario_name</span>);
<span class="comment">// Include all buses/trains</span>
<span class="ident">s</span>.<span class="ident">only_seed_buses</span> <span class="op">=</span> <span class="prelude-val">None</span>;
<span class="ident">s</span>.<span class="ident">people</span> <span class="op">=</span> <span class="ident">ExternalPerson</span>::<span class="ident">import</span>(<span class="ident">map</span>, <span class="ident">input</span>.<span class="ident">people</span>, <span class="ident">skip_problems</span>)<span class="question-mark">?</span>;
<span class="comment">// Always clean up people with no-op trips (going between the same buildings)</span>
<span class="ident">s</span> <span class="op">=</span> <span class="ident">s</span>.<span class="ident">remove_weird_schedules</span>();
<span class="ident">s</span>.<span class="ident">save</span>();
<span class="prelude-val">Ok</span>(<span class="ident">s</span>.<span class="ident">scenario_name</span>.<span class="ident">clone</span>())
}
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Deserialize</span>)]</span>
<span class="kw">struct</span> <span class="ident">Input</span> {
<span class="ident">scenario_name</span>: <span class="ident">String</span>,
<span class="ident">people</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">ExternalPerson</span><span class="op">&gt;</span>,
}
</pre></div>
</section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../../../" data-current-crate="game" data-search-js="../../../../../search-index.js"></div>
<script src="../../../../../main.js"></script><script src="../../../../../source-script.js"></script><script src="../../../../../source-files.js"></script></body></html>

View File

@ -422,9 +422,24 @@
<span id="419">419</span>
<span id="420">420</span>
<span id="421">421</span>
<span id="422">422</span>
<span id="423">423</span>
<span id="424">424</span>
<span id="425">425</span>
<span id="426">426</span>
<span id="427">427</span>
<span id="428">428</span>
<span id="429">429</span>
<span id="430">430</span>
<span id="431">431</span>
<span id="432">432</span>
<span id="433">433</span>
<span id="434">434</span>
<span id="435">435</span>
<span id="436">436</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">not</span>(<span class="ident">target_arch</span> <span class="op">=</span> <span class="string">&quot;wasm32&quot;</span>))]</span>
<span class="kw">mod</span> <span class="ident">grid2demand</span>;
<span class="kw">mod</span> <span class="ident">importers</span>;
<span class="kw">mod</span> <span class="ident">spawner</span>;
<span class="kw">use</span> <span class="ident">rand</span>::<span class="ident">seq</span>::<span class="ident">SliceRandom</span>;
@ -670,6 +685,10 @@
<span class="string">&quot;import grid2demand&quot;</span>.<span class="ident">to_string</span>(),
<span class="string">&quot;import Grid2Demand data&quot;</span>.<span class="ident">to_string</span>(),
<span class="string">&quot;Select an input_agents.csv file from https://github.com/asu-trans-ai-lab/grid2demand&quot;</span>));
<span class="ident">choices</span>.<span class="ident">push</span>((
<span class="string">&quot;import json&quot;</span>.<span class="ident">to_string</span>(),
<span class="string">&quot;import JSON scenario&quot;</span>.<span class="ident">to_string</span>(),
<span class="string">&quot;Select a JSON file specified by https://a-b-street.github.io/docs/dev/formats/scenarios.html&quot;</span>));
}
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">col</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[
@ -724,7 +743,18 @@
} <span class="kw">else</span> <span class="kw">if</span> <span class="ident">x</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;import grid2demand&quot;</span> {
<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">not</span>(<span class="ident">target_arch</span> <span class="op">=</span> <span class="string">&quot;wasm32&quot;</span>))]</span>
{
<span class="ident">grid2demand</span>::<span class="ident">import</span>(<span class="ident">ctx</span>)
<span class="ident">importers</span>::<span class="ident">import_grid2demand</span>(<span class="ident">ctx</span>)
}
<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">target_arch</span> <span class="op">=</span> <span class="string">&quot;wasm32&quot;</span>)]</span>
{
<span class="comment">// Silence compiler warnings</span>
<span class="kw">let</span> <span class="kw">_</span> <span class="op">=</span> <span class="ident">ctx</span>;
<span class="macro">unreachable</span><span class="macro">!</span>()
}
} <span class="kw">else</span> <span class="kw">if</span> <span class="ident">x</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;import json&quot;</span> {
<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">not</span>(<span class="ident">target_arch</span> <span class="op">=</span> <span class="string">&quot;wasm32&quot;</span>))]</span>
{
<span class="ident">importers</span>::<span class="ident">import_json</span>(<span class="ident">ctx</span>)
}
<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">target_arch</span> <span class="op">=</span> <span class="string">&quot;wasm32&quot;</span>)]</span>
{