This commit is contained in:
dabreegster 2022-01-31 16:13:31 +00:00
parent fb2deed7f5
commit b5201aec8b
24 changed files with 155 additions and 55 deletions

View File

@ -198,8 +198,8 @@ call this to handle all other events. <a href="#method.other_event">Read more</a
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw_baselayer-13" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/debug/mod.rs.html#475-477" title="goto source code">[src]</a></div><a href="#method.draw_baselayer-13" class="anchor"></a><h4 class="code-header">fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</h4></div></summary><div class='docblock'><p>Specifies what to draw before draw()</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw-14" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/debug/mod.rs.html#479-501" title="goto source code">[src]</a></div><a href="#method.draw-14" class="anchor"></a><h4 class="code-header">fn <a class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, app: &amp;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>)</h4></div></summary><div class='docblock'><p>Draw</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.on_destroy-13" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.on_destroy-13" class="anchor"></a><h4 class="code-header">fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.reference.html">&amp;mut </a>A)</h4></div></summary><div class='docblock'><p>Before this state is popped or replaced, call this.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-State%3CApp%3E-14" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/debug/mod.rs.html#963-991" title="goto source code">[src]</a></div><a href="#impl-State%3CApp%3E-14" class="anchor"></a><h3 class="code-header in-band">impl State&lt;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../debug/struct.ScreenshotTest.html" title="struct game::debug::ScreenshotTest">ScreenshotTest</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event-14" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/debug/mod.rs.html#964-989" title="goto source code">[src]</a></div><a href="#method.event-14" class="anchor"></a><h4 class="code-header">fn <a class="fnname">event</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="struct.App.html" title="struct game::app::App">App</a>) -&gt; Transition&lt;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>&gt;</h4></div></summary><div class='docblock'><p>Respond to a UI event, such as input or time passing.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw-15" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/debug/mod.rs.html#990" title="goto source code">[src]</a></div><a href="#method.draw-15" class="anchor"></a><h4 class="code-header">fn <a class="fnname">draw</a>(&amp;self, _: &amp;mut GfxCtx&lt;'_&gt;, _: &amp;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>)</h4></div></summary><div class='docblock'><p>Draw</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-State%3CApp%3E-14" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/debug/mod.rs.html#968-996" title="goto source code">[src]</a></div><a href="#impl-State%3CApp%3E-14" class="anchor"></a><h3 class="code-header in-band">impl State&lt;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../debug/struct.ScreenshotTest.html" title="struct game::debug::ScreenshotTest">ScreenshotTest</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event-14" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/debug/mod.rs.html#969-994" title="goto source code">[src]</a></div><a href="#method.event-14" class="anchor"></a><h4 class="code-header">fn <a class="fnname">event</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="struct.App.html" title="struct game::app::App">App</a>) -&gt; Transition&lt;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>&gt;</h4></div></summary><div class='docblock'><p>Respond to a UI event, such as input or time passing.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw-15" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/debug/mod.rs.html#995" title="goto source code">[src]</a></div><a href="#method.draw-15" class="anchor"></a><h4 class="code-header">fn <a class="fnname">draw</a>(&amp;self, _: &amp;mut GfxCtx&lt;'_&gt;, _: &amp;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>)</h4></div></summary><div class='docblock'><p>Draw</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw_baselayer-14" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.draw_baselayer-14" class="anchor"></a><h4 class="code-header">fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</h4></div></summary><div class='docblock'><p>Specifies what to draw before draw()</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.on_destroy-14" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.on_destroy-14" class="anchor"></a><h4 class="code-header">fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.reference.html">&amp;mut </a>A)</h4></div></summary><div class='docblock'><p>Before this state is popped or replaced, call this.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-State%3CApp%3E-15" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/devtools/collisions.rs.html#271-304" title="goto source code">[src]</a></div><a href="#impl-State%3CApp%3E-15" class="anchor"></a><h3 class="code-header in-band">impl State&lt;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../devtools/collisions/struct.CollisionsViewer.html" title="struct game::devtools::collisions::CollisionsViewer">CollisionsViewer</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event-15" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/devtools/collisions.rs.html#272-298" title="goto source code">[src]</a></div><a href="#method.event-15" class="anchor"></a><h4 class="code-header">fn <a class="fnname">event</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="struct.App.html" title="struct game::app::App">App</a>) -&gt; Transition&lt;<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>&gt;</h4></div></summary><div class='docblock'><p>Respond to a UI event, such as input or time passing.</p>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `debug` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, debug"><title>game::debug - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../game/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module debug</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="debug" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">game</a>::<wbr><a class="mod" href="#">debug</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/debug/mod.rs.html#1-1088" title="goto source code">[src]</a></span></h1><h2 id="reexports" class="small-section-header"><a href="#reexports">Re-exports</a></h2>
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../game/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module debug</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="debug" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">game</a>::<wbr><a class="mod" href="#">debug</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/debug/mod.rs.html#1-1093" title="goto source code">[src]</a></span></h1><h2 id="reexports" class="small-section-header"><a href="#reexports">Re-exports</a></h2>
<div class="item-table"><div class="item-row"><div class="item-left import-item"><code>pub use self::routes::<a class="struct" href="routes/struct.PathCostDebugger.html" title="struct game::debug::routes::PathCostDebugger">PathCostDebugger</a>;</code></div><div class="item-right docblock-short"></div></div></div><h2 id="modules" class="small-section-header"><a href="#modules">Modules</a></h2>
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="mod" href="blocked_by/index.html" title="game::debug::blocked_by mod">blocked_by</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="blockfinder/index.html" title="game::debug::blockfinder mod">blockfinder</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="floodfill/index.html" title="game::debug::floodfill mod">floodfill</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="objects/index.html" title="game::debug::objects mod">objects</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="path_counter/index.html" title="game::debug::path_counter mod">path_counter</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="polygons/index.html" title="game::debug::polygons mod">polygons</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="routes/index.html" title="game::debug::routes mod">routes</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="select_roads/index.html" title="game::debug::select_roads mod">select_roads</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="shared_row/index.html" title="game::debug::shared_row mod">shared_row</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="streetmix/index.html" title="game::debug::streetmix mod">streetmix</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="uber_turns/index.html" title="game::debug::uber_turns mod">uber_turns</a></div><div class="item-right docblock-short"></div></div></div><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2>
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Actions.html" title="game::debug::Actions struct">Actions</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.DebugMode.html" title="game::debug::DebugMode struct">DebugMode</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.ScreenshotTest.html" title="game::debug::ScreenshotTest struct">ScreenshotTest</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.SearchResults.html" title="game::debug::SearchResults struct">SearchResults</a></div><div class="item-right docblock-short"></div></div></div><h2 id="functions" class="small-section-header"><a href="#functions">Functions</a></h2>

File diff suppressed because one or more lines are too long

View File

