This commit is contained in:
dabreegster 2020-10-22 21:44:26 +00:00
parent 594d416acb
commit 8f67e74439
16 changed files with 87 additions and 43 deletions

View File

@ -1,3 +1,3 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `BUILT_TIME_UTC` constant in crate `game`."><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 src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><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">&#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><script>window.sidebarCurrent = {name: 'BUILT_TIME_UTC', ty: 'constant', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></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><span class="help-button">?</span>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><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-e788b46a21eaee2a/out/built.rs.html#49' title='goto source code'>[src]</a></span><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></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> = &quot;Thu, 22 Oct 2020 21:01:27 +0000&quot;;</pre><div class='docblock'><p>The built-time in RFC2822, UTC</p>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><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-e788b46a21eaee2a/out/built.rs.html#49' title='goto source code'>[src]</a></span><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></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> = &quot;Thu, 22 Oct 2020 21:42:17 +0000&quot;;</pre><div class='docblock'><p>The built-time in RFC2822, UTC</p>
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,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 `parking` mod in crate `sim`."><meta name="keywords" content="rust, rustlang, rust-lang, parking"><title>sim::mechanics::parking - 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 src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><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">&#9776;</div><a href='../../../sim/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class='location'>Module parking</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#traits">Traits</a></li></ul></div><p class='location'><a href='../../index.html'>sim</a>::<wbr><a href='../index.html'>mechanics</a></p><script>window.sidebarCurrent = {name: 'parking', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></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><span class="help-button">?</span>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><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/sim/mechanics/parking.rs.html#1-1001' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../../index.html'>sim</a>::<wbr><a href='../index.html'>mechanics</a>::<wbr><a class="mod" href=''>parking</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><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/sim/mechanics/parking.rs.html#1-1004' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../../index.html'>sim</a>::<wbr><a href='../index.html'>mechanics</a>::<wbr><a class="mod" href=''>parking</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.InfiniteParkingSimState.html" title='sim::mechanics::parking::InfiniteParkingSimState struct'>InfiniteParkingSimState</a></td><td class='docblock-short'><p>This assigns infinite private parking to all buildings and none anywhere else. This effectively
disables the simulation of parking entirely, making driving trips just go directly between
buildings. Useful for maps without good parking data (which is currently all of them) and

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,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 `sim` mod in crate `sim`."><meta name="keywords" content="rust, rustlang, rust-lang, sim"><title>sim::sim - 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 src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><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">&#9776;</div><a href='../../sim/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module sim</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#reexports">Re-exports</a></li><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#constants">Constants</a></li><li><a href="#traits">Traits</a></li></ul></div><p class='location'><a href='../index.html'>sim</a></p><script>window.sidebarCurrent = {name: 'sim', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></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><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><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/sim/sim/mod.rs.html#3-1039' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>sim</a>::<wbr><a class="mod" href=''>sim</a></span></h1><h2 id='reexports' class='section-header'><a href="#reexports">Re-exports</a></h2>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><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/sim/sim/mod.rs.html#3-1042' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>sim</a>::<wbr><a class="mod" href=''>sim</a></span></h1><h2 id='reexports' class='section-header'><a href="#reexports">Re-exports</a></h2>
<table><tr><td><code>pub use self::queries::<a class="struct" href="../../sim/struct.AgentProperties.html" title="struct sim::AgentProperties">AgentProperties</a>;</code></td></tr></table><h2 id='modules' class='section-header'><a href="#modules">Modules</a></h2>
<table><tr class='module-item'><td><a class="mod" href="queries/index.html" title='sim::sim::queries mod'>queries</a></td><td class='docblock-short'><p>All sorts of read-only queries about a simulation</p>
</td></tr></table><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>

