mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-24 06:55:40 +03:00
deploy: 4b557fa6de
This commit is contained in:
parent
e4eb2dc208
commit
e2622b49c0
@ -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">☰</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'>−</span>]</a></span><a class='srclink' href='../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-26b47b6c62d293fe/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, 11 Nov 2020 21:35:57 +0000";</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'>−</span>]</a></span><a class='srclink' href='../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-26b47b6c62d293fe/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, 11 Nov 2020 23:31:16 +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>
|
@ -5,7 +5,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(<a class="struct" href="../../map_model/struct.ControlStopSign.html" title="struct map_model::ControlStopSign">ControlStopSign</a>)</code></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/enum.EditIntersection.html" title="enum map_model::EditIntersection">EditIntersection</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../src/map_model/edits/perma.rs.html#165-181' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.to_permanent' class="method"><code>fn <a href='#method.to_permanent' class='fnname'>to_permanent</a>(&self, map: &<a class="struct" href="../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -> <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#166-180' 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/enum.EditIntersection.html" title="enum map_model::EditIntersection">EditIntersection</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../../src/map_model/edits/mod.rs.html#47' 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/enum.EditIntersection.html" title="enum map_model::EditIntersection">EditIntersection</a></code><a class='srclink' href='../../src/map_model/edits/mod.rs.html#47' 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(<a class="struct" href="../../map_model/struct.ControlStopSign.html" title="struct map_model::ControlStopSign">ControlStopSign</a>)</code></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/enum.EditIntersection.html" title="enum map_model::EditIntersection">EditIntersection</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../src/map_model/edits/perma.rs.html#191-207' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.to_permanent' class="method"><code>fn <a href='#method.to_permanent' class='fnname'>to_permanent</a>(&self, map: &<a class="struct" href="../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -> <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#192-206' 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/enum.EditIntersection.html" title="enum map_model::EditIntersection">EditIntersection</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../../src/map_model/edits/mod.rs.html#47' 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/enum.EditIntersection.html" title="enum map_model::EditIntersection">EditIntersection</a></code><a class='srclink' href='../../src/map_model/edits/mod.rs.html#47' 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-Debug' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../../map_model/enum.EditIntersection.html" title="enum map_model::EditIntersection">EditIntersection</a></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../../src/map_model/edits/mod.rs.html#47' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../../src/map_model/edits/mod.rs.html#47' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id='impl-PartialEq%3CEditIntersection%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="enum" href="../../map_model/enum.EditIntersection.html" title="enum map_model::EditIntersection">EditIntersection</a>> for <a class="enum" href="../../map_model/enum.EditIntersection.html" title="enum map_model::EditIntersection">EditIntersection</a></code><a href='#impl-PartialEq%3CEditIntersection%3E' class='anchor'></a><a class='srclink' href='../../src/map_model/edits/mod.rs.html#47' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, other: &<a class="enum" href="../../map_model/enum.EditIntersection.html" title="enum map_model::EditIntersection">EditIntersection</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/map_model/edits/mod.rs.html#47' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
||||
|
File diff suppressed because one or more lines are too long
@ -7,7 +7,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#183-215' 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#184-214' 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#32' 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#32' 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#209-241' 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#210-240' 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#32' 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#32' 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.117/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#32' 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.117/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.117/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.117/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#32' 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.117/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.117/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#32' 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.117/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.117/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.117/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.117/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#32' 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.117/serde/ser/trait.Serialize.html#tymethod.serialize">Read more</a></p>
|
||||
|
@ -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 `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="../../../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">☰</div><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><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><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'>−</span>]</a></span><a class='srclink' href='../../../src/map_model/edits/perma.rs.html#1-215' 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>
|
||||
<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-241' 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'><p>MapEdits are converted to this before serializing. Referencing things like LaneID in a Map won't
|
||||
work if the basemap is rebuilt from new OSM data, so instead we use stabler OSM IDs that're less
|
||||
likely to change.</p>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `PermanentMapEdits` struct in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, PermanentMapEdits"><title>map_model::edits::perma::PermanentMapEdits - 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 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">☰</div><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class='location'>Struct PermanentMapEdits</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.commands">commands</a><a href="#structfield.edits_name">edits_name</a><a href="#structfield.map_name">map_name</a><a href="#structfield.merge_zones">merge_zones</a><a href="#structfield.proposal_description">proposal_description</a><a href="#structfield.proposal_link">proposal_link</a><a href="#structfield.version">version</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.from_permanent">from_permanent</a><a href="#method.to_permanent">to_permanent</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Deserialize%3C%27de%3E">Deserialize<'de></a><a href="#impl-Serialize">Serialize</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<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class='location'><a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>edits</a>::<wbr><a href='index.html'>perma</a></p><script>window.sidebarCurrent = {name: 'PermanentMapEdits', ty: 'struct', 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>
|
||||
<!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 `PermanentMapEdits` struct in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, PermanentMapEdits"><title>map_model::edits::perma::PermanentMapEdits - 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 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">☰</div><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class='location'>Struct PermanentMapEdits</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.commands">commands</a><a href="#structfield.edits_name">edits_name</a><a href="#structfield.map_name">map_name</a><a href="#structfield.merge_zones">merge_zones</a><a href="#structfield.proposal_description">proposal_description</a><a href="#structfield.proposal_link">proposal_link</a><a href="#structfield.version">version</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.from_permanent">from_permanent</a><a href="#method.from_permanent_permissive">from_permanent_permissive</a><a href="#method.to_permanent">to_permanent</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Deserialize%3C%27de%3E">Deserialize<'de></a><a href="#impl-Serialize">Serialize</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<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class='location'><a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>edits</a>::<wbr><a href='index.html'>perma</a></p><script>window.sidebarCurrent = {name: 'PermanentMapEdits', ty: 'struct', 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'>−</span>]</a></span><a class='srclink' href='../../../src/map_model/edits/perma.rs.html#16-30' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>edits</a>::<wbr><a href='index.html'>perma</a>::<wbr><a class="struct" href=''>PermanentMapEdits</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct PermanentMapEdits {
|
||||
pub map_name: <a class="struct" href="../../../abstutil/abst_paths/struct.MapName.html" title="struct abstutil::abst_paths::MapName">MapName</a>,
|
||||
pub edits_name: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>,
|
||||
@ -16,8 +16,10 @@ Zone; every Road will be its own Zone. This is used to experiment with a per-roa
|
||||
this is a map-wide setting.</p>
|
||||
</div><span id="structfield.proposal_description" class="structfield small-section-header"><a href="#structfield.proposal_description" class="anchor field"></a><code>proposal_description: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></code></span><div class='docblock'><p>Edits without these are player generated.</p>
|
||||
</div><span id="structfield.proposal_link" class="structfield small-section-header"><a href="#structfield.proposal_link" class="anchor field"></a><code>proposal_link: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></code></span><div class='docblock'><p>The link is optional even for proposals</p>
|
||||
</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="../../../map_model/struct.PermanentMapEdits.html" title="struct map_model::PermanentMapEdits">PermanentMapEdits</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../../src/map_model/edits/perma.rs.html#88-163' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.to_permanent' class="method"><code>pub fn <a href='#method.to_permanent' class='fnname'>to_permanent</a>(edits: &<a class="struct" href="../../../map_model/struct.MapEdits.html" title="struct map_model::MapEdits">MapEdits</a>, map: &<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -> <a class="struct" href="../../../map_model/struct.PermanentMapEdits.html" title="struct map_model::PermanentMapEdits">PermanentMapEdits</a></code><a class='srclink' href='../../../src/map_model/edits/perma.rs.html#89-100' title='goto source code'>[src]</a></h4><h4 id='method.from_permanent' class="method"><code>pub fn <a href='#method.from_permanent' class='fnname'>from_permanent</a>(<br> perma: <a class="struct" href="../../../map_model/struct.PermanentMapEdits.html" title="struct map_model::PermanentMapEdits">PermanentMapEdits</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="struct" href="../../../map_model/struct.MapEdits.html" title="struct map_model::MapEdits">MapEdits</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#106-162' title='goto source code'>[src]</a></h4><div class='docblock'><p>Load edits from the permanent form, looking up the Map IDs by the hopefully stabler OSM IDs.
|
||||
</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="../../../map_model/struct.PermanentMapEdits.html" title="struct map_model::PermanentMapEdits">PermanentMapEdits</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../../src/map_model/edits/perma.rs.html#132-189' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.to_permanent' class="method"><code>pub fn <a href='#method.to_permanent' class='fnname'>to_permanent</a>(edits: &<a class="struct" href="../../../map_model/struct.MapEdits.html" title="struct map_model::MapEdits">MapEdits</a>, map: &<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -> <a class="struct" href="../../../map_model/struct.PermanentMapEdits.html" title="struct map_model::PermanentMapEdits">PermanentMapEdits</a></code><a class='srclink' href='../../../src/map_model/edits/perma.rs.html#133-144' title='goto source code'>[src]</a></h4><h4 id='method.from_permanent' class="method"><code>pub fn <a href='#method.from_permanent' class='fnname'>from_permanent</a>(<br> perma: <a class="struct" href="../../../map_model/struct.PermanentMapEdits.html" title="struct map_model::PermanentMapEdits">PermanentMapEdits</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="struct" href="../../../map_model/struct.MapEdits.html" title="struct map_model::MapEdits">MapEdits</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#148-166' title='goto source code'>[src]</a></h4><div class='docblock'><p>Load edits from the permanent form, looking up the map IDs by the hopefully stabler OSM IDs.
|
||||
Validate that the basemap hasn't changed in important ways.</p>
|
||||
</div><h4 id='method.from_permanent_permissive' class="method"><code>pub fn <a href='#method.from_permanent_permissive' class='fnname'>from_permanent_permissive</a>(<br> perma: <a class="struct" href="../../../map_model/struct.PermanentMapEdits.html" title="struct map_model::PermanentMapEdits">PermanentMapEdits</a>, <br> map: &<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a><br>) -> <a class="struct" href="../../../map_model/struct.MapEdits.html" title="struct map_model::MapEdits">MapEdits</a></code><a class='srclink' href='../../../src/map_model/edits/perma.rs.html#170-188' title='goto source code'>[src]</a></h4><div class='docblock'><p>Load edits from the permanent form, looking up the map IDs by the hopefully stabler OSM IDs.
|
||||
Strip out commands that're broken.</p>
|
||||
</div></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="struct" href="../../../map_model/struct.PermanentMapEdits.html" title="struct map_model::PermanentMapEdits">PermanentMapEdits</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../../../src/map_model/edits/perma.rs.html#15' 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="struct" href="../../../map_model/struct.PermanentMapEdits.html" title="struct map_model::PermanentMapEdits">PermanentMapEdits</a></code><a class='srclink' href='../../../src/map_model/edits/perma.rs.html#15' 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.117/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a><'de> for <a class="struct" href="../../../map_model/struct.PermanentMapEdits.html" title="struct map_model::PermanentMapEdits">PermanentMapEdits</a></code><a href='#impl-Deserialize%3C%27de%3E' class='anchor'></a><a class='srclink' href='../../../src/map_model/edits/perma.rs.html#15' 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.117/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.117/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.117/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#15' 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.117/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
|
||||
|
@ -5,7 +5,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(<a class="struct" href="../map_model/struct.ControlStopSign.html" title="struct map_model::ControlStopSign">ControlStopSign</a>)</code></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/enum.EditIntersection.html" title="enum map_model::EditIntersection">EditIntersection</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../src/map_model/edits/perma.rs.html#165-181' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.to_permanent' class="method"><code>fn <a href='#method.to_permanent' class='fnname'>to_permanent</a>(&self, map: &<a class="struct" href="../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -> <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#166-180' 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/enum.EditIntersection.html" title="enum map_model::EditIntersection">EditIntersection</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../src/map_model/edits/mod.rs.html#47' 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/enum.EditIntersection.html" title="enum map_model::EditIntersection">EditIntersection</a></code><a class='srclink' href='../src/map_model/edits/mod.rs.html#47' 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(<a class="struct" href="../map_model/struct.ControlStopSign.html" title="struct map_model::ControlStopSign">ControlStopSign</a>)</code></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/enum.EditIntersection.html" title="enum map_model::EditIntersection">EditIntersection</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../src/map_model/edits/perma.rs.html#191-207' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.to_permanent' class="method"><code>fn <a href='#method.to_permanent' class='fnname'>to_permanent</a>(&self, map: &<a class="struct" href="../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -> <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#192-206' 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/enum.EditIntersection.html" title="enum map_model::EditIntersection">EditIntersection</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../src/map_model/edits/mod.rs.html#47' 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/enum.EditIntersection.html" title="enum map_model::EditIntersection">EditIntersection</a></code><a class='srclink' href='../src/map_model/edits/mod.rs.html#47' 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-Debug' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../map_model/enum.EditIntersection.html" title="enum map_model::EditIntersection">EditIntersection</a></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../src/map_model/edits/mod.rs.html#47' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../src/map_model/edits/mod.rs.html#47' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id='impl-PartialEq%3CEditIntersection%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="enum" href="../map_model/enum.EditIntersection.html" title="enum map_model::EditIntersection">EditIntersection</a>> for <a class="enum" href="../map_model/enum.EditIntersection.html" title="enum map_model::EditIntersection">EditIntersection</a></code><a href='#impl-PartialEq%3CEditIntersection%3E' class='anchor'></a><a class='srclink' href='../src/map_model/edits/mod.rs.html#47' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, other: &<a class="enum" href="../map_model/enum.EditIntersection.html" title="enum map_model::EditIntersection">EditIntersection</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/map_model/edits/mod.rs.html#47' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `PermanentMapEdits` struct in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, PermanentMapEdits"><title>map_model::PermanentMapEdits - 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 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">☰</div><a href='../map_model/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Struct PermanentMapEdits</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.commands">commands</a><a href="#structfield.edits_name">edits_name</a><a href="#structfield.map_name">map_name</a><a href="#structfield.merge_zones">merge_zones</a><a href="#structfield.proposal_description">proposal_description</a><a href="#structfield.proposal_link">proposal_link</a><a href="#structfield.version">version</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.from_permanent">from_permanent</a><a href="#method.to_permanent">to_permanent</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Deserialize%3C%27de%3E">Deserialize<'de></a><a href="#impl-Serialize">Serialize</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<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class='location'><a href='index.html'>map_model</a></p><script>window.sidebarCurrent = {name: 'PermanentMapEdits', ty: 'struct', 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>
|
||||
<!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 `PermanentMapEdits` struct in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, PermanentMapEdits"><title>map_model::PermanentMapEdits - 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 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">☰</div><a href='../map_model/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Struct PermanentMapEdits</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.commands">commands</a><a href="#structfield.edits_name">edits_name</a><a href="#structfield.map_name">map_name</a><a href="#structfield.merge_zones">merge_zones</a><a href="#structfield.proposal_description">proposal_description</a><a href="#structfield.proposal_link">proposal_link</a><a href="#structfield.version">version</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.from_permanent">from_permanent</a><a href="#method.from_permanent_permissive">from_permanent_permissive</a><a href="#method.to_permanent">to_permanent</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Deserialize%3C%27de%3E">Deserialize<'de></a><a href="#impl-Serialize">Serialize</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<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class='location'><a href='index.html'>map_model</a></p><script>window.sidebarCurrent = {name: 'PermanentMapEdits', ty: 'struct', 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'>−</span>]</a></span><a class='srclink' href='../src/map_model/edits/perma.rs.html#16-30' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='index.html'>map_model</a>::<wbr><a class="struct" href=''>PermanentMapEdits</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct PermanentMapEdits {
|
||||
pub map_name: <a class="struct" href="../abstutil/abst_paths/struct.MapName.html" title="struct abstutil::abst_paths::MapName">MapName</a>,
|
||||
pub edits_name: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>,
|
||||
@ -16,8 +16,10 @@ Zone; every Road will be its own Zone. This is used to experiment with a per-roa
|
||||
this is a map-wide setting.</p>
|
||||
</div><span id="structfield.proposal_description" class="structfield small-section-header"><a href="#structfield.proposal_description" class="anchor field"></a><code>proposal_description: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></code></span><div class='docblock'><p>Edits without these are player generated.</p>
|
||||
</div><span id="structfield.proposal_link" class="structfield small-section-header"><a href="#structfield.proposal_link" class="anchor field"></a><code>proposal_link: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></code></span><div class='docblock'><p>The link is optional even for proposals</p>
|
||||
</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="../map_model/struct.PermanentMapEdits.html" title="struct map_model::PermanentMapEdits">PermanentMapEdits</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../src/map_model/edits/perma.rs.html#88-163' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.to_permanent' class="method"><code>pub fn <a href='#method.to_permanent' class='fnname'>to_permanent</a>(edits: &<a class="struct" href="../map_model/struct.MapEdits.html" title="struct map_model::MapEdits">MapEdits</a>, map: &<a class="struct" href="../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -> <a class="struct" href="../map_model/struct.PermanentMapEdits.html" title="struct map_model::PermanentMapEdits">PermanentMapEdits</a></code><a class='srclink' href='../src/map_model/edits/perma.rs.html#89-100' title='goto source code'>[src]</a></h4><h4 id='method.from_permanent' class="method"><code>pub fn <a href='#method.from_permanent' class='fnname'>from_permanent</a>(<br> perma: <a class="struct" href="../map_model/struct.PermanentMapEdits.html" title="struct map_model::PermanentMapEdits">PermanentMapEdits</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="struct" href="../map_model/struct.MapEdits.html" title="struct map_model::MapEdits">MapEdits</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#106-162' title='goto source code'>[src]</a></h4><div class='docblock'><p>Load edits from the permanent form, looking up the Map IDs by the hopefully stabler OSM IDs.
|
||||
</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="../map_model/struct.PermanentMapEdits.html" title="struct map_model::PermanentMapEdits">PermanentMapEdits</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../src/map_model/edits/perma.rs.html#132-189' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.to_permanent' class="method"><code>pub fn <a href='#method.to_permanent' class='fnname'>to_permanent</a>(edits: &<a class="struct" href="../map_model/struct.MapEdits.html" title="struct map_model::MapEdits">MapEdits</a>, map: &<a class="struct" href="../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -> <a class="struct" href="../map_model/struct.PermanentMapEdits.html" title="struct map_model::PermanentMapEdits">PermanentMapEdits</a></code><a class='srclink' href='../src/map_model/edits/perma.rs.html#133-144' title='goto source code'>[src]</a></h4><h4 id='method.from_permanent' class="method"><code>pub fn <a href='#method.from_permanent' class='fnname'>from_permanent</a>(<br> perma: <a class="struct" href="../map_model/struct.PermanentMapEdits.html" title="struct map_model::PermanentMapEdits">PermanentMapEdits</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="struct" href="../map_model/struct.MapEdits.html" title="struct map_model::MapEdits">MapEdits</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#148-166' title='goto source code'>[src]</a></h4><div class='docblock'><p>Load edits from the permanent form, looking up the map IDs by the hopefully stabler OSM IDs.
|
||||
Validate that the basemap hasn't changed in important ways.</p>
|
||||
</div><h4 id='method.from_permanent_permissive' class="method"><code>pub fn <a href='#method.from_permanent_permissive' class='fnname'>from_permanent_permissive</a>(<br> perma: <a class="struct" href="../map_model/struct.PermanentMapEdits.html" title="struct map_model::PermanentMapEdits">PermanentMapEdits</a>, <br> map: &<a class="struct" href="../map_model/struct.Map.html" title="struct map_model::Map">Map</a><br>) -> <a class="struct" href="../map_model/struct.MapEdits.html" title="struct map_model::MapEdits">MapEdits</a></code><a class='srclink' href='../src/map_model/edits/perma.rs.html#170-188' title='goto source code'>[src]</a></h4><div class='docblock'><p>Load edits from the permanent form, looking up the map IDs by the hopefully stabler OSM IDs.
|
||||
Strip out commands that're broken.</p>
|
||||
</div></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="struct" href="../map_model/struct.PermanentMapEdits.html" title="struct map_model::PermanentMapEdits">PermanentMapEdits</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../src/map_model/edits/perma.rs.html#15' 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="struct" href="../map_model/struct.PermanentMapEdits.html" title="struct map_model::PermanentMapEdits">PermanentMapEdits</a></code><a class='srclink' href='../src/map_model/edits/perma.rs.html#15' 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.117/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a><'de> for <a class="struct" href="../map_model/struct.PermanentMapEdits.html" title="struct map_model::PermanentMapEdits">PermanentMapEdits</a></code><a href='#impl-Deserialize%3C%27de%3E' class='anchor'></a><a class='srclink' href='../src/map_model/edits/perma.rs.html#15' 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.117/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.117/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.117/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#15' 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.117/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
|
||||
|
File diff suppressed because one or more lines are too long
@ -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">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"rustdoc 1.47.0 (18bf6b4f0 2020-10-07)"</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, 11 Nov 2020 21:35:57 +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, 11 Nov 2020 23:31:16 +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>
|
||||
|
@ -257,7 +257,7 @@
|
||||
<span class="ident">config</span>: <span class="kw-2">&</span><span class="ident">ImporterConfiguration</span>,
|
||||
) {
|
||||
<span class="kw">let</span> <span class="ident">input</span> <span class="op">=</span> <span class="ident">abstutil</span>::<span class="ident">path</span>(<span class="ident">input</span>);
|
||||
<span class="kw">let</span> <span class="ident">clipping_polygon</span> <span class="op">=</span> <span class="ident">abstutil</span>::<span class="ident">path</span>(<span class="ident">clipping_polygon</span>);
|
||||
<span class="kw">let</span> <span class="ident">clipping_polygon</span> <span class="op">=</span> <span class="ident">clipping_polygon</span>;
|
||||
<span class="kw">let</span> <span class="ident">output</span> <span class="op">=</span> <span class="ident">abstutil</span>::<span class="ident">path</span>(<span class="ident">output</span>);
|
||||
|
||||
<span class="kw">if</span> <span class="ident">Path</span>::<span class="ident">new</span>(<span class="kw-2">&</span><span class="ident">output</span>).<span class="ident">exists</span>() {
|
||||
|
@ -214,6 +214,32 @@
|
||||
<span id="213">213</span>
|
||||
<span id="214">214</span>
|
||||
<span id="215">215</span>
|
||||
<span id="216">216</span>
|
||||
<span id="217">217</span>
|
||||
<span id="218">218</span>
|
||||
<span id="219">219</span>
|
||||
<span id="220">220</span>
|
||||
<span id="221">221</span>
|
||||
<span id="222">222</span>
|
||||
<span id="223">223</span>
|
||||
<span id="224">224</span>
|
||||
<span id="225">225</span>
|
||||
<span id="226">226</span>
|
||||
<span id="227">227</span>
|
||||
<span id="228">228</span>
|
||||
<span id="229">229</span>
|
||||
<span id="230">230</span>
|
||||
<span id="231">231</span>
|
||||
<span id="232">232</span>
|
||||
<span id="233">233</span>
|
||||
<span id="234">234</span>
|
||||
<span id="235">235</span>
|
||||
<span id="236">236</span>
|
||||
<span id="237">237</span>
|
||||
<span id="238">238</span>
|
||||
<span id="239">239</span>
|
||||
<span id="240">240</span>
|
||||
<span id="241">241</span>
|
||||
</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>};
|
||||
|
||||
@ -302,6 +328,50 @@
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">PermanentEditCmd</span> {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">to_cmd</span>(<span class="self">self</span>, <span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>) <span class="op">-></span> <span class="prelude-ty">Result</span><span class="op"><</span><span class="ident">EditCmd</span>, <span class="ident">String</span><span class="op">></span> {
|
||||
<span class="kw">match</span> <span class="self">self</span> {
|
||||
<span class="ident">PermanentEditCmd</span>::<span class="ident">ChangeRoad</span> { <span class="ident">r</span>, <span class="ident">new</span>, <span class="ident">old</span> } <span class="op">=></span> {
|
||||
<span class="kw">let</span> <span class="ident">id</span> <span class="op">=</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="kw">let</span> <span class="ident">num_current</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_r</span>(<span class="ident">id</span>).<span class="ident">lanes_ltr</span>().<span class="ident">len</span>();
|
||||
<span class="comment">// The basemap changed -- it'd be pretty hard to understand the original</span>
|
||||
<span class="comment">// intent of the edit.</span>
|
||||
<span class="kw">if</span> <span class="ident">num_current</span> <span class="op">!=</span> <span class="ident">new</span>.<span class="ident">lanes_ltr</span>.<span class="ident">len</span>() {
|
||||
<span class="kw">return</span> <span class="prelude-val">Err</span>(<span class="macro">format</span><span class="macro">!</span>(
|
||||
<span class="string">"number of lanes in {} is {} now, but {} in the edits"</span>,
|
||||
<span class="ident">r</span>,
|
||||
<span class="ident">num_current</span>,
|
||||
<span class="ident">new</span>.<span class="ident">lanes_ltr</span>.<span class="ident">len</span>()
|
||||
));
|
||||
}
|
||||
<span class="prelude-val">Ok</span>(<span class="ident">EditCmd</span>::<span class="ident">ChangeRoad</span> { <span class="ident">r</span>: <span class="ident">id</span>, <span class="ident">new</span>, <span class="ident">old</span> })
|
||||
}
|
||||
<span class="ident">PermanentEditCmd</span>::<span class="ident">ChangeIntersection</span> { <span class="ident">i</span>, <span class="ident">new</span>, <span class="ident">old</span> } <span class="op">=></span> {
|
||||
<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">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> {
|
||||
<span class="ident">osm_rel_id</span>,
|
||||
<span class="ident">old</span>,
|
||||
<span class="ident">new</span>,
|
||||
} <span class="op">=></span> {
|
||||
<span class="kw">let</span> <span class="ident">id</span> <span class="op">=</span> <span class="ident">map</span>
|
||||
.<span class="ident">find_br</span>(<span class="ident">osm_rel_id</span>)
|
||||
.<span class="ident">ok_or</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">"can't find {}"</span>, <span class="ident">osm_rel_id</span>))<span class="question-mark">?</span>;
|
||||
<span class="prelude-val">Ok</span>(<span class="ident">EditCmd</span>::<span class="ident">ChangeRouteSchedule</span> { <span class="ident">id</span>, <span class="ident">old</span>, <span class="ident">new</span> })
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">PermanentMapEdits</span> {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">to_permanent</span>(<span class="ident">edits</span>: <span class="kw-2">&</span><span class="ident">MapEdits</span>, <span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>) <span class="op">-></span> <span class="ident">PermanentMapEdits</span> {
|
||||
<span class="ident">PermanentMapEdits</span> {
|
||||
@ -316,10 +386,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Load edits from the permanent form, looking up the Map IDs by the hopefully stabler OSM IDs.</span>
|
||||
<span class="doccomment">/// Load edits from the permanent form, looking up the map IDs by the hopefully stabler OSM IDs.</span>
|
||||
<span class="doccomment">/// Validate that the basemap hasn't changed in important ways.</span>
|
||||
<span class="comment">// TODO When a change has happened, try to preserve as much of the original edits as possible,</span>
|
||||
<span class="comment">// and warn the player about the rest?</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">from_permanent</span>(<span class="ident">perma</span>: <span class="ident">PermanentMapEdits</span>, <span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>) <span class="op">-></span> <span class="prelude-ty">Result</span><span class="op"><</span><span class="ident">MapEdits</span>, <span class="ident">String</span><span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">edits</span> <span class="op">=</span> <span class="ident">MapEdits</span> {
|
||||
<span class="ident">edits_name</span>: <span class="ident">perma</span>.<span class="ident">edits_name</span>,
|
||||
@ -328,45 +396,7 @@
|
||||
<span class="ident">commands</span>: <span class="ident">perma</span>
|
||||
.<span class="ident">commands</span>
|
||||
.<span class="ident">into_iter</span>()
|
||||
.<span class="ident">map</span>(<span class="op">|</span><span class="ident">cmd</span><span class="op">|</span> <span class="kw">match</span> <span class="ident">cmd</span> {
|
||||
<span class="ident">PermanentEditCmd</span>::<span class="ident">ChangeRoad</span> { <span class="ident">r</span>, <span class="ident">new</span>, <span class="ident">old</span> } <span class="op">=></span> {
|
||||
<span class="kw">let</span> <span class="ident">id</span> <span class="op">=</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="kw">let</span> <span class="ident">num_current</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_r</span>(<span class="ident">id</span>).<span class="ident">lanes_ltr</span>().<span class="ident">len</span>();
|
||||
<span class="comment">// The basemap changed -- it'd be pretty hard to understand the original</span>
|
||||
<span class="comment">// intent of the edit.</span>
|
||||
<span class="kw">if</span> <span class="ident">num_current</span> <span class="op">!=</span> <span class="ident">new</span>.<span class="ident">lanes_ltr</span>.<span class="ident">len</span>() {
|
||||
<span class="kw">return</span> <span class="prelude-val">Err</span>(<span class="macro">format</span><span class="macro">!</span>(
|
||||
<span class="string">"number of lanes in {} is {} now, but {} in the edits"</span>,
|
||||
<span class="ident">r</span>,
|
||||
<span class="ident">num_current</span>,
|
||||
<span class="ident">new</span>.<span class="ident">lanes_ltr</span>.<span class="ident">len</span>()
|
||||
));
|
||||
}
|
||||
<span class="prelude-val">Ok</span>(<span class="ident">EditCmd</span>::<span class="ident">ChangeRoad</span> { <span class="ident">r</span>: <span class="ident">id</span>, <span class="ident">new</span>, <span class="ident">old</span> })
|
||||
}
|
||||
<span class="ident">PermanentEditCmd</span>::<span class="ident">ChangeIntersection</span> { <span class="ident">i</span>, <span class="ident">new</span>, <span class="ident">old</span> } <span class="op">=></span> {
|
||||
<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">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> {
|
||||
<span class="ident">osm_rel_id</span>,
|
||||
<span class="ident">old</span>,
|
||||
<span class="ident">new</span>,
|
||||
} <span class="op">=></span> {
|
||||
<span class="kw">let</span> <span class="ident">id</span> <span class="op">=</span> <span class="ident">map</span>
|
||||
.<span class="ident">find_br</span>(<span class="ident">osm_rel_id</span>)
|
||||
.<span class="ident">ok_or</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">"can't find {}"</span>, <span class="ident">osm_rel_id</span>))<span class="question-mark">?</span>;
|
||||
<span class="prelude-val">Ok</span>(<span class="ident">EditCmd</span>::<span class="ident">ChangeRouteSchedule</span> { <span class="ident">id</span>, <span class="ident">old</span>, <span class="ident">new</span> })
|
||||
}
|
||||
})
|
||||
.<span class="ident">map</span>(<span class="op">|</span><span class="ident">cmd</span><span class="op">|</span> <span class="ident">cmd</span>.<span class="ident">to_cmd</span>(<span class="ident">map</span>))
|
||||
.<span class="ident">collect</span>::<span class="op"><</span><span class="prelude-ty">Result</span><span class="op"><</span><span class="ident">Vec</span><span class="op"><</span><span class="ident">EditCmd</span><span class="op">></span>, <span class="ident">String</span><span class="op">>></span>()<span class="question-mark">?</span>,
|
||||
<span class="ident">merge_zones</span>: <span class="ident">perma</span>.<span class="ident">merge_zones</span>,
|
||||
|
||||
@ -377,6 +407,28 @@
|
||||
<span class="ident">edits</span>.<span class="ident">update_derived</span>(<span class="ident">map</span>);
|
||||
<span class="prelude-val">Ok</span>(<span class="ident">edits</span>)
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Load edits from the permanent form, looking up the map IDs by the hopefully stabler OSM IDs.</span>
|
||||
<span class="doccomment">/// Strip out commands that're broken.</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">from_permanent_permissive</span>(<span class="ident">perma</span>: <span class="ident">PermanentMapEdits</span>, <span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>) <span class="op">-></span> <span class="ident">MapEdits</span> {
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">edits</span> <span class="op">=</span> <span class="ident">MapEdits</span> {
|
||||
<span class="ident">edits_name</span>: <span class="ident">perma</span>.<span class="ident">edits_name</span>,
|
||||
<span class="ident">proposal_description</span>: <span class="ident">perma</span>.<span class="ident">proposal_description</span>,
|
||||
<span class="ident">proposal_link</span>: <span class="ident">perma</span>.<span class="ident">proposal_link</span>,
|
||||
<span class="ident">commands</span>: <span class="ident">perma</span>
|
||||
.<span class="ident">commands</span>
|
||||
.<span class="ident">into_iter</span>()
|
||||
.<span class="ident">filter_map</span>(<span class="op">|</span><span class="ident">cmd</span><span class="op">|</span> <span class="ident">cmd</span>.<span class="ident">to_cmd</span>(<span class="ident">map</span>).<span class="ident">ok</span>())
|
||||
.<span class="ident">collect</span>(),
|
||||
<span class="ident">merge_zones</span>: <span class="ident">perma</span>.<span class="ident">merge_zones</span>,
|
||||
|
||||
<span class="ident">changed_roads</span>: <span class="ident">BTreeSet</span>::<span class="ident">new</span>(),
|
||||
<span class="ident">original_intersections</span>: <span class="ident">BTreeMap</span>::<span class="ident">new</span>(),
|
||||
<span class="ident">changed_routes</span>: <span class="ident">BTreeSet</span>::<span class="ident">new</span>(),
|
||||
};
|
||||
<span class="ident">edits</span>.<span class="ident">update_derived</span>(<span class="ident">map</span>);
|
||||
<span class="ident">edits</span>
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">EditIntersection</span> {
|
||||
|
@ -235,6 +235,14 @@
|
||||
<span id="234">234</span>
|
||||
<span id="235">235</span>
|
||||
<span id="236">236</span>
|
||||
<span id="237">237</span>
|
||||
<span id="238">238</span>
|
||||
<span id="239">239</span>
|
||||
<span id="240">240</span>
|
||||
<span id="241">241</span>
|
||||
<span id="242">242</span>
|
||||
<span id="243">243</span>
|
||||
<span id="244">244</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="doccomment">//! Integration tests</span>
|
||||
|
||||
@ -376,7 +384,15 @@
|
||||
) {
|
||||
<span class="prelude-val">Ok</span>(<span class="ident">perma</span>) <span class="op">=></span> {
|
||||
<span class="kw">let</span> <span class="ident">map</span> <span class="op">=</span> <span class="ident">map_model</span>::<span class="ident">Map</span>::<span class="ident">new</span>(<span class="ident">perma</span>.<span class="ident">map_name</span>.<span class="ident">path</span>(), <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">timer</span>);
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Err</span>(<span class="ident">err</span>) <span class="op">=</span> <span class="ident">map_model</span>::<span class="ident">PermanentMapEdits</span>::<span class="ident">from_permanent</span>(<span class="ident">perma</span>, <span class="kw-2">&</span><span class="ident">map</span>) {
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Err</span>(<span class="ident">err</span>) <span class="op">=</span> <span class="ident">map_model</span>::<span class="ident">PermanentMapEdits</span>::<span class="ident">from_permanent</span>(<span class="ident">perma</span>.<span class="ident">clone</span>(), <span class="kw-2">&</span><span class="ident">map</span>)
|
||||
{
|
||||
<span class="ident">abstutil</span>::<span class="ident">write_json</span>(
|
||||
<span class="string">"repair_attempt.json"</span>.<span class="ident">to_string</span>(),
|
||||
<span class="kw-2">&</span><span class="ident">map_model</span>::<span class="ident">PermanentMapEdits</span>::<span class="ident">to_permanent</span>(
|
||||
<span class="kw-2">&</span><span class="ident">map_model</span>::<span class="ident">PermanentMapEdits</span>::<span class="ident">from_permanent_permissive</span>(<span class="ident">perma</span>, <span class="kw-2">&</span><span class="ident">map</span>),
|
||||
<span class="kw-2">&</span><span class="ident">map</span>,
|
||||
),
|
||||
);
|
||||
<span class="kw">return</span> <span class="prelude-val">Err</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">"{} is out-of-date: {}"</span>, <span class="ident">name</span>, <span class="ident">err</span>));
|
||||
}
|
||||
}
|
||||
|
@ -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 `check_proposals` fn in crate `tests`."><meta name="keywords" content="rust, rustlang, rust-lang, check_proposals"><title>tests::check_proposals - 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 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">☰</div><a href='../tests/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'>tests</a></p><script>window.sidebarCurrent = {name: 'check_proposals', ty: 'fn', 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'>−</span>]</a></span><a class='srclink' href='../src/tests/main.rs.html#132-151' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='index.html'>tests</a>::<wbr><a class="fn" href=''>check_proposals</a></span></h1><pre class='rust fn'>fn check_proposals() -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></pre><div class='docblock'><p>Verify all edits under version control can be correctly apply to their map.</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'>−</span>]</a></span><a class='srclink' href='../src/tests/main.rs.html#132-159' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='index.html'>tests</a>::<wbr><a class="fn" href=''>check_proposals</a></span></h1><pre class='rust fn'>fn check_proposals() -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></pre><div class='docblock'><p>Verify all edits under version control can be correctly apply to their map.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "tests";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `test_lane_changing` fn in crate `tests`."><meta name="keywords" content="rust, rustlang, rust-lang, test_lane_changing"><title>tests::test_lane_changing - 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 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">☰</div><a href='../tests/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'>tests</a></p><script>window.sidebarCurrent = {name: 'test_lane_changing', ty: 'fn', 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'>−</span>]</a></span><a class='srclink' href='../src/tests/main.rs.html#155-236' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='index.html'>tests</a>::<wbr><a class="fn" href=''>test_lane_changing</a></span></h1><pre class='rust fn'>fn test_lane_changing(map: &<a class="struct" href="../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></pre><div class='docblock'><p>Verify lane-chaging behavior is overall reasonable, by asserting all cars and bikes can
|
||||
<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/tests/main.rs.html#163-244' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='index.html'>tests</a>::<wbr><a class="fn" href=''>test_lane_changing</a></span></h1><pre class='rust fn'>fn test_lane_changing(map: &<a class="struct" href="../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></pre><div class='docblock'><p>Verify lane-chaging behavior is overall reasonable, by asserting all cars and bikes can
|
||||
complete their trip under a time limit.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "tests";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `tests` crate."><meta name="keywords" content="rust, rustlang, rust-lang, tests"><title>tests - 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">☰</div><a href='../tests/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Crate tests</p><div class='block version'><p>Version 0.1.0</p></div><div class="sidebar-elems"><a id='all-types' href='all.html'><p>See all tests's items</p></a><div class="block items"><ul><li><a href="#functions">Functions</a></li></ul></div><p class='location'></p><script>window.sidebarCurrent = {name: 'tests', ty: 'mod', relpath: '../'};</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'>−</span>]</a></span><a class='srclink' href='../src/tests/main.rs.html#1-236' title='goto source code'>[src]</a></span><span class='in-band'>Crate <a class="mod" href=''>tests</a></span></h1><div class='docblock'><p>Integration tests</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'>−</span>]</a></span><a class='srclink' href='../src/tests/main.rs.html#1-244' title='goto source code'>[src]</a></span><span class='in-band'>Crate <a class="mod" href=''>tests</a></span></h1><div class='docblock'><p>Integration tests</p>
|
||||
</div><h2 id='functions' class='section-header'><a href="#functions">Functions</a></h2>
|
||||
<table><tr class='module-item'><td><a class="fn" href="fn.check_proposals.html" title='tests::check_proposals fn'>check_proposals</a></td><td class='docblock-short'><p>Verify all edits under version control can be correctly apply to their map.</p>
|
||||
</td></tr><tr class='module-item'><td><a class="fn" href="fn.dump_route_goldenfile.html" title='tests::dump_route_goldenfile fn'>dump_route_goldenfile</a></td><td class='docblock-short'><p>Describe all public transit routes and keep under version control to spot diffs easily.</p>
|
||||
|
Loading…
Reference in New Issue
Block a user