@ -1,9 +1,9 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `ScreenshotTest` struct in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, ScreenshotTest"><title>ScreenshotTest in game::debug - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../game/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct ScreenshotTest</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield.screenshot_done">screenshot_done</a><a href="#structfield.todo_maps">todo_maps</a></div><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.new_state">new_state</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-State%3CApp%3E">State&lt;App&gt;</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><h2 class="location">Other items in<br><a href="../index.html">game</a>::<wbr><a href="index.html">debug</a></h2><div id="sidebar-vars" data-name="ScreenshotTest" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">game</a>::<wbr><a href="index.html">debug</a>::<wbr><a class="struct" href="#">ScreenshotTest</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/debug/mod.rs.html#934-937" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust struct"><code>struct ScreenshotTest {
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../game/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct ScreenshotTest</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield.screenshot_done">screenshot_done</a><a href="#structfield.todo_maps">todo_maps</a></div><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.new_state">new_state</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-State%3CApp%3E">State&lt;App&gt;</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><h2 class="location">Other items in<br><a href="../index.html">game</a>::<wbr><a href="index.html">debug</a></h2><div id="sidebar-vars" data-name="ScreenshotTest" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">game</a>::<wbr><a href="index.html">debug</a>::<wbr><a class="struct" href="#">ScreenshotTest</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/debug/mod.rs.html#939-942" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust struct"><code>struct ScreenshotTest {
todo_maps: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../abstio/abst_paths/struct.MapName.html" title="struct abstio::abst_paths::MapName">MapName</a>&gt;,
screenshot_done: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a>,
}</code></pre></div><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.todo_maps" class="structfield small-section-header"><a href="#structfield.todo_maps" class="anchor field"></a><code>todo_maps: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../abstio/abst_paths/struct.MapName.html" title="struct abstio::abst_paths::MapName">MapName</a>&gt;</code></span><span id="structfield.screenshot_done" class="structfield small-section-header"><a href="#structfield.screenshot_done" class="anchor field"></a><code>screenshot_done: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/debug/mod.rs.html#939-961" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.ScreenshotTest.html" title="struct game::debug::ScreenshotTest">ScreenshotTest</a></h3></div></summary><div class="impl-items"><div id="method.new_state" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/debug/mod.rs.html#940-960" title="goto source code">[src]</a></div><a href="#method.new_state" class="anchor"></a><h4 class="code-header">fn <a href="#method.new_state" class="fnname">new_state</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;mut <a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;todo_maps: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../abstio/abst_paths/struct.MapName.html" title="struct abstio::abst_paths::MapName">MapName</a>&gt;<br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn State&lt;<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>&gt;&gt;</h4></div></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-State%3CApp%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/debug/mod.rs.html#963-991" title="goto source code">[src]</a></div><a href="#impl-State%3CApp%3E" class="anchor"></a><h3 class="code-header in-band">impl State&lt;<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="struct.ScreenshotTest.html" title="struct game::debug::ScreenshotTest">ScreenshotTest</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/debug/mod.rs.html#964-989" title="goto source code">[src]</a></div><a href="#method.event" class="anchor"></a><h4 class="code-header">fn <a class="fnname">event</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>) -&gt; Transition&lt;<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>&gt;</h4></div></summary><div class='docblock'><p>Respond to a UI event, such as input or time passing.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/debug/mod.rs.html#990" title="goto source code">[src]</a></div><a href="#method.draw" class="anchor"></a><h4 class="code-header">fn <a class="fnname">draw</a>(&amp;self, _: &amp;mut GfxCtx&lt;'_&gt;, _: &amp;<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>)</h4></div></summary><div class='docblock'><p>Draw</p>
}</code></pre></div><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.todo_maps" class="structfield small-section-header"><a href="#structfield.todo_maps" class="anchor field"></a><code>todo_maps: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../abstio/abst_paths/struct.MapName.html" title="struct abstio::abst_paths::MapName">MapName</a>&gt;</code></span><span id="structfield.screenshot_done" class="structfield small-section-header"><a href="#structfield.screenshot_done" class="anchor field"></a><code>screenshot_done: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/debug/mod.rs.html#944-966" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.ScreenshotTest.html" title="struct game::debug::ScreenshotTest">ScreenshotTest</a></h3></div></summary><div class="impl-items"><div id="method.new_state" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/debug/mod.rs.html#945-965" title="goto source code">[src]</a></div><a href="#method.new_state" class="anchor"></a><h4 class="code-header">fn <a href="#method.new_state" class="fnname">new_state</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;mut <a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;todo_maps: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../abstio/abst_paths/struct.MapName.html" title="struct abstio::abst_paths::MapName">MapName</a>&gt;<br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn State&lt;<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>&gt;&gt;</h4></div></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-State%3CApp%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/debug/mod.rs.html#968-996" title="goto source code">[src]</a></div><a href="#impl-State%3CApp%3E" class="anchor"></a><h3 class="code-header in-band">impl State&lt;<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="struct.ScreenshotTest.html" title="struct game::debug::ScreenshotTest">ScreenshotTest</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/debug/mod.rs.html#969-994" title="goto source code">[src]</a></div><a href="#method.event" class="anchor"></a><h4 class="code-header">fn <a class="fnname">event</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>) -&gt; Transition&lt;<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>&gt;</h4></div></summary><div class='docblock'><p>Respond to a UI event, such as input or time passing.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/debug/mod.rs.html#995" title="goto source code">[src]</a></div><a href="#method.draw" class="anchor"></a><h4 class="code-header">fn <a class="fnname">draw</a>(&amp;self, _: &amp;mut GfxCtx&lt;'_&gt;, _: &amp;<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>)</h4></div></summary><div class='docblock'><p>Draw</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw_baselayer" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.draw_baselayer" class="anchor"></a><h4 class="code-header">fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</h4></div></summary><div class='docblock'><p>Specifies what to draw before draw()</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.on_destroy" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.on_destroy" class="anchor"></a><h4 class="code-header">fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.reference.html">&amp;mut </a>A)</h4></div></summary><div class='docblock'><p>Before this state is popped or replaced, call this.</p>
</div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-RefUnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.ScreenshotTest.html" title="struct game::debug::ScreenshotTest">ScreenshotTest</a></h3></div><div id="impl-Send" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Send" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.ScreenshotTest.html" title="struct game::debug::ScreenshotTest">ScreenshotTest</a></h3></div><div id="impl-Sync" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Sync" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.ScreenshotTest.html" title="struct game::debug::ScreenshotTest">ScreenshotTest</a></h3></div><div id="impl-Unpin" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Unpin" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.ScreenshotTest.html" title="struct game::debug::ScreenshotTest">ScreenshotTest</a></h3></div><div id="impl-UnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-UnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.ScreenshotTest.html" title="struct game::debug::ScreenshotTest">ScreenshotTest</a></h3></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Any" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/any.rs.html#132-136" title="goto source code">[src]</a></div><a href="#impl-Any" class="anchor"></a><h3 class="code-header in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/any.rs.html#133" title="goto source code">[src]</a></div><a href="#method.type_id" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.58.1/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.58.1/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.58.1/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>

File diff suppressed because one or more lines are too long

View File

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

View File

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `block` mod in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, block"><title>map_model::objects::block - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><script defer src="../../../main.js"></script>
<noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module block</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><div id="sidebar-vars" data-name="block" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">objects</a>::<wbr><a class="mod" href="#">block</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_model/objects/block.rs.html#1-538" title="goto source code">[src]</a></span></h1><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2>
<noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module block</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><div id="sidebar-vars" data-name="block" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">objects</a>::<wbr><a class="mod" href="#">block</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_model/objects/block.rs.html#1-578" title="goto source code">[src]</a></span></h1><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2>
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Block.html" title="map_model::objects::block::Block struct">Block</a></div><div class="item-right docblock-short"><p>A block is defined by a perimeter that traces along the sides of roads. Inside the perimeter,
the block may contain buildings and interior roads. In the simple case, a block represents a
single “city block”, with no interior roads. It may also cover a “neighborhood”, where the

View File