File diff suppressed because one or more lines are too long

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 `SimCallback` trait in crate `sim`."><meta name="keywords" content="rust, rustlang, rust-lang, SimCallback"><title>sim::sim::SimCallback - 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 src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[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">&#9776;</div><a href='../../sim/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Trait SimCallback</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.run">run</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.downcast">downcast</a><a href="#method.downcast_mut">downcast_mut</a><a href="#method.downcast_rc">downcast_rc</a><a href="#method.downcast_ref">downcast_ref</a><a href="#method.is">is</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class='location'><a href='../index.html'>sim</a>::<wbr><a href='index.html'>sim</a></p><script>window.sidebarCurrent = {name: 'SimCallback', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></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><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><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/sim/sim/mod.rs.html#1021-1024' title='goto source code'>[src]</a></span><span class='in-band'>Trait <a href='../index.html'>sim</a>::<wbr><a href='index.html'>sim</a>::<wbr><a class="trait" href=''>SimCallback</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust trait'>pub trait SimCallback: Downcast {
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><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/sim/sim/mod.rs.html#1024-1027' title='goto source code'>[src]</a></span><span class='in-band'>Trait <a href='../index.html'>sim</a>::<wbr><a href='index.html'>sim</a>::<wbr><a class="trait" href=''>SimCallback</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust trait'>pub trait SimCallback: Downcast {
fn <a href='#tymethod.run' class='fnname'>run</a>(&amp;mut self, sim: &amp;<a class="struct" href="../../sim/struct.Sim.html" title="struct sim::Sim">Sim</a>, map: &amp;<a class="struct" href="../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>;
}</pre></div>
<h2 id='required-methods' class='small-section-header'>Required methods<a href='#required-methods' class='anchor'></a></h2><div class='methods'><h3 id='tymethod.run' class='method'><code>fn <a href='#tymethod.run' class='fnname'>run</a>(&amp;mut self, sim: &amp;<a class="struct" href="../../sim/struct.Sim.html" title="struct sim::Sim">Sim</a>, map: &amp;<a class="struct" href="../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></h3></div><span class='loading-content'>Loading content...</span><h2 id='implementations' class='small-section-header'>Implementations<a href='#implementations' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl dyn <a class="trait" href="../../sim/sim/trait.SimCallback.html" title="trait sim::sim::SimCallback">SimCallback</a></code><a href='#impl' class='anchor'></a></h3><div class='impl-items'><h4 id='method.is' class="method"><code>pub fn <a href='#method.is' class='fnname'>is</a>&lt;__T:&nbsp;<a class="trait" href="../../sim/sim/trait.SimCallback.html" title="trait sim::sim::SimCallback">SimCallback</a>&gt;(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></h4><div class='docblock'><p>Returns true if the trait object wraps an object of type <code>__T</code>.</p>

File diff suppressed because one or more lines are too long

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 `SimCallback` trait in crate `sim`."><meta name="keywords" content="rust, rustlang, rust-lang, SimCallback"><title>sim::SimCallback - 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 src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[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">&#9776;</div><a href='../sim/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Trait SimCallback</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.run">run</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.downcast">downcast</a><a href="#method.downcast_mut">downcast_mut</a><a href="#method.downcast_rc">downcast_rc</a><a href="#method.downcast_ref">downcast_ref</a><a href="#method.is">is</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class='location'><a href='index.html'>sim</a></p><script>window.sidebarCurrent = {name: 'SimCallback', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></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><span class="help-button">?</span>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><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/sim/sim/mod.rs.html#1021-1024' title='goto source code'>[src]</a></span><span class='in-band'>Trait <a href='index.html'>sim</a>::<wbr><a class="trait" href=''>SimCallback</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust trait'>pub trait SimCallback: Downcast {
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><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/sim/sim/mod.rs.html#1024-1027' title='goto source code'>[src]</a></span><span class='in-band'>Trait <a href='index.html'>sim</a>::<wbr><a class="trait" href=''>SimCallback</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust trait'>pub trait SimCallback: Downcast {
fn <a href='#tymethod.run' class='fnname'>run</a>(&amp;mut self, sim: &amp;<a class="struct" href="../sim/struct.Sim.html" title="struct sim::Sim">Sim</a>, map: &amp;<a class="struct" href="../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>;
}</pre></div>
<h2 id='required-methods' class='small-section-header'>Required methods<a href='#required-methods' class='anchor'></a></h2><div class='methods'><h3 id='tymethod.run' class='method'><code>fn <a href='#tymethod.run' class='fnname'>run</a>(&amp;mut self, sim: &amp;<a class="struct" href="../sim/struct.Sim.html" title="struct sim::Sim">Sim</a>, map: &amp;<a class="struct" href="../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></h3></div><span class='loading-content'>Loading content...</span><h2 id='implementations' class='small-section-header'>Implementations<a href='#implementations' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl dyn <a class="trait" href="../sim/sim/trait.SimCallback.html" title="trait sim::sim::SimCallback">SimCallback</a></code><a href='#impl' class='anchor'></a></h3><div class='impl-items'><h4 id='method.is' class="method"><code>pub fn <a href='#method.is' class='fnname'>is</a>&lt;__T:&nbsp;<a class="trait" href="../sim/sim/trait.SimCallback.html" title="trait sim::sim::SimCallback">SimCallback</a>&gt;(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></h4><div class='docblock'><p>Returns true if the trait object wraps an object of type <code>__T</code>.</p>

View File

@ -112,7 +112,7 @@
<span class="doccomment">/// The output of `rustdoc -V`</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">RUSTDOC_VERSION</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;rustdoc 1.47.0 (18bf6b4f0 2020-10-07)&quot;</span>;
<span class="doccomment">/// The built-time in RFC2822, UTC</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;Thu, 22 Oct 2020 21:01:27 +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">&quot;Thu, 22 Oct 2020 21:42:17 +0000&quot;</span>;
<span class="doccomment">/// The target architecture, given by `cfg!(target_arch)`.</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CFG_TARGET_ARCH</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;x86_64&quot;</span>;
<span class="doccomment">/// The endianness, given by `cfg!(target_endian)`.</span>

View File

@ -1000,6 +1000,9 @@
<span id="999"> 999</span>
<span id="1000">1000</span>
<span id="1001">1001</span>
<span id="1002">1002</span>
<span id="1003">1003</span>
<span id="1004">1004</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">collections</span>::{<span class="ident">BTreeMap</span>, <span class="ident">BTreeSet</span>, <span class="ident">BinaryHeap</span>, <span class="ident">HashMap</span>};
@ -1036,13 +1039,13 @@
<span class="kw">fn</span> <span class="ident">get_draw_cars</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">id</span>: <span class="ident">LaneID</span>, <span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>) <span class="op">-&gt;</span> <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">DrawCarInput</span><span class="op">&gt;</span>;
<span class="kw">fn</span> <span class="ident">get_draw_cars_in_lots</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">id</span>: <span class="ident">LaneID</span>, <span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>) <span class="op">-&gt;</span> <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">DrawCarInput</span><span class="op">&gt;</span>;
<span class="kw">fn</span> <span class="ident">get_draw_car</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">id</span>: <span class="ident">CarID</span>, <span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>) <span class="op">-&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">DrawCarInput</span><span class="op">&gt;</span>;
<span class="comment">// There&#39;s no DrawCarInput for cars parked offstreet, so we need this.</span>
<span class="doccomment">/// There&#39;s no DrawCarInput for cars parked offstreet, so we need this.</span>
<span class="kw">fn</span> <span class="ident">canonical_pt</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">id</span>: <span class="ident">CarID</span>, <span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>) <span class="op">-&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">Pt2D</span><span class="op">&gt;</span>;
<span class="kw">fn</span> <span class="ident">get_all_draw_cars</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>) <span class="op">-&gt;</span> <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">DrawCarInput</span><span class="op">&gt;</span>;
<span class="kw">fn</span> <span class="ident">is_free</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">spot</span>: <span class="ident">ParkingSpot</span>) <span class="op">-&gt;</span> <span class="ident">bool</span>;
<span class="kw">fn</span> <span class="ident">get_car_at_spot</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">spot</span>: <span class="ident">ParkingSpot</span>) <span class="op">-&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="kw-2">&amp;</span><span class="ident">ParkedCar</span><span class="op">&gt;</span>;
<span class="comment">// The vehicle&#39;s front is currently at the given driving_pos. Returns all valid spots and their</span>
<span class="comment">// driving position.</span>
<span class="doccomment">/// The vehicle&#39;s front is currently at the given driving_pos. Returns all valid spots and their</span>
<span class="doccomment">/// driving position.</span>
<span class="kw">fn</span> <span class="ident">get_all_free_spots</span>(
<span class="kw-2">&amp;</span><span class="self">self</span>,
<span class="ident">driving_pos</span>: <span class="ident">Position</span>,
@ -1056,12 +1059,12 @@
<span class="kw">fn</span> <span class="ident">spot_to_sidewalk_pos</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">spot</span>: <span class="ident">ParkingSpot</span>, <span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>) <span class="op">-&gt;</span> <span class="ident">Position</span>;
<span class="kw">fn</span> <span class="ident">get_owner_of_car</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">id</span>: <span class="ident">CarID</span>) <span class="op">-&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">PersonID</span><span class="op">&gt;</span>;
<span class="kw">fn</span> <span class="ident">lookup_parked_car</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">id</span>: <span class="ident">CarID</span>) <span class="op">-&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="kw-2">&amp;</span><span class="ident">ParkedCar</span><span class="op">&gt;</span>;
<span class="comment">// (Filled, available)</span>
<span class="doccomment">/// (Filled, available)</span>
<span class="kw">fn</span> <span class="ident">get_all_parking_spots</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-&gt;</span> (<span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">ParkingSpot</span><span class="op">&gt;</span>, <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">ParkingSpot</span><span class="op">&gt;</span>);
<span class="comment">// Unrealistically assumes the driver has knowledge of currently free parking spots, even if</span>
<span class="comment">// they&#39;re far away. Since they don&#39;t reserve the spot in advance, somebody else can still beat</span>
<span class="comment">// them there, producing some nice, realistic churn if there&#39;s too much contention.</span>
<span class="comment">// The first PathStep is the turn after start, NOT PathStep::Lane(start).</span>
<span class="doccomment">/// Unrealistically assumes the driver has knowledge of currently free parking spots, even if</span>
<span class="doccomment">/// they&#39;re far away. Since they don&#39;t reserve the spot in advance, somebody else can still beat</span>
<span class="doccomment">/// them there, producing some nice, realistic churn if there&#39;s too much contention.</span>
<span class="doccomment">/// The first PathStep is the turn after start, NOT PathStep::Lane(start).</span>
<span class="kw">fn</span> <span class="ident">path_to_free_parking_spot</span>(
<span class="kw-2">&amp;</span><span class="self">self</span>,
<span class="ident">start</span>: <span class="ident">LaneID</span>,
@ -1212,10 +1215,13 @@
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">evicted</span> <span class="op">=</span> <span class="ident">Vec</span>::<span class="ident">new</span>();
<span class="kw">for</span> <span class="ident">spot</span> <span class="kw">in</span> <span class="ident">filled_before</span> {
<span class="kw">if</span> <span class="op">!</span><span class="ident">avail_after</span>.<span class="ident">contains</span>(<span class="kw-2">&amp;</span><span class="ident">spot</span>) {
<span class="kw">let</span> <span class="ident">car</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">occupants</span>.<span class="ident">remove</span>(<span class="kw-2">&amp;</span><span class="ident">spot</span>).<span class="ident">unwrap</span>();
<span class="comment">// If the spot isn&#39;t occupied, it must be reserved; a car is in the process of</span>
<span class="comment">// parking in it. That&#39;ll be handled below.</span>
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">car</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">occupants</span>.<span class="ident">remove</span>(<span class="kw-2">&amp;</span><span class="ident">spot</span>) {
<span class="ident">evicted</span>.<span class="ident">push</span>(<span class="self">self</span>.<span class="ident">parked_cars</span>.<span class="ident">remove</span>(<span class="kw-2">&amp;</span><span class="ident">car</span>).<span class="ident">unwrap</span>());
}
}
}
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">moving_into_deleted_spot</span> <span class="op">=</span> <span class="ident">Vec</span>::<span class="ident">new</span>();
<span class="ident">retain_btreemap</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>.<span class="ident">reserved_spots</span>, <span class="op">|</span><span class="ident">spot</span>, <span class="ident">car</span><span class="op">|</span> {

View File

@ -1038,6 +1038,9 @@
<span id="1037">1037</span>
<span id="1038">1038</span>
<span id="1039">1039</span>
<span id="1040">1040</span>
<span id="1041">1041</span>
<span id="1042">1042</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="comment">// This file has a jumbled mess of queries, setup, and mutating methods.</span>
@ -1975,8 +1978,11 @@
}
<span class="doccomment">/// Returns (trips affected, number of parked cars displaced)</span>
<span class="kw">fn</span> <span class="ident">find_trips_affected_by_live_edits</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>) <span class="op">-&gt;</span> (<span class="ident">Vec</span><span class="op">&lt;</span>(<span class="ident">AgentID</span>, <span class="ident">TripID</span>)<span class="op">&gt;</span>, <span class="ident">usize</span>) {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">affected</span>: <span class="ident">Vec</span><span class="op">&lt;</span>(<span class="ident">AgentID</span>, <span class="ident">TripID</span>)<span class="op">&gt;</span> <span class="op">=</span> <span class="ident">Vec</span>::<span class="ident">new</span>();
<span class="kw">fn</span> <span class="ident">find_trips_affected_by_live_edits</span>(
<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>,
<span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>,
) <span class="op">-&gt;</span> (<span class="ident">BTreeSet</span><span class="op">&lt;</span>(<span class="ident">AgentID</span>, <span class="ident">TripID</span>)<span class="op">&gt;</span>, <span class="ident">usize</span>) {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">affected</span>: <span class="ident">BTreeSet</span><span class="op">&lt;</span>(<span class="ident">AgentID</span>, <span class="ident">TripID</span>)<span class="op">&gt;</span> <span class="op">=</span> <span class="ident">BTreeSet</span>::<span class="ident">new</span>();
<span class="comment">// TODO Handle changes to access restrictions</span>
@ -1999,7 +2005,7 @@
<span class="ident">Traversable</span>::<span class="ident">Turn</span>(<span class="ident">t</span>) <span class="op">=&gt;</span> <span class="ident">closed_intersections</span>.<span class="ident">contains</span>(<span class="kw-2">&amp;</span><span class="ident">t</span>.<span class="ident">parent</span>),
})
{
<span class="ident">affected</span>.<span class="ident">push</span>((<span class="kw-2">*</span><span class="ident">a</span>, <span class="kw-2">*</span><span class="ident">trip</span>));
<span class="ident">affected</span>.<span class="ident">insert</span>((<span class="kw-2">*</span><span class="ident">a</span>, <span class="kw-2">*</span><span class="ident">trip</span>));
}
}
}
@ -2012,7 +2018,7 @@
<span class="ident">affected</span>.<span class="ident">extend</span>(<span class="self">self</span>.<span class="ident">walking</span>.<span class="ident">find_trips_to_parking</span>(<span class="ident">evicted_cars</span>));
<span class="kw">for</span> <span class="ident">car</span> <span class="kw">in</span> <span class="ident">cars_parking_in_the_void</span> {
<span class="kw">let</span> <span class="ident">a</span> <span class="op">=</span> <span class="ident">AgentID</span>::<span class="ident">Car</span>(<span class="ident">car</span>);
<span class="ident">affected</span>.<span class="ident">push</span>((<span class="ident">a</span>, <span class="self">self</span>.<span class="ident">agent_to_trip</span>(<span class="ident">a</span>).<span class="ident">unwrap</span>()));
<span class="ident">affected</span>.<span class="ident">insert</span>((<span class="ident">a</span>, <span class="self">self</span>.<span class="ident">agent_to_trip</span>(<span class="ident">a</span>).<span class="ident">unwrap</span>()));
}
<span class="kw">if</span> <span class="op">!</span><span class="self">self</span>.<span class="ident">parking</span>.<span class="ident">is_infinite</span>() {