mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-25 07:25:47 +03:00
deploy: 9844eeecc8
This commit is contained in:
parent
1bde3b9e9d
commit
f53012d213
@ -243,6 +243,7 @@ latest input.</p>
|
||||
<code>convert_osm</code>, you need <code>./import.sh --raw --map</code>.</li>
|
||||
<li>If you're modifying <code>map_model</code> but not the OSM -> RawMap conversion, then you
|
||||
just need <code>./import.sh --map</code>.</li>
|
||||
<li>If you're modifying the demand model for Seattle, you can add <code>--scenario</code> to regenerate.</li>
|
||||
<li>By default, all maps are regenerated. You can also specify a single map:
|
||||
<code>./import.sh --map downtown</code>.</li>
|
||||
<li>By default, Seattle is assumed as the city. You have to specify otherwise:
|
||||
|
@ -879,6 +879,7 @@ latest input.</p>
|
||||
<code>convert_osm</code>, you need <code>./import.sh --raw --map</code>.</li>
|
||||
<li>If you're modifying <code>map_model</code> but not the OSM -> RawMap conversion, then you
|
||||
just need <code>./import.sh --map</code>.</li>
|
||||
<li>If you're modifying the demand model for Seattle, you can add <code>--scenario</code> to regenerate.</li>
|
||||
<li>By default, all maps are regenerated. You can also specify a single map:
|
||||
<code>./import.sh --map downtown</code>.</li>
|
||||
<li>By default, Seattle is assumed as the city. You have to specify otherwise:
|
||||
|
@ -1,2 +1,2 @@
|
||||
<!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="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><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">☰</div><a href='../../../game/index.html'><div class='logo-container'><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><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'>−</span>]</a></span><a class='srclink' href='../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-3c7487281029702d/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: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = "Wed, 09 Sep 2020 22:18:39 +0000";</pre><div class='docblock'><p>The built-time in RFC2822, UTC</p>
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="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="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><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">☰</div><a href='../../../game/index.html'><div class='logo-container'><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><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'>−</span>]</a></span><a class='srclink' href='../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-3c7487281029702d/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: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = "Wed, 09 Sep 2020 23:16:59 +0000";</pre><div class='docblock'><p>The built-time in RFC2822, UTC</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
@ -6,7 +6,7 @@
|
||||
Closed,
|
||||
}</pre></div><h2 id='variants' class='variants small-section-header'>
|
||||
Variants<a href='#variants' class='anchor'></a></h2>
|
||||
<div id="variant.StopSign" class="variant small-section-header"><a href="#variant.StopSign" class="anchor field"></a><code>StopSign</code></div><div class='autohide sub-variant' id='variant.StopSign.fields'><h3>Fields of <b>StopSign</b></h3><div><span id="variant.StopSign.field.must_stop" class="variant small-section-header"><a href="#variant.StopSign.field.must_stop" class="anchor field"></a><code>must_stop: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="struct" href="../../../map_model/raw/struct.OriginalRoad.html" title="struct map_model::raw::OriginalRoad">OriginalRoad</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>></code></span></div></div><div id="variant.TrafficSignal" class="variant small-section-header"><a href="#variant.TrafficSignal" class="anchor field"></a><code>TrafficSignal(TrafficSignal)</code></div><div id="variant.Closed" class="variant small-section-header"><a href="#variant.Closed" class="anchor field"></a><code>Closed</code></div><h2 id='implementations' class='small-section-header'>Implementations<a href='#implementations' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="enum" href="../../../map_model/edits/perma/enum.PermanentEditIntersection.html" title="enum map_model::edits::perma::PermanentEditIntersection">PermanentEditIntersection</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../../src/map_model/edits/perma.rs.html#167-193' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from_permanent' class="method"><code>fn <a href='#method.from_permanent' class='fnname'>from_permanent</a>(<br> self, <br> i: <a class="struct" href="../../../map_model/struct.IntersectionID.html" title="struct map_model::IntersectionID">IntersectionID</a>, <br> map: &<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../../../map_model/enum.EditIntersection.html" title="enum map_model::EditIntersection">EditIntersection</a>></code><a class='srclink' href='../../../src/map_model/edits/perma.rs.html#168-192' title='goto source code'>[src]</a></h4></div><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="../../../map_model/edits/perma/enum.PermanentEditIntersection.html" title="enum map_model::edits::perma::PermanentEditIntersection">PermanentEditIntersection</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../../../src/map_model/edits/perma.rs.html#24' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class="enum" href="../../../map_model/edits/perma/enum.PermanentEditIntersection.html" title="enum map_model::edits::perma::PermanentEditIntersection">PermanentEditIntersection</a></code><a class='srclink' href='../../../src/map_model/edits/perma.rs.html#24' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
<div id="variant.StopSign" class="variant small-section-header"><a href="#variant.StopSign" class="anchor field"></a><code>StopSign</code></div><div class='autohide sub-variant' id='variant.StopSign.fields'><h3>Fields of <b>StopSign</b></h3><div><span id="variant.StopSign.field.must_stop" class="variant small-section-header"><a href="#variant.StopSign.field.must_stop" class="anchor field"></a><code>must_stop: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="struct" href="../../../map_model/raw/struct.OriginalRoad.html" title="struct map_model::raw::OriginalRoad">OriginalRoad</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>></code></span></div></div><div id="variant.TrafficSignal" class="variant small-section-header"><a href="#variant.TrafficSignal" class="anchor field"></a><code>TrafficSignal(TrafficSignal)</code></div><div id="variant.Closed" class="variant small-section-header"><a href="#variant.Closed" class="anchor field"></a><code>Closed</code></div><h2 id='implementations' class='small-section-header'>Implementations<a href='#implementations' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="enum" href="../../../map_model/edits/perma/enum.PermanentEditIntersection.html" title="enum map_model::edits::perma::PermanentEditIntersection">PermanentEditIntersection</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../../src/map_model/edits/perma.rs.html#167-199' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from_permanent' class="method"><code>fn <a href='#method.from_permanent' class='fnname'>from_permanent</a>(<br> self, <br> i: <a class="struct" href="../../../map_model/struct.IntersectionID.html" title="struct map_model::IntersectionID">IntersectionID</a>, <br> map: &<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../../../map_model/enum.EditIntersection.html" title="enum map_model::EditIntersection">EditIntersection</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></code><a class='srclink' href='../../../src/map_model/edits/perma.rs.html#168-198' title='goto source code'>[src]</a></h4></div><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="../../../map_model/edits/perma/enum.PermanentEditIntersection.html" title="enum map_model::edits::perma::PermanentEditIntersection">PermanentEditIntersection</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../../../src/map_model/edits/perma.rs.html#24' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class="enum" href="../../../map_model/edits/perma/enum.PermanentEditIntersection.html" title="enum map_model::edits::perma::PermanentEditIntersection">PermanentEditIntersection</a></code><a class='srclink' href='../../../src/map_model/edits/perma.rs.html#24' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id='method.clone_from' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#131-133' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></div><h3 id='impl-Deserialize%3C%27de%3E' class='impl'><code class='in-band'>impl<'de> <a class="trait" href="https://docs.rs/serde/1.0.110/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a><'de> for <a class="enum" href="../../../map_model/edits/perma/enum.PermanentEditIntersection.html" title="enum map_model::edits::perma::PermanentEditIntersection">PermanentEditIntersection</a></code><a href='#impl-Deserialize%3C%27de%3E' class='anchor'></a><a class='srclink' href='../../../src/map_model/edits/perma.rs.html#24' 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.110/serde/de/trait.Deserialize.html#tymethod.deserialize' class='fnname'>deserialize</a><__D>(__deserializer: __D) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, __D::<a class="type" href="https://docs.rs/serde/1.0.110/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>> <span class="where fmt-newline">where<br> __D: <a class="trait" href="https://docs.rs/serde/1.0.110/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a><'de>, </span></code><a class='srclink' href='../../../src/map_model/edits/perma.rs.html#24' 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.110/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
|
||||
</div></div><h3 id='impl-Serialize' class='impl'><code class='in-band'>impl <a class="trait" href="https://docs.rs/serde/1.0.110/serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a> for <a class="enum" href="../../../map_model/edits/perma/enum.PermanentEditIntersection.html" title="enum map_model::edits::perma::PermanentEditIntersection">PermanentEditIntersection</a></code><a href='#impl-Serialize' class='anchor'></a><a class='srclink' href='../../../src/map_model/edits/perma.rs.html#24' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.serialize' class="method hidden"><code>fn <a href='https://docs.rs/serde/1.0.110/serde/ser/trait.Serialize.html#tymethod.serialize' class='fnname'>serialize</a><__S>(&self, __serializer: __S) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><__S::<a class="type" href="https://docs.rs/serde/1.0.110/serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, __S::<a class="type" href="https://docs.rs/serde/1.0.110/serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>> <span class="where fmt-newline">where<br> __S: <a class="trait" href="https://docs.rs/serde/1.0.110/serde/ser/trait.Serializer.html" title="trait serde::ser::Serializer">Serializer</a>, </span></code><a class='srclink' href='../../../src/map_model/edits/perma.rs.html#24' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Serialize this value into the given Serde serializer. <a href="https://docs.rs/serde/1.0.110/serde/ser/trait.Serialize.html#tymethod.serialize">Read more</a></p>
|
||||
|
@ -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 `perma` mod in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, perma"><title>map_model::edits::perma - 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="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><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">☰</div><a href='../../../map_model/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><p class='location'>Module perma</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li></ul></div><p class='location'><a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>edits</a></p><script>window.sidebarCurrent = {name: 'perma', 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><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'>−</span>]</a></span><a class='srclink' href='../../../src/map_model/edits/perma.rs.html#1-193' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>edits</a>::<wbr><a class="mod" href=''>perma</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `perma` mod in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, perma"><title>map_model::edits::perma - 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="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><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">☰</div><a href='../../../map_model/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><p class='location'>Module perma</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li></ul></div><p class='location'><a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>edits</a></p><script>window.sidebarCurrent = {name: 'perma', 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><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'>−</span>]</a></span><a class='srclink' href='../../../src/map_model/edits/perma.rs.html#1-199' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>edits</a>::<wbr><a class="mod" href=''>perma</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.PermanentMapEdits.html" title='map_model::edits::perma::PermanentMapEdits struct'>PermanentMapEdits</a></td><td class='docblock-short'></td></tr></table><h2 id='enums' class='section-header'><a href="#enums">Enums</a></h2>
|
||||
<table><tr class='module-item'><td><a class="enum" href="enum.PermanentEditCmd.html" title='map_model::edits::perma::PermanentEditCmd enum'>PermanentEditCmd</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="enum" href="enum.PermanentEditIntersection.html" title='map_model::edits::perma::PermanentEditIntersection enum'>PermanentEditIntersection</a></td><td class='docblock-short'></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_model";</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
@ -111,7 +111,7 @@
|
||||
<span class="doccomment">/// The output of `rustdoc -V`</span>
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">RUSTDOC_VERSION</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"rustdoc 1.46.0 (04488afe3 2020-08-24)"</span>;
|
||||
<span class="doccomment">/// The built-time in RFC2822, UTC</span>
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"Wed, 09 Sep 2020 22:18:39 +0000"</span>;
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"Wed, 09 Sep 2020 23:16:59 +0000"</span>;
|
||||
<span class="doccomment">/// The target architecture, given by `cfg!(target_arch)`.</span>
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CFG_TARGET_ARCH</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"x86_64"</span>;
|
||||
<span class="doccomment">/// The endianness, given by `cfg!(target_endian)`.</span>
|
||||
|
@ -191,6 +191,12 @@
|
||||
<span id="191">191</span>
|
||||
<span id="192">192</span>
|
||||
<span id="193">193</span>
|
||||
<span id="194">194</span>
|
||||
<span id="195">195</span>
|
||||
<span id="196">196</span>
|
||||
<span id="197">197</span>
|
||||
<span id="198">198</span>
|
||||
<span id="199">199</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">edits</span>::{<span class="ident">EditCmd</span>, <span class="ident">EditIntersection</span>, <span class="ident">EditRoad</span>, <span class="ident">MapEdits</span>};
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">raw</span>::<span class="ident">OriginalRoad</span>;
|
||||
@ -310,12 +316,12 @@
|
||||
<span class="kw">let</span> <span class="ident">id</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">find_i_by_osm_id</span>(<span class="ident">i</span>)<span class="question-mark">?</span>;
|
||||
<span class="prelude-val">Ok</span>(<span class="ident">EditCmd</span>::<span class="ident">ChangeIntersection</span> {
|
||||
<span class="ident">i</span>: <span class="ident">id</span>,
|
||||
<span class="ident">new</span>: <span class="ident">new</span>
|
||||
.<span class="ident">from_permanent</span>(<span class="ident">id</span>, <span class="ident">map</span>)
|
||||
.<span class="ident">ok_or</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">"new ChangeIntersection of {} invalid"</span>, <span class="ident">i</span>))<span class="question-mark">?</span>,
|
||||
<span class="ident">old</span>: <span class="ident">old</span>
|
||||
.<span class="ident">from_permanent</span>(<span class="ident">id</span>, <span class="ident">map</span>)
|
||||
.<span class="ident">ok_or</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">"old ChangeIntersection of {} invalid"</span>, <span class="ident">i</span>))<span class="question-mark">?</span>,
|
||||
<span class="ident">new</span>: <span class="ident">new</span>.<span class="ident">from_permanent</span>(<span class="ident">id</span>, <span class="ident">map</span>).<span class="ident">map_err</span>(<span class="op">|</span><span class="ident">err</span><span class="op">|</span> {
|
||||
<span class="macro">format</span><span class="macro">!</span>(<span class="string">"new ChangeIntersection of {} invalid: {}"</span>, <span class="ident">i</span>, <span class="ident">err</span>)
|
||||
})<span class="question-mark">?</span>,
|
||||
<span class="ident">old</span>: <span class="ident">old</span>.<span class="ident">from_permanent</span>(<span class="ident">id</span>, <span class="ident">map</span>).<span class="ident">map_err</span>(<span class="op">|</span><span class="ident">err</span><span class="op">|</span> {
|
||||
<span class="macro">format</span><span class="macro">!</span>(<span class="string">"old ChangeIntersection of {} invalid: {}"</span>, <span class="ident">i</span>, <span class="ident">err</span>)
|
||||
})<span class="question-mark">?</span>,
|
||||
})
|
||||
}
|
||||
<span class="ident">PermanentEditCmd</span>::<span class="ident">ChangeRouteSchedule</span> {
|
||||
@ -359,29 +365,35 @@
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">PermanentEditIntersection</span> {
|
||||
<span class="kw">fn</span> <span class="ident">from_permanent</span>(<span class="self">self</span>, <span class="ident">i</span>: <span class="ident">IntersectionID</span>, <span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">EditIntersection</span><span class="op">></span> {
|
||||
<span class="kw">fn</span> <span class="ident">from_permanent</span>(<span class="self">self</span>, <span class="ident">i</span>: <span class="ident">IntersectionID</span>, <span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Result</span><span class="op"><</span><span class="ident">EditIntersection</span>, <span class="ident">String</span><span class="op">></span> {
|
||||
<span class="kw">match</span> <span class="self">self</span> {
|
||||
<span class="ident">PermanentEditIntersection</span>::<span class="ident">StopSign</span> { <span class="ident">must_stop</span> } <span class="op">=</span><span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">translated_must_stop</span> <span class="op">=</span> <span class="ident">BTreeMap</span>::<span class="ident">new</span>();
|
||||
<span class="kw">for</span> (<span class="ident">r</span>, <span class="ident">stop</span>) <span class="kw">in</span> <span class="ident">must_stop</span> {
|
||||
<span class="ident">translated_must_stop</span>.<span class="ident">insert</span>(<span class="ident">map</span>.<span class="ident">find_r_by_osm_id</span>(<span class="ident">r</span>).<span class="ident">ok</span>()<span class="question-mark">?</span>, <span class="ident">stop</span>);
|
||||
<span class="ident">translated_must_stop</span>.<span class="ident">insert</span>(<span class="ident">map</span>.<span class="ident">find_r_by_osm_id</span>(<span class="ident">r</span>)<span class="question-mark">?</span>, <span class="ident">stop</span>);
|
||||
}
|
||||
|
||||
<span class="comment">// Make sure the roads exactly match up</span>
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">ss</span> <span class="op">=</span> <span class="ident">ControlStopSign</span>::<span class="ident">new</span>(<span class="ident">map</span>, <span class="ident">i</span>);
|
||||
<span class="kw">if</span> <span class="ident">translated_must_stop</span>.<span class="ident">len</span>() <span class="op">!</span><span class="op">=</span> <span class="ident">ss</span>.<span class="ident">roads</span>.<span class="ident">len</span>() {
|
||||
<span class="kw">return</span> <span class="prelude-val">None</span>;
|
||||
<span class="kw">return</span> <span class="prelude-val">Err</span>(<span class="macro">format</span><span class="macro">!</span>(
|
||||
<span class="string">"Stop sign has {} roads now, but {} from edits"</span>,
|
||||
<span class="ident">ss</span>.<span class="ident">roads</span>.<span class="ident">len</span>(),
|
||||
<span class="ident">translated_must_stop</span>.<span class="ident">len</span>()
|
||||
));
|
||||
}
|
||||
<span class="kw">for</span> (<span class="ident">r</span>, <span class="ident">stop</span>) <span class="kw">in</span> <span class="ident">translated_must_stop</span> {
|
||||
<span class="ident">ss</span>.<span class="ident">roads</span>.<span class="ident">get_mut</span>(<span class="kw-2">&</span><span class="ident">r</span>)<span class="question-mark">?</span>.<span class="ident">must_stop</span> <span class="op">=</span> <span class="ident">stop</span>;
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">road</span>) <span class="op">=</span> <span class="ident">ss</span>.<span class="ident">roads</span>.<span class="ident">get_mut</span>(<span class="kw-2">&</span><span class="ident">r</span>) {
|
||||
<span class="ident">road</span>.<span class="ident">must_stop</span> <span class="op">=</span> <span class="ident">stop</span>;
|
||||
} <span class="kw">else</span> {
|
||||
<span class="kw">return</span> <span class="prelude-val">Err</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">"{} doesn't connect to {}"</span>, <span class="ident">i</span>, <span class="ident">r</span>));
|
||||
}
|
||||
}
|
||||
|
||||
<span class="prelude-val">Some</span>(<span class="ident">EditIntersection</span>::<span class="ident">StopSign</span>(<span class="ident">ss</span>))
|
||||
<span class="prelude-val">Ok</span>(<span class="ident">EditIntersection</span>::<span class="ident">StopSign</span>(<span class="ident">ss</span>))
|
||||
}
|
||||
<span class="ident">PermanentEditIntersection</span>::<span class="ident">TrafficSignal</span>(<span class="ident">ts</span>) <span class="op">=</span><span class="op">></span> {
|
||||
<span class="prelude-val">Some</span>(<span class="ident">EditIntersection</span>::<span class="ident">TrafficSignal</span>(<span class="ident">ts</span>))
|
||||
}
|
||||
<span class="ident">PermanentEditIntersection</span>::<span class="ident">Closed</span> <span class="op">=</span><span class="op">></span> <span class="prelude-val">Some</span>(<span class="ident">EditIntersection</span>::<span class="ident">Closed</span>),
|
||||
<span class="ident">PermanentEditIntersection</span>::<span class="ident">TrafficSignal</span>(<span class="ident">ts</span>) <span class="op">=</span><span class="op">></span> <span class="prelude-val">Ok</span>(<span class="ident">EditIntersection</span>::<span class="ident">TrafficSignal</span>(<span class="ident">ts</span>)),
|
||||
<span class="ident">PermanentEditIntersection</span>::<span class="ident">Closed</span> <span class="op">=</span><span class="op">></span> <span class="prelude-val">Ok</span>(<span class="ident">EditIntersection</span>::<span class="ident">Closed</span>),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user