@ -1,39 +1,43 @@
<!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="A sequence of roads in order, beginning and ending at the same place. No “crossings” tracing along this sequence should geometrically yield a simple polygon."><meta name="keywords" content="rust, rustlang, rust-lang, Perimeter"><title>Perimeter in map_model::objects::block - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><script defer src="../../../main.js"></script>
<noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct Perimeter</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield.interior">interior</a><a href="#structfield.roads">roads</a></div><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.calculate_coloring">calculate_coloring</a><a href="#method.collapse_deadends">collapse_deadends</a><a href="#method.contains">contains</a><a href="#method.find_all_single_blocks">find_all_single_blocks</a><a href="#method.merge_all">merge_all</a><a href="#method.partition_by_predicate">partition_by_predicate</a><a href="#method.restore_invariant">restore_invariant</a><a href="#method.single_block">single_block</a><a href="#method.to_block">to_block</a><a href="#method.try_to_merge">try_to_merge</a><a href="#method.undo_invariant">undo_invariant</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-Deserialize%3C%27de%3E">Deserialize&lt;&#39;de&gt;</a><a href="#impl-Serialize">Serialize</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><h2 class="location">Other items in<br><a href="../../index.html">map_model</a>::<wbr><a href="../index.html">objects</a>::<wbr><a href="index.html">block</a></h2><div id="sidebar-vars" data-name="Perimeter" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">objects</a>::<wbr><a href="index.html">block</a>::<wbr><a class="struct" href="#">Perimeter</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_model/objects/block.rs.html#29-33" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust struct"><code>pub struct Perimeter {
<noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct Perimeter</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield.interior">interior</a><a href="#structfield.roads">roads</a></div><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.calculate_coloring">calculate_coloring</a><a href="#method.collapse_deadends">collapse_deadends</a><a href="#method.contains">contains</a><a href="#method.find_all_single_blocks">find_all_single_blocks</a><a href="#method.find_roads_to_skip_tracing">find_roads_to_skip_tracing</a><a href="#method.merge_all">merge_all</a><a href="#method.partition_by_predicate">partition_by_predicate</a><a href="#method.restore_invariant">restore_invariant</a><a href="#method.single_block">single_block</a><a href="#method.to_block">to_block</a><a href="#method.try_to_merge">try_to_merge</a><a href="#method.undo_invariant">undo_invariant</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-Deserialize%3C%27de%3E">Deserialize&lt;&#39;de&gt;</a><a href="#impl-Serialize">Serialize</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><h2 class="location">Other items in<br><a href="../../index.html">map_model</a>::<wbr><a href="../index.html">objects</a>::<wbr><a href="index.html">block</a></h2><div id="sidebar-vars" data-name="Perimeter" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">objects</a>::<wbr><a href="index.html">block</a>::<wbr><a class="struct" href="#">Perimeter</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_model/objects/block.rs.html#29-33" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust struct"><code>pub struct Perimeter {
pub roads: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../road/struct.RoadSideID.html" title="struct map_model::objects::road::RoadSideID">RoadSideID</a>&gt;,
pub interior: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a>&lt;<a class="struct" href="../road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>&gt;,
}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A sequence of roads in order, beginning and ending at the same place. No “crossings” tracing
along this sequence should geometrically yield a simple polygon.</p>
</div></details><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.roads" class="structfield small-section-header"><a href="#structfield.roads" class="anchor field"></a><code>roads: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../road/struct.RoadSideID.html" title="struct map_model::objects::road::RoadSideID">RoadSideID</a>&gt;</code></span><span id="structfield.interior" class="structfield small-section-header"><a href="#structfield.interior" class="anchor field"></a><code>interior: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a>&lt;<a class="struct" href="../road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>&gt;</code></span><div class="docblock"><p>These roads exist entirely within the perimeter</p>
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#35-528" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.single_block" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#39-83" title="goto source code">[src]</a></div><a href="#method.single_block" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.single_block" class="fnname">single_block</a>(map: &amp;<a class="struct" href="../../struct.Map.html" title="struct map_model::Map">Map</a>, start: <a class="struct" href="../lane/struct.LaneID.html" title="struct map_model::objects::lane::LaneID">LaneID</a>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>&gt;</h4></div></summary><div class="docblock"><p>Starting at any lane, snap to the nearest side of that road, then begin tracing a single
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#35-568" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.single_block" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#40-90" title="goto source code">[src]</a></div><a href="#method.single_block" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.single_block" class="fnname">single_block</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;start: <a class="struct" href="../lane/struct.LaneID.html" title="struct map_model::objects::lane::LaneID">LaneID</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;skip: &amp;<a class="struct" href="https://doc.rust-lang.org/1.58.1/std/collections/hash/set/struct.HashSet.html" title="struct std::collections::hash::set::HashSet">HashSet</a>&lt;<a class="struct" href="../road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>&gt;<br>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>&gt;</h4></div></summary><div class="docblock"><p>Starting at any lane, snap to the nearest side of that road, then begin tracing a single
block, with no interior roads. This will fail if a map boundary is reached. The results are
unusual when crossing the entrance to a tunnel or bridge.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.find_all_single_blocks" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#87-112" title="goto source code">[src]</a></div><a href="#method.find_all_single_blocks" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.find_all_single_blocks" class="fnname">find_all_single_blocks</a>(map: &amp;<a class="struct" href="../../struct.Map.html" title="struct map_model::Map">Map</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>&gt;<span class="notable-traits"><span class="notable-traits-tooltip"><div class="notable-traits-tooltiptext"><span class="docblock"><div class="notable">Notable traits for <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.u8.html">u8</a>, A&gt;</div><code class="content"><span class="where fmt-newline">impl&lt;A&gt; <a class="trait" href="https://doc.rust-lang.org/1.58.1/std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.u8.html">u8</a>, A&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/alloc/trait.Allocator.html" title="trait core::alloc::Allocator">Allocator</a>,&nbsp;</span></span></code></span></div></span></span></h4></div></summary><div class="docblock"><p>This calculates all single block perimeters for the entire map. The resulting list does not
unusual when crossing the entrance to a tunnel or bridge, and so <code>skip</code> is used to avoid
tracing there.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.find_all_single_blocks" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#94-121" title="goto source code">[src]</a></div><a href="#method.find_all_single_blocks" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.find_all_single_blocks" class="fnname">find_all_single_blocks</a>(map: &amp;<a class="struct" href="../../struct.Map.html" title="struct map_model::Map">Map</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>&gt;<span class="notable-traits"><span class="notable-traits-tooltip"><div class="notable-traits-tooltiptext"><span class="docblock"><div class="notable">Notable traits for <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.u8.html">u8</a>, A&gt;</div><code class="content"><span class="where fmt-newline">impl&lt;A&gt; <a class="trait" href="https://doc.rust-lang.org/1.58.1/std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.u8.html">u8</a>, A&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/alloc/trait.Allocator.html" title="trait core::alloc::Allocator">Allocator</a>,&nbsp;</span></span></code></span></div></span></span></h4></div></summary><div class="docblock"><p>This calculates all single block perimeters for the entire map. The resulting list does not
cover roads near the map boundary.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.undo_invariant" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#116-118" title="goto source code">[src]</a></div><a href="#method.undo_invariant" class="anchor"></a><h4 class="code-header">fn <a href="#method.undo_invariant" class="fnname">undo_invariant</a>(&amp;mut self)</h4></div></summary><div class="docblock"><p>A perimeter has the first and last road matching up, but thats confusing to
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.find_roads_to_skip_tracing" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#126-136" title="goto source code">[src]</a></div><a href="#method.find_roads_to_skip_tracing" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.find_roads_to_skip_tracing" class="fnname">find_roads_to_skip_tracing</a>(map: &amp;<a class="struct" href="../../struct.Map.html" title="struct map_model::Map">Map</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.58.1/std/collections/hash/set/struct.HashSet.html" title="struct std::collections::hash::set::HashSet">HashSet</a>&lt;<a class="struct" href="../road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>&gt;</h4></div></summary><div class="docblock"><p>Trying to form blocks near railways or cycleways that involve bridges/tunnels often causes
overlapping geometry or blocks thatre way too large. These are extremely imperfect
heuristics to avoid the worst problems.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.undo_invariant" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#140-142" title="goto source code">[src]</a></div><a href="#method.undo_invariant" class="anchor"></a><h4 class="code-header">fn <a href="#method.undo_invariant" class="fnname">undo_invariant</a>(&amp;mut self)</h4></div></summary><div class="docblock"><p>A perimeter has the first and last road matching up, but thats confusing to
work with. Temporarily undo that.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.restore_invariant" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#122-124" title="goto source code">[src]</a></div><a href="#method.restore_invariant" class="anchor"></a><h4 class="code-header">fn <a href="#method.restore_invariant" class="fnname">restore_invariant</a>(&amp;mut self)</h4></div></summary><div class="docblock"><p>Restore the first=last invariant. Methods may temporarily break this, but must restore it
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.restore_invariant" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#146-148" title="goto source code">[src]</a></div><a href="#method.restore_invariant" class="anchor"></a><h4 class="code-header">fn <a href="#method.restore_invariant" class="fnname">restore_invariant</a>(&amp;mut self)</h4></div></summary><div class="docblock"><p>Restore the first=last invariant. Methods may temporarily break this, but must restore it
before returning.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_to_merge" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#135-239" title="goto source code">[src]</a></div><a href="#method.try_to_merge" class="anchor"></a><h4 class="code-header">fn <a href="#method.try_to_merge" class="fnname">try_to_merge</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;other: &amp;mut <a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;debug_failures: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a><br>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Try to merge two blocks. Returns true if this is successful, which will only be when the
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_to_merge" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#159-273" title="goto source code">[src]</a></div><a href="#method.try_to_merge" class="anchor"></a><h4 class="code-header">fn <a href="#method.try_to_merge" class="fnname">try_to_merge</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;other: &amp;mut <a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;debug_failures: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a><br>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Try to merge two blocks. Returns true if this is successful, which will only be when the
blocks are adjacent, but the merge wouldnt create an interior “hole”.</p>
<p>Note this may modify both perimeters and still return <code>false</code>. The modification is just to
rotate the order of the road loop; this doesnt logically change the perimeter.</p>
<p>TODO Due to https://github.com/a-b-street/abstreet/issues/841, it seems like rotation
sometimes breaks <code>to_block</code>, so for now, always revert to the original upon failure.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.merge_all" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#244-280" title="goto source code">[src]</a></div><a href="#method.merge_all" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.merge_all" class="fnname">merge_all</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;input: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;stepwise_debug: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a><br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>&gt;<span class="notable-traits"><span class="notable-traits-tooltip"><div class="notable-traits-tooltiptext"><span class="docblock"><div class="notable">Notable traits for <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.u8.html">u8</a>, A&gt;</div><code class="content"><span class="where fmt-newline">impl&lt;A&gt; <a class="trait" href="https://doc.rust-lang.org/1.58.1/std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.u8.html">u8</a>, A&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/alloc/trait.Allocator.html" title="trait core::alloc::Allocator">Allocator</a>,&nbsp;</span></span></code></span></div></span></span></h4></div></summary><div class="docblock"><p>Try to merge all given perimeters. If successful, only one perimeter will be returned.
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.merge_all" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#278-314" title="goto source code">[src]</a></div><a href="#method.merge_all" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.merge_all" class="fnname">merge_all</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;input: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;stepwise_debug: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a><br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>&gt;<span class="notable-traits"><span class="notable-traits-tooltip"><div class="notable-traits-tooltiptext"><span class="docblock"><div class="notable">Notable traits for <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.u8.html">u8</a>, A&gt;</div><code class="content"><span class="where fmt-newline">impl&lt;A&gt; <a class="trait" href="https://doc.rust-lang.org/1.58.1/std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.u8.html">u8</a>, A&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/alloc/trait.Allocator.html" title="trait core::alloc::Allocator">Allocator</a>,&nbsp;</span></span></code></span></div></span></span></h4></div></summary><div class="docblock"><p>Try to merge all given perimeters. If successful, only one perimeter will be returned.
Perimeters are never “destroyed” if not merged, theyll appear in the results. If
<code>stepwise_debug</code> is true, returns after performing just one merge.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.collapse_deadends" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#284-312" title="goto source code">[src]</a></div><a href="#method.collapse_deadends" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.collapse_deadends" class="fnname">collapse_deadends</a>(&amp;mut self)</h4></div></summary><div class="docblock"><p>If the perimeter follows any dead-end roads, “collapse” them and instead make the perimeter
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.collapse_deadends" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#318-352" title="goto source code">[src]</a></div><a href="#method.collapse_deadends" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.collapse_deadends" class="fnname">collapse_deadends</a>(&amp;mut self)</h4></div></summary><div class="docblock"><p>If the perimeter follows any dead-end roads, “collapse” them and instead make the perimeter
contain the dead-end.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.partition_by_predicate" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#317-377" title="goto source code">[src]</a></div><a href="#method.partition_by_predicate" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.partition_by_predicate" class="fnname">partition_by_predicate</a>&lt;F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/1.58.1/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(<a class="struct" href="../road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;input: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;predicate: F<br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>&gt;&gt;<span class="notable-traits"><span class="notable-traits-tooltip"><div class="notable-traits-tooltiptext"><span class="docblock"><div class="notable">Notable traits for <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.u8.html">u8</a>, A&gt;</div><code class="content"><span class="where fmt-newline">impl&lt;A&gt; <a class="trait" href="https://doc.rust-lang.org/1.58.1/std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.u8.html">u8</a>, A&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/alloc/trait.Allocator.html" title="trait core::alloc::Allocator">Allocator</a>,&nbsp;</span></span></code></span></div></span></span></h4></div></summary><div class="docblock"><p>Consider the perimeters as a graph, with adjacency determined by sharing any road in common.
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.partition_by_predicate" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#357-417" title="goto source code">[src]</a></div><a href="#method.partition_by_predicate" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.partition_by_predicate" class="fnname">partition_by_predicate</a>&lt;F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/1.58.1/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(<a class="struct" href="../road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;input: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;predicate: F<br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>&gt;&gt;<span class="notable-traits"><span class="notable-traits-tooltip"><div class="notable-traits-tooltiptext"><span class="docblock"><div class="notable">Notable traits for <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.u8.html">u8</a>, A&gt;</div><code class="content"><span class="where fmt-newline">impl&lt;A&gt; <a class="trait" href="https://doc.rust-lang.org/1.58.1/std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.u8.html">u8</a>, A&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/alloc/trait.Allocator.html" title="trait core::alloc::Allocator">Allocator</a>,&nbsp;</span></span></code></span></div></span></span></h4></div></summary><div class="docblock"><p>Consider the perimeters as a graph, with adjacency determined by sharing any road in common.
Partition adjacent perimeters, subject to the predicate. Each partition should produce a
single result with <code>merge_all</code>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.calculate_coloring" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#381-415" title="goto source code">[src]</a></div><a href="#method.calculate_coloring" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.calculate_coloring" class="fnname">calculate_coloring</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;input: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.slice.html">&amp;[</a><a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a><a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.slice.html">]</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;num_colors: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.usize.html">usize</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.usize.html">usize</a>&gt;&gt;</h4></div></summary><div class="docblock"><p>Assign each perimeter one of <code>num_colors</code>, such that no two adjacent perimeters share the
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.calculate_coloring" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#421-455" title="goto source code">[src]</a></div><a href="#method.calculate_coloring" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.calculate_coloring" class="fnname">calculate_coloring</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;input: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.slice.html">&amp;[</a><a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a><a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.slice.html">]</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;num_colors: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.usize.html">usize</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.usize.html">usize</a>&gt;&gt;</h4></div></summary><div class="docblock"><p>Assign each perimeter one of <code>num_colors</code>, such that no two adjacent perimeters share the
same color. May fail. The resulting colors are expressed as <code>[0, num_colors)</code>.</p>
</div></details><div id="method.to_block" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#417-519" title="goto source code">[src]</a></div><a href="#method.to_block" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.to_block" class="fnname">to_block</a>(self, map: &amp;<a class="struct" href="../../struct.Map.html" title="struct map_model::Map">Map</a>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="struct" href="struct.Block.html" title="struct map_model::objects::block::Block">Block</a>&gt;</h4></div><details class="rustdoc-toggle method-toggle" open><summary><div id="method.contains" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#522-527" title="goto source code">[src]</a></div><a href="#method.contains" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.contains" class="fnname">contains</a>(&amp;self, other: &amp;<a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Does this perimeter completely enclose the other?</p>
</div></details><div id="method.to_block" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#457-559" title="goto source code">[src]</a></div><a href="#method.to_block" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.to_block" class="fnname">to_block</a>(self, map: &amp;<a class="struct" href="../../struct.Map.html" title="struct map_model::Map">Map</a>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="struct" href="struct.Block.html" title="struct map_model::objects::block::Block">Block</a>&gt;</h4></div><details class="rustdoc-toggle method-toggle" open><summary><div id="method.contains" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#562-567" title="goto source code">[src]</a></div><a href="#method.contains" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.contains" class="fnname">contains</a>(&amp;self, other: &amp;<a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Does this perimeter completely enclose the other?</p>
</div></details></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Clone" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#28" title="goto source code">[src]</a></div><a href="#impl-Clone" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#28" title="goto source code">[src]</a></div><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&amp;self) -&gt; <a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h4></div></summary><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone_from" class="method trait-impl has-srclink"><div class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/clone.rs.html#130" title="goto source code">[src]</a></div><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.reference.html">&amp;</a>Self)</h4></div></summary><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Debug" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#530-538" title="goto source code">[src]</a></div><a href="#impl-Debug" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#531-537" title="goto source code">[src]</a></div><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/1.58.1/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/1.58.1/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.58.1/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Debug" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#570-578" title="goto source code">[src]</a></div><a href="#impl-Debug" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#571-577" title="goto source code">[src]</a></div><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/1.58.1/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/1.58.1/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.58.1/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Deserialize%3C%27de%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#28" title="goto source code">[src]</a></div><a href="#impl-Deserialize%3C%27de%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;'de&gt; <a class="trait" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt; for <a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.deserialize" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#28" title="goto source code">[src]</a></div><a href="#method.deserialize" class="anchor"></a><h4 class="code-header">fn <a href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html#tymethod.deserialize" class="fnname">deserialize</a>&lt;__D&gt;(__deserializer: __D) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, __D::<a class="type" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__D: <a class="trait" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a>&lt;'de&gt;,&nbsp;</span></h4></div></summary><div class='docblock'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Serialize" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#28" title="goto source code">[src]</a></div><a href="#impl-Serialize" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a> for <a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.serialize" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#28" title="goto source code">[src]</a></div><a href="#method.serialize" class="anchor"></a><h4 class="code-header">fn <a href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serialize.html#tymethod.serialize" class="fnname">serialize</a>&lt;__S&gt;(&amp;self, __serializer: __S) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;__S::<a class="type" href="https://docs.rs/serde/1.0.126/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.126/serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__S: <a class="trait" href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serializer.html" title="trait serde::ser::Serializer">Serializer</a>,&nbsp;</span></h4></div></summary><div class='docblock'><p>Serialize this value into the given Serde serializer. <a href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serialize.html#tymethod.serialize">Read more</a></p>
</div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-RefUnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div><div id="impl-Send" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Send" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div><div id="impl-Sync" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Sync" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div><div id="impl-Unpin" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Unpin" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div><div id="impl-UnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-UnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Any" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/any.rs.html#132-136" title="goto source code">[src]</a></div><a href="#impl-Any" class="anchor"></a><h3 class="code-header in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/any.rs.html#133" title="goto source code">[src]</a></div><a href="#method.type_id" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.58.1/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.58.1/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.58.1/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>

View File

@ -1,39 +1,43 @@
<!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="A sequence of roads in order, beginning and ending at the same place. No “crossings” tracing along this sequence should geometrically yield a simple polygon."><meta name="keywords" content="rust, rustlang, rust-lang, Perimeter"><title>Perimeter in map_model - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings" ></script><script src="../storage.js"></script><script src="../crates.js"></script><script defer src="../main.js"></script>
<noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../map_model/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct Perimeter</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield.interior">interior</a><a href="#structfield.roads">roads</a></div><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.calculate_coloring">calculate_coloring</a><a href="#method.collapse_deadends">collapse_deadends</a><a href="#method.contains">contains</a><a href="#method.find_all_single_blocks">find_all_single_blocks</a><a href="#method.merge_all">merge_all</a><a href="#method.partition_by_predicate">partition_by_predicate</a><a href="#method.restore_invariant">restore_invariant</a><a href="#method.single_block">single_block</a><a href="#method.to_block">to_block</a><a href="#method.try_to_merge">try_to_merge</a><a href="#method.undo_invariant">undo_invariant</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-Deserialize%3C%27de%3E">Deserialize&lt;&#39;de&gt;</a><a href="#impl-Serialize">Serialize</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><h2 class="location">Other items in<br><a href="index.html">map_model</a></h2><div id="sidebar-vars" data-name="Perimeter" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="index.html">map_model</a>::<wbr><a class="struct" href="#">Perimeter</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/map_model/objects/block.rs.html#29-33" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust struct"><code>pub struct Perimeter {
<noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../map_model/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct Perimeter</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield.interior">interior</a><a href="#structfield.roads">roads</a></div><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.calculate_coloring">calculate_coloring</a><a href="#method.collapse_deadends">collapse_deadends</a><a href="#method.contains">contains</a><a href="#method.find_all_single_blocks">find_all_single_blocks</a><a href="#method.find_roads_to_skip_tracing">find_roads_to_skip_tracing</a><a href="#method.merge_all">merge_all</a><a href="#method.partition_by_predicate">partition_by_predicate</a><a href="#method.restore_invariant">restore_invariant</a><a href="#method.single_block">single_block</a><a href="#method.to_block">to_block</a><a href="#method.try_to_merge">try_to_merge</a><a href="#method.undo_invariant">undo_invariant</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-Deserialize%3C%27de%3E">Deserialize&lt;&#39;de&gt;</a><a href="#impl-Serialize">Serialize</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><h2 class="location">Other items in<br><a href="index.html">map_model</a></h2><div id="sidebar-vars" data-name="Perimeter" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="index.html">map_model</a>::<wbr><a class="struct" href="#">Perimeter</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/map_model/objects/block.rs.html#29-33" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust struct"><code>pub struct Perimeter {
pub roads: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="objects/road/struct.RoadSideID.html" title="struct map_model::objects::road::RoadSideID">RoadSideID</a>&gt;,
pub interior: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a>&lt;<a class="struct" href="objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>&gt;,
}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A sequence of roads in order, beginning and ending at the same place. No “crossings” tracing
along this sequence should geometrically yield a simple polygon.</p>
</div></details><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.roads" class="structfield small-section-header"><a href="#structfield.roads" class="anchor field"></a><code>roads: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="objects/road/struct.RoadSideID.html" title="struct map_model::objects::road::RoadSideID">RoadSideID</a>&gt;</code></span><span id="structfield.interior" class="structfield small-section-header"><a href="#structfield.interior" class="anchor field"></a><code>interior: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a>&lt;<a class="struct" href="objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>&gt;</code></span><div class="docblock"><p>These roads exist entirely within the perimeter</p>
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#35-528" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.single_block" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#39-83" title="goto source code">[src]</a></div><a href="#method.single_block" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.single_block" class="fnname">single_block</a>(map: &amp;<a class="struct" href="struct.Map.html" title="struct map_model::Map">Map</a>, start: <a class="struct" href="objects/lane/struct.LaneID.html" title="struct map_model::objects::lane::LaneID">LaneID</a>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>&gt;</h4></div></summary><div class="docblock"><p>Starting at any lane, snap to the nearest side of that road, then begin tracing a single
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#35-568" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.single_block" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#40-90" title="goto source code">[src]</a></div><a href="#method.single_block" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.single_block" class="fnname">single_block</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;start: <a class="struct" href="objects/lane/struct.LaneID.html" title="struct map_model::objects::lane::LaneID">LaneID</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;skip: &amp;<a class="struct" href="https://doc.rust-lang.org/1.58.1/std/collections/hash/set/struct.HashSet.html" title="struct std::collections::hash::set::HashSet">HashSet</a>&lt;<a class="struct" href="objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>&gt;<br>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>&gt;</h4></div></summary><div class="docblock"><p>Starting at any lane, snap to the nearest side of that road, then begin tracing a single
block, with no interior roads. This will fail if a map boundary is reached. The results are
unusual when crossing the entrance to a tunnel or bridge.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.find_all_single_blocks" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#87-112" title="goto source code">[src]</a></div><a href="#method.find_all_single_blocks" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.find_all_single_blocks" class="fnname">find_all_single_blocks</a>(map: &amp;<a class="struct" href="struct.Map.html" title="struct map_model::Map">Map</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>&gt;<span class="notable-traits"><span class="notable-traits-tooltip"><div class="notable-traits-tooltiptext"><span class="docblock"><div class="notable">Notable traits for <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.u8.html">u8</a>, A&gt;</div><code class="content"><span class="where fmt-newline">impl&lt;A&gt; <a class="trait" href="https://doc.rust-lang.org/1.58.1/std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.u8.html">u8</a>, A&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/alloc/trait.Allocator.html" title="trait core::alloc::Allocator">Allocator</a>,&nbsp;</span></span></code></span></div></span></span></h4></div></summary><div class="docblock"><p>This calculates all single block perimeters for the entire map. The resulting list does not
unusual when crossing the entrance to a tunnel or bridge, and so <code>skip</code> is used to avoid
tracing there.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.find_all_single_blocks" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#94-121" title="goto source code">[src]</a></div><a href="#method.find_all_single_blocks" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.find_all_single_blocks" class="fnname">find_all_single_blocks</a>(map: &amp;<a class="struct" href="struct.Map.html" title="struct map_model::Map">Map</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>&gt;<span class="notable-traits"><span class="notable-traits-tooltip"><div class="notable-traits-tooltiptext"><span class="docblock"><div class="notable">Notable traits for <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.u8.html">u8</a>, A&gt;</div><code class="content"><span class="where fmt-newline">impl&lt;A&gt; <a class="trait" href="https://doc.rust-lang.org/1.58.1/std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.u8.html">u8</a>, A&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/alloc/trait.Allocator.html" title="trait core::alloc::Allocator">Allocator</a>,&nbsp;</span></span></code></span></div></span></span></h4></div></summary><div class="docblock"><p>This calculates all single block perimeters for the entire map. The resulting list does not
cover roads near the map boundary.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.undo_invariant" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#116-118" title="goto source code">[src]</a></div><a href="#method.undo_invariant" class="anchor"></a><h4 class="code-header">fn <a href="#method.undo_invariant" class="fnname">undo_invariant</a>(&amp;mut self)</h4></div></summary><div class="docblock"><p>A perimeter has the first and last road matching up, but thats confusing to
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.find_roads_to_skip_tracing" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#126-136" title="goto source code">[src]</a></div><a href="#method.find_roads_to_skip_tracing" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.find_roads_to_skip_tracing" class="fnname">find_roads_to_skip_tracing</a>(map: &amp;<a class="struct" href="struct.Map.html" title="struct map_model::Map">Map</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.58.1/std/collections/hash/set/struct.HashSet.html" title="struct std::collections::hash::set::HashSet">HashSet</a>&lt;<a class="struct" href="objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>&gt;</h4></div></summary><div class="docblock"><p>Trying to form blocks near railways or cycleways that involve bridges/tunnels often causes
overlapping geometry or blocks thatre way too large. These are extremely imperfect
heuristics to avoid the worst problems.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.undo_invariant" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#140-142" title="goto source code">[src]</a></div><a href="#method.undo_invariant" class="anchor"></a><h4 class="code-header">fn <a href="#method.undo_invariant" class="fnname">undo_invariant</a>(&amp;mut self)</h4></div></summary><div class="docblock"><p>A perimeter has the first and last road matching up, but thats confusing to
work with. Temporarily undo that.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.restore_invariant" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#122-124" title="goto source code">[src]</a></div><a href="#method.restore_invariant" class="anchor"></a><h4 class="code-header">fn <a href="#method.restore_invariant" class="fnname">restore_invariant</a>(&amp;mut self)</h4></div></summary><div class="docblock"><p>Restore the first=last invariant. Methods may temporarily break this, but must restore it
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.restore_invariant" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#146-148" title="goto source code">[src]</a></div><a href="#method.restore_invariant" class="anchor"></a><h4 class="code-header">fn <a href="#method.restore_invariant" class="fnname">restore_invariant</a>(&amp;mut self)</h4></div></summary><div class="docblock"><p>Restore the first=last invariant. Methods may temporarily break this, but must restore it
before returning.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_to_merge" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#135-239" title="goto source code">[src]</a></div><a href="#method.try_to_merge" class="anchor"></a><h4 class="code-header">fn <a href="#method.try_to_merge" class="fnname">try_to_merge</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;other: &amp;mut <a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;debug_failures: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a><br>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Try to merge two blocks. Returns true if this is successful, which will only be when the
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_to_merge" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#159-273" title="goto source code">[src]</a></div><a href="#method.try_to_merge" class="anchor"></a><h4 class="code-header">fn <a href="#method.try_to_merge" class="fnname">try_to_merge</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;other: &amp;mut <a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;debug_failures: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a><br>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Try to merge two blocks. Returns true if this is successful, which will only be when the
blocks are adjacent, but the merge wouldnt create an interior “hole”.</p>
<p>Note this may modify both perimeters and still return <code>false</code>. The modification is just to
rotate the order of the road loop; this doesnt logically change the perimeter.</p>
<p>TODO Due to https://github.com/a-b-street/abstreet/issues/841, it seems like rotation
sometimes breaks <code>to_block</code>, so for now, always revert to the original upon failure.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.merge_all" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#244-280" title="goto source code">[src]</a></div><a href="#method.merge_all" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.merge_all" class="fnname">merge_all</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;input: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;stepwise_debug: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a><br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>&gt;<span class="notable-traits"><span class="notable-traits-tooltip"><div class="notable-traits-tooltiptext"><span class="docblock"><div class="notable">Notable traits for <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.u8.html">u8</a>, A&gt;</div><code class="content"><span class="where fmt-newline">impl&lt;A&gt; <a class="trait" href="https://doc.rust-lang.org/1.58.1/std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.u8.html">u8</a>, A&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/alloc/trait.Allocator.html" title="trait core::alloc::Allocator">Allocator</a>,&nbsp;</span></span></code></span></div></span></span></h4></div></summary><div class="docblock"><p>Try to merge all given perimeters. If successful, only one perimeter will be returned.
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.merge_all" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#278-314" title="goto source code">[src]</a></div><a href="#method.merge_all" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.merge_all" class="fnname">merge_all</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;input: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;stepwise_debug: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a><br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>&gt;<span class="notable-traits"><span class="notable-traits-tooltip"><div class="notable-traits-tooltiptext"><span class="docblock"><div class="notable">Notable traits for <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.u8.html">u8</a>, A&gt;</div><code class="content"><span class="where fmt-newline">impl&lt;A&gt; <a class="trait" href="https://doc.rust-lang.org/1.58.1/std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.u8.html">u8</a>, A&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/alloc/trait.Allocator.html" title="trait core::alloc::Allocator">Allocator</a>,&nbsp;</span></span></code></span></div></span></span></h4></div></summary><div class="docblock"><p>Try to merge all given perimeters. If successful, only one perimeter will be returned.
Perimeters are never “destroyed” if not merged, theyll appear in the results. If
<code>stepwise_debug</code> is true, returns after performing just one merge.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.collapse_deadends" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#284-312" title="goto source code">[src]</a></div><a href="#method.collapse_deadends" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.collapse_deadends" class="fnname">collapse_deadends</a>(&amp;mut self)</h4></div></summary><div class="docblock"><p>If the perimeter follows any dead-end roads, “collapse” them and instead make the perimeter
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.collapse_deadends" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#318-352" title="goto source code">[src]</a></div><a href="#method.collapse_deadends" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.collapse_deadends" class="fnname">collapse_deadends</a>(&amp;mut self)</h4></div></summary><div class="docblock"><p>If the perimeter follows any dead-end roads, “collapse” them and instead make the perimeter
contain the dead-end.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.partition_by_predicate" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#317-377" title="goto source code">[src]</a></div><a href="#method.partition_by_predicate" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.partition_by_predicate" class="fnname">partition_by_predicate</a>&lt;F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/1.58.1/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(<a class="struct" href="objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;input: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;predicate: F<br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>&gt;&gt;<span class="notable-traits"><span class="notable-traits-tooltip"><div class="notable-traits-tooltiptext"><span class="docblock"><div class="notable">Notable traits for <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.u8.html">u8</a>, A&gt;</div><code class="content"><span class="where fmt-newline">impl&lt;A&gt; <a class="trait" href="https://doc.rust-lang.org/1.58.1/std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.u8.html">u8</a>, A&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/alloc/trait.Allocator.html" title="trait core::alloc::Allocator">Allocator</a>,&nbsp;</span></span></code></span></div></span></span></h4></div></summary><div class="docblock"><p>Consider the perimeters as a graph, with adjacency determined by sharing any road in common.
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.partition_by_predicate" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#357-417" title="goto source code">[src]</a></div><a href="#method.partition_by_predicate" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.partition_by_predicate" class="fnname">partition_by_predicate</a>&lt;F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/1.58.1/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(<a class="struct" href="objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;input: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;predicate: F<br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>&gt;&gt;<span class="notable-traits"><span class="notable-traits-tooltip"><div class="notable-traits-tooltiptext"><span class="docblock"><div class="notable">Notable traits for <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.u8.html">u8</a>, A&gt;</div><code class="content"><span class="where fmt-newline">impl&lt;A&gt; <a class="trait" href="https://doc.rust-lang.org/1.58.1/std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.u8.html">u8</a>, A&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/alloc/trait.Allocator.html" title="trait core::alloc::Allocator">Allocator</a>,&nbsp;</span></span></code></span></div></span></span></h4></div></summary><div class="docblock"><p>Consider the perimeters as a graph, with adjacency determined by sharing any road in common.
Partition adjacent perimeters, subject to the predicate. Each partition should produce a
single result with <code>merge_all</code>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.calculate_coloring" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#381-415" title="goto source code">[src]</a></div><a href="#method.calculate_coloring" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.calculate_coloring" class="fnname">calculate_coloring</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;input: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.slice.html">&amp;[</a><a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a><a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.slice.html">]</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;num_colors: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.usize.html">usize</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.usize.html">usize</a>&gt;&gt;</h4></div></summary><div class="docblock"><p>Assign each perimeter one of <code>num_colors</code>, such that no two adjacent perimeters share the
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.calculate_coloring" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#421-455" title="goto source code">[src]</a></div><a href="#method.calculate_coloring" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.calculate_coloring" class="fnname">calculate_coloring</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;input: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.slice.html">&amp;[</a><a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a><a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.slice.html">]</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;num_colors: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.usize.html">usize</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.usize.html">usize</a>&gt;&gt;</h4></div></summary><div class="docblock"><p>Assign each perimeter one of <code>num_colors</code>, such that no two adjacent perimeters share the
same color. May fail. The resulting colors are expressed as <code>[0, num_colors)</code>.</p>
</div></details><div id="method.to_block" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#417-519" title="goto source code">[src]</a></div><a href="#method.to_block" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.to_block" class="fnname">to_block</a>(self, map: &amp;<a class="struct" href="struct.Map.html" title="struct map_model::Map">Map</a>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="struct" href="objects/block/struct.Block.html" title="struct map_model::objects::block::Block">Block</a>&gt;</h4></div><details class="rustdoc-toggle method-toggle" open><summary><div id="method.contains" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#522-527" title="goto source code">[src]</a></div><a href="#method.contains" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.contains" class="fnname">contains</a>(&amp;self, other: &amp;<a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Does this perimeter completely enclose the other?</p>
</div></details><div id="method.to_block" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#457-559" title="goto source code">[src]</a></div><a href="#method.to_block" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.to_block" class="fnname">to_block</a>(self, map: &amp;<a class="struct" href="struct.Map.html" title="struct map_model::Map">Map</a>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="struct" href="objects/block/struct.Block.html" title="struct map_model::objects::block::Block">Block</a>&gt;</h4></div><details class="rustdoc-toggle method-toggle" open><summary><div id="method.contains" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#562-567" title="goto source code">[src]</a></div><a href="#method.contains" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.contains" class="fnname">contains</a>(&amp;self, other: &amp;<a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Does this perimeter completely enclose the other?</p>
</div></details></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Clone" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#28" title="goto source code">[src]</a></div><a href="#impl-Clone" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#28" title="goto source code">[src]</a></div><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&amp;self) -&gt; <a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h4></div></summary><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone_from" class="method trait-impl has-srclink"><div class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/clone.rs.html#130" title="goto source code">[src]</a></div><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.reference.html">&amp;</a>Self)</h4></div></summary><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Debug" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#530-538" title="goto source code">[src]</a></div><a href="#impl-Debug" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#531-537" title="goto source code">[src]</a></div><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/1.58.1/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/1.58.1/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.58.1/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Debug" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#570-578" title="goto source code">[src]</a></div><a href="#impl-Debug" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#571-577" title="goto source code">[src]</a></div><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/1.58.1/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/1.58.1/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.58.1/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Deserialize%3C%27de%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#28" title="goto source code">[src]</a></div><a href="#impl-Deserialize%3C%27de%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;'de&gt; <a class="trait" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt; for <a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.deserialize" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#28" title="goto source code">[src]</a></div><a href="#method.deserialize" class="anchor"></a><h4 class="code-header">fn <a href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html#tymethod.deserialize" class="fnname">deserialize</a>&lt;__D&gt;(__deserializer: __D) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, __D::<a class="type" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__D: <a class="trait" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a>&lt;'de&gt;,&nbsp;</span></h4></div></summary><div class='docblock'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Serialize" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#28" title="goto source code">[src]</a></div><a href="#impl-Serialize" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a> for <a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.serialize" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#28" title="goto source code">[src]</a></div><a href="#method.serialize" class="anchor"></a><h4 class="code-header">fn <a href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serialize.html#tymethod.serialize" class="fnname">serialize</a>&lt;__S&gt;(&amp;self, __serializer: __S) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;__S::<a class="type" href="https://docs.rs/serde/1.0.126/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.126/serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__S: <a class="trait" href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serializer.html" title="trait serde::ser::Serializer">Serializer</a>,&nbsp;</span></h4></div></summary><div class='docblock'><p>Serialize this value into the given Serde serializer. <a href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serialize.html#tymethod.serialize">Read more</a></p>
</div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-RefUnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div><div id="impl-Send" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Send" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div><div id="impl-Sync" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Sync" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div><div id="impl-Unpin" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Unpin" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div><div id="impl-UnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-UnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Any" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/any.rs.html#132-136" title="goto source code">[src]</a></div><a href="#impl-Any" class="anchor"></a><h3 class="code-header in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/any.rs.html#133" title="goto source code">[src]</a></div><a href="#method.type_id" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.58.1/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.58.1/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.58.1/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>

File diff suppressed because one or more lines are too long

View File

@ -1087,6 +1087,11 @@
<span id="1086">1086</span>
<span id="1087">1087</span>
<span id="1088">1088</span>
<span id="1089">1089</span>
<span id="1090">1090</span>
<span id="1091">1091</span>
<span id="1092">1092</span>
<span id="1093">1093</span>
</pre><pre class="rust"><code><span class="kw">use</span> <span class="ident">std::collections::HashSet</span>;
<span class="kw">use</span> <span class="ident">abstio::MapName</span>;
@ -1877,9 +1882,14 @@
}
(<span class="ident">ID::Lane</span>(<span class="ident">l</span>), <span class="string">&quot;trace this block&quot;</span>) =&gt; {
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">current_selection</span> <span class="op">=</span> <span class="prelude-val">None</span>;
<span class="kw">let</span> <span class="ident">map</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>;
<span class="kw">return</span> <span class="ident">Transition::Push</span>(
<span class="kw">match</span> <span class="ident">Perimeter::single_block</span>(<span class="kw-2">&amp;</span><span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>, <span class="ident">l</span>)
.<span class="ident">and_then</span>(<span class="op">|</span><span class="ident">perim</span><span class="op">|</span> <span class="ident">perim</span>.<span class="ident">to_block</span>(<span class="kw-2">&amp;</span><span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>))
<span class="kw">match</span> <span class="ident">Perimeter::single_block</span>(
<span class="ident">map</span>,
<span class="ident">l</span>,
<span class="kw-2">&amp;</span><span class="ident">Perimeter::find_roads_to_skip_tracing</span>(<span class="ident">map</span>),
)
.<span class="ident">and_then</span>(<span class="op">|</span><span class="ident">perim</span><span class="op">|</span> <span class="ident">perim</span>.<span class="ident">to_block</span>(<span class="ident">map</span>))
{
<span class="prelude-val">Ok</span>(<span class="ident">block</span>) =&gt; <span class="ident">blockfinder::OneBlock::new_state</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">block</span>),
<span class="prelude-val">Err</span>(<span class="ident">err</span>) =&gt; {

View File

@ -175,7 +175,7 @@
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">RUSTDOC_VERSION</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r&quot;rustdoc 1.58.1 (db9d1b20b 2022-01-20)&quot;</span>;
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#&quot;The build time in RFC2822, UTC.&quot;#</span>]</span>
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r&quot;Mon, 31 Jan 2022 13:39:04 +0000&quot;</span>;
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r&quot;Mon, 31 Jan 2022 16:12:20 +0000&quot;</span>;
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#&quot;The target architecture, given by `CARGO_CFG_TARGET_ARCH`.&quot;#</span>]</span>
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CFG_TARGET_ARCH</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r&quot;x86_64&quot;</span>;

View File

@ -537,6 +537,46 @@
<span id="536">536</span>
<span id="537">537</span>
<span id="538">538</span>
<span id="539">539</span>
<span id="540">540</span>
<span id="541">541</span>
<span id="542">542</span>
<span id="543">543</span>
<span id="544">544</span>
<span id="545">545</span>
<span id="546">546</span>
<span id="547">547</span>
<span id="548">548</span>
<span id="549">549</span>
<span id="550">550</span>
<span id="551">551</span>
<span id="552">552</span>
<span id="553">553</span>
<span id="554">554</span>
<span id="555">555</span>
<span id="556">556</span>
<span id="557">557</span>
<span id="558">558</span>
<span id="559">559</span>
<span id="560">560</span>
<span id="561">561</span>
<span id="562">562</span>
<span id="563">563</span>
<span id="564">564</span>
<span id="565">565</span>
<span id="566">566</span>
<span id="567">567</span>
<span id="568">568</span>
<span id="569">569</span>
<span id="570">570</span>
<span id="571">571</span>
<span id="572">572</span>
<span id="573">573</span>
<span id="574">574</span>
<span id="575">575</span>
<span id="576">576</span>
<span id="577">577</span>
<span id="578">578</span>
</pre><pre class="rust"><code><span class="kw">use</span> <span class="ident">std::collections</span>::{<span class="ident">BTreeSet</span>, <span class="ident">HashMap</span>, <span class="ident">HashSet</span>};
<span class="kw">use</span> <span class="ident">std::fmt</span>;
@ -574,10 +614,16 @@
<span class="kw">impl</span> <span class="ident">Perimeter</span> {
<span class="doccomment">/// Starting at any lane, snap to the nearest side of that road, then begin tracing a single</span>
<span class="doccomment">/// block, with no interior roads. This will fail if a map boundary is reached. The results are</span>
<span class="doccomment">/// unusual when crossing the entrance to a tunnel or bridge.</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">single_block</span>(<span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>, <span class="ident">start</span>: <span class="ident">LaneID</span>) -&gt; <span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">Perimeter</span><span class="op">&gt;</span> {
<span class="doccomment">/// unusual when crossing the entrance to a tunnel or bridge, and so `skip` is used to avoid</span>
<span class="doccomment">/// tracing there.</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">single_block</span>(<span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>, <span class="ident">start</span>: <span class="ident">LaneID</span>, <span class="ident">skip</span>: <span class="kw-2">&amp;</span><span class="ident">HashSet</span><span class="op">&lt;</span><span class="ident">RoadID</span><span class="op">&gt;</span>) -&gt; <span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">Perimeter</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">roads</span> <span class="op">=</span> <span class="ident">Vec::new</span>();
<span class="kw">let</span> <span class="ident">start_road_side</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_l</span>(<span class="ident">start</span>).<span class="ident">get_nearest_side_of_road</span>(<span class="ident">map</span>);
<span class="kw">if</span> <span class="ident">skip</span>.<span class="ident">contains</span>(<span class="kw-2">&amp;</span><span class="ident">start_road_side</span>.<span class="ident">road</span>) {
<span class="macro">bail!</span>(<span class="string">&quot;Started on a road we shouldn&#39;t trace&quot;</span>);
}
<span class="comment">// We need to track which side of the road we&#39;re at, but also which direction we&#39;re facing</span>
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">current_road_side</span> <span class="op">=</span> <span class="ident">start_road_side</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">current_intersection</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_l</span>(<span class="ident">start</span>).<span class="ident">dst_i</span>;
@ -586,7 +632,8 @@
<span class="kw">if</span> <span class="ident">i</span>.<span class="ident">is_border</span>() {
<span class="macro">bail!</span>(<span class="string">&quot;hit the map boundary&quot;</span>);
}
<span class="kw">let</span> <span class="ident">sorted_roads</span> <span class="op">=</span> <span class="ident">i</span>.<span class="ident">get_road_sides_sorted_by_incoming_angle</span>(<span class="ident">map</span>);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">sorted_roads</span> <span class="op">=</span> <span class="ident">i</span>.<span class="ident">get_road_sides_sorted_by_incoming_angle</span>(<span class="ident">map</span>);
<span class="ident">sorted_roads</span>.<span class="ident">retain</span>(<span class="op">|</span><span class="ident">id</span><span class="op">|</span> <span class="op">!</span><span class="ident">skip</span>.<span class="ident">contains</span>(<span class="kw-2">&amp;</span><span class="ident">id</span>.<span class="ident">road</span>));
<span class="kw">let</span> <span class="ident">idx</span> <span class="op">=</span> <span class="ident">sorted_roads</span>
.<span class="ident">iter</span>()
.<span class="ident">position</span>(<span class="op">|</span><span class="ident">x</span><span class="op">|</span> <span class="kw-2">*</span><span class="ident">x</span> <span class="op">==</span> <span class="ident">current_road_side</span>)
@ -624,6 +671,8 @@
<span class="doccomment">/// This calculates all single block perimeters for the entire map. The resulting list does not</span>
<span class="doccomment">/// cover roads near the map boundary.</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">find_all_single_blocks</span>(<span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>) -&gt; <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">Perimeter</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">skip</span> <span class="op">=</span> <span class="ident">Perimeter::find_roads_to_skip_tracing</span>(<span class="ident">map</span>);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">seen</span> <span class="op">=</span> <span class="ident">HashSet::new</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">perimeters</span> <span class="op">=</span> <span class="ident">Vec::new</span>();
<span class="kw">for</span> <span class="ident">lane</span> <span class="kw">in</span> <span class="ident">map</span>.<span class="ident">all_lanes</span>() {
@ -631,7 +680,7 @@
<span class="kw">if</span> <span class="ident">seen</span>.<span class="ident">contains</span>(<span class="kw-2">&amp;</span><span class="ident">side</span>) {
<span class="kw">continue</span>;
}
<span class="kw">match</span> <span class="ident">Perimeter::single_block</span>(<span class="ident">map</span>, <span class="ident">lane</span>.<span class="ident">id</span>) {
<span class="kw">match</span> <span class="ident">Perimeter::single_block</span>(<span class="ident">map</span>, <span class="ident">lane</span>.<span class="ident">id</span>, <span class="kw-2">&amp;</span><span class="ident">skip</span>) {
<span class="prelude-val">Ok</span>(<span class="ident">perimeter</span>) =&gt; {
<span class="ident">seen</span>.<span class="ident">extend</span>(<span class="ident">perimeter</span>.<span class="ident">roads</span>.<span class="ident">clone</span>());
<span class="ident">perimeters</span>.<span class="ident">push</span>(<span class="ident">perimeter</span>);
@ -650,6 +699,21 @@
<span class="ident">perimeters</span>
}
<span class="doccomment">/// Trying to form blocks near railways or cycleways that involve bridges/tunnels often causes</span>
<span class="doccomment">/// overlapping geometry or blocks that&#39;re way too large. These are extremely imperfect</span>
<span class="doccomment">/// heuristics to avoid the worst problems.</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">find_roads_to_skip_tracing</span>(<span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>) -&gt; <span class="ident">HashSet</span><span class="op">&lt;</span><span class="ident">RoadID</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">skip</span> <span class="op">=</span> <span class="ident">HashSet::new</span>();
<span class="kw">for</span> <span class="ident">r</span> <span class="kw">in</span> <span class="ident">map</span>.<span class="ident">all_roads</span>() {
<span class="kw">if</span> <span class="ident">r</span>.<span class="ident">is_light_rail</span>() {
<span class="ident">skip</span>.<span class="ident">insert</span>(<span class="ident">r</span>.<span class="ident">id</span>);
} <span class="kw">else</span> <span class="kw">if</span> <span class="ident">r</span>.<span class="ident">is_cycleway</span>() <span class="op">&amp;&amp;</span> <span class="ident">r</span>.<span class="ident">zorder</span> <span class="op">!</span><span class="op">=</span> <span class="number">0</span> {
<span class="ident">skip</span>.<span class="ident">insert</span>(<span class="ident">r</span>.<span class="ident">id</span>);
}
}
<span class="ident">skip</span>
}
<span class="doccomment">/// A perimeter has the first and last road matching up, but that&#39;s confusing to</span>
<span class="doccomment">/// work with. Temporarily undo that.</span>
<span class="kw">fn</span> <span class="ident">undo_invariant</span>(<span class="kw-2">&amp;mut</span> <span class="self">self</span>) {
@ -757,6 +821,16 @@
<span class="comment">// This order assumes everything is clockwise to start with.</span>
<span class="self">self</span>.<span class="ident">roads</span>.<span class="ident">append</span>(<span class="kw-2">&amp;mut</span> <span class="ident">other</span>.<span class="ident">roads</span>);
<span class="comment">// TODO This case was introduced with find_roads_to_skip_tracing. Not sure why.</span>
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">roads</span>.<span class="ident">is_empty</span>() {
<span class="kw">if</span> <span class="ident">debug_failures</span> {
<span class="macro">warn!</span>(<span class="string">&quot;Two perimeters had every road in common: {:?}&quot;</span>, <span class="ident">common</span>);
}
<span class="kw-2">*</span><span class="self">self</span> <span class="op">=</span> <span class="ident">orig_self</span>;
<span class="kw-2">*</span><span class="ident">other</span> <span class="op">=</span> <span class="ident">orig_other</span>;
<span class="kw">return</span> <span class="bool-val">false</span>;
}
<span class="self">self</span>.<span class="ident">interior</span>.<span class="ident">extend</span>(<span class="ident">common</span>);
<span class="self">self</span>.<span class="ident">interior</span>.<span class="ident">append</span>(<span class="kw-2">&amp;mut</span> <span class="ident">other</span>.<span class="ident">interior</span>);
@ -821,6 +895,7 @@
<span class="doccomment">/// If the perimeter follows any dead-end roads, &quot;collapse&quot; them and instead make the perimeter</span>
<span class="doccomment">/// contain the dead-end.</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">collapse_deadends</span>(<span class="kw-2">&amp;mut</span> <span class="self">self</span>) {
<span class="kw">let</span> <span class="ident">orig</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">clone</span>();
<span class="self">self</span>.<span class="ident">undo_invariant</span>();
<span class="comment">// TODO Workaround https://github.com/a-b-street/abstreet/issues/834. If this is a loop</span>
@ -847,6 +922,11 @@
}
<span class="self">self</span>.<span class="ident">roads</span> <span class="op">=</span> <span class="ident">roads</span>;
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">roads</span>.<span class="ident">is_empty</span>() {
<span class="comment">// TODO This case was introduced with find_roads_to_skip_tracing. Not sure why.</span>
<span class="kw-2">*</span><span class="self">self</span> <span class="op">=</span> <span class="ident">orig</span>;
<span class="kw">return</span>;
}
<span class="self">self</span>.<span class="ident">restore_invariant</span>();
}

View File

@ -295,6 +295,7 @@
<span id="294">294</span>
<span id="295">295</span>
<span id="296">296</span>
<span id="297">297</span>
</pre><pre class="rust"><code><span class="doccomment">//! Integration tests</span>
<span class="kw">use</span> <span class="ident">std::io::Write</span>;
@ -550,10 +551,11 @@
<span class="ident">MapName::seattle</span>(<span class="string">&quot;downtown&quot;</span>),
<span class="ident">MapName::seattle</span>(<span class="string">&quot;lakeslice&quot;</span>),
<span class="ident">MapName::new</span>(<span class="string">&quot;us&quot;</span>, <span class="string">&quot;phoenix&quot;</span>, <span class="string">&quot;tempe&quot;</span>),
<span class="ident">MapName::new</span>(<span class="string">&quot;gb&quot;</span>, <span class="string">&quot;leeds&quot;</span>, <span class="string">&quot;north&quot;</span>),
<span class="ident">MapName::new</span>(<span class="string">&quot;gb&quot;</span>, <span class="string">&quot;bristol&quot;</span>, <span class="string">&quot;east&quot;</span>),
<span class="ident">MapName::new</span>(<span class="string">&quot;gb&quot;</span>, <span class="string">&quot;leeds&quot;</span>, <span class="string">&quot;north&quot;</span>),
<span class="ident">MapName::new</span>(<span class="string">&quot;gb&quot;</span>, <span class="string">&quot;london&quot;</span>, <span class="string">&quot;camden&quot;</span>),
<span class="ident">MapName::new</span>(<span class="string">&quot;gb&quot;</span>, <span class="string">&quot;london&quot;</span>, <span class="string">&quot;southwark&quot;</span>),
<span class="ident">MapName::new</span>(<span class="string">&quot;gb&quot;</span>, <span class="string">&quot;manchester&quot;</span>, <span class="string">&quot;levenshulme&quot;</span>),
] {
<span class="kw">let</span> <span class="ident">map</span> <span class="op">=</span> <span class="ident">map_model::Map::load_synchronously</span>(<span class="ident">name</span>.<span class="ident">path</span>(), <span class="kw-2">&amp;mut</span> <span class="ident">timer</span>);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">single_blocks</span> <span class="op">=</span> <span class="ident">Perimeter::find_all_single_blocks</span>(<span class="kw-2">&amp;</span><span class="ident">map</span>);

View File

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Generate single blocks and merged LTN-style blocks for some maps, counting the number of failures. Store in a goldenfile, so somebody can manually do a visual diff if anything changes."><meta name="keywords" content="rust, rustlang, rust-lang, test_blockfinding"><title>test_blockfinding in 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 id="default-settings" ></script><script src="../storage.js"></script><script src="../crates.js"></script><script defer src="../main.js"></script>
<noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../tests/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="index.html">tests</a></h2><div id="sidebar-vars" data-name="test_blockfinding" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="index.html">tests</a>::<wbr><a class="fn" href="#">test_blockfinding</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/tests/main.rs.html#246-296" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>pub(crate) fn test_blockfinding() -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.unit.html">()</a>&gt;</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Generate single blocks and merged LTN-style blocks for some maps, counting the number of
<noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../tests/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="index.html">tests</a></h2><div id="sidebar-vars" data-name="test_blockfinding" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="index.html">tests</a>::<wbr><a class="fn" href="#">test_blockfinding</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/tests/main.rs.html#246-297" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>pub(crate) fn test_blockfinding() -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.unit.html">()</a>&gt;</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Generate single blocks and merged LTN-style blocks for some maps, counting the number of
failures. Store in a goldenfile, so somebody can manually do a visual diff if anything changes.</p>
</div></details></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="tests" data-search-index-js="../search-index.js" data-search-js="../search.js"></div>
</body></html>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Integration tests"><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 id="default-settings" ></script><script src="../storage.js"></script><script src="../crates.js"></script><script defer src="../main.js"></script>
<noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod crate"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../tests/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Crate tests</h2><div class="block version"><div class="narrow-helper"></div><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><div id="sidebar-vars" data-name="tests" data-ty="mod" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Crate <a class="mod" href="#">tests</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/tests/main.rs.html#1-296" title="goto source code">[src]</a></span></h1><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Integration tests</p>
<noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod crate"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../tests/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Crate tests</h2><div class="block version"><div class="narrow-helper"></div><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><div id="sidebar-vars" data-name="tests" data-ty="mod" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Crate <a class="mod" href="#">tests</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/tests/main.rs.html#1-297" title="goto source code">[src]</a></span></h1><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Integration tests</p>
</div></details><h2 id="functions" class="small-section-header"><a href="#functions">Functions</a></h2>
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.check_proposals.html" title="tests::check_proposals fn">check_proposals</a></div><div class="item-right docblock-short"><p>Verify all edits under version control can be correctly apply to their map.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.dump_route_goldenfile.html" title="tests::dump_route_goldenfile fn">dump_route_goldenfile</a></div><div class="item-right docblock-short"><p>Describe all public transit routes and keep under version control to spot diffs easily.</p>