This commit is contained in:
dabreegster 2020-08-29 00:39:14 +00:00
parent 830260af2f
commit a46d5ec4b1
88 changed files with 451 additions and 438 deletions

View File

@ -165,13 +165,13 @@ transportation.</p>
first.</p>
</blockquote>
<h2><a class="header" href="#16th-ave-sw-and-sw-holden-st" id="16th-ave-sw-and-sw-holden-st">16th Ave SW and SW Holden St</a></h2>
<p>HPAC has been asking for a protected left-turn phase at this intersection. I'm
<p>HPAC has been asking for a protected left-turn stage at this intersection. I'm
unfamiliar with this intersection and currently unable to scout in-person, so
I'm blindly guessing the traffic signal currently has just two phases:</p>
I'm blindly guessing the traffic signal currently has just two stages:</p>
<p><img src="existing_diagram.gif" alt="existing_diagram" /></p>
<p>From watching the traffic, it seems like the east/west direction is busier, with
lots of eastbound traffic headed towards WA-509. Holden St has no turn lanes, so
a protected left turn phase makes sense. Let's make the change and see what
a protected left turn stage makes sense. Let's make the change and see what
happens:</p>
<iframe width="560" height="315" src="https://www.youtube.com/embed/6tooJaZLa0Q" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
<p>Unfortuately, we can't evaluate the change yet, because the simulation gets
@ -188,7 +188,7 @@ analysis, using the <em>throughput</em> layer.</p>
Alaska, SW Holden, and SW Roxbury St. Again, it's necessary to first fix data
quality problems and run a full day before doing more analysis.</p>
<p>Once the simulation is running smoothly, A/B Street can be used to make changes
-- like lowering speed limits, adding a protected left turn phase, or converting
-- like lowering speed limits, adding a protected left turn stage, or converting
part of the road into a bus lane -- and evaluate the effects on individual trips
and aggregate groups.</p>
<h2><a class="header" href="#repair-the-bridge" id="repair-the-bridge">Repair the bridge</a></h2>

View File

@ -282,7 +282,7 @@ intersection</li>
<li>Only fixed timers; no actuated signals or
<a href="https://www.seattle.gov/transportation/projects-and-programs/programs/technology-program/mercer-scoot">centralized control</a>
yet</li>
<li>The timing and phases are automatically guessed, except some intersections
<li>The timing and stages are automatically guessed, except some intersections
are
<a href="https://docs.google.com/document/d/1Od_7WvBVYsvpY4etRI0sKmYmZnwXMAXcJxVmm8Iwdcg/edit?usp=sharing">manually mapped</a></li>
<li>No pedestrian beg buttons; walk signals always come on</li>

View File

@ -249,11 +249,11 @@ an all way stop.</li>
<ul>
<li>Apply the first predefined policy that works.
<ul>
<li>4-way 4 phase, 4-way 2 phase, 3-way 3-phase, degenerate policy for 2
roads, 2-phase for 4 one-ways</li>
<li>Fallback to a greedy assignment that just randomly starts a new phase,
<li>4-way 4 stage, 4-way 2 stage, 3-way 3-stage, degenerate policy for 2
roads, 2-stage for 4 one-ways</li>
<li>Fallback to a greedy assignment that just randomly starts a new stage,
adds all compatible turns, and repeats until all turns are present
priority in some phase.</li>
priority in some stage.</li>
</ul>
</li>
</ul>

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

View File

@ -529,7 +529,7 @@ intersection</li>
<li>Only fixed timers; no actuated signals or
<a href="https://www.seattle.gov/transportation/projects-and-programs/programs/technology-program/mercer-scoot">centralized control</a>
yet</li>
<li>The timing and phases are automatically guessed, except some intersections
<li>The timing and stages are automatically guessed, except some intersections
are
<a href="https://docs.google.com/document/d/1Od_7WvBVYsvpY4etRI0sKmYmZnwXMAXcJxVmm8Iwdcg/edit?usp=sharing">manually mapped</a></li>
<li>No pedestrian beg buttons; walk signals always come on</li>
@ -754,13 +754,13 @@ transportation.</p>
first.</p>
</blockquote>
<h2><a class="header" href="#16th-ave-sw-and-sw-holden-st" id="16th-ave-sw-and-sw-holden-st">16th Ave SW and SW Holden St</a></h2>
<p>HPAC has been asking for a protected left-turn phase at this intersection. I'm
<p>HPAC has been asking for a protected left-turn stage at this intersection. I'm
unfamiliar with this intersection and currently unable to scout in-person, so
I'm blindly guessing the traffic signal currently has just two phases:</p>
I'm blindly guessing the traffic signal currently has just two stages:</p>
<p><img src="case_studies/existing_diagram.gif" alt="existing_diagram" /></p>
<p>From watching the traffic, it seems like the east/west direction is busier, with
lots of eastbound traffic headed towards WA-509. Holden St has no turn lanes, so
a protected left turn phase makes sense. Let's make the change and see what
a protected left turn stage makes sense. Let's make the change and see what
happens:</p>
<iframe width="560" height="315" src="https://www.youtube.com/embed/6tooJaZLa0Q" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
<p>Unfortuately, we can't evaluate the change yet, because the simulation gets
@ -777,7 +777,7 @@ analysis, using the <em>throughput</em> layer.</p>
Alaska, SW Holden, and SW Roxbury St. Again, it's necessary to first fix data
quality problems and run a full day before doing more analysis.</p>
<p>Once the simulation is running smoothly, A/B Street can be used to make changes
-- like lowering speed limits, adding a protected left turn phase, or converting
-- like lowering speed limits, adding a protected left turn stage, or converting
part of the road into a bus lane -- and evaluate the effects on individual trips
and aggregate groups.</p>
<h2><a class="header" href="#repair-the-bridge" id="repair-the-bridge">Repair the bridge</a></h2>
@ -1416,11 +1416,11 @@ an all way stop.</li>
<ul>
<li>Apply the first predefined policy that works.
<ul>
<li>4-way 4 phase, 4-way 2 phase, 3-way 3-phase, degenerate policy for 2
roads, 2-phase for 4 one-ways</li>
<li>Fallback to a greedy assignment that just randomly starts a new phase,
<li>4-way 4 stage, 4-way 2 stage, 3-way 3-stage, degenerate policy for 2
roads, 2-stage for 4 one-ways</li>
<li>Fallback to a greedy assignment that just randomly starts a new stage,
adds all compatible turns, and repeats until all turns are present
priority in some phase.</li>
priority in some stage.</li>
</ul>
</li>
</ul>
@ -1956,11 +1956,11 @@ ends at a border or building, there are many combinations of these sequences.
This is a way to categorize them into three groups. I'm not sure it's the
simplest way to express all the state transitons.</p>
<h2><a class="header" href="#walking-only-trips" id="walking-only-trips">Walking-only trips</a></h2>
<p><img src="trafficsim/../mdbook-plantuml-img/e011d046-1efc-42fc-b437-993fce44827a.svg" alt="../mdbook-plantuml-img/e011d046-1efc-42fc-b437-993fce44827a.svg" /></p>
<p><img src="trafficsim/../mdbook-plantuml-img/e03dc25f-efcf-4760-81a0-8c2cadb2ab67.svg" alt="../mdbook-plantuml-img/e03dc25f-efcf-4760-81a0-8c2cadb2ab67.svg" /></p>
<h2><a class="header" href="#trips-starting-from-a-border" id="trips-starting-from-a-border">Trips starting from a border</a></h2>
<p><img src="trafficsim/../mdbook-plantuml-img/f7fd7079-ed5d-4ece-865f-87af6d814cb6.svg" alt="../mdbook-plantuml-img/f7fd7079-ed5d-4ece-865f-87af6d814cb6.svg" /></p>
<p><img src="trafficsim/../mdbook-plantuml-img/f14ae73b-8208-4273-b934-cec712a2e5b9.svg" alt="../mdbook-plantuml-img/f14ae73b-8208-4273-b934-cec712a2e5b9.svg" /></p>
<h2><a class="header" href="#trips-starting-from-a-building" id="trips-starting-from-a-building">Trips starting from a building</a></h2>
<p><img src="trafficsim/../mdbook-plantuml-img/c705130d-1aed-43d2-aea1-4762810f7cb1.svg" alt="../mdbook-plantuml-img/c705130d-1aed-43d2-aea1-4762810f7cb1.svg" /></p>
<p><img src="trafficsim/../mdbook-plantuml-img/6cc88860-e881-4daf-b34b-460134935ac5.svg" alt="../mdbook-plantuml-img/6cc88860-e881-4daf-b34b-460134935ac5.svg" /></p>
<h1><a class="header" href="#project-logistics" id="project-logistics">Project logistics</a></h1>
<p>This has some background/logistics about the project.</p>
<h1><a class="header" href="#roadmap" id="roadmap">Roadmap</a></h1>

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
<!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 `make_previewer` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, make_previewer"><title>game::edit::traffic_signals::preview::make_previewer - Rust</title><link rel="stylesheet" type="text/css" href="../../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../../light.css" id="themeStyle"><script src="../../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../../game/index.html'><div class='logo-container'><img src='../../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../../index.html'>game</a>::<wbr><a href='../../index.html'>edit</a>::<wbr><a href='../index.html'>traffic_signals</a>::<wbr><a href='index.html'>preview</a></p><script>window.sidebarCurrent = {name: 'make_previewer', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../../settings.html"><img src="../../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../../src/game/edit/traffic_signals/preview.rs.html#72-119' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../../index.html'>game</a>::<wbr><a href='../../index.html'>edit</a>::<wbr><a href='../index.html'>traffic_signals</a>::<wbr><a href='index.html'>preview</a>::<wbr><a class="fn" href=''>make_previewer</a></span></h1><pre class='rust fn'>pub fn make_previewer(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;members: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a>&lt;<a class="struct" href="../../../../map_model/objects/intersection/struct.IntersectionID.html" title="struct map_model::objects::intersection::IntersectionID">IntersectionID</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;phase: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="../../../../game/game/trait.State.html" title="trait game::game::State">State</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../../";window.currentCrate = "game";</script><script src="../../../../main.js"></script><script defer src="../../../../search-index.js"></script></body></html>
<!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 `make_previewer` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, make_previewer"><title>game::edit::traffic_signals::preview::make_previewer - Rust</title><link rel="stylesheet" type="text/css" href="../../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../../light.css" id="themeStyle"><script src="../../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../../game/index.html'><div class='logo-container'><img src='../../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../../index.html'>game</a>::<wbr><a href='../../index.html'>edit</a>::<wbr><a href='../index.html'>traffic_signals</a>::<wbr><a href='index.html'>preview</a></p><script>window.sidebarCurrent = {name: 'make_previewer', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../../settings.html"><img src="../../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../../src/game/edit/traffic_signals/preview.rs.html#72-119' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../../index.html'>game</a>::<wbr><a href='../../index.html'>edit</a>::<wbr><a href='../index.html'>traffic_signals</a>::<wbr><a href='index.html'>preview</a>::<wbr><a class="fn" href=''>make_previewer</a></span></h1><pre class='rust fn'>pub fn make_previewer(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;members: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a>&lt;<a class="struct" href="../../../../map_model/objects/intersection/struct.IntersectionID.html" title="struct map_model::objects::intersection::IntersectionID">IntersectionID</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;stage: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="../../../../game/game/trait.State.html" title="trait game::game::State">State</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../../";window.currentCrate = "game";</script><script src="../../../../main.js"></script><script defer src="../../../../search-index.js"></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `TrafficSignalStyle` enum in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, TrafficSignalStyle"><title>game::options::TrafficSignalStyle - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../game/index.html'><div class='logo-container'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Enum TrafficSignalStyle</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.BAP">BAP</a><a href="#variant.GroupArrows">GroupArrows</a><a href="#variant.Icons">Icons</a><a href="#variant.IndividualTurnArrows">IndividualTurnArrows</a><a href="#variant.Sidewalks">Sidewalks</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-PartialEq%3CTrafficSignalStyle%3E">PartialEq&lt;TrafficSignalStyle&gt;</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&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><p class='location'><a href='../index.html'>game</a>::<wbr><a href='index.html'>options</a></p><script>window.sidebarCurrent = {name: 'TrafficSignalStyle', ty: 'enum', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/game/options.rs.html#51-57' title='goto source code'>[src]</a></span><span class='in-band'>Enum <a href='../index.html'>game</a>::<wbr><a href='index.html'>options</a>::<wbr><a class="enum" href=''>TrafficSignalStyle</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust enum'>pub enum TrafficSignalStyle {
<!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 `TrafficSignalStyle` enum in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, TrafficSignalStyle"><title>game::options::TrafficSignalStyle - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../game/index.html'><div class='logo-container'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Enum TrafficSignalStyle</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.BAP">BAP</a><a href="#variant.GroupArrows">GroupArrows</a><a href="#variant.Icons">Icons</a><a href="#variant.IndividualTurnArrows">IndividualTurnArrows</a><a href="#variant.Sidewalks">Sidewalks</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-PartialEq%3CTrafficSignalStyle%3E">PartialEq&lt;TrafficSignalStyle&gt;</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&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><p class='location'><a href='../index.html'>game</a>::<wbr><a href='index.html'>options</a></p><script>window.sidebarCurrent = {name: 'TrafficSignalStyle', ty: 'enum', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/game/options.rs.html#53-59' title='goto source code'>[src]</a></span><span class='in-band'>Enum <a href='../index.html'>game</a>::<wbr><a href='index.html'>options</a>::<wbr><a class="enum" href=''>TrafficSignalStyle</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust enum'>pub enum TrafficSignalStyle {
BAP,
GroupArrows,
Sidewalks,
@ -6,12 +6,12 @@
IndividualTurnArrows,
}</pre></div><h2 id='variants' class='variants small-section-header'>
Variants<a href='#variants' class='anchor'></a></h2>
<div id="variant.BAP" class="variant small-section-header"><a href="#variant.BAP" class="anchor field"></a><code>BAP</code></div><div id="variant.GroupArrows" class="variant small-section-header"><a href="#variant.GroupArrows" class="anchor field"></a><code>GroupArrows</code></div><div id="variant.Sidewalks" class="variant small-section-header"><a href="#variant.Sidewalks" class="anchor field"></a><code>Sidewalks</code></div><div id="variant.Icons" class="variant small-section-header"><a href="#variant.Icons" class="anchor field"></a><code>Icons</code></div><div id="variant.IndividualTurnArrows" class="variant small-section-header"><a href="#variant.IndividualTurnArrows" class="anchor field"></a><code>IndividualTurnArrows</code></div><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="../../game/options/enum.TrafficSignalStyle.html" title="enum game::options::TrafficSignalStyle">TrafficSignalStyle</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../../src/game/options.rs.html#50' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class="enum" href="../../game/options/enum.TrafficSignalStyle.html" title="enum game::options::TrafficSignalStyle">TrafficSignalStyle</a></code><a class='srclink' href='../../src/game/options.rs.html#50' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
<div id="variant.BAP" class="variant small-section-header"><a href="#variant.BAP" class="anchor field"></a><code>BAP</code></div><div id="variant.GroupArrows" class="variant small-section-header"><a href="#variant.GroupArrows" class="anchor field"></a><code>GroupArrows</code></div><div id="variant.Sidewalks" class="variant small-section-header"><a href="#variant.Sidewalks" class="anchor field"></a><code>Sidewalks</code></div><div id="variant.Icons" class="variant small-section-header"><a href="#variant.Icons" class="anchor field"></a><code>Icons</code></div><div id="variant.IndividualTurnArrows" class="variant small-section-header"><a href="#variant.IndividualTurnArrows" class="anchor field"></a><code>IndividualTurnArrows</code></div><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="../../game/options/enum.TrafficSignalStyle.html" title="enum game::options::TrafficSignalStyle">TrafficSignalStyle</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../../src/game/options.rs.html#52' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class="enum" href="../../game/options/enum.TrafficSignalStyle.html" title="enum game::options::TrafficSignalStyle">TrafficSignalStyle</a></code><a class='srclink' href='../../src/game/options.rs.html#52' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id='method.clone_from' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self)</code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#131-133' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div><h3 id='impl-Debug' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../../game/options/enum.TrafficSignalStyle.html" title="enum game::options::TrafficSignalStyle">TrafficSignalStyle</a></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../../src/game/options.rs.html#50' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../../src/game/options.rs.html#50' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id='impl-PartialEq%3CTrafficSignalStyle%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="enum" href="../../game/options/enum.TrafficSignalStyle.html" title="enum game::options::TrafficSignalStyle">TrafficSignalStyle</a>&gt; for <a class="enum" href="../../game/options/enum.TrafficSignalStyle.html" title="enum game::options::TrafficSignalStyle">TrafficSignalStyle</a></code><a href='#impl-PartialEq%3CTrafficSignalStyle%3E' class='anchor'></a><a class='srclink' href='../../src/game/options.rs.html#50' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;<a class="enum" href="../../game/options/enum.TrafficSignalStyle.html" title="enum game::options::TrafficSignalStyle">TrafficSignalStyle</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/game/options.rs.html#50' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div></div><h3 id='impl-Debug' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../../game/options/enum.TrafficSignalStyle.html" title="enum game::options::TrafficSignalStyle">TrafficSignalStyle</a></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../../src/game/options.rs.html#52' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../../src/game/options.rs.html#52' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id='impl-PartialEq%3CTrafficSignalStyle%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="enum" href="../../game/options/enum.TrafficSignalStyle.html" title="enum game::options::TrafficSignalStyle">TrafficSignalStyle</a>&gt; for <a class="enum" href="../../game/options/enum.TrafficSignalStyle.html" title="enum game::options::TrafficSignalStyle">TrafficSignalStyle</a></code><a href='#impl-PartialEq%3CTrafficSignalStyle%3E' class='anchor'></a><a class='srclink' href='../../src/game/options.rs.html#52' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;<a class="enum" href="../../game/options/enum.TrafficSignalStyle.html" title="enum game::options::TrafficSignalStyle">TrafficSignalStyle</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/game/options.rs.html#52' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne' class="method hidden"><code><span class="docblock attributes">#[must_use]</span>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#215-217' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-StructuralPartialEq' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="enum" href="../../game/options/enum.TrafficSignalStyle.html" title="enum game::options::TrafficSignalStyle">TrafficSignalStyle</a></code><a href='#impl-StructuralPartialEq' class='anchor'></a><a class='srclink' href='../../src/game/options.rs.html#50' title='goto source code'>[src]</a></h3><div class='impl-items'></div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="../../game/options/enum.TrafficSignalStyle.html" title="enum game::options::TrafficSignalStyle">TrafficSignalStyle</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Send' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="../../game/options/enum.TrafficSignalStyle.html" title="enum game::options::TrafficSignalStyle">TrafficSignalStyle</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="../../game/options/enum.TrafficSignalStyle.html" title="enum game::options::TrafficSignalStyle">TrafficSignalStyle</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="../../game/options/enum.TrafficSignalStyle.html" title="enum game::options::TrafficSignalStyle">TrafficSignalStyle</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="../../game/options/enum.TrafficSignalStyle.html" title="enum game::options::TrafficSignalStyle">TrafficSignalStyle</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-Any' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id='impl-StructuralPartialEq' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="enum" href="../../game/options/enum.TrafficSignalStyle.html" title="enum game::options::TrafficSignalStyle">TrafficSignalStyle</a></code><a href='#impl-StructuralPartialEq' class='anchor'></a><a class='srclink' href='../../src/game/options.rs.html#52' title='goto source code'>[src]</a></h3><div class='impl-items'></div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="../../game/options/enum.TrafficSignalStyle.html" title="enum game::options::TrafficSignalStyle">TrafficSignalStyle</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Send' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="../../game/options/enum.TrafficSignalStyle.html" title="enum game::options::TrafficSignalStyle">TrafficSignalStyle</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="../../game/options/enum.TrafficSignalStyle.html" title="enum game::options::TrafficSignalStyle">TrafficSignalStyle</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="../../game/options/enum.TrafficSignalStyle.html" title="enum game::options::TrafficSignalStyle">TrafficSignalStyle</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="../../game/options/enum.TrafficSignalStyle.html" title="enum game::options::TrafficSignalStyle">TrafficSignalStyle</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-Any' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213-217' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214-216' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id='impl-BorrowMut%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-BorrowMut%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#220-224' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#221-223' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></div><h3 id='impl-Downcast' class='impl'><code class='in-band'>impl&lt;T&gt; Downcast for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a>,&nbsp;</span></code><a href='#impl-Downcast' class='anchor'></a></h3><div class='impl-items'><h4 id='method.into_any' class="method hidden"><code>fn <a href='#method.into_any' class='fnname'>into_any</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;T&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static&gt;</code></h4><div class='docblock hidden'><p>Convert <code>Box&lt;dyn Trait&gt;</code> (where <code>Trait: Downcast</code>) to <code>Box&lt;dyn Any&gt;</code>. <code>Box&lt;dyn Any&gt;</code> can then be further <code>downcast</code> into <code>Box&lt;ConcreteType&gt;</code> where <code>ConcreteType</code> implements <code>Trait</code>. <a href="#tymethod.into_any">Read more</a></p>

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 `options` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, options"><title>game::options - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../game/index.html'><div class='logo-container'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module options</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li></ul></div><p class='location'><a href='../index.html'>game</a></p><script>window.sidebarCurrent = {name: 'options', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/game/options.rs.html#1-276' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>game</a>::<wbr><a class="mod" href=''>options</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `options` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, options"><title>game::options - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../game/index.html'><div class='logo-container'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module options</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li></ul></div><p class='location'><a href='../index.html'>game</a></p><script>window.sidebarCurrent = {name: 'options', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/game/options.rs.html#1-278' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>game</a>::<wbr><a class="mod" href=''>options</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
<table><tr class='module-item'><td><a class="struct" href="struct.Options.html" title='game::options::Options struct'>Options</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.OptionsPanel.html" title='game::options::OptionsPanel struct'>OptionsPanel</a></td><td class='docblock-short'></td></tr></table><h2 id='enums' class='section-header'><a href="#enums">Enums</a></h2>
<table><tr class='module-item'><td><a class="enum" href="enum.TrafficSignalStyle.html" title='game::options::TrafficSignalStyle enum'>TrafficSignalStyle</a></td><td class='docblock-short'></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "game";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `BUILT_TIME_UTC` constant in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>game::pregame::built_info::BUILT_TIME_UTC - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../game/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>game</a>::<wbr><a href='../index.html'>pregame</a>::<wbr><a href='index.html'>built_info</a></p><script>window.sidebarCurrent = {name: 'BUILT_TIME_UTC', ty: 'constant', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-3c7487281029702d/out/built.rs.html#49' title='goto source code'>[src]</a></span><span class='in-band'>Constant <a href='../../index.html'>game</a>::<wbr><a href='../index.html'>pregame</a>::<wbr><a href='index.html'>built_info</a>::<wbr><a class="constant" href=''>BUILT_TIME_UTC</a></span></h1><pre class='rust const'>pub const BUILT_TIME_UTC: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = &quot;Sat, 29 Aug 2020 00:04:04 +0000&quot;;</pre><div class='docblock'><p>The built-time in RFC2822, UTC</p>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `BUILT_TIME_UTC` constant in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>game::pregame::built_info::BUILT_TIME_UTC - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../game/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>game</a>::<wbr><a href='../index.html'>pregame</a>::<wbr><a href='index.html'>built_info</a></p><script>window.sidebarCurrent = {name: 'BUILT_TIME_UTC', ty: 'constant', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-3c7487281029702d/out/built.rs.html#49' title='goto source code'>[src]</a></span><span class='in-band'>Constant <a href='../../index.html'>game</a>::<wbr><a href='../index.html'>pregame</a>::<wbr><a href='index.html'>built_info</a>::<wbr><a class="constant" href=''>BUILT_TIME_UTC</a></span></h1><pre class='rust const'>pub const BUILT_TIME_UTC: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = &quot;Sat, 29 Aug 2020 00:36:47 +0000&quot;;</pre><div class='docblock'><p>The built-time in RFC2822, UTC</p>
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

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 `render` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, render"><title>game::render - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../game/index.html'><div class='logo-container'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module render</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#reexports">Re-exports</a></li><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#constants">Constants</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li></ul></div><p class='location'><a href='../index.html'>game</a></p><script>window.sidebarCurrent = {name: 'render', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/game/render/mod.rs.html#1-85' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>game</a>::<wbr><a class="mod" href=''>render</a></span></h1><h2 id='reexports' class='section-header'><a href="#reexports">Re-exports</a></h2>
<table><tr><td><code>pub use crate::render::area::<a class="struct" href="../../game/render/area/struct.DrawArea.html" title="struct game::render::area::DrawArea">DrawArea</a>;</code></td></tr><tr><td><code>pub use crate::render::intersection::<a class="fn" href="../../game/render/intersection/fn.calculate_corners.html" title="fn game::render::intersection::calculate_corners">calculate_corners</a>;</code></td></tr><tr><td><code>pub use crate::render::intersection::<a class="struct" href="../../game/render/intersection/struct.DrawIntersection.html" title="struct game::render::intersection::DrawIntersection">DrawIntersection</a>;</code></td></tr><tr><td><code>pub use crate::render::map::<a class="struct" href="../../game/render/map/struct.AgentCache.html" title="struct game::render::map::AgentCache">AgentCache</a>;</code></td></tr><tr><td><code>pub use crate::render::map::<a class="struct" href="../../game/render/map/struct.DrawMap.html" title="struct game::render::map::DrawMap">DrawMap</a>;</code></td></tr><tr><td><code>pub use crate::render::map::<a class="struct" href="../../game/render/map/struct.UnzoomedAgents.html" title="struct game::render::map::UnzoomedAgents">UnzoomedAgents</a>;</code></td></tr><tr><td><code>pub use crate::render::pedestrian::<a class="struct" href="../../game/render/pedestrian/struct.DrawPedCrowd.html" title="struct game::render::pedestrian::DrawPedCrowd">DrawPedCrowd</a>;</code></td></tr><tr><td><code>pub use crate::render::pedestrian::<a class="struct" href="../../game/render/pedestrian/struct.DrawPedestrian.html" title="struct game::render::pedestrian::DrawPedestrian">DrawPedestrian</a>;</code></td></tr><tr><td><code>pub use crate::render::traffic_signal::<a class="fn" href="../../game/render/traffic_signal/fn.draw_signal_phase.html" title="fn game::render::traffic_signal::draw_signal_phase">draw_signal_phase</a>;</code></td></tr><tr><td><code>pub use crate::render::turn::<a class="struct" href="../../game/render/turn/struct.DrawTurnGroup.html" title="struct game::render::turn::DrawTurnGroup">DrawTurnGroup</a>;</code></td></tr><tr><td><code>pub use crate::render::turn::<a class="struct" href="../../game/render/turn/struct.DrawUberTurnGroup.html" title="struct game::render::turn::DrawUberTurnGroup">DrawUberTurnGroup</a>;</code></td></tr></table><h2 id='modules' class='section-header'><a href="#modules">Modules</a></h2>
<table><tr><td><code>pub use crate::render::area::<a class="struct" href="../../game/render/area/struct.DrawArea.html" title="struct game::render::area::DrawArea">DrawArea</a>;</code></td></tr><tr><td><code>pub use crate::render::intersection::<a class="fn" href="../../game/render/intersection/fn.calculate_corners.html" title="fn game::render::intersection::calculate_corners">calculate_corners</a>;</code></td></tr><tr><td><code>pub use crate::render::intersection::<a class="struct" href="../../game/render/intersection/struct.DrawIntersection.html" title="struct game::render::intersection::DrawIntersection">DrawIntersection</a>;</code></td></tr><tr><td><code>pub use crate::render::map::<a class="struct" href="../../game/render/map/struct.AgentCache.html" title="struct game::render::map::AgentCache">AgentCache</a>;</code></td></tr><tr><td><code>pub use crate::render::map::<a class="struct" href="../../game/render/map/struct.DrawMap.html" title="struct game::render::map::DrawMap">DrawMap</a>;</code></td></tr><tr><td><code>pub use crate::render::map::<a class="struct" href="../../game/render/map/struct.UnzoomedAgents.html" title="struct game::render::map::UnzoomedAgents">UnzoomedAgents</a>;</code></td></tr><tr><td><code>pub use crate::render::pedestrian::<a class="struct" href="../../game/render/pedestrian/struct.DrawPedCrowd.html" title="struct game::render::pedestrian::DrawPedCrowd">DrawPedCrowd</a>;</code></td></tr><tr><td><code>pub use crate::render::pedestrian::<a class="struct" href="../../game/render/pedestrian/struct.DrawPedestrian.html" title="struct game::render::pedestrian::DrawPedestrian">DrawPedestrian</a>;</code></td></tr><tr><td><code>pub use crate::render::traffic_signal::<a class="fn" href="../../game/render/traffic_signal/fn.draw_signal_stage.html" title="fn game::render::traffic_signal::draw_signal_stage">draw_signal_stage</a>;</code></td></tr><tr><td><code>pub use crate::render::turn::<a class="struct" href="../../game/render/turn/struct.DrawTurnGroup.html" title="struct game::render::turn::DrawTurnGroup">DrawTurnGroup</a>;</code></td></tr><tr><td><code>pub use crate::render::turn::<a class="struct" href="../../game/render/turn/struct.DrawUberTurnGroup.html" title="struct game::render::turn::DrawUberTurnGroup">DrawUberTurnGroup</a>;</code></td></tr></table><h2 id='modules' class='section-header'><a href="#modules">Modules</a></h2>
<table><tr class='module-item'><td><a class="mod" href="area/index.html" title='game::render::area mod'>area</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="bike/index.html" title='game::render::bike mod'>bike</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="building/index.html" title='game::render::building mod'>building</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="bus_stop/index.html" title='game::render::bus_stop mod'>bus_stop</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="car/index.html" title='game::render::car mod'>car</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="intersection/index.html" title='game::render::intersection mod'>intersection</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="lane/index.html" title='game::render::lane mod'>lane</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="map/index.html" title='game::render::map mod'>map</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="parking_lot/index.html" title='game::render::parking_lot mod'>parking_lot</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="pedestrian/index.html" title='game::render::pedestrian mod'>pedestrian</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="road/index.html" title='game::render::road mod'>road</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="traffic_signal/index.html" title='game::render::traffic_signal mod'>traffic_signal</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="turn/index.html" title='game::render::turn mod'>turn</a></td><td class='docblock-short'></td></tr></table><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
<table><tr class='module-item'><td><a class="struct" href="struct.DrawOptions.html" title='game::render::DrawOptions struct'>DrawOptions</a></td><td class='docblock-short'></td></tr></table><h2 id='constants' class='section-header'><a href="#constants">Constants</a></h2>
<table><tr class='module-item'><td><a class="constant" href="constant.BIG_ARROW_THICKNESS.html" title='game::render::BIG_ARROW_THICKNESS constant'>BIG_ARROW_THICKNESS</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="constant" href="constant.CROSSWALK_LINE_THICKNESS.html" title='game::render::CROSSWALK_LINE_THICKNESS constant'>CROSSWALK_LINE_THICKNESS</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="constant" href="constant.OUTLINE_THICKNESS.html" title='game::render::OUTLINE_THICKNESS constant'>OUTLINE_THICKNESS</a></td><td class='docblock-short'></td></tr></table><h2 id='traits' class='section-header'><a href="#traits">Traits</a></h2>

View File

@ -1 +1 @@
<!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_signal_phase` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, draw_signal_phase"><title>game::render::traffic_signal::draw_signal_phase - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../game/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>game</a>::<wbr><a href='../index.html'>render</a>::<wbr><a href='index.html'>traffic_signal</a></p><script>window.sidebarCurrent = {name: 'draw_signal_phase', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/game/render/traffic_signal.rs.html#11-259' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>game</a>::<wbr><a href='../index.html'>render</a>::<wbr><a href='index.html'>traffic_signal</a>::<wbr><a class="fn" href=''>draw_signal_phase</a></span></h1><pre class='rust fn'>pub fn draw_signal_phase(<br>&nbsp;&nbsp;&nbsp;&nbsp;prerender: &amp;Prerender, <br>&nbsp;&nbsp;&nbsp;&nbsp;phase: &amp;<a class="struct" href="../../../map_model/objects/traffic_signals/struct.Phase.html" title="struct map_model::objects::traffic_signals::Phase">Phase</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;i: <a class="struct" href="../../../map_model/objects/intersection/struct.IntersectionID.html" title="struct map_model::objects::intersection::IntersectionID">IntersectionID</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;time_left: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;batch: &amp;mut GeomBatch, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;signal_style: <a class="enum" href="../../../game/options/enum.TrafficSignalStyle.html" title="enum game::options::TrafficSignalStyle">TrafficSignalStyle</a><br>)</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
<!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_signal_stage` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, draw_signal_stage"><title>game::render::traffic_signal::draw_signal_stage - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../game/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>game</a>::<wbr><a href='../index.html'>render</a>::<wbr><a href='index.html'>traffic_signal</a></p><script>window.sidebarCurrent = {name: 'draw_signal_stage', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/game/render/traffic_signal.rs.html#11-259' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>game</a>::<wbr><a href='../index.html'>render</a>::<wbr><a href='index.html'>traffic_signal</a>::<wbr><a class="fn" href=''>draw_signal_stage</a></span></h1><pre class='rust fn'>pub fn draw_signal_stage(<br>&nbsp;&nbsp;&nbsp;&nbsp;prerender: &amp;Prerender, <br>&nbsp;&nbsp;&nbsp;&nbsp;stage: &amp;<a class="struct" href="../../../map_model/objects/traffic_signals/struct.Stage.html" title="struct map_model::objects::traffic_signals::Stage">Stage</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;i: <a class="struct" href="../../../map_model/objects/intersection/struct.IntersectionID.html" title="struct map_model::objects::intersection::IntersectionID">IntersectionID</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;time_left: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;batch: &amp;mut GeomBatch, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;signal_style: <a class="enum" href="../../../game/options/enum.TrafficSignalStyle.html" title="enum game::options::TrafficSignalStyle">TrafficSignalStyle</a><br>)</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1,2 +1,2 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `traffic_signal` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, traffic_signal"><title>game::render::traffic_signal - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../game/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><p class='location'>Module traffic_signal</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#functions">Functions</a></li></ul></div><p class='location'><a href='../../index.html'>game</a>::<wbr><a href='../index.html'>render</a></p><script>window.sidebarCurrent = {name: 'traffic_signal', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/game/render/traffic_signal.rs.html#1-269' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../../index.html'>game</a>::<wbr><a href='../index.html'>render</a>::<wbr><a class="mod" href=''>traffic_signal</a></span></h1><h2 id='functions' class='section-header'><a href="#functions">Functions</a></h2>
<table><tr class='module-item'><td><a class="fn" href="fn.crosswalk_icon.html" title='game::render::traffic_signal::crosswalk_icon fn'>crosswalk_icon</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.draw_signal_phase.html" title='game::render::traffic_signal::draw_signal_phase fn'>draw_signal_phase</a></td><td class='docblock-short'></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
<table><tr class='module-item'><td><a class="fn" href="fn.crosswalk_icon.html" title='game::render::traffic_signal::crosswalk_icon fn'>crosswalk_icon</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.draw_signal_stage.html" title='game::render::traffic_signal::draw_signal_stage fn'>draw_signal_stage</a></td><td class='docblock-short'></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1 +1 @@
initSidebarItems({"fn":[["crosswalk_icon",""],["draw_signal_phase",""]]});
initSidebarItems({"fn":[["crosswalk_icon",""],["draw_signal_stage",""]]});

View File

@ -1 +1 @@
<!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 `area_under_curve` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, area_under_curve"><title>game::sandbox::speed::area_under_curve - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../game/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>game</a>::<wbr><a href='../index.html'>sandbox</a>::<wbr><a href='index.html'>speed</a></p><script>window.sidebarCurrent = {name: 'area_under_curve', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/game/sandbox/speed.rs.html#751-772' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>game</a>::<wbr><a href='../index.html'>sandbox</a>::<wbr><a href='index.html'>speed</a>::<wbr><a class="fn" href=''>area_under_curve</a></span></h1><pre class='rust fn'>fn area_under_curve(raw: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;, width: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>, height: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -&gt; <a class="struct" href="../../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
<!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 `area_under_curve` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, area_under_curve"><title>game::sandbox::speed::area_under_curve - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../game/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>game</a>::<wbr><a href='../index.html'>sandbox</a>::<wbr><a href='index.html'>speed</a></p><script>window.sidebarCurrent = {name: 'area_under_curve', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/game/sandbox/speed.rs.html#753-774' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>game</a>::<wbr><a href='../index.html'>sandbox</a>::<wbr><a href='index.html'>speed</a>::<wbr><a class="fn" href=''>area_under_curve</a></span></h1><pre class='rust fn'>fn area_under_curve(raw: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;, width: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>, height: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -&gt; <a class="struct" href="../../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1 +1 @@
<!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 `build_jump_to_delay_button` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, build_jump_to_delay_button"><title>game::sandbox::speed::build_jump_to_delay_button - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../game/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>game</a>::<wbr><a href='../index.html'>sandbox</a>::<wbr><a href='index.html'>speed</a></p><script>window.sidebarCurrent = {name: 'build_jump_to_delay_button', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/game/sandbox/speed.rs.html#793-799' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>game</a>::<wbr><a href='../index.html'>sandbox</a>::<wbr><a href='index.html'>speed</a>::<wbr><a class="fn" href=''>build_jump_to_delay_button</a></span></h1><pre class='rust fn'>fn build_jump_to_delay_button(halt_limit: <a class="struct" href="../../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>, ctx: &amp;EventCtx) -&gt; Widget</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
<!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 `build_jump_to_delay_button` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, build_jump_to_delay_button"><title>game::sandbox::speed::build_jump_to_delay_button - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../game/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>game</a>::<wbr><a href='../index.html'>sandbox</a>::<wbr><a href='index.html'>speed</a></p><script>window.sidebarCurrent = {name: 'build_jump_to_delay_button', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/game/sandbox/speed.rs.html#795-801' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>game</a>::<wbr><a href='../index.html'>sandbox</a>::<wbr><a href='index.html'>speed</a>::<wbr><a class="fn" href=''>build_jump_to_delay_button</a></span></h1><pre class='rust fn'>fn build_jump_to_delay_button(halt_limit: <a class="struct" href="../../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>, ctx: &amp;EventCtx) -&gt; Widget</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1 +1 @@
<!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 `build_jump_to_delay_picker` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, build_jump_to_delay_picker"><title>game::sandbox::speed::build_jump_to_delay_picker - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../game/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>game</a>::<wbr><a href='../index.html'>sandbox</a>::<wbr><a href='index.html'>speed</a></p><script>window.sidebarCurrent = {name: 'build_jump_to_delay_picker', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/game/sandbox/speed.rs.html#801-820' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>game</a>::<wbr><a href='../index.html'>sandbox</a>::<wbr><a href='index.html'>speed</a>::<wbr><a class="fn" href=''>build_jump_to_delay_picker</a></span></h1><pre class='rust fn'>fn build_jump_to_delay_picker(halt_limit: <a class="struct" href="../../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>, ctx: &amp;EventCtx) -&gt; Widget</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
<!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 `build_jump_to_delay_picker` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, build_jump_to_delay_picker"><title>game::sandbox::speed::build_jump_to_delay_picker - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../game/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>game</a>::<wbr><a href='../index.html'>sandbox</a>::<wbr><a href='index.html'>speed</a></p><script>window.sidebarCurrent = {name: 'build_jump_to_delay_picker', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/game/sandbox/speed.rs.html#803-822' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>game</a>::<wbr><a href='../index.html'>sandbox</a>::<wbr><a href='index.html'>speed</a>::<wbr><a class="fn" href=''>build_jump_to_delay_picker</a></span></h1><pre class='rust fn'>fn build_jump_to_delay_picker(halt_limit: <a class="struct" href="../../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>, ctx: &amp;EventCtx) -&gt; Widget</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1 +1 @@
<!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 `build_jump_to_time_btn` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, build_jump_to_time_btn"><title>game::sandbox::speed::build_jump_to_time_btn - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../game/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>game</a>::<wbr><a href='../index.html'>sandbox</a>::<wbr><a href='index.html'>speed</a></p><script>window.sidebarCurrent = {name: 'build_jump_to_time_btn', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/game/sandbox/speed.rs.html#785-791' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>game</a>::<wbr><a href='../index.html'>sandbox</a>::<wbr><a href='index.html'>speed</a>::<wbr><a class="fn" href=''>build_jump_to_time_btn</a></span></h1><pre class='rust fn'>fn build_jump_to_time_btn(target: <a class="struct" href="../../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a>, ctx: &amp;EventCtx) -&gt; Widget</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
<!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 `build_jump_to_time_btn` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, build_jump_to_time_btn"><title>game::sandbox::speed::build_jump_to_time_btn - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../game/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>game</a>::<wbr><a href='../index.html'>sandbox</a>::<wbr><a href='index.html'>speed</a></p><script>window.sidebarCurrent = {name: 'build_jump_to_time_btn', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/game/sandbox/speed.rs.html#787-793' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>game</a>::<wbr><a href='../index.html'>sandbox</a>::<wbr><a href='index.html'>speed</a>::<wbr><a class="fn" href=''>build_jump_to_time_btn</a></span></h1><pre class='rust fn'>fn build_jump_to_time_btn(target: <a class="struct" href="../../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a>, ctx: &amp;EventCtx) -&gt; Widget</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1 +1 @@
<!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 `compare_count` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, compare_count"><title>game::sandbox::speed::compare_count - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../game/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>game</a>::<wbr><a href='../index.html'>sandbox</a>::<wbr><a href='index.html'>speed</a></p><script>window.sidebarCurrent = {name: 'compare_count', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/game/sandbox/speed.rs.html#775-783' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>game</a>::<wbr><a href='../index.html'>sandbox</a>::<wbr><a href='index.html'>speed</a>::<wbr><a class="fn" href=''>compare_count</a></span></h1><pre class='rust fn'>fn compare_count(after: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, before: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
<!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 `compare_count` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, compare_count"><title>game::sandbox::speed::compare_count - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../game/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>game</a>::<wbr><a href='../index.html'>sandbox</a>::<wbr><a href='index.html'>speed</a></p><script>window.sidebarCurrent = {name: 'compare_count', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/game/sandbox/speed.rs.html#777-785' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>game</a>::<wbr><a href='../index.html'>sandbox</a>::<wbr><a href='index.html'>speed</a>::<wbr><a class="fn" href=''>compare_count</a></span></h1><pre class='rust fn'>fn compare_count(after: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, before: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

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="API documentation for the Rust `speed` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, speed"><title>game::sandbox::speed - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../game/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><p class='location'>Module speed</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#functions">Functions</a></li></ul></div><p class='location'><a href='../../index.html'>game</a>::<wbr><a href='../index.html'>sandbox</a></p><script>window.sidebarCurrent = {name: 'speed', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/game/sandbox/speed.rs.html#1-820' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../../index.html'>game</a>::<wbr><a href='../index.html'>sandbox</a>::<wbr><a class="mod" href=''>speed</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `speed` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, speed"><title>game::sandbox::speed - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../game/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><p class='location'>Module speed</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#functions">Functions</a></li></ul></div><p class='location'><a href='../../index.html'>game</a>::<wbr><a href='../index.html'>sandbox</a></p><script>window.sidebarCurrent = {name: 'speed', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/game/sandbox/speed.rs.html#1-822' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../../index.html'>game</a>::<wbr><a href='../index.html'>sandbox</a>::<wbr><a class="mod" href=''>speed</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
<table><tr class='module-item'><td><a class="struct" href="struct.JumpToTime.html" title='game::sandbox::speed::JumpToTime struct'>JumpToTime</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.SpeedControls.html" title='game::sandbox::speed::SpeedControls struct'>SpeedControls</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.TimePanel.html" title='game::sandbox::speed::TimePanel struct'>TimePanel</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.TimeWarpScreen.html" title='game::sandbox::speed::TimeWarpScreen struct'>TimeWarpScreen</a></td><td class='docblock-short'></td></tr></table><h2 id='enums' class='section-header'><a href="#enums">Enums</a></h2>
<table><tr class='module-item'><td><a class="enum" href="enum.SpeedSetting.html" title='game::sandbox::speed::SpeedSetting enum'>SpeedSetting</a></td><td class='docblock-short'></td></tr></table><h2 id='functions' class='section-header'><a href="#functions">Functions</a></h2>
<table><tr class='module-item'><td><a class="fn" href="fn.area_under_curve.html" title='game::sandbox::speed::area_under_curve fn'>area_under_curve</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.build_jump_to_delay_button.html" title='game::sandbox::speed::build_jump_to_delay_button fn'>build_jump_to_delay_button</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.build_jump_to_delay_picker.html" title='game::sandbox::speed::build_jump_to_delay_picker fn'>build_jump_to_delay_picker</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.build_jump_to_time_btn.html" title='game::sandbox::speed::build_jump_to_time_btn fn'>build_jump_to_time_btn</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.compare_count.html" title='game::sandbox::speed::compare_count fn'>compare_count</a></td><td class='docblock-short'></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,16 +1,16 @@
<!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 `PhaseType` enum in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, PhaseType"><title>map_model::PhaseType - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../dark.css"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../map_model/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Enum PhaseType</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.Adaptive">Adaptive</a><a href="#variant.Fixed">Fixed</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.simple_duration">simple_duration</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-Deserialize%3C%27de%3E">Deserialize&lt;&#39;de&gt;</a><a href="#impl-PartialEq%3CPhaseType%3E">PartialEq&lt;PhaseType&gt;</a><a href="#impl-Serialize">Serialize</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&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><p class='location'><a href='index.html'>map_model</a></p><script>window.sidebarCurrent = {name: 'PhaseType', ty: 'enum', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../src/map_model/objects/traffic_signals.rs.html#34-40' title='goto source code'>[src]</a></span><span class='in-band'>Enum <a href='index.html'>map_model</a>::<wbr><a class="enum" href=''>PhaseType</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust enum'>pub enum PhaseType {
<!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 `PhaseType` enum in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, PhaseType"><title>map_model::PhaseType - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../dark.css"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../map_model/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Enum PhaseType</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.Adaptive">Adaptive</a><a href="#variant.Fixed">Fixed</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.simple_duration">simple_duration</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-Deserialize%3C%27de%3E">Deserialize&lt;&#39;de&gt;</a><a href="#impl-PartialEq%3CPhaseType%3E">PartialEq&lt;PhaseType&gt;</a><a href="#impl-Serialize">Serialize</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&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><p class='location'><a href='index.html'>map_model</a></p><script>window.sidebarCurrent = {name: 'PhaseType', ty: 'enum', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../src/map_model/objects/traffic_signals.rs.html#36-42' title='goto source code'>[src]</a></span><span class='in-band'>Enum <a href='index.html'>map_model</a>::<wbr><a class="enum" href=''>PhaseType</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust enum'>pub enum PhaseType {
Fixed(<a class="struct" href="../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>),
Adaptive(<a class="struct" href="../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>),
}</pre></div><h2 id='variants' class='variants small-section-header'>
Variants<a href='#variants' class='anchor'></a></h2>
<div id="variant.Fixed" class="variant small-section-header"><a href="#variant.Fixed" class="anchor field"></a><code>Fixed(<a class="struct" href="../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>)</code></div><div id="variant.Adaptive" class="variant small-section-header"><a href="#variant.Adaptive" class="anchor field"></a><code>Adaptive(<a class="struct" href="../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>)</code></div><h2 id='implementations' class='small-section-header'>Implementations<a href='#implementations' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="enum" href="../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../src/map_model/objects/traffic_signals.rs.html#42-49' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.simple_duration' class="method"><code>pub fn <a href='#method.simple_duration' class='fnname'>simple_duration</a>(&amp;self) -&gt; <a class="struct" href="../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a></code><a class='srclink' href='../src/map_model/objects/traffic_signals.rs.html#44-48' title='goto source code'>[src]</a></h4></div><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../src/map_model/objects/traffic_signals.rs.html#33' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class="enum" href="../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a class='srclink' href='../src/map_model/objects/traffic_signals.rs.html#33' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
<div id="variant.Fixed" class="variant small-section-header"><a href="#variant.Fixed" class="anchor field"></a><code>Fixed(<a class="struct" href="../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>)</code></div><div id="variant.Adaptive" class="variant small-section-header"><a href="#variant.Adaptive" class="anchor field"></a><code>Adaptive(<a class="struct" href="../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>)</code></div><h2 id='implementations' class='small-section-header'>Implementations<a href='#implementations' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="enum" href="../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../src/map_model/objects/traffic_signals.rs.html#44-51' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.simple_duration' class="method"><code>pub fn <a href='#method.simple_duration' class='fnname'>simple_duration</a>(&amp;self) -&gt; <a class="struct" href="../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a></code><a class='srclink' href='../src/map_model/objects/traffic_signals.rs.html#46-50' title='goto source code'>[src]</a></h4></div><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../src/map_model/objects/traffic_signals.rs.html#35' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class="enum" href="../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a class='srclink' href='../src/map_model/objects/traffic_signals.rs.html#35' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id='method.clone_from' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self)</code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#131-133' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div><h3 id='impl-Debug' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../src/map_model/objects/traffic_signals.rs.html#33' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../src/map_model/objects/traffic_signals.rs.html#33' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id='impl-Deserialize%3C%27de%3E' class='impl'><code class='in-band'>impl&lt;'de&gt; <a class="trait" href="https://docs.rs/serde/1.0.110/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt; for <a class="enum" href="../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-Deserialize%3C%27de%3E' class='anchor'></a><a class='srclink' href='../src/map_model/objects/traffic_signals.rs.html#33' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.deserialize' class="method hidden"><code>fn <a href='https://docs.rs/serde/1.0.110/serde/de/trait.Deserialize.html#tymethod.deserialize' class='fnname'>deserialize</a>&lt;__D&gt;(__deserializer: __D) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, __D::<a class="type" href="https://docs.rs/serde/1.0.110/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.110/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a>&lt;'de&gt;,&nbsp;</span></code><a class='srclink' href='../src/map_model/objects/traffic_signals.rs.html#33' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.110/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
</div></div><h3 id='impl-PartialEq%3CPhaseType%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="enum" href="../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a>&gt; for <a class="enum" href="../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-PartialEq%3CPhaseType%3E' class='anchor'></a><a class='srclink' href='../src/map_model/objects/traffic_signals.rs.html#33' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;<a class="enum" href="../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/map_model/objects/traffic_signals.rs.html#33' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: &amp;<a class="enum" href="../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/map_model/objects/traffic_signals.rs.html#33' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-Serialize' class='impl'><code class='in-band'>impl <a class="trait" href="https://docs.rs/serde/1.0.110/serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a> for <a class="enum" href="../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-Serialize' class='anchor'></a><a class='srclink' href='../src/map_model/objects/traffic_signals.rs.html#33' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.serialize' class="method hidden"><code>fn <a href='https://docs.rs/serde/1.0.110/serde/ser/trait.Serialize.html#tymethod.serialize' class='fnname'>serialize</a>&lt;__S&gt;(&amp;self, __serializer: __S) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;__S::<a class="type" href="https://docs.rs/serde/1.0.110/serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, __S::<a class="type" href="https://docs.rs/serde/1.0.110/serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__S: <a class="trait" href="https://docs.rs/serde/1.0.110/serde/ser/trait.Serializer.html" title="trait serde::ser::Serializer">Serializer</a>,&nbsp;</span></code><a class='srclink' href='../src/map_model/objects/traffic_signals.rs.html#33' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Serialize this value into the given Serde serializer. <a href="https://docs.rs/serde/1.0.110/serde/ser/trait.Serialize.html#tymethod.serialize">Read more</a></p>
</div></div><h3 id='impl-StructuralPartialEq' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="enum" href="../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-StructuralPartialEq' class='anchor'></a><a class='srclink' href='../src/map_model/objects/traffic_signals.rs.html#33' title='goto source code'>[src]</a></h3><div class='impl-items'></div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Send' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-Any' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id='impl-Debug' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../src/map_model/objects/traffic_signals.rs.html#35' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../src/map_model/objects/traffic_signals.rs.html#35' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id='impl-Deserialize%3C%27de%3E' class='impl'><code class='in-band'>impl&lt;'de&gt; <a class="trait" href="https://docs.rs/serde/1.0.110/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt; for <a class="enum" href="../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-Deserialize%3C%27de%3E' class='anchor'></a><a class='srclink' href='../src/map_model/objects/traffic_signals.rs.html#35' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.deserialize' class="method hidden"><code>fn <a href='https://docs.rs/serde/1.0.110/serde/de/trait.Deserialize.html#tymethod.deserialize' class='fnname'>deserialize</a>&lt;__D&gt;(__deserializer: __D) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, __D::<a class="type" href="https://docs.rs/serde/1.0.110/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.110/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a>&lt;'de&gt;,&nbsp;</span></code><a class='srclink' href='../src/map_model/objects/traffic_signals.rs.html#35' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.110/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
</div></div><h3 id='impl-PartialEq%3CPhaseType%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="enum" href="../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a>&gt; for <a class="enum" href="../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-PartialEq%3CPhaseType%3E' class='anchor'></a><a class='srclink' href='../src/map_model/objects/traffic_signals.rs.html#35' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;<a class="enum" href="../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/map_model/objects/traffic_signals.rs.html#35' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: &amp;<a class="enum" href="../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/map_model/objects/traffic_signals.rs.html#35' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-Serialize' class='impl'><code class='in-band'>impl <a class="trait" href="https://docs.rs/serde/1.0.110/serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a> for <a class="enum" href="../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-Serialize' class='anchor'></a><a class='srclink' href='../src/map_model/objects/traffic_signals.rs.html#35' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.serialize' class="method hidden"><code>fn <a href='https://docs.rs/serde/1.0.110/serde/ser/trait.Serialize.html#tymethod.serialize' class='fnname'>serialize</a>&lt;__S&gt;(&amp;self, __serializer: __S) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;__S::<a class="type" href="https://docs.rs/serde/1.0.110/serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, __S::<a class="type" href="https://docs.rs/serde/1.0.110/serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__S: <a class="trait" href="https://docs.rs/serde/1.0.110/serde/ser/trait.Serializer.html" title="trait serde::ser::Serializer">Serializer</a>,&nbsp;</span></code><a class='srclink' href='../src/map_model/objects/traffic_signals.rs.html#35' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Serialize this value into the given Serde serializer. <a href="https://docs.rs/serde/1.0.110/serde/ser/trait.Serialize.html#tymethod.serialize">Read more</a></p>
</div></div><h3 id='impl-StructuralPartialEq' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="enum" href="../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-StructuralPartialEq' class='anchor'></a><a class='srclink' href='../src/map_model/objects/traffic_signals.rs.html#35' title='goto source code'>[src]</a></h3><div class='impl-items'></div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Send' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-Any' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213-217' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214-216' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id='impl-BorrowMut%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-BorrowMut%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#220-224' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#221-223' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></div><h3 id='impl-DeserializeOwned' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://docs.rs/serde/1.0.110/serde/de/trait.DeserializeOwned.html" title="trait serde::de::DeserializeOwned">DeserializeOwned</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: for&lt;'de&gt; <a class="trait" href="https://docs.rs/serde/1.0.110/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt;,&nbsp;</span></code><a href='#impl-DeserializeOwned' class='anchor'></a><a class='srclink' href='https://docs.rs/serde/1.0.110/src/serde/de/mod.rs.html#604' title='goto source code'>[src]</a></h3><div class='impl-items'></div><h3 id='impl-From%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</code><a href='#impl-From%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#566-570' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(t: T) -&gt; T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#567-569' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
<!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 `expand_all_phases` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, expand_all_phases"><title>map_model::make::traffic_signals::expand_all_phases - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_model/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>make</a>::<wbr><a href='index.html'>traffic_signals</a></p><script>window.sidebarCurrent = {name: 'expand_all_phases', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/map_model/make/traffic_signals.rs.html#351-359' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>make</a>::<wbr><a href='index.html'>traffic_signals</a>::<wbr><a class="fn" href=''>expand_all_phases</a></span></h1><pre class='rust fn'>fn expand_all_phases(ts: &amp;mut <a class="struct" href="../../../map_model/struct.ControlTrafficSignal.html" title="struct map_model::ControlTrafficSignal">ControlTrafficSignal</a>)</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_model";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
<!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 `expand_all_stages` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, expand_all_stages"><title>map_model::make::traffic_signals::expand_all_stages - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_model/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>make</a>::<wbr><a href='index.html'>traffic_signals</a></p><script>window.sidebarCurrent = {name: 'expand_all_stages', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/map_model/make/traffic_signals.rs.html#351-359' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>make</a>::<wbr><a href='index.html'>traffic_signals</a>::<wbr><a class="fn" href=''>expand_all_stages</a></span></h1><pre class='rust fn'>fn expand_all_stages(ts: &amp;mut <a class="struct" href="../../../map_model/struct.ControlTrafficSignal.html" title="struct map_model::ControlTrafficSignal">ControlTrafficSignal</a>)</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_model";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1 +1 @@
<!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 `four_way_four_phase` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, four_way_four_phase"><title>map_model::make::traffic_signals::four_way_four_phase - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_model/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>make</a>::<wbr><a href='index.html'>traffic_signals</a></p><script>window.sidebarCurrent = {name: 'four_way_four_phase', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/map_model/make/traffic_signals.rs.html#188-220' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>make</a>::<wbr><a href='index.html'>traffic_signals</a>::<wbr><a class="fn" href=''>four_way_four_phase</a></span></h1><pre class='rust fn'>fn four_way_four_phase(<br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;i: <a class="struct" href="../../../map_model/struct.IntersectionID.html" title="struct map_model::IntersectionID">IntersectionID</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../../map_model/struct.ControlTrafficSignal.html" title="struct map_model::ControlTrafficSignal">ControlTrafficSignal</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_model";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
<!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 `four_way_four_stage` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, four_way_four_stage"><title>map_model::make::traffic_signals::four_way_four_stage - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_model/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>make</a>::<wbr><a href='index.html'>traffic_signals</a></p><script>window.sidebarCurrent = {name: 'four_way_four_stage', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/map_model/make/traffic_signals.rs.html#188-220' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>make</a>::<wbr><a href='index.html'>traffic_signals</a>::<wbr><a class="fn" href=''>four_way_four_stage</a></span></h1><pre class='rust fn'>fn four_way_four_stage(<br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;i: <a class="struct" href="../../../map_model/struct.IntersectionID.html" title="struct map_model::IntersectionID">IntersectionID</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../../map_model/struct.ControlTrafficSignal.html" title="struct map_model::ControlTrafficSignal">ControlTrafficSignal</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_model";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1 +1 @@
<!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 `four_way_two_phase` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, four_way_two_phase"><title>map_model::make::traffic_signals::four_way_two_phase - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_model/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>make</a>::<wbr><a href='index.html'>traffic_signals</a></p><script>window.sidebarCurrent = {name: 'four_way_two_phase', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/map_model/make/traffic_signals.rs.html#222-253' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>make</a>::<wbr><a href='index.html'>traffic_signals</a>::<wbr><a class="fn" href=''>four_way_two_phase</a></span></h1><pre class='rust fn'>fn four_way_two_phase(<br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;i: <a class="struct" href="../../../map_model/struct.IntersectionID.html" title="struct map_model::IntersectionID">IntersectionID</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../../map_model/struct.ControlTrafficSignal.html" title="struct map_model::ControlTrafficSignal">ControlTrafficSignal</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_model";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
<!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 `four_way_two_stage` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, four_way_two_stage"><title>map_model::make::traffic_signals::four_way_two_stage - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_model/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>make</a>::<wbr><a href='index.html'>traffic_signals</a></p><script>window.sidebarCurrent = {name: 'four_way_two_stage', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/map_model/make/traffic_signals.rs.html#222-253' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>make</a>::<wbr><a href='index.html'>traffic_signals</a>::<wbr><a class="fn" href=''>four_way_two_stage</a></span></h1><pre class='rust fn'>fn four_way_two_stage(<br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;i: <a class="struct" href="../../../map_model/struct.IntersectionID.html" title="struct map_model::IntersectionID">IntersectionID</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../../map_model/struct.ControlTrafficSignal.html" title="struct map_model::ControlTrafficSignal">ControlTrafficSignal</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_model";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1 +1 @@
<!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 `make_phases` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, make_phases"><title>map_model::make::traffic_signals::make_phases - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_model/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>make</a>::<wbr><a href='index.html'>traffic_signals</a></p><script>window.sidebarCurrent = {name: 'make_phases', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/map_model/make/traffic_signals.rs.html#364-427' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>make</a>::<wbr><a href='index.html'>traffic_signals</a>::<wbr><a class="fn" href=''>make_phases</a></span></h1><pre class='rust fn'>fn make_phases(<br>&nbsp;&nbsp;&nbsp;&nbsp;ts: &amp;mut <a class="struct" href="../../../map_model/struct.ControlTrafficSignal.html" title="struct map_model::ControlTrafficSignal">ControlTrafficSignal</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;phase_specs: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../../map_model/struct.RoadID.html" title="struct map_model::RoadID">RoadID</a>&gt;, <a class="enum" href="../../../map_model/enum.TurnType.html" title="enum map_model::TurnType">TurnType</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;&gt;<br>)</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_model";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
<!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 `make_stages` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, make_stages"><title>map_model::make::traffic_signals::make_stages - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_model/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>make</a>::<wbr><a href='index.html'>traffic_signals</a></p><script>window.sidebarCurrent = {name: 'make_stages', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/map_model/make/traffic_signals.rs.html#364-427' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>make</a>::<wbr><a href='index.html'>traffic_signals</a>::<wbr><a class="fn" href=''>make_stages</a></span></h1><pre class='rust fn'>fn make_stages(<br>&nbsp;&nbsp;&nbsp;&nbsp;ts: &amp;mut <a class="struct" href="../../../map_model/struct.ControlTrafficSignal.html" title="struct map_model::ControlTrafficSignal">ControlTrafficSignal</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;stage_specs: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../../map_model/struct.RoadID.html" title="struct map_model::RoadID">RoadID</a>&gt;, <a class="enum" href="../../../map_model/enum.TurnType.html" title="enum map_model::TurnType">TurnType</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;&gt;<br>)</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_model";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1 +1 @@
<!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 `phase_per_road` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, phase_per_road"><title>map_model::make::traffic_signals::phase_per_road - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_model/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>make</a>::<wbr><a href='index.html'>traffic_signals</a></p><script>window.sidebarCurrent = {name: 'phase_per_road', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/map_model/make/traffic_signals.rs.html#321-348' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>make</a>::<wbr><a href='index.html'>traffic_signals</a>::<wbr><a class="fn" href=''>phase_per_road</a></span></h1><pre class='rust fn'>fn phase_per_road(map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, i: <a class="struct" href="../../../map_model/struct.IntersectionID.html" title="struct map_model::IntersectionID">IntersectionID</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../../map_model/struct.ControlTrafficSignal.html" title="struct map_model::ControlTrafficSignal">ControlTrafficSignal</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_model";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
<!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 `stage_per_road` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, stage_per_road"><title>map_model::make::traffic_signals::stage_per_road - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_model/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>make</a>::<wbr><a href='index.html'>traffic_signals</a></p><script>window.sidebarCurrent = {name: 'stage_per_road', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/map_model/make/traffic_signals.rs.html#321-348' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>make</a>::<wbr><a href='index.html'>traffic_signals</a>::<wbr><a class="fn" href=''>stage_per_road</a></span></h1><pre class='rust fn'>fn stage_per_road(map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, i: <a class="struct" href="../../../map_model/struct.IntersectionID.html" title="struct map_model::IntersectionID">IntersectionID</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../../map_model/struct.ControlTrafficSignal.html" title="struct map_model::ControlTrafficSignal">ControlTrafficSignal</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_model";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

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="API documentation for the Rust `traffic_signals` mod in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, traffic_signals"><title>map_model::make::traffic_signals - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_model/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><p class='location'>Module traffic_signals</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#constants">Constants</a></li><li><a href="#functions">Functions</a></li></ul></div><p class='location'><a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>make</a></p><script>window.sidebarCurrent = {name: 'traffic_signals', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/map_model/make/traffic_signals.rs.html#1-547' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>make</a>::<wbr><a class="mod" href=''>traffic_signals</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
<table><tr class='module-item'><td><a class="struct" href="struct.Partition.html" title='map_model::make::traffic_signals::Partition struct'>Partition</a></td><td class='docblock-short'></td></tr></table><h2 id='constants' class='section-header'><a href="#constants">Constants</a></h2>
<table><tr class='module-item'><td><a class="constant" href="constant.PROTECTED.html" title='map_model::make::traffic_signals::PROTECTED constant'>PROTECTED</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="constant" href="constant.YIELD.html" title='map_model::make::traffic_signals::YIELD constant'>YIELD</a></td><td class='docblock-short'></td></tr></table><h2 id='functions' class='section-header'><a href="#functions">Functions</a></h2>
<table><tr class='module-item'><td><a class="fn" href="fn.all_walk_all_yield.html" title='map_model::make::traffic_signals::all_walk_all_yield fn'>all_walk_all_yield</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.brute_force.html" title='map_model::make::traffic_signals::brute_force fn'>brute_force</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.degenerate.html" title='map_model::make::traffic_signals::degenerate fn'>degenerate</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.expand_all_phases.html" title='map_model::make::traffic_signals::expand_all_phases fn'>expand_all_phases</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.four_oneways.html" title='map_model::make::traffic_signals::four_oneways fn'>four_oneways</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.four_way_four_phase.html" title='map_model::make::traffic_signals::four_way_four_phase fn'>four_way_four_phase</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.four_way_two_phase.html" title='map_model::make::traffic_signals::four_way_two_phase fn'>four_way_two_phase</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.get_possible_policies.html" title='map_model::make::traffic_signals::get_possible_policies fn'>get_possible_policies</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.greedy_assignment.html" title='map_model::make::traffic_signals::greedy_assignment fn'>greedy_assignment</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.half_signal.html" title='map_model::make::traffic_signals::half_signal fn'>half_signal</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.helper.html" title='map_model::make::traffic_signals::helper fn'>helper</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.make_phases.html" title='map_model::make::traffic_signals::make_phases fn'>make_phases</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.new.html" title='map_model::make::traffic_signals::new fn'>new</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.okay_partition.html" title='map_model::make::traffic_signals::okay_partition fn'>okay_partition</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.phase_per_road.html" title='map_model::make::traffic_signals::phase_per_road fn'>phase_per_road</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.synchronize.html" title='map_model::make::traffic_signals::synchronize fn'>synchronize</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.three_way.html" title='map_model::make::traffic_signals::three_way fn'>three_way</a></td><td class='docblock-short'></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_model";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
<table><tr class='module-item'><td><a class="fn" href="fn.all_walk_all_yield.html" title='map_model::make::traffic_signals::all_walk_all_yield fn'>all_walk_all_yield</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.brute_force.html" title='map_model::make::traffic_signals::brute_force fn'>brute_force</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.degenerate.html" title='map_model::make::traffic_signals::degenerate fn'>degenerate</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.expand_all_stages.html" title='map_model::make::traffic_signals::expand_all_stages fn'>expand_all_stages</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.four_oneways.html" title='map_model::make::traffic_signals::four_oneways fn'>four_oneways</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.four_way_four_stage.html" title='map_model::make::traffic_signals::four_way_four_stage fn'>four_way_four_stage</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.four_way_two_stage.html" title='map_model::make::traffic_signals::four_way_two_stage fn'>four_way_two_stage</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.get_possible_policies.html" title='map_model::make::traffic_signals::get_possible_policies fn'>get_possible_policies</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.greedy_assignment.html" title='map_model::make::traffic_signals::greedy_assignment fn'>greedy_assignment</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.half_signal.html" title='map_model::make::traffic_signals::half_signal fn'>half_signal</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.helper.html" title='map_model::make::traffic_signals::helper fn'>helper</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.make_stages.html" title='map_model::make::traffic_signals::make_stages fn'>make_stages</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.new.html" title='map_model::make::traffic_signals::new fn'>new</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.okay_partition.html" title='map_model::make::traffic_signals::okay_partition fn'>okay_partition</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.stage_per_road.html" title='map_model::make::traffic_signals::stage_per_road fn'>stage_per_road</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.synchronize.html" title='map_model::make::traffic_signals::synchronize fn'>synchronize</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.three_way.html" title='map_model::make::traffic_signals::three_way fn'>three_way</a></td><td class='docblock-short'></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_model";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1 +1 @@
initSidebarItems({"constant":[["PROTECTED",""],["YIELD",""]],"fn":[["all_walk_all_yield",""],["brute_force",""],["degenerate",""],["expand_all_phases",""],["four_oneways",""],["four_way_four_phase",""],["four_way_two_phase",""],["get_possible_policies",""],["greedy_assignment",""],["half_signal",""],["helper",""],["make_phases",""],["new",""],["okay_partition",""],["phase_per_road",""],["synchronize",""],["three_way",""]],"struct":[["Partition",""]]});
initSidebarItems({"constant":[["PROTECTED",""],["YIELD",""]],"fn":[["all_walk_all_yield",""],["brute_force",""],["degenerate",""],["expand_all_stages",""],["four_oneways",""],["four_way_four_stage",""],["four_way_two_stage",""],["get_possible_policies",""],["greedy_assignment",""],["half_signal",""],["helper",""],["make_stages",""],["new",""],["okay_partition",""],["stage_per_road",""],["synchronize",""],["three_way",""]],"struct":[["Partition",""]]});

View File

@ -1,16 +1,16 @@
<!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 `PhaseType` enum in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, PhaseType"><title>map_model::objects::traffic_signals::PhaseType - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_model/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><p class='location'>Enum PhaseType</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.Adaptive">Adaptive</a><a href="#variant.Fixed">Fixed</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.simple_duration">simple_duration</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-Deserialize%3C%27de%3E">Deserialize&lt;&#39;de&gt;</a><a href="#impl-PartialEq%3CPhaseType%3E">PartialEq&lt;PhaseType&gt;</a><a href="#impl-Serialize">Serialize</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&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><p class='location'><a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>objects</a>::<wbr><a href='index.html'>traffic_signals</a></p><script>window.sidebarCurrent = {name: 'PhaseType', ty: 'enum', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#34-40' title='goto source code'>[src]</a></span><span class='in-band'>Enum <a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>objects</a>::<wbr><a href='index.html'>traffic_signals</a>::<wbr><a class="enum" href=''>PhaseType</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust enum'>pub enum PhaseType {
<!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 `PhaseType` enum in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, PhaseType"><title>map_model::objects::traffic_signals::PhaseType - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_model/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><p class='location'>Enum PhaseType</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.Adaptive">Adaptive</a><a href="#variant.Fixed">Fixed</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.simple_duration">simple_duration</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-Deserialize%3C%27de%3E">Deserialize&lt;&#39;de&gt;</a><a href="#impl-PartialEq%3CPhaseType%3E">PartialEq&lt;PhaseType&gt;</a><a href="#impl-Serialize">Serialize</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&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><p class='location'><a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>objects</a>::<wbr><a href='index.html'>traffic_signals</a></p><script>window.sidebarCurrent = {name: 'PhaseType', ty: 'enum', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#36-42' title='goto source code'>[src]</a></span><span class='in-band'>Enum <a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>objects</a>::<wbr><a href='index.html'>traffic_signals</a>::<wbr><a class="enum" href=''>PhaseType</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust enum'>pub enum PhaseType {
Fixed(<a class="struct" href="../../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>),
Adaptive(<a class="struct" href="../../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>),
}</pre></div><h2 id='variants' class='variants small-section-header'>
Variants<a href='#variants' class='anchor'></a></h2>
<div id="variant.Fixed" class="variant small-section-header"><a href="#variant.Fixed" class="anchor field"></a><code>Fixed(<a class="struct" href="../../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>)</code></div><div id="variant.Adaptive" class="variant small-section-header"><a href="#variant.Adaptive" class="anchor field"></a><code>Adaptive(<a class="struct" href="../../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>)</code></div><h2 id='implementations' class='small-section-header'>Implementations<a href='#implementations' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="enum" href="../../../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#42-49' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.simple_duration' class="method"><code>pub fn <a href='#method.simple_duration' class='fnname'>simple_duration</a>(&amp;self) -&gt; <a class="struct" href="../../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a></code><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#44-48' title='goto source code'>[src]</a></h4></div><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="../../../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#33' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class="enum" href="../../../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#33' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
<div id="variant.Fixed" class="variant small-section-header"><a href="#variant.Fixed" class="anchor field"></a><code>Fixed(<a class="struct" href="../../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>)</code></div><div id="variant.Adaptive" class="variant small-section-header"><a href="#variant.Adaptive" class="anchor field"></a><code>Adaptive(<a class="struct" href="../../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>)</code></div><h2 id='implementations' class='small-section-header'>Implementations<a href='#implementations' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="enum" href="../../../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#44-51' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.simple_duration' class="method"><code>pub fn <a href='#method.simple_duration' class='fnname'>simple_duration</a>(&amp;self) -&gt; <a class="struct" href="../../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a></code><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#46-50' title='goto source code'>[src]</a></h4></div><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="../../../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#35' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class="enum" href="../../../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#35' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id='method.clone_from' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self)</code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#131-133' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div><h3 id='impl-Debug' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../../../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#33' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#33' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id='impl-Deserialize%3C%27de%3E' class='impl'><code class='in-band'>impl&lt;'de&gt; <a class="trait" href="https://docs.rs/serde/1.0.110/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt; for <a class="enum" href="../../../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-Deserialize%3C%27de%3E' class='anchor'></a><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#33' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.deserialize' class="method hidden"><code>fn <a href='https://docs.rs/serde/1.0.110/serde/de/trait.Deserialize.html#tymethod.deserialize' class='fnname'>deserialize</a>&lt;__D&gt;(__deserializer: __D) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, __D::<a class="type" href="https://docs.rs/serde/1.0.110/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.110/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a>&lt;'de&gt;,&nbsp;</span></code><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#33' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.110/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
</div></div><h3 id='impl-PartialEq%3CPhaseType%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="enum" href="../../../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a>&gt; for <a class="enum" href="../../../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-PartialEq%3CPhaseType%3E' class='anchor'></a><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#33' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;<a class="enum" href="../../../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#33' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: &amp;<a class="enum" href="../../../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#33' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-Serialize' class='impl'><code class='in-band'>impl <a class="trait" href="https://docs.rs/serde/1.0.110/serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a> for <a class="enum" href="../../../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-Serialize' class='anchor'></a><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#33' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.serialize' class="method hidden"><code>fn <a href='https://docs.rs/serde/1.0.110/serde/ser/trait.Serialize.html#tymethod.serialize' class='fnname'>serialize</a>&lt;__S&gt;(&amp;self, __serializer: __S) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;__S::<a class="type" href="https://docs.rs/serde/1.0.110/serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, __S::<a class="type" href="https://docs.rs/serde/1.0.110/serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__S: <a class="trait" href="https://docs.rs/serde/1.0.110/serde/ser/trait.Serializer.html" title="trait serde::ser::Serializer">Serializer</a>,&nbsp;</span></code><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#33' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Serialize this value into the given Serde serializer. <a href="https://docs.rs/serde/1.0.110/serde/ser/trait.Serialize.html#tymethod.serialize">Read more</a></p>
</div></div><h3 id='impl-StructuralPartialEq' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="enum" href="../../../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-StructuralPartialEq' class='anchor'></a><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#33' title='goto source code'>[src]</a></h3><div class='impl-items'></div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="../../../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Send' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="../../../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="../../../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="../../../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="../../../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-Any' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id='impl-Debug' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../../../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#35' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#35' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id='impl-Deserialize%3C%27de%3E' class='impl'><code class='in-band'>impl&lt;'de&gt; <a class="trait" href="https://docs.rs/serde/1.0.110/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt; for <a class="enum" href="../../../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-Deserialize%3C%27de%3E' class='anchor'></a><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#35' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.deserialize' class="method hidden"><code>fn <a href='https://docs.rs/serde/1.0.110/serde/de/trait.Deserialize.html#tymethod.deserialize' class='fnname'>deserialize</a>&lt;__D&gt;(__deserializer: __D) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, __D::<a class="type" href="https://docs.rs/serde/1.0.110/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.110/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a>&lt;'de&gt;,&nbsp;</span></code><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#35' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.110/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
</div></div><h3 id='impl-PartialEq%3CPhaseType%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="enum" href="../../../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a>&gt; for <a class="enum" href="../../../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-PartialEq%3CPhaseType%3E' class='anchor'></a><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#35' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;<a class="enum" href="../../../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#35' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: &amp;<a class="enum" href="../../../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#35' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-Serialize' class='impl'><code class='in-band'>impl <a class="trait" href="https://docs.rs/serde/1.0.110/serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a> for <a class="enum" href="../../../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-Serialize' class='anchor'></a><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#35' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.serialize' class="method hidden"><code>fn <a href='https://docs.rs/serde/1.0.110/serde/ser/trait.Serialize.html#tymethod.serialize' class='fnname'>serialize</a>&lt;__S&gt;(&amp;self, __serializer: __S) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;__S::<a class="type" href="https://docs.rs/serde/1.0.110/serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, __S::<a class="type" href="https://docs.rs/serde/1.0.110/serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__S: <a class="trait" href="https://docs.rs/serde/1.0.110/serde/ser/trait.Serializer.html" title="trait serde::ser::Serializer">Serializer</a>,&nbsp;</span></code><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#35' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Serialize this value into the given Serde serializer. <a href="https://docs.rs/serde/1.0.110/serde/ser/trait.Serialize.html#tymethod.serialize">Read more</a></p>
</div></div><h3 id='impl-StructuralPartialEq' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="enum" href="../../../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-StructuralPartialEq' class='anchor'></a><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#35' title='goto source code'>[src]</a></h3><div class='impl-items'></div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="../../../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Send' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="../../../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="../../../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="../../../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="../../../map_model/enum.PhaseType.html" title="enum map_model::PhaseType">PhaseType</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-Any' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213-217' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214-216' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id='impl-BorrowMut%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-BorrowMut%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#220-224' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#221-223' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></div><h3 id='impl-DeserializeOwned' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://docs.rs/serde/1.0.110/serde/de/trait.DeserializeOwned.html" title="trait serde::de::DeserializeOwned">DeserializeOwned</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: for&lt;'de&gt; <a class="trait" href="https://docs.rs/serde/1.0.110/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt;,&nbsp;</span></code><a href='#impl-DeserializeOwned' class='anchor'></a><a class='srclink' href='https://docs.rs/serde/1.0.110/src/serde/de/mod.rs.html#604' title='goto source code'>[src]</a></h3><div class='impl-items'></div><h3 id='impl-From%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</code><a href='#impl-From%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#566-570' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(t: T) -&gt; T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#567-569' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>

View File

@ -1 +1 @@
<!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 `export_turn_group` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, export_turn_group"><title>map_model::objects::traffic_signals::export_turn_group - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_model/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>objects</a>::<wbr><a href='index.html'>traffic_signals</a></p><script>window.sidebarCurrent = {name: 'export_turn_group', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#341-361' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>objects</a>::<wbr><a href='index.html'>traffic_signals</a>::<wbr><a class="fn" href=''>export_turn_group</a></span></h1><pre class='rust fn'>fn export_turn_group(id: &amp;<a class="struct" href="../../../map_model/struct.TurnGroupID.html" title="struct map_model::TurnGroupID">TurnGroupID</a>, map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -&gt; Turn</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_model";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
<!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 `export_turn_group` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, export_turn_group"><title>map_model::objects::traffic_signals::export_turn_group - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_model/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>objects</a>::<wbr><a href='index.html'>traffic_signals</a></p><script>window.sidebarCurrent = {name: 'export_turn_group', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#343-363' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>objects</a>::<wbr><a href='index.html'>traffic_signals</a>::<wbr><a class="fn" href=''>export_turn_group</a></span></h1><pre class='rust fn'>fn export_turn_group(id: &amp;<a class="struct" href="../../../map_model/struct.TurnGroupID.html" title="struct map_model::TurnGroupID">TurnGroupID</a>, map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -&gt; Turn</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_model";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1 +1 @@
<!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_r` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, find_r"><title>map_model::objects::traffic_signals::find_r - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_model/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>objects</a>::<wbr><a href='index.html'>traffic_signals</a></p><script>window.sidebarCurrent = {name: 'find_r', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#374-388' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>objects</a>::<wbr><a href='index.html'>traffic_signals</a>::<wbr><a class="fn" href=''>find_r</a></span></h1><pre class='rust fn'>fn find_r(id: DirectedRoad, map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../../map_model/struct.DirectedRoadID.html" title="struct map_model::DirectedRoadID">DirectedRoadID</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_model";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
<!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_r` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, find_r"><title>map_model::objects::traffic_signals::find_r - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_model/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>objects</a>::<wbr><a href='index.html'>traffic_signals</a></p><script>window.sidebarCurrent = {name: 'find_r', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#376-390' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>objects</a>::<wbr><a href='index.html'>traffic_signals</a>::<wbr><a class="fn" href=''>find_r</a></span></h1><pre class='rust fn'>fn find_r(id: DirectedRoad, map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../../map_model/struct.DirectedRoadID.html" title="struct map_model::DirectedRoadID">DirectedRoadID</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_model";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `import_turn_group` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, import_turn_group"><title>map_model::objects::traffic_signals::import_turn_group - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_model/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>objects</a>::<wbr><a href='index.html'>traffic_signals</a></p><script>window.sidebarCurrent = {name: 'import_turn_group', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#363-372' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>objects</a>::<wbr><a href='index.html'>traffic_signals</a>::<wbr><a class="fn" href=''>import_turn_group</a></span></h1><pre class='rust fn'>fn import_turn_group(id: Turn, map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../../map_model/struct.TurnGroupID.html" title="struct map_model::TurnGroupID">TurnGroupID</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_model";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `import_turn_group` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, import_turn_group"><title>map_model::objects::traffic_signals::import_turn_group - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_model/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>objects</a>::<wbr><a href='index.html'>traffic_signals</a></p><script>window.sidebarCurrent = {name: 'import_turn_group', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#365-374' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>objects</a>::<wbr><a href='index.html'>traffic_signals</a>::<wbr><a class="fn" href=''>import_turn_group</a></span></h1><pre class='rust fn'>fn import_turn_group(id: Turn, map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../../map_model/struct.TurnGroupID.html" title="struct map_model::TurnGroupID">TurnGroupID</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_model";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

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="API documentation for the Rust `traffic_signals` mod in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, traffic_signals"><title>map_model::objects::traffic_signals - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_model/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><p class='location'>Module traffic_signals</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#functions">Functions</a></li></ul></div><p class='location'><a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>objects</a></p><script>window.sidebarCurrent = {name: 'traffic_signals', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#1-388' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>objects</a>::<wbr><a class="mod" href=''>traffic_signals</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
<table><tr class='module-item'><td><a class="struct" href="struct.ControlTrafficSignal.html" title='map_model::objects::traffic_signals::ControlTrafficSignal struct'>ControlTrafficSignal</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Phase.html" title='map_model::objects::traffic_signals::Phase struct'>Phase</a></td><td class='docblock-short'></td></tr></table><h2 id='enums' class='section-header'><a href="#enums">Enums</a></h2>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `traffic_signals` mod in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, traffic_signals"><title>map_model::objects::traffic_signals - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_model/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><p class='location'>Module traffic_signals</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#functions">Functions</a></li></ul></div><p class='location'><a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>objects</a></p><script>window.sidebarCurrent = {name: 'traffic_signals', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/map_model/objects/traffic_signals.rs.html#1-390' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../../index.html'>map_model</a>::<wbr><a href='../index.html'>objects</a>::<wbr><a class="mod" href=''>traffic_signals</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
<table><tr class='module-item'><td><a class="struct" href="struct.ControlTrafficSignal.html" title='map_model::objects::traffic_signals::ControlTrafficSignal struct'>ControlTrafficSignal</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Stage.html" title='map_model::objects::traffic_signals::Stage struct'>Stage</a></td><td class='docblock-short'></td></tr></table><h2 id='enums' class='section-header'><a href="#enums">Enums</a></h2>
<table><tr class='module-item'><td><a class="enum" href="enum.PhaseType.html" title='map_model::objects::traffic_signals::PhaseType enum'>PhaseType</a></td><td class='docblock-short'></td></tr></table><h2 id='functions' class='section-header'><a href="#functions">Functions</a></h2>
<table><tr class='module-item'><td><a class="fn" href="fn.export_turn_group.html" title='map_model::objects::traffic_signals::export_turn_group fn'>export_turn_group</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.find_r.html" title='map_model::objects::traffic_signals::find_r fn'>find_r</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.import_turn_group.html" title='map_model::objects::traffic_signals::import_turn_group fn'>import_turn_group</a></td><td class='docblock-short'></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_model";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1 +1 @@
initSidebarItems({"enum":[["PhaseType",""]],"fn":[["export_turn_group",""],["find_r",""],["import_turn_group",""]],"struct":[["ControlTrafficSignal",""],["Phase",""]]});
initSidebarItems({"enum":[["PhaseType",""]],"fn":[["export_turn_group",""],["find_r",""],["import_turn_group",""]],"struct":[["ControlTrafficSignal",""],["Stage",""]]});

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
initSidebarItems({"constant":[["NORMAL_LANE_THICKNESS",""],["PARKING_LOT_SPOT_LENGTH",""],["PARKING_SPOT_LENGTH",""],["SHOULDER_THICKNESS",""],["SIDEWALK_THICKNESS",""]],"enum":[["AreaType",""],["BuildingType",""],["Direction",""],["EditCmd",""],["EditIntersection",""],["IntersectionType",""],["LaneType",""],["OffstreetParking",""],["PathConstraints",""],["PathStep",""],["PhaseType",""],["Traversable",""],["TurnPriority",""],["TurnType",""]],"mod":[["city",""],["connectivity",""],["edits",""],["make",""],["map",""],["objects",""],["osm",""],["pathfind",""],["raw",""],["traversable",""]],"struct":[["AccessRestrictions",""],["Area",""],["AreaID",""],["Building",""],["BuildingID",""],["BusRoute",""],["BusRouteID",""],["BusStop",""],["BusStopID",""],["City",""],["CompressedTurnGroupID",""],["ControlStopSign",""],["ControlTrafficSignal",""],["DirectedRoadID",""],["EditEffects",""],["EditRoad",""],["Intersection",""],["IntersectionCluster",""],["IntersectionID",""],["Lane",""],["LaneID",""],["Map",""],["MapConfig",""],["MapEdits",""],["NamePerLanguage",""],["ParkingLot",""],["ParkingLotID",""],["Path",""],["PathRequest",""],["PermanentMapEdits",""],["Phase",""],["Position",""],["Road",""],["RoadID",""],["RoadWithStopSign",""],["Turn",""],["TurnGroup",""],["TurnGroupID",""],["TurnID",""],["UberTurn",""],["UberTurnGroup",""],["Zone",""]]});
initSidebarItems({"constant":[["NORMAL_LANE_THICKNESS",""],["PARKING_LOT_SPOT_LENGTH",""],["PARKING_SPOT_LENGTH",""],["SHOULDER_THICKNESS",""],["SIDEWALK_THICKNESS",""]],"enum":[["AreaType",""],["BuildingType",""],["Direction",""],["EditCmd",""],["EditIntersection",""],["IntersectionType",""],["LaneType",""],["OffstreetParking",""],["PathConstraints",""],["PathStep",""],["PhaseType",""],["Traversable",""],["TurnPriority",""],["TurnType",""]],"mod":[["city",""],["connectivity",""],["edits",""],["make",""],["map",""],["objects",""],["osm",""],["pathfind",""],["raw",""],["traversable",""]],"struct":[["AccessRestrictions",""],["Area",""],["AreaID",""],["Building",""],["BuildingID",""],["BusRoute",""],["BusRouteID",""],["BusStop",""],["BusStopID",""],["City",""],["CompressedTurnGroupID",""],["ControlStopSign",""],["ControlTrafficSignal",""],["DirectedRoadID",""],["EditEffects",""],["EditRoad",""],["Intersection",""],["IntersectionCluster",""],["IntersectionID",""],["Lane",""],["LaneID",""],["Map",""],["MapConfig",""],["MapEdits",""],["NamePerLanguage",""],["ParkingLot",""],["ParkingLotID",""],["Path",""],["PathRequest",""],["PermanentMapEdits",""],["Position",""],["Road",""],["RoadID",""],["RoadWithStopSign",""],["Stage",""],["Turn",""],["TurnGroup",""],["TurnGroupID",""],["TurnID",""],["UberTurn",""],["UberTurnGroup",""],["Zone",""]]});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,12 +1,12 @@
<!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 `State` struct in crate `sim`."><meta name="keywords" content="rust, rustlang, rust-lang, State"><title>sim::mechanics::intersection::State - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../sim/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><p class='location'>Struct State</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.accepted">accepted</a><a href="#structfield.current_phase">current_phase</a><a href="#structfield.id">id</a><a href="#structfield.phase_ends_at">phase_ends_at</a><a href="#structfield.reserved">reserved</a><a href="#structfield.waiting">waiting</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Deserialize%3C%27de%3E">Deserialize&lt;&#39;de&gt;</a><a href="#impl-Serialize">Serialize</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&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><p class='location'><a href='../../index.html'>sim</a>::<wbr><a href='../index.html'>mechanics</a>::<wbr><a href='index.html'>intersection</a></p><script>window.sidebarCurrent = {name: 'State', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/sim/mechanics/intersection.rs.html#30-47' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='../../index.html'>sim</a>::<wbr><a href='../index.html'>mechanics</a>::<wbr><a href='index.html'>intersection</a>::<wbr><a class="struct" href=''>State</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>struct State {
<!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 `State` struct in crate `sim`."><meta name="keywords" content="rust, rustlang, rust-lang, State"><title>sim::mechanics::intersection::State - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../sim/index.html'><div class='logo-container'><img src='../../../rust-logo.png' alt='logo'></div></a><p class='location'>Struct State</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.accepted">accepted</a><a href="#structfield.current_stage">current_stage</a><a href="#structfield.id">id</a><a href="#structfield.reserved">reserved</a><a href="#structfield.stage_ends_at">stage_ends_at</a><a href="#structfield.waiting">waiting</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Deserialize%3C%27de%3E">Deserialize&lt;&#39;de&gt;</a><a href="#impl-Serialize">Serialize</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&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><p class='location'><a href='../../index.html'>sim</a>::<wbr><a href='../index.html'>mechanics</a>::<wbr><a href='index.html'>intersection</a></p><script>window.sidebarCurrent = {name: 'State', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/sim/mechanics/intersection.rs.html#30-47' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='../../index.html'>sim</a>::<wbr><a href='../index.html'>mechanics</a>::<wbr><a href='index.html'>intersection</a>::<wbr><a class="struct" href=''>State</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>struct State {
id: <a class="struct" href="../../../map_model/objects/intersection/struct.IntersectionID.html" title="struct map_model::objects::intersection::IntersectionID">IntersectionID</a>,
accepted: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a>&lt;<a class="struct" href="../../../sim/mechanics/intersection/struct.Request.html" title="struct sim::mechanics::intersection::Request">Request</a>&gt;,
waiting: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a>&lt;<a class="struct" href="../../../sim/mechanics/intersection/struct.Request.html" title="struct sim::mechanics::intersection::Request">Request</a>, <a class="struct" href="../../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a>&gt;,
reserved: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a>&lt;<a class="struct" href="../../../sim/mechanics/intersection/struct.Request.html" title="struct sim::mechanics::intersection::Request">Request</a>&gt;,
current_phase: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
phase_ends_at: <a class="struct" href="../../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a>,
current_stage: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
stage_ends_at: <a class="struct" href="../../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a>,
}</pre></div><h2 id='fields' class='fields small-section-header'>
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.id" class="structfield small-section-header"><a href="#structfield.id" class="anchor field"></a><code>id: <a class="struct" href="../../../map_model/objects/intersection/struct.IntersectionID.html" title="struct map_model::objects::intersection::IntersectionID">IntersectionID</a></code></span><span id="structfield.accepted" class="structfield small-section-header"><a href="#structfield.accepted" class="anchor field"></a><code>accepted: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a>&lt;<a class="struct" href="../../../sim/mechanics/intersection/struct.Request.html" title="struct sim::mechanics::intersection::Request">Request</a>&gt;</code></span><span id="structfield.waiting" class="structfield small-section-header"><a href="#structfield.waiting" class="anchor field"></a><code>waiting: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a>&lt;<a class="struct" href="../../../sim/mechanics/intersection/struct.Request.html" title="struct sim::mechanics::intersection::Request">Request</a>, <a class="struct" href="../../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a>&gt;</code></span><span id="structfield.reserved" class="structfield small-section-header"><a href="#structfield.reserved" class="anchor field"></a><code>reserved: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a>&lt;<a class="struct" href="../../../sim/mechanics/intersection/struct.Request.html" title="struct sim::mechanics::intersection::Request">Request</a>&gt;</code></span><span id="structfield.current_phase" class="structfield small-section-header"><a href="#structfield.current_phase" class="anchor field"></a><code>current_phase: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span id="structfield.phase_ends_at" class="structfield small-section-header"><a href="#structfield.phase_ends_at" class="anchor field"></a><code>phase_ends_at: <a class="struct" href="../../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a></code></span><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../../sim/mechanics/intersection/struct.State.html" title="struct sim::mechanics::intersection::State">State</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../../../src/sim/mechanics/intersection.rs.html#29' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class="struct" href="../../../sim/mechanics/intersection/struct.State.html" title="struct sim::mechanics::intersection::State">State</a></code><a class='srclink' href='../../../src/sim/mechanics/intersection.rs.html#29' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.id" class="structfield small-section-header"><a href="#structfield.id" class="anchor field"></a><code>id: <a class="struct" href="../../../map_model/objects/intersection/struct.IntersectionID.html" title="struct map_model::objects::intersection::IntersectionID">IntersectionID</a></code></span><span id="structfield.accepted" class="structfield small-section-header"><a href="#structfield.accepted" class="anchor field"></a><code>accepted: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a>&lt;<a class="struct" href="../../../sim/mechanics/intersection/struct.Request.html" title="struct sim::mechanics::intersection::Request">Request</a>&gt;</code></span><span id="structfield.waiting" class="structfield small-section-header"><a href="#structfield.waiting" class="anchor field"></a><code>waiting: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a>&lt;<a class="struct" href="../../../sim/mechanics/intersection/struct.Request.html" title="struct sim::mechanics::intersection::Request">Request</a>, <a class="struct" href="../../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a>&gt;</code></span><span id="structfield.reserved" class="structfield small-section-header"><a href="#structfield.reserved" class="anchor field"></a><code>reserved: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a>&lt;<a class="struct" href="../../../sim/mechanics/intersection/struct.Request.html" title="struct sim::mechanics::intersection::Request">Request</a>&gt;</code></span><span id="structfield.current_stage" class="structfield small-section-header"><a href="#structfield.current_stage" class="anchor field"></a><code>current_stage: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span id="structfield.stage_ends_at" class="structfield small-section-header"><a href="#structfield.stage_ends_at" class="anchor field"></a><code>stage_ends_at: <a class="struct" href="../../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a></code></span><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../../sim/mechanics/intersection/struct.State.html" title="struct sim::mechanics::intersection::State">State</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../../../src/sim/mechanics/intersection.rs.html#29' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class="struct" href="../../../sim/mechanics/intersection/struct.State.html" title="struct sim::mechanics::intersection::State">State</a></code><a class='srclink' href='../../../src/sim/mechanics/intersection.rs.html#29' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id='method.clone_from' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self)</code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#131-133' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div><h3 id='impl-Deserialize%3C%27de%3E' class='impl'><code class='in-band'>impl&lt;'de&gt; <a class="trait" href="https://docs.rs/serde/1.0.110/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt; for <a class="struct" href="../../../sim/mechanics/intersection/struct.State.html" title="struct sim::mechanics::intersection::State">State</a></code><a href='#impl-Deserialize%3C%27de%3E' class='anchor'></a><a class='srclink' href='../../../src/sim/mechanics/intersection.rs.html#29' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.deserialize' class="method hidden"><code>fn <a href='https://docs.rs/serde/1.0.110/serde/de/trait.Deserialize.html#tymethod.deserialize' class='fnname'>deserialize</a>&lt;__D&gt;(__deserializer: __D) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, __D::<a class="type" href="https://docs.rs/serde/1.0.110/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.110/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a>&lt;'de&gt;,&nbsp;</span></code><a class='srclink' href='../../../src/sim/mechanics/intersection.rs.html#29' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.110/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
</div></div><h3 id='impl-Serialize' class='impl'><code class='in-band'>impl <a class="trait" href="https://docs.rs/serde/1.0.110/serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a> for <a class="struct" href="../../../sim/mechanics/intersection/struct.State.html" title="struct sim::mechanics::intersection::State">State</a></code><a href='#impl-Serialize' class='anchor'></a><a class='srclink' href='../../../src/sim/mechanics/intersection.rs.html#29' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.serialize' class="method hidden"><code>fn <a href='https://docs.rs/serde/1.0.110/serde/ser/trait.Serialize.html#tymethod.serialize' class='fnname'>serialize</a>&lt;__S&gt;(&amp;self, __serializer: __S) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;__S::<a class="type" href="https://docs.rs/serde/1.0.110/serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, __S::<a class="type" href="https://docs.rs/serde/1.0.110/serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__S: <a class="trait" href="https://docs.rs/serde/1.0.110/serde/ser/trait.Serializer.html" title="trait serde::ser::Serializer">Serializer</a>,&nbsp;</span></code><a class='srclink' href='../../../src/sim/mechanics/intersection.rs.html#29' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Serialize this value into the given Serde serializer. <a href="https://docs.rs/serde/1.0.110/serde/ser/trait.Serialize.html#tymethod.serialize">Read more</a></p>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -238,7 +238,7 @@
<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">ChangeDuration</span> {
<span class="ident">panel</span>: <span class="ident">Panel</span>::<span class="ident">new</span>(<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">Line</span>(<span class="string">&quot;How long should this phase last?&quot;</span>)
<span class="ident">Line</span>(<span class="string">&quot;How long should this stage last?&quot;</span>)
.<span class="ident">small_heading</span>()
.<span class="ident">draw</span>(<span class="ident">ctx</span>),
<span class="ident">Btn</span>::<span class="ident">plaintext</span>(<span class="string">&quot;X&quot;</span>)
@ -292,7 +292,7 @@
<span class="kw">return</span> <span class="ident">Transition</span>::<span class="ident">PopWithData</span>(<span class="ident">Box</span>::<span class="ident">new</span>(<span class="kw">move</span> <span class="op">|</span><span class="ident">state</span>, <span class="ident">ctx</span>, <span class="ident">app</span><span class="op">|</span> {
<span class="kw">let</span> <span class="ident">editor</span> <span class="op">=</span> <span class="ident">state</span>.<span class="ident">downcast_mut</span>::<span class="op">&lt;</span><span class="ident">TrafficSignalEditor</span><span class="op">&gt;</span>().<span class="ident">unwrap</span>();
<span class="ident">editor</span>.<span class="ident">add_new_edit</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">idx</span>, <span class="op">|</span><span class="ident">ts</span><span class="op">|</span> {
<span class="ident">ts</span>.<span class="ident">phases</span>[<span class="ident">idx</span>].<span class="ident">phase_type</span> <span class="op">=</span> <span class="ident">new_type</span>.<span class="ident">clone</span>();
<span class="ident">ts</span>.<span class="ident">stages</span>[<span class="ident">idx</span>].<span class="ident">phase_type</span> <span class="op">=</span> <span class="ident">new_type</span>.<span class="ident">clone</span>();
});
}));
}
@ -330,7 +330,7 @@
.<span class="ident">any</span>(<span class="op">|</span><span class="ident">t</span><span class="op">|</span> <span class="ident">t</span>.<span class="ident">between_sidewalks</span>());
<span class="kw">let</span> <span class="ident">use_template</span> <span class="op">=</span> <span class="string">&quot;use template&quot;</span>;
<span class="kw">let</span> <span class="ident">all_walk</span> <span class="op">=</span> <span class="string">&quot;add an all-walk phase at the end&quot;</span>;
<span class="kw">let</span> <span class="ident">all_walk</span> <span class="op">=</span> <span class="string">&quot;add an all-walk stage at the end&quot;</span>;
<span class="kw">let</span> <span class="ident">stop_sign</span> <span class="op">=</span> <span class="string">&quot;convert to stop signs&quot;</span>;
<span class="kw">let</span> <span class="ident">close</span> <span class="op">=</span> <span class="string">&quot;close intersection for construction&quot;</span>;
<span class="kw">let</span> <span class="ident">reset</span> <span class="op">=</span> <span class="string">&quot;reset to default&quot;</span>;

View File

@ -981,12 +981,12 @@
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">edit</span>::<span class="ident">apply_map_edits</span>;
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">game</span>::{<span class="ident">DrawBaselayer</span>, <span class="ident">PopupMsg</span>, <span class="ident">State</span>, <span class="ident">Transition</span>};
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">options</span>::<span class="ident">TrafficSignalStyle</span>;
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">render</span>::{<span class="ident">draw_signal_phase</span>, <span class="ident">DrawOptions</span>, <span class="ident">DrawTurnGroup</span>, <span class="ident">BIG_ARROW_THICKNESS</span>};
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">render</span>::{<span class="ident">draw_signal_stage</span>, <span class="ident">DrawOptions</span>, <span class="ident">DrawTurnGroup</span>, <span class="ident">BIG_ARROW_THICKNESS</span>};
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">sandbox</span>::<span class="ident">GameplayMode</span>;
<span class="kw">use</span> <span class="ident">abstutil</span>::<span class="ident">Timer</span>;
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">ArrowCap</span>, <span class="ident">Distance</span>, <span class="ident">Duration</span>, <span class="ident">Line</span>, <span class="ident">Polygon</span>, <span class="ident">Pt2D</span>};
<span class="kw">use</span> <span class="ident">map_model</span>::{
<span class="ident">ControlTrafficSignal</span>, <span class="ident">EditCmd</span>, <span class="ident">EditIntersection</span>, <span class="ident">IntersectionID</span>, <span class="ident">Phase</span>, <span class="ident">PhaseType</span>, <span class="ident">TurnGroup</span>,
<span class="ident">ControlTrafficSignal</span>, <span class="ident">EditCmd</span>, <span class="ident">EditIntersection</span>, <span class="ident">IntersectionID</span>, <span class="ident">PhaseType</span>, <span class="ident">Stage</span>, <span class="ident">TurnGroup</span>,
<span class="ident">TurnGroupID</span>, <span class="ident">TurnPriority</span>,
};
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">collections</span>::{<span class="ident">BTreeSet</span>, <span class="ident">HashMap</span>, <span class="ident">VecDeque</span>};
@ -1003,7 +1003,7 @@
<span class="ident">mode</span>: <span class="ident">GameplayMode</span>,
<span class="ident">members</span>: <span class="ident">BTreeSet</span><span class="op">&lt;</span><span class="ident">IntersectionID</span><span class="op">&gt;</span>,
<span class="ident">current_phase</span>: <span class="ident">usize</span>,
<span class="ident">current_stage</span>: <span class="ident">usize</span>,
<span class="ident">groups</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">DrawTurnGroup</span><span class="op">&gt;</span>,
<span class="comment">// And the next priority to toggle to</span>
@ -1012,7 +1012,7 @@
<span class="ident">command_stack</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">BundleEdits</span><span class="op">&gt;</span>,
<span class="ident">redo_stack</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">BundleEdits</span><span class="op">&gt;</span>,
<span class="comment">// Before synchronizing the number of phases</span>
<span class="comment">// Before synchronizing the number of stages</span>
<span class="ident">original</span>: <span class="ident">BundleEdits</span>,
<span class="ident">warn_changed</span>: <span class="ident">bool</span>,
@ -1066,7 +1066,7 @@
<span class="ident">top_panel</span>: <span class="ident">make_top_panel</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="bool-val">false</span>, <span class="bool-val">false</span>),
<span class="ident">mode</span>,
<span class="ident">members</span>,
<span class="ident">current_phase</span>: <span class="number">0</span>,
<span class="ident">current_stage</span>: <span class="number">0</span>,
<span class="ident">groups</span>,
<span class="ident">group_selected</span>: <span class="prelude-val">None</span>,
<span class="ident">draw_current</span>: <span class="ident">ctx</span>.<span class="ident">upload</span>(<span class="ident">GeomBatch</span>::<span class="ident">new</span>()),
@ -1080,20 +1080,20 @@
<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">editor</span>)
}
<span class="kw">fn</span> <span class="ident">change_phase</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>, <span class="ident">idx</span>: <span class="ident">usize</span>) {
<span class="kw">fn</span> <span class="ident">change_stage</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>, <span class="ident">idx</span>: <span class="ident">usize</span>) {
<span class="kw">let</span> <span class="ident">hovering</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">group_selected</span>.<span class="ident">map</span>(<span class="op">|</span>(<span class="ident">tg</span>, <span class="kw">_</span>)<span class="op">|</span> <span class="ident">tg</span>.<span class="ident">parent</span>);
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">current_phase</span> <span class="op">=</span><span class="op">=</span> <span class="ident">idx</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">new</span> <span class="op">=</span> <span class="ident">make_side_panel</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">members</span>, <span class="self">self</span>.<span class="ident">current_phase</span>, <span class="ident">hovering</span>);
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">current_stage</span> <span class="op">=</span><span class="op">=</span> <span class="ident">idx</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">new</span> <span class="op">=</span> <span class="ident">make_side_panel</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">members</span>, <span class="self">self</span>.<span class="ident">current_stage</span>, <span class="ident">hovering</span>);
<span class="ident">new</span>.<span class="ident">restore</span>(<span class="ident">ctx</span>, <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">side_panel</span>);
<span class="self">self</span>.<span class="ident">side_panel</span> <span class="op">=</span> <span class="ident">new</span>;
} <span class="kw">else</span> {
<span class="self">self</span>.<span class="ident">current_phase</span> <span class="op">=</span> <span class="ident">idx</span>;
<span class="self">self</span>.<span class="ident">current_stage</span> <span class="op">=</span> <span class="ident">idx</span>;
<span class="self">self</span>.<span class="ident">side_panel</span> <span class="op">=</span>
<span class="ident">make_side_panel</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">members</span>, <span class="self">self</span>.<span class="ident">current_phase</span>, <span class="ident">hovering</span>);
<span class="ident">make_side_panel</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">members</span>, <span class="self">self</span>.<span class="ident">current_stage</span>, <span class="ident">hovering</span>);
<span class="comment">// TODO Maybe center of previous member</span>
<span class="self">self</span>.<span class="ident">side_panel</span>
.<span class="ident">scroll_to_member</span>(<span class="ident">ctx</span>, <span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;phase {}&quot;</span>, <span class="ident">idx</span> <span class="op">+</span> <span class="number">1</span>));
.<span class="ident">scroll_to_member</span>(<span class="ident">ctx</span>, <span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;stage {}&quot;</span>, <span class="ident">idx</span> <span class="op">+</span> <span class="number">1</span>));
}
<span class="self">self</span>.<span class="ident">draw_current</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">recalc_draw_current</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
@ -1115,7 +1115,7 @@
<span class="ident">bundle</span>.<span class="ident">apply</span>(<span class="ident">app</span>);
<span class="self">self</span>.<span class="ident">top_panel</span> <span class="op">=</span> <span class="ident">make_top_panel</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="bool-val">true</span>, <span class="bool-val">false</span>);
<span class="self">self</span>.<span class="ident">change_phase</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">idx</span>);
<span class="self">self</span>.<span class="ident">change_stage</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">idx</span>);
}
<span class="kw">fn</span> <span class="ident">recalc_draw_current</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Drawable</span> {
@ -1123,15 +1123,15 @@
<span class="kw">for</span> <span class="ident">i</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">members</span> {
<span class="kw">let</span> <span class="ident">signal</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">get_traffic_signal</span>(<span class="kw-2">*</span><span class="ident">i</span>);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">phase</span> <span class="op">=</span> <span class="ident">signal</span>.<span class="ident">phases</span>[<span class="self">self</span>.<span class="ident">current_phase</span>].<span class="ident">clone</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">stage</span> <span class="op">=</span> <span class="ident">signal</span>.<span class="ident">stages</span>[<span class="self">self</span>.<span class="ident">current_stage</span>].<span class="ident">clone</span>();
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>((<span class="ident">id</span>, <span class="kw">_</span>)) <span class="op">=</span> <span class="self">self</span>.<span class="ident">group_selected</span> {
<span class="kw">if</span> <span class="ident">id</span>.<span class="ident">parent</span> <span class="op">=</span><span class="op">=</span> <span class="ident">signal</span>.<span class="ident">id</span> {
<span class="ident">phase</span>.<span class="ident">edit_group</span>(<span class="kw-2">&amp;</span><span class="ident">signal</span>.<span class="ident">turn_groups</span>[<span class="kw-2">&amp;</span><span class="ident">id</span>], <span class="ident">TurnPriority</span>::<span class="ident">Banned</span>);
<span class="ident">stage</span>.<span class="ident">edit_group</span>(<span class="kw-2">&amp;</span><span class="ident">signal</span>.<span class="ident">turn_groups</span>[<span class="kw-2">&amp;</span><span class="ident">id</span>], <span class="ident">TurnPriority</span>::<span class="ident">Banned</span>);
}
}
<span class="ident">draw_signal_phase</span>(
<span class="ident">draw_signal_stage</span>(
<span class="ident">ctx</span>.<span class="ident">prerender</span>,
<span class="kw-2">&amp;</span><span class="ident">phase</span>,
<span class="kw-2">&amp;</span><span class="ident">stage</span>,
<span class="ident">signal</span>.<span class="ident">id</span>,
<span class="prelude-val">None</span>,
<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">batch</span>,
@ -1157,8 +1157,8 @@
);
} <span class="kw">else</span> {
<span class="ident">batch</span>.<span class="ident">push</span>(<span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">signal_turn_block_bg</span>, <span class="ident">tg</span>.<span class="ident">block</span>.<span class="ident">clone</span>());
<span class="kw">let</span> <span class="ident">phase</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="ident">signal</span>.<span class="ident">phases</span>[<span class="self">self</span>.<span class="ident">current_phase</span>];
<span class="kw">let</span> <span class="ident">arrow_color</span> <span class="op">=</span> <span class="kw">match</span> <span class="ident">phase</span>.<span class="ident">get_priority_of_group</span>(<span class="ident">tg</span>.<span class="ident">id</span>) {
<span class="kw">let</span> <span class="ident">stage</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="ident">signal</span>.<span class="ident">stages</span>[<span class="self">self</span>.<span class="ident">current_stage</span>];
<span class="kw">let</span> <span class="ident">arrow_color</span> <span class="op">=</span> <span class="kw">match</span> <span class="ident">stage</span>.<span class="ident">get_priority_of_group</span>(<span class="ident">tg</span>.<span class="ident">id</span>) {
<span class="ident">TurnPriority</span>::<span class="ident">Protected</span> <span class="op">=</span><span class="op">&gt;</span> <span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">signal_protected_turn</span>,
<span class="ident">TurnPriority</span>::<span class="ident">Yield</span> <span class="op">=</span><span class="op">&gt;</span> <span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">signal_permitted_turn</span>,
<span class="ident">TurnPriority</span>::<span class="ident">Banned</span> <span class="op">=</span><span class="op">&gt;</span> <span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">signal_banned_turn</span>,
@ -1177,7 +1177,7 @@
<span class="kw">return</span> <span class="ident">Transition</span>::<span class="ident">Push</span>(<span class="ident">PopupMsg</span>::<span class="ident">new</span>(
<span class="ident">ctx</span>,
<span class="string">&quot;Note&quot;</span>,
<span class="macro">vec</span><span class="macro">!</span>[<span class="string">&quot;Some signals were modified to match the number and duration of phases&quot;</span>],
<span class="macro">vec</span><span class="macro">!</span>[<span class="string">&quot;Some signals were modified to match the number and duration of stages&quot;</span>],
));
}
@ -1187,7 +1187,7 @@
.<span class="ident">primary</span>
.<span class="ident">map</span>
.<span class="ident">get_traffic_signal</span>(<span class="kw-2">*</span><span class="self">self</span>.<span class="ident">members</span>.<span class="ident">iter</span>().<span class="ident">next</span>().<span class="ident">unwrap</span>());
<span class="kw">let</span> <span class="ident">num_phases</span> <span class="op">=</span> <span class="ident">canonical_signal</span>.<span class="ident">phases</span>.<span class="ident">len</span>();
<span class="kw">let</span> <span class="ident">num_stages</span> <span class="op">=</span> <span class="ident">canonical_signal</span>.<span class="ident">stages</span>.<span class="ident">len</span>();
<span class="kw">match</span> <span class="self">self</span>.<span class="ident">side_panel</span>.<span class="ident">event</span>(<span class="ident">ctx</span>) {
<span class="ident">Outcome</span>::<span class="ident">Clicked</span>(<span class="ident">x</span>) <span class="op">=</span><span class="op">&gt;</span> {
@ -1213,15 +1213,15 @@
<span class="self">self</span>.<span class="ident">original</span>.<span class="ident">clone</span>(),
));
}
<span class="kw">if</span> <span class="ident">x</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;Add new phase&quot;</span> {
<span class="self">self</span>.<span class="ident">add_new_edit</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">num_phases</span>, <span class="op">|</span><span class="ident">ts</span><span class="op">|</span> {
<span class="ident">ts</span>.<span class="ident">phases</span>.<span class="ident">push</span>(<span class="ident">Phase</span>::<span class="ident">new</span>());
<span class="kw">if</span> <span class="ident">x</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;Add new stage&quot;</span> {
<span class="self">self</span>.<span class="ident">add_new_edit</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">num_stages</span>, <span class="op">|</span><span class="ident">ts</span><span class="op">|</span> {
<span class="ident">ts</span>.<span class="ident">stages</span>.<span class="ident">push</span>(<span class="ident">Stage</span>::<span class="ident">new</span>());
});
<span class="kw">return</span> <span class="ident">Transition</span>::<span class="ident">Keep</span>;
}
<span class="kw">if</span> <span class="ident">x</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;Apply offset&quot;</span> {
<span class="kw">let</span> <span class="ident">offset</span> <span class="op">=</span> <span class="ident">Duration</span>::<span class="ident">seconds</span>(<span class="self">self</span>.<span class="ident">side_panel</span>.<span class="ident">spinner</span>(<span class="string">&quot;offset&quot;</span>) <span class="kw">as</span> <span class="ident">f64</span>);
<span class="self">self</span>.<span class="ident">add_new_edit</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="self">self</span>.<span class="ident">current_phase</span>, <span class="op">|</span><span class="ident">ts</span><span class="op">|</span> {
<span class="self">self</span>.<span class="ident">add_new_edit</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="self">self</span>.<span class="ident">current_stage</span>, <span class="op">|</span><span class="ident">ts</span><span class="op">|</span> {
<span class="ident">ts</span>.<span class="ident">offset</span> <span class="op">=</span> <span class="ident">offset</span>;
});
<span class="kw">return</span> <span class="ident">Transition</span>::<span class="ident">Keep</span>;
@ -1240,43 +1240,43 @@
)
})
.<span class="ident">collect</span>();
<span class="self">self</span>.<span class="ident">add_new_edit</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="self">self</span>.<span class="ident">current_phase</span>, <span class="op">|</span><span class="ident">ts</span><span class="op">|</span> {
<span class="self">self</span>.<span class="ident">add_new_edit</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="self">self</span>.<span class="ident">current_stage</span>, <span class="op">|</span><span class="ident">ts</span><span class="op">|</span> {
<span class="ident">ts</span>.<span class="ident">offset</span> <span class="op">=</span> <span class="ident">offsets</span>[<span class="kw-2">&amp;</span><span class="ident">ts</span>.<span class="ident">id</span>];
});
<span class="kw">return</span> <span class="ident">Transition</span>::<span class="ident">Keep</span>;
}
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">x</span>) <span class="op">=</span> <span class="ident">x</span>.<span class="ident">strip_prefix</span>(<span class="string">&quot;change duration of phase &quot;</span>) {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">x</span>) <span class="op">=</span> <span class="ident">x</span>.<span class="ident">strip_prefix</span>(<span class="string">&quot;change duration of stage &quot;</span>) {
<span class="kw">let</span> <span class="ident">idx</span> <span class="op">=</span> <span class="ident">x</span>.<span class="ident">parse</span>::<span class="op">&lt;</span><span class="ident">usize</span><span class="op">&gt;</span>().<span class="ident">unwrap</span>() <span class="op">-</span> <span class="number">1</span>;
<span class="kw">return</span> <span class="ident">Transition</span>::<span class="ident">Push</span>(<span class="ident">edits</span>::<span class="ident">ChangeDuration</span>::<span class="ident">new</span>(
<span class="ident">ctx</span>,
<span class="ident">canonical_signal</span>.<span class="ident">phases</span>[<span class="ident">idx</span>].<span class="ident">phase_type</span>.<span class="ident">clone</span>(),
<span class="ident">canonical_signal</span>.<span class="ident">stages</span>[<span class="ident">idx</span>].<span class="ident">phase_type</span>.<span class="ident">clone</span>(),
<span class="ident">idx</span>,
));
}
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">x</span>) <span class="op">=</span> <span class="ident">x</span>.<span class="ident">strip_prefix</span>(<span class="string">&quot;delete phase &quot;</span>) {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">x</span>) <span class="op">=</span> <span class="ident">x</span>.<span class="ident">strip_prefix</span>(<span class="string">&quot;delete stage &quot;</span>) {
<span class="kw">let</span> <span class="ident">idx</span> <span class="op">=</span> <span class="ident">x</span>.<span class="ident">parse</span>::<span class="op">&lt;</span><span class="ident">usize</span><span class="op">&gt;</span>().<span class="ident">unwrap</span>() <span class="op">-</span> <span class="number">1</span>;
<span class="self">self</span>.<span class="ident">add_new_edit</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="number">0</span>, <span class="op">|</span><span class="ident">ts</span><span class="op">|</span> {
<span class="ident">ts</span>.<span class="ident">phases</span>.<span class="ident">remove</span>(<span class="ident">idx</span>);
<span class="ident">ts</span>.<span class="ident">stages</span>.<span class="ident">remove</span>(<span class="ident">idx</span>);
});
<span class="kw">return</span> <span class="ident">Transition</span>::<span class="ident">Keep</span>;
}
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">x</span>) <span class="op">=</span> <span class="ident">x</span>.<span class="ident">strip_prefix</span>(<span class="string">&quot;move up phase &quot;</span>) {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">x</span>) <span class="op">=</span> <span class="ident">x</span>.<span class="ident">strip_prefix</span>(<span class="string">&quot;move up stage &quot;</span>) {
<span class="kw">let</span> <span class="ident">idx</span> <span class="op">=</span> <span class="ident">x</span>.<span class="ident">parse</span>::<span class="op">&lt;</span><span class="ident">usize</span><span class="op">&gt;</span>().<span class="ident">unwrap</span>() <span class="op">-</span> <span class="number">1</span>;
<span class="self">self</span>.<span class="ident">add_new_edit</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">idx</span> <span class="op">-</span> <span class="number">1</span>, <span class="op">|</span><span class="ident">ts</span><span class="op">|</span> {
<span class="ident">ts</span>.<span class="ident">phases</span>.<span class="ident">swap</span>(<span class="ident">idx</span>, <span class="ident">idx</span> <span class="op">-</span> <span class="number">1</span>);
<span class="ident">ts</span>.<span class="ident">stages</span>.<span class="ident">swap</span>(<span class="ident">idx</span>, <span class="ident">idx</span> <span class="op">-</span> <span class="number">1</span>);
});
<span class="kw">return</span> <span class="ident">Transition</span>::<span class="ident">Keep</span>;
}
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">x</span>) <span class="op">=</span> <span class="ident">x</span>.<span class="ident">strip_prefix</span>(<span class="string">&quot;move down phase &quot;</span>) {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">x</span>) <span class="op">=</span> <span class="ident">x</span>.<span class="ident">strip_prefix</span>(<span class="string">&quot;move down stage &quot;</span>) {
<span class="kw">let</span> <span class="ident">idx</span> <span class="op">=</span> <span class="ident">x</span>.<span class="ident">parse</span>::<span class="op">&lt;</span><span class="ident">usize</span><span class="op">&gt;</span>().<span class="ident">unwrap</span>() <span class="op">-</span> <span class="number">1</span>;
<span class="self">self</span>.<span class="ident">add_new_edit</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">idx</span> <span class="op">+</span> <span class="number">1</span>, <span class="op">|</span><span class="ident">ts</span><span class="op">|</span> {
<span class="ident">ts</span>.<span class="ident">phases</span>.<span class="ident">swap</span>(<span class="ident">idx</span>, <span class="ident">idx</span> <span class="op">+</span> <span class="number">1</span>);
<span class="ident">ts</span>.<span class="ident">stages</span>.<span class="ident">swap</span>(<span class="ident">idx</span>, <span class="ident">idx</span> <span class="op">+</span> <span class="number">1</span>);
});
<span class="kw">return</span> <span class="ident">Transition</span>::<span class="ident">Keep</span>;
}
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">x</span>) <span class="op">=</span> <span class="ident">x</span>.<span class="ident">strip_prefix</span>(<span class="string">&quot;phase &quot;</span>) {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">x</span>) <span class="op">=</span> <span class="ident">x</span>.<span class="ident">strip_prefix</span>(<span class="string">&quot;stage &quot;</span>) {
<span class="kw">let</span> <span class="ident">idx</span> <span class="op">=</span> <span class="ident">x</span>.<span class="ident">parse</span>::<span class="op">&lt;</span><span class="ident">usize</span><span class="op">&gt;</span>().<span class="ident">unwrap</span>() <span class="op">-</span> <span class="number">1</span>;
<span class="self">self</span>.<span class="ident">change_phase</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">idx</span>);
<span class="self">self</span>.<span class="ident">change_stage</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">idx</span>);
<span class="kw">return</span> <span class="ident">Transition</span>::<span class="ident">Keep</span>;
}
<span class="macro">unreachable</span><span class="macro">!</span>()
@ -1293,14 +1293,14 @@
<span class="self">self</span>.<span class="ident">redo_stack</span>.<span class="ident">clear</span>();
<span class="self">self</span>.<span class="ident">top_panel</span> <span class="op">=</span> <span class="ident">make_top_panel</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="bool-val">true</span>, <span class="bool-val">false</span>);
<span class="self">self</span>.<span class="ident">change_phase</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="number">0</span>);
<span class="self">self</span>.<span class="ident">change_stage</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="number">0</span>);
<span class="kw">return</span> <span class="ident">Transition</span>::<span class="ident">Push</span>(<span class="ident">PopupMsg</span>::<span class="ident">new</span>(
<span class="ident">ctx</span>,
<span class="string">&quot;Error: missing turns&quot;</span>,
<span class="macro">vec</span><span class="macro">!</span>[
<span class="string">&quot;Some turns are missing from this traffic signal&quot;</span>,
<span class="string">&quot;They&#39;ve all been added as a new first phase. Please update your \
<span class="string">&quot;They&#39;ve all been added as a new first stage. Please update your \
changes to include them.&quot;</span>,
],
));
@ -1330,7 +1330,7 @@
<span class="ident">ctx</span>,
<span class="ident">app</span>,
<span class="self">self</span>.<span class="ident">members</span>.<span class="ident">clone</span>(),
<span class="self">self</span>.<span class="ident">current_phase</span>,
<span class="self">self</span>.<span class="ident">current_stage</span>,
));
}
<span class="string">&quot;undo&quot;</span> <span class="op">=</span><span class="op">&gt;</span> {
@ -1338,7 +1338,7 @@
.<span class="ident">push</span>(<span class="ident">BundleEdits</span>::<span class="ident">get_current</span>(<span class="ident">app</span>, <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">members</span>));
<span class="self">self</span>.<span class="ident">command_stack</span>.<span class="ident">pop</span>().<span class="ident">unwrap</span>().<span class="ident">apply</span>(<span class="ident">app</span>);
<span class="self">self</span>.<span class="ident">top_panel</span> <span class="op">=</span> <span class="ident">make_top_panel</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="op">!</span><span class="self">self</span>.<span class="ident">command_stack</span>.<span class="ident">is_empty</span>(), <span class="bool-val">true</span>);
<span class="self">self</span>.<span class="ident">change_phase</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="number">0</span>);
<span class="self">self</span>.<span class="ident">change_stage</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="number">0</span>);
<span class="kw">return</span> <span class="ident">Transition</span>::<span class="ident">Keep</span>;
}
<span class="string">&quot;redo&quot;</span> <span class="op">=</span><span class="op">&gt;</span> {
@ -1346,7 +1346,7 @@
.<span class="ident">push</span>(<span class="ident">BundleEdits</span>::<span class="ident">get_current</span>(<span class="ident">app</span>, <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">members</span>));
<span class="self">self</span>.<span class="ident">redo_stack</span>.<span class="ident">pop</span>().<span class="ident">unwrap</span>().<span class="ident">apply</span>(<span class="ident">app</span>);
<span class="self">self</span>.<span class="ident">top_panel</span> <span class="op">=</span> <span class="ident">make_top_panel</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="bool-val">true</span>, <span class="op">!</span><span class="self">self</span>.<span class="ident">redo_stack</span>.<span class="ident">is_empty</span>());
<span class="self">self</span>.<span class="ident">change_phase</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="number">0</span>);
<span class="self">self</span>.<span class="ident">change_stage</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="number">0</span>);
<span class="kw">return</span> <span class="ident">Transition</span>::<span class="ident">Keep</span>;
}
<span class="kw">_</span> <span class="op">=</span><span class="op">&gt;</span> <span class="macro">unreachable</span><span class="macro">!</span>(),
@ -1355,12 +1355,12 @@
}
{
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">current_phase</span> <span class="op">!</span><span class="op">=</span> <span class="number">0</span> <span class="kw-2">&amp;</span><span class="op">&amp;</span> <span class="ident">ctx</span>.<span class="ident">input</span>.<span class="ident">key_pressed</span>(<span class="ident">Key</span>::<span class="ident">UpArrow</span>) {
<span class="self">self</span>.<span class="ident">change_phase</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="self">self</span>.<span class="ident">current_phase</span> <span class="op">-</span> <span class="number">1</span>);
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">current_stage</span> <span class="op">!</span><span class="op">=</span> <span class="number">0</span> <span class="kw-2">&amp;</span><span class="op">&amp;</span> <span class="ident">ctx</span>.<span class="ident">input</span>.<span class="ident">key_pressed</span>(<span class="ident">Key</span>::<span class="ident">UpArrow</span>) {
<span class="self">self</span>.<span class="ident">change_stage</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="self">self</span>.<span class="ident">current_stage</span> <span class="op">-</span> <span class="number">1</span>);
}
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">current_phase</span> <span class="op">!</span><span class="op">=</span> <span class="ident">num_phases</span> <span class="op">-</span> <span class="number">1</span> <span class="kw-2">&amp;</span><span class="op">&amp;</span> <span class="ident">ctx</span>.<span class="ident">input</span>.<span class="ident">key_pressed</span>(<span class="ident">Key</span>::<span class="ident">DownArrow</span>) {
<span class="self">self</span>.<span class="ident">change_phase</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="self">self</span>.<span class="ident">current_phase</span> <span class="op">+</span> <span class="number">1</span>);
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">current_stage</span> <span class="op">!</span><span class="op">=</span> <span class="ident">num_stages</span> <span class="op">-</span> <span class="number">1</span> <span class="kw-2">&amp;</span><span class="op">&amp;</span> <span class="ident">ctx</span>.<span class="ident">input</span>.<span class="ident">key_pressed</span>(<span class="ident">Key</span>::<span class="ident">DownArrow</span>) {
<span class="self">self</span>.<span class="ident">change_stage</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="self">self</span>.<span class="ident">current_stage</span> <span class="op">+</span> <span class="number">1</span>);
}
}
@ -1372,10 +1372,10 @@
<span class="kw">for</span> <span class="ident">g</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">groups</span> {
<span class="kw">let</span> <span class="ident">signal</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">get_traffic_signal</span>(<span class="ident">g</span>.<span class="ident">id</span>.<span class="ident">parent</span>);
<span class="kw">if</span> <span class="ident">g</span>.<span class="ident">block</span>.<span class="ident">contains_pt</span>(<span class="ident">pt</span>) {
<span class="kw">let</span> <span class="ident">phase</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="ident">signal</span>.<span class="ident">phases</span>[<span class="self">self</span>.<span class="ident">current_phase</span>];
<span class="kw">let</span> <span class="ident">next_priority</span> <span class="op">=</span> <span class="kw">match</span> <span class="ident">phase</span>.<span class="ident">get_priority_of_group</span>(<span class="ident">g</span>.<span class="ident">id</span>) {
<span class="kw">let</span> <span class="ident">stage</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="ident">signal</span>.<span class="ident">stages</span>[<span class="self">self</span>.<span class="ident">current_stage</span>];
<span class="kw">let</span> <span class="ident">next_priority</span> <span class="op">=</span> <span class="kw">match</span> <span class="ident">stage</span>.<span class="ident">get_priority_of_group</span>(<span class="ident">g</span>.<span class="ident">id</span>) {
<span class="ident">TurnPriority</span>::<span class="ident">Banned</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">if</span> <span class="ident">phase</span>.<span class="ident">could_be_protected</span>(<span class="ident">g</span>.<span class="ident">id</span>, <span class="kw-2">&amp;</span><span class="ident">signal</span>.<span class="ident">turn_groups</span>) {
<span class="kw">if</span> <span class="ident">stage</span>.<span class="ident">could_be_protected</span>(<span class="ident">g</span>.<span class="ident">id</span>, <span class="kw-2">&amp;</span><span class="ident">signal</span>.<span class="ident">turn_groups</span>) {
<span class="prelude-val">Some</span>(<span class="ident">TurnPriority</span>::<span class="ident">Protected</span>)
} <span class="kw">else</span> <span class="kw">if</span> <span class="ident">g</span>.<span class="ident">id</span>.<span class="ident">crosswalk</span> {
<span class="prelude-val">None</span>
@ -1400,7 +1400,7 @@
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">group_selected</span> <span class="op">!</span><span class="op">=</span> <span class="ident">old</span> {
<span class="self">self</span>.<span class="ident">draw_current</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">recalc_draw_current</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
<span class="self">self</span>.<span class="ident">change_phase</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="self">self</span>.<span class="ident">current_phase</span>);
<span class="self">self</span>.<span class="ident">change_stage</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="self">self</span>.<span class="ident">current_stage</span>);
}
}
@ -1411,15 +1411,15 @@
<span class="ident">ctx</span>,
<span class="macro">format</span><span class="macro">!</span>(
<span class="string">&quot;toggle from {:?} to {:?}&quot;</span>,
<span class="ident">signal</span>.<span class="ident">phases</span>[<span class="self">self</span>.<span class="ident">current_phase</span>].<span class="ident">get_priority_of_group</span>(<span class="ident">id</span>),
<span class="ident">signal</span>.<span class="ident">stages</span>[<span class="self">self</span>.<span class="ident">current_stage</span>].<span class="ident">get_priority_of_group</span>(<span class="ident">id</span>),
<span class="ident">pri</span>
),
) {
<span class="kw">let</span> <span class="ident">idx</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">current_phase</span>;
<span class="kw">let</span> <span class="ident">idx</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">current_stage</span>;
<span class="kw">let</span> <span class="ident">signal</span> <span class="op">=</span> <span class="ident">signal</span>.<span class="ident">clone</span>();
<span class="self">self</span>.<span class="ident">add_new_edit</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">idx</span>, <span class="op">|</span><span class="ident">ts</span><span class="op">|</span> {
<span class="kw">if</span> <span class="ident">ts</span>.<span class="ident">id</span> <span class="op">=</span><span class="op">=</span> <span class="ident">id</span>.<span class="ident">parent</span> {
<span class="ident">ts</span>.<span class="ident">phases</span>[<span class="ident">idx</span>].<span class="ident">edit_group</span>(<span class="kw-2">&amp;</span><span class="ident">signal</span>.<span class="ident">turn_groups</span>[<span class="kw-2">&amp;</span><span class="ident">id</span>], <span class="ident">pri</span>);
<span class="ident">ts</span>.<span class="ident">stages</span>[<span class="ident">idx</span>].<span class="ident">edit_group</span>(<span class="kw-2">&amp;</span><span class="ident">signal</span>.<span class="ident">turn_groups</span>[<span class="kw-2">&amp;</span><span class="ident">id</span>], <span class="ident">pri</span>);
}
});
<span class="kw">return</span> <span class="ident">Transition</span>::<span class="ident">KeepWithMouseover</span>;
@ -1536,7 +1536,7 @@
<span class="ident">hovering</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">IntersectionID</span><span class="op">&gt;</span>,
) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Panel</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="comment">// Use any member for phase duration</span>
<span class="comment">// Use any member for stage duration</span>
<span class="kw">let</span> <span class="ident">canonical_signal</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_traffic_signal</span>(<span class="kw-2">*</span><span class="ident">members</span>.<span class="ident">iter</span>().<span class="ident">next</span>().<span class="ident">unwrap</span>());
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">txt</span> <span class="op">=</span> <span class="ident">Text</span>::<span class="ident">new</span>();
@ -1561,10 +1561,10 @@
}
{
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">total</span> <span class="op">=</span> <span class="ident">Duration</span>::<span class="ident">ZERO</span>;
<span class="kw">for</span> <span class="ident">p</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">canonical_signal</span>.<span class="ident">phases</span> {
<span class="ident">total</span> <span class="op">+</span><span class="op">=</span> <span class="ident">p</span>.<span class="ident">phase_type</span>.<span class="ident">simple_duration</span>();
<span class="kw">for</span> <span class="ident">s</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">canonical_signal</span>.<span class="ident">stages</span> {
<span class="ident">total</span> <span class="op">+</span><span class="op">=</span> <span class="ident">s</span>.<span class="ident">phase_type</span>.<span class="ident">simple_duration</span>();
}
<span class="comment">// TODO Say &quot;normally&quot; to account for adaptive phases?</span>
<span class="comment">// TODO Say &quot;normally&quot; to account for adaptive stages?</span>
<span class="ident">txt</span>.<span class="ident">add</span>(<span class="ident">Line</span>(<span class="string">&quot;&quot;</span>));
<span class="ident">txt</span>.<span class="ident">add</span>(<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;One full cycle lasts {}&quot;</span>, <span class="ident">total</span>)));
}
@ -1594,56 +1594,56 @@
.<span class="ident">collect</span>(),
);
<span class="kw">for</span> (<span class="ident">idx</span>, <span class="ident">canonical_phase</span>) <span class="kw">in</span> <span class="ident">canonical_signal</span>.<span class="ident">phases</span>.<span class="ident">iter</span>().<span class="ident">enumerate</span>() {
<span class="kw">for</span> (<span class="ident">idx</span>, <span class="ident">canonical_stage</span>) <span class="kw">in</span> <span class="ident">canonical_signal</span>.<span class="ident">stages</span>.<span class="ident">iter</span>().<span class="ident">enumerate</span>() {
<span class="ident">col</span>.<span class="ident">push</span>(<span class="ident">Widget</span>::<span class="ident">horiz_separator</span>(<span class="ident">ctx</span>, <span class="number">0.2</span>));
<span class="kw">let</span> <span class="ident">unselected_btn</span> <span class="op">=</span> <span class="ident">draw_multiple_signals</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">members</span>, <span class="ident">idx</span>, <span class="ident">hovering</span>, <span class="kw-2">&amp;</span><span class="ident">translations</span>);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">selected_btn</span> <span class="op">=</span> <span class="ident">unselected_btn</span>.<span class="ident">clone</span>();
<span class="kw">let</span> <span class="ident">bbox</span> <span class="op">=</span> <span class="ident">unselected_btn</span>.<span class="ident">get_bounds</span>().<span class="ident">get_rectangle</span>();
<span class="ident">selected_btn</span>.<span class="ident">push</span>(<span class="ident">Color</span>::<span class="ident">RED</span>, <span class="ident">bbox</span>.<span class="ident">to_outline</span>(<span class="ident">Distance</span>::<span class="ident">meters</span>(<span class="number">5.0</span>)).<span class="ident">unwrap</span>());
<span class="kw">let</span> <span class="ident">phase_btn</span> <span class="op">=</span> <span class="ident">Btn</span>::<span class="ident">custom</span>(<span class="ident">unselected_btn</span>, <span class="ident">selected_btn</span>, <span class="ident">bbox</span>).<span class="ident">build</span>(
<span class="kw">let</span> <span class="ident">stage_btn</span> <span class="op">=</span> <span class="ident">Btn</span>::<span class="ident">custom</span>(<span class="ident">unselected_btn</span>, <span class="ident">selected_btn</span>, <span class="ident">bbox</span>).<span class="ident">build</span>(
<span class="ident">ctx</span>,
<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;phase {}&quot;</span>, <span class="ident">idx</span> <span class="op">+</span> <span class="number">1</span>),
<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;stage {}&quot;</span>, <span class="ident">idx</span> <span class="op">+</span> <span class="number">1</span>),
<span class="prelude-val">None</span>,
);
<span class="kw">let</span> <span class="ident">phase_col</span> <span class="op">=</span> <span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="kw">let</span> <span class="ident">stage_col</span> <span class="op">=</span> <span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="kw">match</span> <span class="ident">canonical_phase</span>.<span class="ident">phase_type</span> {
<span class="ident">PhaseType</span>::<span class="ident">Fixed</span>(<span class="ident">d</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Phase {}: {}&quot;</span>, <span class="ident">idx</span> <span class="op">+</span> <span class="number">1</span>, <span class="ident">d</span>)),
<span class="ident">PhaseType</span>::<span class="ident">Adaptive</span>(<span class="ident">d</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Phase {}: {} (adaptive)&quot;</span>, <span class="ident">idx</span> <span class="op">+</span> <span class="number">1</span>, <span class="ident">d</span>)),
<span class="kw">match</span> <span class="ident">canonical_stage</span>.<span class="ident">phase_type</span> {
<span class="ident">PhaseType</span>::<span class="ident">Fixed</span>(<span class="ident">d</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Stage {}: {}&quot;</span>, <span class="ident">idx</span> <span class="op">+</span> <span class="number">1</span>, <span class="ident">d</span>)),
<span class="ident">PhaseType</span>::<span class="ident">Adaptive</span>(<span class="ident">d</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Stage {}: {} (adaptive)&quot;</span>, <span class="ident">idx</span> <span class="op">+</span> <span class="number">1</span>, <span class="ident">d</span>)),
}
.<span class="ident">small_heading</span>()
.<span class="ident">draw</span>(<span class="ident">ctx</span>),
<span class="ident">Btn</span>::<span class="ident">svg_def</span>(<span class="string">&quot;system/assets/tools/edit.svg&quot;</span>).<span class="ident">build</span>(
<span class="ident">ctx</span>,
<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;change duration of phase {}&quot;</span>, <span class="ident">idx</span> <span class="op">+</span> <span class="number">1</span>),
<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;change duration of stage {}&quot;</span>, <span class="ident">idx</span> <span class="op">+</span> <span class="number">1</span>),
<span class="kw">if</span> <span class="ident">selected</span> <span class="op">=</span><span class="op">=</span> <span class="ident">idx</span> {
<span class="ident">hotkey</span>(<span class="ident">Key</span>::<span class="ident">X</span>)
} <span class="kw">else</span> {
<span class="prelude-val">None</span>
},
),
<span class="kw">if</span> <span class="ident">canonical_signal</span>.<span class="ident">phases</span>.<span class="ident">len</span>() <span class="op">&gt;</span> <span class="number">1</span> {
<span class="kw">if</span> <span class="ident">canonical_signal</span>.<span class="ident">stages</span>.<span class="ident">len</span>() <span class="op">&gt;</span> <span class="number">1</span> {
<span class="ident">Btn</span>::<span class="ident">svg_def</span>(<span class="string">&quot;system/assets/tools/delete.svg&quot;</span>)
.<span class="ident">build</span>(<span class="ident">ctx</span>, <span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;delete phase {}&quot;</span>, <span class="ident">idx</span> <span class="op">+</span> <span class="number">1</span>), <span class="prelude-val">None</span>)
.<span class="ident">build</span>(<span class="ident">ctx</span>, <span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;delete stage {}&quot;</span>, <span class="ident">idx</span> <span class="op">+</span> <span class="number">1</span>), <span class="prelude-val">None</span>)
.<span class="ident">align_right</span>()
} <span class="kw">else</span> {
<span class="ident">Widget</span>::<span class="ident">nothing</span>()
},
]),
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">phase_btn</span>,
<span class="ident">stage_btn</span>,
<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="kw">if</span> <span class="ident">idx</span> <span class="op">=</span><span class="op">=</span> <span class="number">0</span> {
<span class="ident">Btn</span>::<span class="ident">text_fg</span>(<span class="string">&quot;&quot;</span>).<span class="ident">inactive</span>(<span class="ident">ctx</span>)
} <span class="kw">else</span> {
<span class="ident">Btn</span>::<span class="ident">text_fg</span>(<span class="string">&quot;&quot;</span>).<span class="ident">build</span>(<span class="ident">ctx</span>, <span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;move up phase {}&quot;</span>, <span class="ident">idx</span> <span class="op">+</span> <span class="number">1</span>), <span class="prelude-val">None</span>)
<span class="ident">Btn</span>::<span class="ident">text_fg</span>(<span class="string">&quot;&quot;</span>).<span class="ident">build</span>(<span class="ident">ctx</span>, <span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;move up stage {}&quot;</span>, <span class="ident">idx</span> <span class="op">+</span> <span class="number">1</span>), <span class="prelude-val">None</span>)
},
<span class="kw">if</span> <span class="ident">idx</span> <span class="op">=</span><span class="op">=</span> <span class="ident">canonical_signal</span>.<span class="ident">phases</span>.<span class="ident">len</span>() <span class="op">-</span> <span class="number">1</span> {
<span class="kw">if</span> <span class="ident">idx</span> <span class="op">=</span><span class="op">=</span> <span class="ident">canonical_signal</span>.<span class="ident">stages</span>.<span class="ident">len</span>() <span class="op">-</span> <span class="number">1</span> {
<span class="ident">Btn</span>::<span class="ident">text_fg</span>(<span class="string">&quot;&quot;</span>).<span class="ident">inactive</span>(<span class="ident">ctx</span>)
} <span class="kw">else</span> {
<span class="ident">Btn</span>::<span class="ident">text_fg</span>(<span class="string">&quot;&quot;</span>).<span class="ident">build</span>(<span class="ident">ctx</span>, <span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;move down phase {}&quot;</span>, <span class="ident">idx</span> <span class="op">+</span> <span class="number">1</span>), <span class="prelude-val">None</span>)
<span class="ident">Btn</span>::<span class="ident">text_fg</span>(<span class="string">&quot;&quot;</span>).<span class="ident">build</span>(<span class="ident">ctx</span>, <span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;move down stage {}&quot;</span>, <span class="ident">idx</span> <span class="op">+</span> <span class="number">1</span>), <span class="prelude-val">None</span>)
},
])
.<span class="ident">centered_vert</span>()
@ -1653,14 +1653,14 @@
.<span class="ident">padding</span>(<span class="number">10</span>);
<span class="kw">if</span> <span class="ident">idx</span> <span class="op">=</span><span class="op">=</span> <span class="ident">selected</span> {
<span class="ident">col</span>.<span class="ident">push</span>(<span class="ident">phase_col</span>.<span class="ident">bg</span>(<span class="ident">Color</span>::<span class="ident">hex</span>(<span class="string">&quot;#2A2A2A&quot;</span>)));
<span class="ident">col</span>.<span class="ident">push</span>(<span class="ident">stage_col</span>.<span class="ident">bg</span>(<span class="ident">Color</span>::<span class="ident">hex</span>(<span class="string">&quot;#2A2A2A&quot;</span>)));
} <span class="kw">else</span> {
<span class="ident">col</span>.<span class="ident">push</span>(<span class="ident">phase_col</span>);
<span class="ident">col</span>.<span class="ident">push</span>(<span class="ident">stage_col</span>);
}
}
<span class="ident">col</span>.<span class="ident">push</span>(<span class="ident">Widget</span>::<span class="ident">horiz_separator</span>(<span class="ident">ctx</span>, <span class="number">0.2</span>));
<span class="ident">col</span>.<span class="ident">push</span>(<span class="ident">Btn</span>::<span class="ident">text_fg</span>(<span class="string">&quot;Add new phase&quot;</span>).<span class="ident">build_def</span>(<span class="ident">ctx</span>, <span class="prelude-val">None</span>));
<span class="ident">col</span>.<span class="ident">push</span>(<span class="ident">Btn</span>::<span class="ident">text_fg</span>(<span class="string">&quot;Add new stage&quot;</span>).<span class="ident">build_def</span>(<span class="ident">ctx</span>, <span class="prelude-val">None</span>));
<span class="comment">// TODO This doesn&#39;t even have a way of knowing which spinner corresponds to which</span>
<span class="comment">// intersection!</span>
@ -1730,26 +1730,26 @@
<span class="ident">BundleEdits</span> { <span class="ident">signals</span> }
}
<span class="comment">// If the intersections haven&#39;t been edited together before, the number of phases and the</span>
<span class="comment">// If the intersections haven&#39;t been edited together before, the number of stages and the</span>
<span class="comment">// durations might not match up. Just initially force them to align somehow.</span>
<span class="kw">fn</span> <span class="ident">synchronize</span>(<span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>, <span class="ident">members</span>: <span class="kw-2">&amp;</span><span class="ident">BTreeSet</span><span class="op">&lt;</span><span class="ident">IntersectionID</span><span class="op">&gt;</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">BundleEdits</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="comment">// Pick one of the members with the most phases as canonical.</span>
<span class="comment">// Pick one of the members with the most stages as canonical.</span>
<span class="kw">let</span> <span class="ident">canonical</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_traffic_signal</span>(
<span class="kw-2">*</span><span class="ident">members</span>
.<span class="ident">iter</span>()
.<span class="ident">max_by_key</span>(<span class="op">|</span><span class="ident">i</span><span class="op">|</span> <span class="ident">map</span>.<span class="ident">get_traffic_signal</span>(<span class="kw-2">*</span><span class="kw-2">*</span><span class="ident">i</span>).<span class="ident">phases</span>.<span class="ident">len</span>())
.<span class="ident">max_by_key</span>(<span class="op">|</span><span class="ident">i</span><span class="op">|</span> <span class="ident">map</span>.<span class="ident">get_traffic_signal</span>(<span class="kw-2">*</span><span class="kw-2">*</span><span class="ident">i</span>).<span class="ident">stages</span>.<span class="ident">len</span>())
.<span class="ident">unwrap</span>(),
);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">signals</span> <span class="op">=</span> <span class="ident">Vec</span>::<span class="ident">new</span>();
<span class="kw">for</span> <span class="ident">i</span> <span class="kw">in</span> <span class="ident">members</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">signal</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_traffic_signal</span>(<span class="kw-2">*</span><span class="ident">i</span>).<span class="ident">clone</span>();
<span class="kw">for</span> (<span class="ident">idx</span>, <span class="ident">canonical_phase</span>) <span class="kw">in</span> <span class="ident">canonical</span>.<span class="ident">phases</span>.<span class="ident">iter</span>().<span class="ident">enumerate</span>() {
<span class="kw">if</span> <span class="ident">signal</span>.<span class="ident">phases</span>.<span class="ident">len</span>() <span class="op">=</span><span class="op">=</span> <span class="ident">idx</span> {
<span class="ident">signal</span>.<span class="ident">phases</span>.<span class="ident">push</span>(<span class="ident">Phase</span>::<span class="ident">new</span>());
<span class="kw">for</span> (<span class="ident">idx</span>, <span class="ident">canonical_stage</span>) <span class="kw">in</span> <span class="ident">canonical</span>.<span class="ident">stages</span>.<span class="ident">iter</span>().<span class="ident">enumerate</span>() {
<span class="kw">if</span> <span class="ident">signal</span>.<span class="ident">stages</span>.<span class="ident">len</span>() <span class="op">=</span><span class="op">=</span> <span class="ident">idx</span> {
<span class="ident">signal</span>.<span class="ident">stages</span>.<span class="ident">push</span>(<span class="ident">Stage</span>::<span class="ident">new</span>());
}
<span class="ident">signal</span>.<span class="ident">phases</span>[<span class="ident">idx</span>].<span class="ident">phase_type</span> <span class="op">=</span> <span class="ident">canonical_phase</span>.<span class="ident">phase_type</span>.<span class="ident">clone</span>();
<span class="ident">signal</span>.<span class="ident">stages</span>[<span class="ident">idx</span>].<span class="ident">phase_type</span> <span class="op">=</span> <span class="ident">canonical_stage</span>.<span class="ident">phase_type</span>.<span class="ident">clone</span>();
}
<span class="ident">signals</span>.<span class="ident">push</span>(<span class="ident">signal</span>);
}
@ -1769,21 +1769,21 @@
}
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">bundle</span> <span class="op">=</span> <span class="ident">BundleEdits</span>::<span class="ident">get_current</span>(<span class="ident">app</span>, <span class="ident">members</span>);
<span class="comment">// Stick all the missing turns in a new phase at the beginning.</span>
<span class="comment">// Stick all the missing turns in a new stage at the beginning.</span>
<span class="kw">for</span> <span class="ident">signal</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">bundle</span>.<span class="ident">signals</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">phase</span> <span class="op">=</span> <span class="ident">Phase</span>::<span class="ident">new</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">stage</span> <span class="op">=</span> <span class="ident">Stage</span>::<span class="ident">new</span>();
<span class="comment">// TODO Could do this more efficiently</span>
<span class="kw">for</span> <span class="ident">g</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">all_missing</span> {
<span class="kw">if</span> <span class="ident">g</span>.<span class="ident">parent</span> <span class="op">!</span><span class="op">=</span> <span class="ident">signal</span>.<span class="ident">id</span> {
<span class="kw">continue</span>;
}
<span class="kw">if</span> <span class="ident">g</span>.<span class="ident">crosswalk</span> {
<span class="ident">phase</span>.<span class="ident">protected_groups</span>.<span class="ident">insert</span>(<span class="kw-2">*</span><span class="ident">g</span>);
<span class="ident">stage</span>.<span class="ident">protected_groups</span>.<span class="ident">insert</span>(<span class="kw-2">*</span><span class="ident">g</span>);
} <span class="kw">else</span> {
<span class="ident">phase</span>.<span class="ident">yield_groups</span>.<span class="ident">insert</span>(<span class="kw-2">*</span><span class="ident">g</span>);
<span class="ident">stage</span>.<span class="ident">yield_groups</span>.<span class="ident">insert</span>(<span class="kw-2">*</span><span class="ident">g</span>);
}
}
<span class="ident">signal</span>.<span class="ident">phases</span>.<span class="ident">insert</span>(<span class="number">0</span>, <span class="ident">phase</span>);
<span class="ident">signal</span>.<span class="ident">stages</span>.<span class="ident">insert</span>(<span class="number">0</span>, <span class="ident">stage</span>);
}
<span class="prelude-val">Some</span>(<span class="ident">bundle</span>)
}
@ -1803,9 +1803,9 @@
<span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">normal_intersection</span>,
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">get_i</span>(<span class="kw-2">*</span><span class="ident">i</span>).<span class="ident">polygon</span>.<span class="ident">clone</span>(),
);
<span class="ident">draw_signal_phase</span>(
<span class="ident">draw_signal_stage</span>(
<span class="ident">ctx</span>.<span class="ident">prerender</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">get_traffic_signal</span>(<span class="kw-2">*</span><span class="ident">i</span>).<span class="ident">phases</span>[<span class="ident">idx</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">get_traffic_signal</span>(<span class="kw-2">*</span><span class="ident">i</span>).<span class="ident">stages</span>[<span class="ident">idx</span>],
<span class="kw-2">*</span><span class="ident">i</span>,
<span class="prelude-val">None</span>,
<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">piece</span>,

View File

@ -130,7 +130,7 @@
<span class="ident">UpdateType</span>, <span class="ident">VerticalAlignment</span>, <span class="ident">Widget</span>,
};
<span class="comment">// TODO Show diagram, auto-sync the phase.</span>
<span class="comment">// TODO Show diagram, auto-sync the stage.</span>
<span class="comment">// TODO Auto quit after things are gone?</span>
<span class="kw">struct</span> <span class="ident">PreviewTrafficSignal</span> {
<span class="ident">panel</span>: <span class="ident">Panel</span>,
@ -193,7 +193,7 @@
<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>,
<span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>,
<span class="ident">members</span>: <span class="ident">BTreeSet</span><span class="op">&lt;</span><span class="ident">IntersectionID</span><span class="op">&gt;</span>,
<span class="ident">phase</span>: <span class="ident">usize</span>,
<span class="ident">stage</span>: <span class="ident">usize</span>,
) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Box</span><span class="op">&lt;</span><span class="kw">dyn</span> <span class="ident">State</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">random</span> <span class="op">=</span> <span class="string">&quot;random agents around these intersections&quot;</span>.<span class="ident">to_string</span>();
<span class="kw">let</span> <span class="ident">right_now</span> <span class="op">=</span> <span class="macro">format</span><span class="macro">!</span>(
@ -209,13 +209,13 @@
<span class="kw">if</span> <span class="ident">x</span> <span class="op">=</span><span class="op">=</span> <span class="string">&quot;random agents around these intersections&quot;</span> {
<span class="kw">for</span> (<span class="ident">idx</span>, <span class="ident">i</span>) <span class="kw">in</span> <span class="ident">members</span>.<span class="ident">iter</span>().<span class="ident">enumerate</span>() {
<span class="kw">if</span> <span class="ident">idx</span> <span class="op">=</span><span class="op">=</span> <span class="number">0</span> {
<span class="comment">// Start at the current phase</span>
<span class="comment">// Start at the current stage</span>
<span class="kw">let</span> <span class="ident">signal</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">get_traffic_signal</span>(<span class="kw-2">*</span><span class="ident">i</span>);
<span class="comment">// TODO Use the offset correctly</span>
<span class="comment">// TODO If there are adaptive phases, this could land anywhere</span>
<span class="comment">// TODO If there are adaptive stages, this could land anywhere</span>
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">step</span> <span class="op">=</span> <span class="ident">Duration</span>::<span class="ident">ZERO</span>;
<span class="kw">for</span> <span class="ident">idx</span> <span class="kw">in</span> <span class="number">0</span>..<span class="ident">phase</span> {
<span class="ident">step</span> <span class="op">+</span><span class="op">=</span> <span class="ident">signal</span>.<span class="ident">phases</span>[<span class="ident">idx</span>].<span class="ident">phase_type</span>.<span class="ident">simple_duration</span>();
<span class="kw">for</span> <span class="ident">idx</span> <span class="kw">in</span> <span class="number">0</span>..<span class="ident">stage</span> {
<span class="ident">step</span> <span class="op">+</span><span class="op">=</span> <span class="ident">signal</span>.<span class="ident">stages</span>[<span class="ident">idx</span>].<span class="ident">phase_type</span>.<span class="ident">simple_duration</span>();
}
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">sim</span>.<span class="ident">timed_step</span>(
<span class="kw-2">&amp;</span><span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>,

View File

@ -111,7 +111,7 @@
<span class="doccomment">/// The output of `rustdoc -V`</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">RUSTDOC_VERSION</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;rustdoc 1.46.0 (04488afe3 2020-08-24)&quot;</span>;
<span class="doccomment">/// The built-time in RFC2822, UTC</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;Sat, 29 Aug 2020 00:04: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">&quot;Sat, 29 Aug 2020 00:36:47 +0000&quot;</span>;
<span class="doccomment">/// The target architecture, given by `cfg!(target_arch)`.</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CFG_TARGET_ARCH</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;x86_64&quot;</span>;
<span class="doccomment">/// The endianness, given by `cfg!(target_endian)`.</span>

View File

@ -407,7 +407,7 @@
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">helpers</span>::<span class="ident">color_for_agent_type</span>;
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">info</span>::{<span class="ident">header_btns</span>, <span class="ident">make_tabs</span>, <span class="ident">throughput</span>, <span class="ident">DataOptions</span>, <span class="ident">Details</span>, <span class="ident">Tab</span>};
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">options</span>::<span class="ident">TrafficSignalStyle</span>;
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">render</span>::<span class="ident">draw_signal_phase</span>;
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">render</span>::<span class="ident">draw_signal_stage</span>;
<span class="kw">use</span> <span class="ident">abstutil</span>::<span class="ident">prettyprint_usize</span>;
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">ArrowCap</span>, <span class="ident">Distance</span>, <span class="ident">Duration</span>, <span class="ident">PolyLine</span>, <span class="ident">Polygon</span>, <span class="ident">Time</span>};
<span class="kw">use</span> <span class="ident">map_model</span>::{<span class="ident">IntersectionID</span>, <span class="ident">IntersectionType</span>, <span class="ident">PhaseType</span>};
@ -656,12 +656,12 @@
<span class="kw">let</span> <span class="ident">signal</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">get_traffic_signal</span>(<span class="ident">id</span>);
{
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">txt</span> <span class="op">=</span> <span class="ident">Text</span>::<span class="ident">new</span>();
<span class="ident">txt</span>.<span class="ident">add</span>(<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;{} phases&quot;</span>, <span class="ident">signal</span>.<span class="ident">phases</span>.<span class="ident">len</span>())).<span class="ident">small_heading</span>());
<span class="ident">txt</span>.<span class="ident">add</span>(<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;{} stages&quot;</span>, <span class="ident">signal</span>.<span class="ident">stages</span>.<span class="ident">len</span>())).<span class="ident">small_heading</span>());
<span class="ident">txt</span>.<span class="ident">add</span>(<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Signal offset: {}&quot;</span>, <span class="ident">signal</span>.<span class="ident">offset</span>)));
{
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">total</span> <span class="op">=</span> <span class="ident">Duration</span>::<span class="ident">ZERO</span>;
<span class="kw">for</span> <span class="ident">p</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">signal</span>.<span class="ident">phases</span> {
<span class="ident">total</span> <span class="op">+</span><span class="op">=</span> <span class="ident">p</span>.<span class="ident">phase_type</span>.<span class="ident">simple_duration</span>();
<span class="kw">for</span> <span class="ident">s</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">signal</span>.<span class="ident">stages</span> {
<span class="ident">total</span> <span class="op">+</span><span class="op">=</span> <span class="ident">s</span>.<span class="ident">phase_type</span>.<span class="ident">simple_duration</span>();
}
<span class="comment">// TODO Say &quot;normally&quot; or something?</span>
<span class="ident">txt</span>.<span class="ident">add</span>(<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;One cycle lasts {}&quot;</span>, <span class="ident">total</span>)));
@ -669,20 +669,20 @@
<span class="ident">rows</span>.<span class="ident">push</span>(<span class="ident">txt</span>.<span class="ident">draw</span>(<span class="ident">ctx</span>));
}
<span class="kw">for</span> (<span class="ident">idx</span>, <span class="ident">phase</span>) <span class="kw">in</span> <span class="ident">signal</span>.<span class="ident">phases</span>.<span class="ident">iter</span>().<span class="ident">enumerate</span>() {
<span class="kw">for</span> (<span class="ident">idx</span>, <span class="ident">stage</span>) <span class="kw">in</span> <span class="ident">signal</span>.<span class="ident">stages</span>.<span class="ident">iter</span>().<span class="ident">enumerate</span>() {
<span class="ident">rows</span>.<span class="ident">push</span>(
<span class="kw">match</span> <span class="ident">phase</span>.<span class="ident">phase_type</span> {
<span class="ident">PhaseType</span>::<span class="ident">Fixed</span>(<span class="ident">d</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Phase {}: {}&quot;</span>, <span class="ident">idx</span> <span class="op">+</span> <span class="number">1</span>, <span class="ident">d</span>)),
<span class="ident">PhaseType</span>::<span class="ident">Adaptive</span>(<span class="ident">d</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Phase {}: {} (adaptive)&quot;</span>, <span class="ident">idx</span> <span class="op">+</span> <span class="number">1</span>, <span class="ident">d</span>)),
<span class="kw">match</span> <span class="ident">stage</span>.<span class="ident">phase_type</span> {
<span class="ident">PhaseType</span>::<span class="ident">Fixed</span>(<span class="ident">d</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Stage {}: {}&quot;</span>, <span class="ident">idx</span> <span class="op">+</span> <span class="number">1</span>, <span class="ident">d</span>)),
<span class="ident">PhaseType</span>::<span class="ident">Adaptive</span>(<span class="ident">d</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Stage {}: {} (adaptive)&quot;</span>, <span class="ident">idx</span> <span class="op">+</span> <span class="number">1</span>, <span class="ident">d</span>)),
}
.<span class="ident">draw</span>(<span class="ident">ctx</span>),
);
{
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">orig_batch</span> <span class="op">=</span> <span class="ident">GeomBatch</span>::<span class="ident">new</span>();
<span class="ident">draw_signal_phase</span>(
<span class="ident">draw_signal_stage</span>(
<span class="ident">ctx</span>.<span class="ident">prerender</span>,
<span class="ident">phase</span>,
<span class="ident">stage</span>,
<span class="ident">id</span>,
<span class="prelude-val">None</span>,
<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">orig_batch</span>,

View File

@ -274,6 +274,8 @@
<span id="274">274</span>
<span id="275">275</span>
<span id="276">276</span>
<span id="277">277</span>
<span id="278">278</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">app</span>::<span class="ident">App</span>;
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">colors</span>::<span class="ident">ColorSchemeChoice</span>;
@ -299,6 +301,7 @@
<span class="kw">pub</span> <span class="ident">time_increment</span>: <span class="ident">Duration</span>,
<span class="kw">pub</span> <span class="ident">resume_after_edit</span>: <span class="ident">bool</span>,
<span class="kw">pub</span> <span class="ident">dont_draw_time_warp</span>: <span class="ident">bool</span>,
<span class="kw">pub</span> <span class="ident">time_warp_halt_limit</span>: <span class="ident">Duration</span>,
<span class="kw">pub</span> <span class="ident">language</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">String</span><span class="op">&gt;</span>,
}
@ -318,6 +321,7 @@
<span class="ident">time_increment</span>: <span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">10</span>),
<span class="ident">resume_after_edit</span>: <span class="bool-val">true</span>,
<span class="ident">dont_draw_time_warp</span>: <span class="bool-val">false</span>,
<span class="ident">time_warp_halt_limit</span>: <span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">5</span>),
<span class="ident">language</span>: <span class="prelude-val">None</span>,
}

View File

@ -437,7 +437,7 @@
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">helpers</span>::<span class="ident">ID</span>;
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">options</span>::<span class="ident">TrafficSignalStyle</span>;
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">render</span>::{
<span class="ident">draw_signal_phase</span>, <span class="ident">DrawOptions</span>, <span class="ident">Renderable</span>, <span class="ident">CROSSWALK_LINE_THICKNESS</span>, <span class="ident">OUTLINE_THICKNESS</span>,
<span class="ident">draw_signal_stage</span>, <span class="ident">DrawOptions</span>, <span class="ident">Renderable</span>, <span class="ident">CROSSWALK_LINE_THICKNESS</span>, <span class="ident">OUTLINE_THICKNESS</span>,
};
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Angle</span>, <span class="ident">ArrowCap</span>, <span class="ident">Distance</span>, <span class="ident">Line</span>, <span class="ident">PolyLine</span>, <span class="ident">Polygon</span>, <span class="ident">Pt2D</span>, <span class="ident">Ring</span>, <span class="ident">Time</span>, <span class="ident">EPSILON_DIST</span>};
<span class="kw">use</span> <span class="ident">map_model</span>::{
@ -581,11 +581,11 @@
.<span class="ident">unwrap_or</span>(<span class="bool-val">true</span>);
<span class="kw">if</span> <span class="ident">recalc</span> {
<span class="kw">let</span> (<span class="ident">idx</span>, <span class="ident">remaining</span>) <span class="op">=</span>
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">sim</span>.<span class="ident">current_phase_and_remaining_time</span>(<span class="self">self</span>.<span class="ident">id</span>);
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">sim</span>.<span class="ident">current_stage_and_remaining_time</span>(<span class="self">self</span>.<span class="ident">id</span>);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">batch</span> <span class="op">=</span> <span class="ident">GeomBatch</span>::<span class="ident">new</span>();
<span class="ident">draw_signal_phase</span>(
<span class="ident">draw_signal_stage</span>(
<span class="ident">g</span>.<span class="ident">prerender</span>,
<span class="kw-2">&amp;</span><span class="ident">signal</span>.<span class="ident">phases</span>[<span class="ident">idx</span>],
<span class="kw-2">&amp;</span><span class="ident">signal</span>.<span class="ident">stages</span>[<span class="ident">idx</span>],
<span class="self">self</span>.<span class="ident">id</span>,
<span class="prelude-val">Some</span>(<span class="ident">remaining</span>),
<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">batch</span>,

View File

@ -107,7 +107,7 @@
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">render</span>::<span class="ident">intersection</span>::{<span class="ident">calculate_corners</span>, <span class="ident">DrawIntersection</span>};
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">render</span>::<span class="ident">map</span>::{<span class="ident">AgentCache</span>, <span class="ident">DrawMap</span>, <span class="ident">UnzoomedAgents</span>};
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">render</span>::<span class="ident">pedestrian</span>::{<span class="ident">DrawPedCrowd</span>, <span class="ident">DrawPedestrian</span>};
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">render</span>::<span class="ident">traffic_signal</span>::<span class="ident">draw_signal_phase</span>;
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">render</span>::<span class="ident">traffic_signal</span>::<span class="ident">draw_signal_stage</span>;
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">render</span>::<span class="ident">turn</span>::{<span class="ident">DrawTurnGroup</span>, <span class="ident">DrawUberTurnGroup</span>};
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Distance</span>, <span class="ident">Polygon</span>, <span class="ident">Pt2D</span>};
<span class="kw">use</span> <span class="ident">map_model</span>::{<span class="ident">IntersectionID</span>, <span class="ident">Map</span>};

View File

@ -273,14 +273,14 @@
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">render</span>::<span class="ident">intersection</span>::<span class="ident">make_crosswalk</span>;
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">render</span>::{<span class="ident">DrawTurnGroup</span>, <span class="ident">BIG_ARROW_THICKNESS</span>};
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Angle</span>, <span class="ident">ArrowCap</span>, <span class="ident">Circle</span>, <span class="ident">Distance</span>, <span class="ident">Duration</span>, <span class="ident">Line</span>, <span class="ident">PolyLine</span>, <span class="ident">Pt2D</span>};
<span class="kw">use</span> <span class="ident">map_model</span>::{<span class="ident">IntersectionID</span>, <span class="ident">Phase</span>, <span class="ident">TurnPriority</span>, <span class="ident">SIDEWALK_THICKNESS</span>};
<span class="kw">use</span> <span class="ident">map_model</span>::{<span class="ident">IntersectionID</span>, <span class="ident">Stage</span>, <span class="ident">TurnPriority</span>, <span class="ident">SIDEWALK_THICKNESS</span>};
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">collections</span>::<span class="ident">BTreeSet</span>;
<span class="kw">use</span> <span class="ident">widgetry</span>::{<span class="ident">Color</span>, <span class="ident">GeomBatch</span>, <span class="ident">Prerender</span>, <span class="ident">RewriteColor</span>};
<span class="comment">// Only draws a box when time_left is present</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">draw_signal_phase</span>(
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">draw_signal_stage</span>(
<span class="ident">prerender</span>: <span class="kw-2">&amp;</span><span class="ident">Prerender</span>,
<span class="ident">phase</span>: <span class="kw-2">&amp;</span><span class="ident">Phase</span>,
<span class="ident">stage</span>: <span class="kw-2">&amp;</span><span class="ident">Stage</span>,
<span class="ident">i</span>: <span class="ident">IntersectionID</span>,
<span class="ident">time_left</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">Duration</span><span class="op">&gt;</span>,
<span class="ident">batch</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">GeomBatch</span>,
@ -306,13 +306,13 @@
<span class="kw">let</span> (<span class="ident">yellow_light</span>, <span class="ident">percent</span>) <span class="op">=</span> <span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">t</span>) <span class="op">=</span> <span class="ident">time_left</span> {
(
<span class="ident">t</span> <span class="op">&lt;</span><span class="op">=</span> <span class="ident">Duration</span>::<span class="ident">seconds</span>(<span class="number">5.0</span>),
(<span class="ident">t</span> <span class="op">/</span> <span class="ident">phase</span>.<span class="ident">phase_type</span>.<span class="ident">simple_duration</span>()) <span class="kw">as</span> <span class="ident">f32</span>,
(<span class="ident">t</span> <span class="op">/</span> <span class="ident">stage</span>.<span class="ident">phase_type</span>.<span class="ident">simple_duration</span>()) <span class="kw">as</span> <span class="ident">f32</span>,
)
} <span class="kw">else</span> {
(<span class="bool-val">false</span>, <span class="number">1.0</span>)
};
<span class="kw">let</span> <span class="ident">yellow</span> <span class="op">=</span> <span class="ident">Color</span>::<span class="ident">YELLOW</span>;
<span class="kw">for</span> <span class="ident">g</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">phase</span>.<span class="ident">protected_groups</span> {
<span class="kw">for</span> <span class="ident">g</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">stage</span>.<span class="ident">protected_groups</span> {
<span class="kw">if</span> <span class="op">!</span><span class="ident">g</span>.<span class="ident">crosswalk</span> {
<span class="comment">// TODO Maybe less if shoulders meet</span>
<span class="kw">let</span> <span class="ident">slice_start</span> <span class="op">=</span> <span class="kw">if</span> <span class="ident">crossed_roads</span>.<span class="ident">contains</span>(<span class="kw-2">&amp;</span>(<span class="ident">g</span>.<span class="ident">from</span>.<span class="ident">id</span>, <span class="ident">g</span>.<span class="ident">parent</span>)) {
@ -357,7 +357,7 @@
.<span class="ident">rotate</span>(<span class="ident">angle</span>),
);
}
<span class="kw">for</span> <span class="ident">g</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">phase</span>.<span class="ident">yield_groups</span> {
<span class="kw">for</span> <span class="ident">g</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">stage</span>.<span class="ident">yield_groups</span> {
<span class="macro">assert</span><span class="macro">!</span>(<span class="op">!</span><span class="ident">g</span>.<span class="ident">crosswalk</span>);
<span class="kw">let</span> <span class="ident">pl</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="ident">signal</span>.<span class="ident">turn_groups</span>[<span class="ident">g</span>].<span class="ident">geom</span>;
<span class="ident">batch</span>.<span class="ident">extend</span>(
@ -393,7 +393,7 @@
<span class="kw">return</span>;
}
<span class="ident">TrafficSignalStyle</span>::<span class="ident">GroupArrows</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">for</span> <span class="ident">g</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">phase</span>.<span class="ident">yield_groups</span> {
<span class="kw">for</span> <span class="ident">g</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">stage</span>.<span class="ident">yield_groups</span> {
<span class="macro">assert</span><span class="macro">!</span>(<span class="op">!</span><span class="ident">g</span>.<span class="ident">crosswalk</span>);
<span class="kw">let</span> <span class="ident">arrow</span> <span class="op">=</span> <span class="ident">signal</span>.<span class="ident">turn_groups</span>[<span class="ident">g</span>]
.<span class="ident">geom</span>
@ -409,7 +409,7 @@
<span class="ident">dont_walk</span>.<span class="ident">insert</span>(<span class="ident">g</span>);
}
}
<span class="kw">for</span> <span class="ident">g</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">phase</span>.<span class="ident">protected_groups</span> {
<span class="kw">for</span> <span class="ident">g</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">stage</span>.<span class="ident">protected_groups</span> {
<span class="kw">if</span> <span class="op">!</span><span class="ident">g</span>.<span class="ident">crosswalk</span> {
<span class="ident">batch</span>.<span class="ident">push</span>(
<span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">signal_protected_turn</span>,
@ -439,7 +439,7 @@
}
}
<span class="ident">TrafficSignalStyle</span>::<span class="ident">Sidewalks</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">for</span> <span class="ident">g</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">phase</span>.<span class="ident">yield_groups</span> {
<span class="kw">for</span> <span class="ident">g</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">stage</span>.<span class="ident">yield_groups</span> {
<span class="macro">assert</span><span class="macro">!</span>(<span class="op">!</span><span class="ident">g</span>.<span class="ident">crosswalk</span>);
<span class="kw">let</span> <span class="ident">arrow</span> <span class="op">=</span> <span class="ident">signal</span>.<span class="ident">turn_groups</span>[<span class="ident">g</span>]
.<span class="ident">geom</span>
@ -449,7 +449,7 @@
<span class="ident">batch</span>.<span class="ident">push</span>(<span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">signal_permitted_turn</span>, <span class="ident">p</span>);
}
}
<span class="kw">for</span> <span class="ident">g</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">phase</span>.<span class="ident">protected_groups</span> {
<span class="kw">for</span> <span class="ident">g</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">stage</span>.<span class="ident">protected_groups</span> {
<span class="kw">if</span> <span class="ident">g</span>.<span class="ident">crosswalk</span> {
<span class="ident">make_crosswalk</span>(
<span class="ident">batch</span>,
@ -470,7 +470,7 @@
<span class="ident">TrafficSignalStyle</span>::<span class="ident">Icons</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">for</span> <span class="ident">g</span> <span class="kw">in</span> <span class="ident">DrawTurnGroup</span>::<span class="ident">for_i</span>(<span class="ident">i</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">batch</span>.<span class="ident">push</span>(<span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">signal_turn_block_bg</span>, <span class="ident">g</span>.<span class="ident">block</span>.<span class="ident">clone</span>());
<span class="kw">let</span> <span class="ident">arrow_color</span> <span class="op">=</span> <span class="kw">match</span> <span class="ident">phase</span>.<span class="ident">get_priority_of_group</span>(<span class="ident">g</span>.<span class="ident">id</span>) {
<span class="kw">let</span> <span class="ident">arrow_color</span> <span class="op">=</span> <span class="kw">match</span> <span class="ident">stage</span>.<span class="ident">get_priority_of_group</span>(<span class="ident">g</span>.<span class="ident">id</span>) {
<span class="ident">TurnPriority</span>::<span class="ident">Protected</span> <span class="op">=</span><span class="op">&gt;</span> <span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">signal_protected_turn</span>,
<span class="ident">TurnPriority</span>::<span class="ident">Yield</span> <span class="op">=</span><span class="op">&gt;</span> <span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">signal_permitted_turn</span>.<span class="ident">alpha</span>(<span class="number">1.0</span>),
<span class="ident">TurnPriority</span>::<span class="ident">Banned</span> <span class="op">=</span><span class="op">&gt;</span> <span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">signal_banned_turn</span>,
@ -483,7 +483,7 @@
<span class="kw">if</span> <span class="ident">turn</span>.<span class="ident">between_sidewalks</span>() {
<span class="kw">continue</span>;
}
<span class="kw">match</span> <span class="ident">phase</span>.<span class="ident">get_priority_of_turn</span>(<span class="ident">turn</span>.<span class="ident">id</span>, <span class="ident">signal</span>) {
<span class="kw">match</span> <span class="ident">stage</span>.<span class="ident">get_priority_of_turn</span>(<span class="ident">turn</span>.<span class="ident">id</span>, <span class="ident">signal</span>) {
<span class="ident">TurnPriority</span>::<span class="ident">Protected</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="ident">batch</span>.<span class="ident">push</span>(
<span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">signal_protected_turn</span>,
@ -513,7 +513,7 @@
<span class="kw">let</span> <span class="ident">radius</span> <span class="op">=</span> <span class="ident">Distance</span>::<span class="ident">meters</span>(<span class="number">2.0</span>);
<span class="kw">let</span> <span class="ident">center</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">get_i</span>(<span class="ident">i</span>).<span class="ident">polygon</span>.<span class="ident">center</span>();
<span class="kw">let</span> <span class="ident">percent</span> <span class="op">=</span> <span class="ident">time_left</span>.<span class="ident">unwrap</span>() <span class="op">/</span> <span class="ident">phase</span>.<span class="ident">phase_type</span>.<span class="ident">simple_duration</span>();
<span class="kw">let</span> <span class="ident">percent</span> <span class="op">=</span> <span class="ident">time_left</span>.<span class="ident">unwrap</span>() <span class="op">/</span> <span class="ident">stage</span>.<span class="ident">phase_type</span>.<span class="ident">simple_duration</span>();
<span class="ident">batch</span>.<span class="ident">push</span>(
<span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">signal_box</span>,
<span class="ident">Circle</span>::<span class="ident">new</span>(<span class="ident">center</span>, <span class="number">1.2</span> <span class="op">*</span> <span class="ident">radius</span>).<span class="ident">to_polygon</span>(),

View File

@ -818,6 +818,8 @@
<span id="818">818</span>
<span id="819">819</span>
<span id="820">820</span>
<span id="821">821</span>
<span id="822">822</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">app</span>::{<span class="ident">App</span>, <span class="ident">FindDelayedIntersections</span>, <span class="ident">ShowEverything</span>};
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">common</span>::<span class="ident">Warping</span>;
@ -1180,7 +1182,7 @@
<span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>, <span class="ident">maybe_mode</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">GameplayMode</span><span class="op">&gt;</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">JumpToTime</span> {
<span class="kw">let</span> <span class="ident">target</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">sim</span>.<span class="ident">time</span>();
<span class="kw">let</span> <span class="ident">end_of_day</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">sim</span>.<span class="ident">get_end_of_day</span>();
<span class="kw">let</span> <span class="ident">halt_limit</span> <span class="op">=</span> <span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">5</span>);
<span class="kw">let</span> <span class="ident">halt_limit</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">opts</span>.<span class="ident">time_warp_halt_limit</span>;
<span class="ident">JumpToTime</span> {
<span class="ident">target</span>,
<span class="ident">halt_limit</span>,
@ -1265,11 +1267,13 @@
}
<span class="string">&quot;choose delay&quot;</span> <span class="op">=</span><span class="op">&gt;</span> <span class="kw">return</span> <span class="ident">Transition</span>::<span class="ident">Keep</span>,
<span class="string">&quot;jump to delay&quot;</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">halt_limit</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">persistent_split_value</span>(<span class="string">&quot;choose delay&quot;</span>);
<span class="ident">app</span>.<span class="ident">opts</span>.<span class="ident">time_warp_halt_limit</span> <span class="op">=</span> <span class="ident">halt_limit</span>;
<span class="kw">return</span> <span class="ident">Transition</span>::<span class="ident">Replace</span>(<span class="ident">TimeWarpScreen</span>::<span class="ident">new</span>(
<span class="ident">ctx</span>,
<span class="ident">app</span>,
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">sim</span>.<span class="ident">get_end_of_day</span>(),
<span class="prelude-val">Some</span>(<span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">persistent_split_value</span>(<span class="string">&quot;choose delay&quot;</span>)),
<span class="prelude-val">Some</span>(<span class="ident">halt_limit</span>),
));
}
<span class="kw">_</span> <span class="op">=</span><span class="op">&gt;</span> <span class="macro">unreachable</span><span class="macro">!</span>(),

View File

@ -113,7 +113,7 @@
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">objects</span>::<span class="ident">parking_lot</span>::{<span class="ident">ParkingLot</span>, <span class="ident">ParkingLotID</span>};
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">objects</span>::<span class="ident">road</span>::{<span class="ident">DirectedRoadID</span>, <span class="ident">Direction</span>, <span class="ident">Road</span>, <span class="ident">RoadID</span>};
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">objects</span>::<span class="ident">stop_signs</span>::{<span class="ident">ControlStopSign</span>, <span class="ident">RoadWithStopSign</span>};
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">objects</span>::<span class="ident">traffic_signals</span>::{<span class="ident">ControlTrafficSignal</span>, <span class="ident">Phase</span>, <span class="ident">PhaseType</span>};
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">objects</span>::<span class="ident">traffic_signals</span>::{<span class="ident">ControlTrafficSignal</span>, <span class="ident">PhaseType</span>, <span class="ident">Stage</span>};
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">objects</span>::<span class="ident">turn</span>::{
<span class="ident">CompressedTurnGroupID</span>, <span class="ident">Turn</span>, <span class="ident">TurnGroup</span>, <span class="ident">TurnGroupID</span>, <span class="ident">TurnID</span>, <span class="ident">TurnPriority</span>, <span class="ident">TurnType</span>,
};

View File

@ -547,7 +547,7 @@
<span id="547">547</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="kw">crate</span>::{
<span class="ident">ControlTrafficSignal</span>, <span class="ident">IntersectionCluster</span>, <span class="ident">IntersectionID</span>, <span class="ident">Map</span>, <span class="ident">Phase</span>, <span class="ident">PhaseType</span>, <span class="ident">RoadID</span>,
<span class="ident">ControlTrafficSignal</span>, <span class="ident">IntersectionCluster</span>, <span class="ident">IntersectionID</span>, <span class="ident">Map</span>, <span class="ident">PhaseType</span>, <span class="ident">RoadID</span>, <span class="ident">Stage</span>,
<span class="ident">TurnGroup</span>, <span class="ident">TurnGroupID</span>, <span class="ident">TurnPriority</span>, <span class="ident">TurnType</span>,
};
<span class="kw">use</span> <span class="ident">abstutil</span>::<span class="ident">Timer</span>;
@ -581,14 +581,14 @@
<span class="comment">// As long as we&#39;re using silly heuristics for these by default, prefer shorter cycle</span>
<span class="comment">// length.</span>
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">ts</span>) <span class="op">=</span> <span class="ident">four_way_two_phase</span>(<span class="ident">map</span>, <span class="ident">id</span>) {
<span class="ident">results</span>.<span class="ident">push</span>((<span class="string">&quot;two-phase&quot;</span>.<span class="ident">to_string</span>(), <span class="ident">ts</span>));
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">ts</span>) <span class="op">=</span> <span class="ident">four_way_two_stage</span>(<span class="ident">map</span>, <span class="ident">id</span>) {
<span class="ident">results</span>.<span class="ident">push</span>((<span class="string">&quot;two-stage&quot;</span>.<span class="ident">to_string</span>(), <span class="ident">ts</span>));
}
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">ts</span>) <span class="op">=</span> <span class="ident">three_way</span>(<span class="ident">map</span>, <span class="ident">id</span>) {
<span class="ident">results</span>.<span class="ident">push</span>((<span class="string">&quot;three-phase&quot;</span>.<span class="ident">to_string</span>(), <span class="ident">ts</span>));
<span class="ident">results</span>.<span class="ident">push</span>((<span class="string">&quot;three-stage&quot;</span>.<span class="ident">to_string</span>(), <span class="ident">ts</span>));
}
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">ts</span>) <span class="op">=</span> <span class="ident">four_way_four_phase</span>(<span class="ident">map</span>, <span class="ident">id</span>) {
<span class="ident">results</span>.<span class="ident">push</span>((<span class="string">&quot;four-phase&quot;</span>.<span class="ident">to_string</span>(), <span class="ident">ts</span>));
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">ts</span>) <span class="op">=</span> <span class="ident">four_way_four_stage</span>(<span class="ident">map</span>, <span class="ident">id</span>) {
<span class="ident">results</span>.<span class="ident">push</span>((<span class="string">&quot;four-stage&quot;</span>.<span class="ident">to_string</span>(), <span class="ident">ts</span>));
}
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">ts</span>) <span class="op">=</span> <span class="ident">half_signal</span>(<span class="ident">map</span>, <span class="ident">id</span>) {
<span class="ident">results</span>.<span class="ident">push</span>((<span class="string">&quot;half signal (2 roads with crosswalk)&quot;</span>.<span class="ident">to_string</span>(), <span class="ident">ts</span>));
@ -597,10 +597,10 @@
<span class="ident">results</span>.<span class="ident">push</span>((<span class="string">&quot;degenerate (2 roads)&quot;</span>.<span class="ident">to_string</span>(), <span class="ident">ts</span>));
}
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">ts</span>) <span class="op">=</span> <span class="ident">four_oneways</span>(<span class="ident">map</span>, <span class="ident">id</span>) {
<span class="ident">results</span>.<span class="ident">push</span>((<span class="string">&quot;two-phase for 4 one-ways&quot;</span>.<span class="ident">to_string</span>(), <span class="ident">ts</span>));
<span class="ident">results</span>.<span class="ident">push</span>((<span class="string">&quot;two-stage for 4 one-ways&quot;</span>.<span class="ident">to_string</span>(), <span class="ident">ts</span>));
}
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">ts</span>) <span class="op">=</span> <span class="ident">phase_per_road</span>(<span class="ident">map</span>, <span class="ident">id</span>) {
<span class="ident">results</span>.<span class="ident">push</span>((<span class="string">&quot;phase per road&quot;</span>.<span class="ident">to_string</span>(), <span class="ident">ts</span>));
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">ts</span>) <span class="op">=</span> <span class="ident">stage_per_road</span>(<span class="ident">map</span>, <span class="ident">id</span>) {
<span class="ident">results</span>.<span class="ident">push</span>((<span class="string">&quot;stage per road&quot;</span>.<span class="ident">to_string</span>(), <span class="ident">ts</span>));
}
<span class="ident">results</span>.<span class="ident">push</span>((
<span class="string">&quot;arbitrary assignment&quot;</span>.<span class="ident">to_string</span>(),
@ -616,7 +616,7 @@
<span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">id</span>: <span class="ident">IntersectionID</span>, <span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ControlTrafficSignal</span> {
<span class="ident">ControlTrafficSignal</span> {
<span class="ident">id</span>,
<span class="ident">phases</span>: <span class="ident">Vec</span>::<span class="ident">new</span>(),
<span class="ident">stages</span>: <span class="ident">Vec</span>::<span class="ident">new</span>(),
<span class="ident">offset</span>: <span class="ident">Duration</span>::<span class="ident">ZERO</span>,
<span class="ident">turn_groups</span>: <span class="ident">TurnGroup</span>::<span class="ident">for_i</span>(<span class="ident">id</span>, <span class="ident">map</span>).<span class="ident">unwrap</span>(),
}
@ -625,23 +625,23 @@
<span class="kw">fn</span> <span class="ident">greedy_assignment</span>(<span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>, <span class="ident">i</span>: <span class="ident">IntersectionID</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ControlTrafficSignal</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">ts</span> <span class="op">=</span> <span class="ident">new</span>(<span class="ident">i</span>, <span class="ident">map</span>);
<span class="comment">// Greedily partition groups into phases that only have protected groups.</span>
<span class="comment">// Greedily partition groups into stages that only have protected groups.</span>
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">remaining_groups</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">TurnGroupID</span><span class="op">&gt;</span> <span class="op">=</span> <span class="ident">ts</span>.<span class="ident">turn_groups</span>.<span class="ident">keys</span>().<span class="ident">cloned</span>().<span class="ident">collect</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">current_phase</span> <span class="op">=</span> <span class="ident">Phase</span>::<span class="ident">new</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">current_stage</span> <span class="op">=</span> <span class="ident">Stage</span>::<span class="ident">new</span>();
<span class="kw">loop</span> {
<span class="kw">let</span> <span class="ident">add</span> <span class="op">=</span> <span class="ident">remaining_groups</span>
.<span class="ident">iter</span>()
.<span class="ident">position</span>(<span class="op">|</span><span class="kw-2">&amp;</span><span class="ident">g</span><span class="op">|</span> <span class="ident">current_phase</span>.<span class="ident">could_be_protected</span>(<span class="ident">g</span>, <span class="kw-2">&amp;</span><span class="ident">ts</span>.<span class="ident">turn_groups</span>));
.<span class="ident">position</span>(<span class="op">|</span><span class="kw-2">&amp;</span><span class="ident">g</span><span class="op">|</span> <span class="ident">current_stage</span>.<span class="ident">could_be_protected</span>(<span class="ident">g</span>, <span class="kw-2">&amp;</span><span class="ident">ts</span>.<span class="ident">turn_groups</span>));
<span class="kw">match</span> <span class="ident">add</span> {
<span class="prelude-val">Some</span>(<span class="ident">idx</span>) <span class="op">=</span><span class="op">&gt;</span> {
<span class="ident">current_phase</span>
<span class="ident">current_stage</span>
.<span class="ident">protected_groups</span>
.<span class="ident">insert</span>(<span class="ident">remaining_groups</span>.<span class="ident">remove</span>(<span class="ident">idx</span>));
}
<span class="prelude-val">None</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="macro">assert</span><span class="macro">!</span>(<span class="op">!</span><span class="ident">current_phase</span>.<span class="ident">protected_groups</span>.<span class="ident">is_empty</span>());
<span class="ident">ts</span>.<span class="ident">phases</span>.<span class="ident">push</span>(<span class="ident">current_phase</span>);
<span class="ident">current_phase</span> <span class="op">=</span> <span class="ident">Phase</span>::<span class="ident">new</span>();
<span class="macro">assert</span><span class="macro">!</span>(<span class="op">!</span><span class="ident">current_stage</span>.<span class="ident">protected_groups</span>.<span class="ident">is_empty</span>());
<span class="ident">ts</span>.<span class="ident">stages</span>.<span class="ident">push</span>(<span class="ident">current_stage</span>);
<span class="ident">current_stage</span> <span class="op">=</span> <span class="ident">Stage</span>::<span class="ident">new</span>();
<span class="kw">if</span> <span class="ident">remaining_groups</span>.<span class="ident">is_empty</span>() {
<span class="kw">break</span>;
}
@ -649,7 +649,7 @@
}
}
<span class="ident">expand_all_phases</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">ts</span>);
<span class="ident">expand_all_stages</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">ts</span>);
<span class="comment">// This must succeed</span>
<span class="ident">ts</span>.<span class="ident">validate</span>().<span class="ident">unwrap</span>()
@ -665,7 +665,7 @@
<span class="kw">let</span> <span class="ident">r2</span> <span class="op">=</span> <span class="kw-2">*</span><span class="ident">roads</span>.<span class="ident">next</span>().<span class="ident">unwrap</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">ts</span> <span class="op">=</span> <span class="ident">new</span>(<span class="ident">i</span>, <span class="ident">map</span>);
<span class="ident">make_phases</span>(
<span class="ident">make_stages</span>(
<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">ts</span>,
<span class="macro">vec</span><span class="macro">!</span>[<span class="macro">vec</span><span class="macro">!</span>[(<span class="macro">vec</span><span class="macro">!</span>[<span class="ident">r1</span>, <span class="ident">r2</span>], <span class="ident">TurnType</span>::<span class="ident">Straight</span>, <span class="ident">PROTECTED</span>)]],
);
@ -678,19 +678,19 @@
}
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">ts</span> <span class="op">=</span> <span class="ident">new</span>(<span class="ident">i</span>, <span class="ident">map</span>);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">vehicle_phase</span> <span class="op">=</span> <span class="ident">Phase</span>::<span class="ident">new</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">ped_phase</span> <span class="op">=</span> <span class="ident">Phase</span>::<span class="ident">new</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">vehicle_stage</span> <span class="op">=</span> <span class="ident">Stage</span>::<span class="ident">new</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">ped_stage</span> <span class="op">=</span> <span class="ident">Stage</span>::<span class="ident">new</span>();
<span class="kw">for</span> (<span class="ident">id</span>, <span class="ident">group</span>) <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">ts</span>.<span class="ident">turn_groups</span> {
<span class="kw">if</span> <span class="ident">id</span>.<span class="ident">crosswalk</span> {
<span class="ident">ped_phase</span>.<span class="ident">edit_group</span>(<span class="ident">group</span>, <span class="ident">TurnPriority</span>::<span class="ident">Protected</span>);
<span class="ident">ped_stage</span>.<span class="ident">edit_group</span>(<span class="ident">group</span>, <span class="ident">TurnPriority</span>::<span class="ident">Protected</span>);
} <span class="kw">else</span> {
<span class="ident">vehicle_phase</span>.<span class="ident">edit_group</span>(<span class="ident">group</span>, <span class="ident">TurnPriority</span>::<span class="ident">Protected</span>);
<span class="ident">vehicle_stage</span>.<span class="ident">edit_group</span>(<span class="ident">group</span>, <span class="ident">TurnPriority</span>::<span class="ident">Protected</span>);
}
}
<span class="ident">vehicle_phase</span>.<span class="ident">phase_type</span> <span class="op">=</span> <span class="ident">PhaseType</span>::<span class="ident">Fixed</span>(<span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">1</span>));
<span class="ident">ped_phase</span>.<span class="ident">phase_type</span> <span class="op">=</span> <span class="ident">PhaseType</span>::<span class="ident">Fixed</span>(<span class="ident">Duration</span>::<span class="ident">seconds</span>(<span class="number">10.0</span>));
<span class="ident">vehicle_stage</span>.<span class="ident">phase_type</span> <span class="op">=</span> <span class="ident">PhaseType</span>::<span class="ident">Fixed</span>(<span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">1</span>));
<span class="ident">ped_stage</span>.<span class="ident">phase_type</span> <span class="op">=</span> <span class="ident">PhaseType</span>::<span class="ident">Fixed</span>(<span class="ident">Duration</span>::<span class="ident">seconds</span>(<span class="number">10.0</span>));
<span class="ident">ts</span>.<span class="ident">phases</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[<span class="ident">vehicle_phase</span>, <span class="ident">ped_phase</span>];
<span class="ident">ts</span>.<span class="ident">stages</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[<span class="ident">vehicle_stage</span>, <span class="ident">ped_stage</span>];
<span class="ident">ts</span>.<span class="ident">validate</span>().<span class="ident">ok</span>()
}
@ -711,8 +711,8 @@
<span class="ident">roads</span>.<span class="ident">remove</span>(<span class="kw-2">&amp;</span><span class="ident">south</span>);
<span class="kw">let</span> <span class="ident">east</span> <span class="op">=</span> <span class="ident">roads</span>.<span class="ident">into_iter</span>().<span class="ident">next</span>().<span class="ident">unwrap</span>();
<span class="comment">// Two-phase with no protected lefts, right turn on red, turning cars yield to peds</span>
<span class="ident">make_phases</span>(
<span class="comment">// Two-stage with no protected lefts, right turn on red, turning cars yield to peds</span>
<span class="ident">make_stages</span>(
<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">ts</span>,
<span class="macro">vec</span><span class="macro">!</span>[
<span class="macro">vec</span><span class="macro">!</span>[
@ -733,7 +733,7 @@
<span class="ident">ts</span>.<span class="ident">validate</span>().<span class="ident">ok</span>()
}
<span class="kw">fn</span> <span class="ident">four_way_four_phase</span>(<span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>, <span class="ident">i</span>: <span class="ident">IntersectionID</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">ControlTrafficSignal</span><span class="op">&gt;</span> {
<span class="kw">fn</span> <span class="ident">four_way_four_stage</span>(<span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>, <span class="ident">i</span>: <span class="ident">IntersectionID</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">ControlTrafficSignal</span><span class="op">&gt;</span> {
<span class="kw">if</span> <span class="ident">map</span>.<span class="ident">get_i</span>(<span class="ident">i</span>).<span class="ident">roads</span>.<span class="ident">len</span>() <span class="op">!</span><span class="op">=</span> <span class="number">4</span> {
<span class="kw">return</span> <span class="prelude-val">None</span>;
}
@ -744,10 +744,10 @@
.<span class="ident">get_roads_sorted_by_incoming_angle</span>(<span class="ident">map</span>.<span class="ident">all_roads</span>());
<span class="kw">let</span> (<span class="ident">north</span>, <span class="ident">west</span>, <span class="ident">south</span>, <span class="ident">east</span>) <span class="op">=</span> (<span class="ident">roads</span>[<span class="number">0</span>], <span class="ident">roads</span>[<span class="number">1</span>], <span class="ident">roads</span>[<span class="number">2</span>], <span class="ident">roads</span>[<span class="number">3</span>]);
<span class="comment">// Four-phase with protected lefts, right turn on red (except for the protected lefts),</span>
<span class="comment">// Four-stage with protected lefts, right turn on red (except for the protected lefts),</span>
<span class="comment">// turning cars yield to peds</span>
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">ts</span> <span class="op">=</span> <span class="ident">new</span>(<span class="ident">i</span>, <span class="ident">map</span>);
<span class="ident">make_phases</span>(
<span class="ident">make_stages</span>(
<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">ts</span>,
<span class="macro">vec</span><span class="macro">!</span>[
<span class="macro">vec</span><span class="macro">!</span>[
@ -767,7 +767,7 @@
<span class="ident">ts</span>.<span class="ident">validate</span>().<span class="ident">ok</span>()
}
<span class="kw">fn</span> <span class="ident">four_way_two_phase</span>(<span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>, <span class="ident">i</span>: <span class="ident">IntersectionID</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">ControlTrafficSignal</span><span class="op">&gt;</span> {
<span class="kw">fn</span> <span class="ident">four_way_two_stage</span>(<span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>, <span class="ident">i</span>: <span class="ident">IntersectionID</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">ControlTrafficSignal</span><span class="op">&gt;</span> {
<span class="kw">if</span> <span class="ident">map</span>.<span class="ident">get_i</span>(<span class="ident">i</span>).<span class="ident">roads</span>.<span class="ident">len</span>() <span class="op">!</span><span class="op">=</span> <span class="number">4</span> {
<span class="kw">return</span> <span class="prelude-val">None</span>;
}
@ -778,9 +778,9 @@
.<span class="ident">get_roads_sorted_by_incoming_angle</span>(<span class="ident">map</span>.<span class="ident">all_roads</span>());
<span class="kw">let</span> (<span class="ident">north</span>, <span class="ident">west</span>, <span class="ident">south</span>, <span class="ident">east</span>) <span class="op">=</span> (<span class="ident">roads</span>[<span class="number">0</span>], <span class="ident">roads</span>[<span class="number">1</span>], <span class="ident">roads</span>[<span class="number">2</span>], <span class="ident">roads</span>[<span class="number">3</span>]);
<span class="comment">// Two-phase with no protected lefts, right turn on red, turning cars yielding to peds</span>
<span class="comment">// Two-stage with no protected lefts, right turn on red, turning cars yielding to peds</span>
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">ts</span> <span class="op">=</span> <span class="ident">new</span>(<span class="ident">i</span>, <span class="ident">map</span>);
<span class="ident">make_phases</span>(
<span class="ident">make_stages</span>(
<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">ts</span>,
<span class="macro">vec</span><span class="macro">!</span>[
<span class="macro">vec</span><span class="macro">!</span>[
@ -819,7 +819,7 @@
<span class="comment">// TODO This may not generalize...</span>
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">ts</span> <span class="op">=</span> <span class="ident">new</span>(<span class="ident">i</span>, <span class="ident">map</span>);
<span class="ident">make_phases</span>(
<span class="ident">make_stages</span>(
<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">ts</span>,
<span class="macro">vec</span><span class="macro">!</span>[
<span class="macro">vec</span><span class="macro">!</span>[
@ -847,8 +847,8 @@
<span class="kw">fn</span> <span class="ident">all_walk_all_yield</span>(<span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>, <span class="ident">i</span>: <span class="ident">IntersectionID</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">ControlTrafficSignal</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">ts</span> <span class="op">=</span> <span class="ident">new</span>(<span class="ident">i</span>, <span class="ident">map</span>);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">all_walk</span> <span class="op">=</span> <span class="ident">Phase</span>::<span class="ident">new</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">all_yield</span> <span class="op">=</span> <span class="ident">Phase</span>::<span class="ident">new</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">all_walk</span> <span class="op">=</span> <span class="ident">Stage</span>::<span class="ident">new</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">all_yield</span> <span class="op">=</span> <span class="ident">Stage</span>::<span class="ident">new</span>();
<span class="kw">for</span> <span class="ident">group</span> <span class="kw">in</span> <span class="ident">ts</span>.<span class="ident">turn_groups</span>.<span class="ident">values</span>() {
<span class="kw">match</span> <span class="ident">group</span>.<span class="ident">turn_type</span> {
@ -861,12 +861,12 @@
}
}
<span class="ident">ts</span>.<span class="ident">phases</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[<span class="ident">all_walk</span>, <span class="ident">all_yield</span>];
<span class="ident">ts</span>.<span class="ident">stages</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[<span class="ident">all_walk</span>, <span class="ident">all_yield</span>];
<span class="comment">// This must succeed</span>
<span class="ident">ts</span>.<span class="ident">validate</span>().<span class="ident">unwrap</span>()
}
<span class="kw">fn</span> <span class="ident">phase_per_road</span>(<span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>, <span class="ident">i</span>: <span class="ident">IntersectionID</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">ControlTrafficSignal</span><span class="op">&gt;</span> {
<span class="kw">fn</span> <span class="ident">stage_per_road</span>(<span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>, <span class="ident">i</span>: <span class="ident">IntersectionID</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">ControlTrafficSignal</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">ts</span> <span class="op">=</span> <span class="ident">new</span>(<span class="ident">i</span>, <span class="ident">map</span>);
<span class="kw">let</span> <span class="ident">sorted_roads</span> <span class="op">=</span> <span class="ident">map</span>
@ -877,30 +877,30 @@
<span class="kw">let</span> <span class="ident">adj1</span> <span class="op">=</span> <span class="kw-2">*</span><span class="ident">abstutil</span>::<span class="ident">wraparound_get</span>(<span class="kw-2">&amp;</span><span class="ident">sorted_roads</span>, (<span class="ident">idx</span> <span class="kw">as</span> <span class="ident">isize</span>) <span class="op">-</span> <span class="number">1</span>);
<span class="kw">let</span> <span class="ident">adj2</span> <span class="op">=</span> <span class="kw-2">*</span><span class="ident">abstutil</span>::<span class="ident">wraparound_get</span>(<span class="kw-2">&amp;</span><span class="ident">sorted_roads</span>, (<span class="ident">idx</span> <span class="kw">as</span> <span class="ident">isize</span>) <span class="op">+</span> <span class="number">1</span>);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">phase</span> <span class="op">=</span> <span class="ident">Phase</span>::<span class="ident">new</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">stage</span> <span class="op">=</span> <span class="ident">Stage</span>::<span class="ident">new</span>();
<span class="kw">for</span> <span class="ident">group</span> <span class="kw">in</span> <span class="ident">ts</span>.<span class="ident">turn_groups</span>.<span class="ident">values</span>() {
<span class="kw">if</span> <span class="ident">group</span>.<span class="ident">turn_type</span> <span class="op">=</span><span class="op">=</span> <span class="ident">TurnType</span>::<span class="ident">Crosswalk</span> {
<span class="kw">if</span> <span class="ident">group</span>.<span class="ident">id</span>.<span class="ident">from</span>.<span class="ident">id</span> <span class="op">=</span><span class="op">=</span> <span class="ident">adj1</span> <span class="op">|</span><span class="op">|</span> <span class="ident">group</span>.<span class="ident">id</span>.<span class="ident">from</span>.<span class="ident">id</span> <span class="op">=</span><span class="op">=</span> <span class="ident">adj2</span> {
<span class="ident">phase</span>.<span class="ident">protected_groups</span>.<span class="ident">insert</span>(<span class="ident">group</span>.<span class="ident">id</span>);
<span class="ident">stage</span>.<span class="ident">protected_groups</span>.<span class="ident">insert</span>(<span class="ident">group</span>.<span class="ident">id</span>);
}
} <span class="kw">else</span> <span class="kw">if</span> <span class="ident">group</span>.<span class="ident">id</span>.<span class="ident">from</span>.<span class="ident">id</span> <span class="op">=</span><span class="op">=</span> <span class="ident">r</span> {
<span class="ident">phase</span>.<span class="ident">yield_groups</span>.<span class="ident">insert</span>(<span class="ident">group</span>.<span class="ident">id</span>);
<span class="ident">stage</span>.<span class="ident">yield_groups</span>.<span class="ident">insert</span>(<span class="ident">group</span>.<span class="ident">id</span>);
}
}
<span class="comment">// Might have a one-way outgoing road. Skip it.</span>
<span class="kw">if</span> <span class="op">!</span><span class="ident">phase</span>.<span class="ident">yield_groups</span>.<span class="ident">is_empty</span>() {
<span class="ident">ts</span>.<span class="ident">phases</span>.<span class="ident">push</span>(<span class="ident">phase</span>);
<span class="kw">if</span> <span class="op">!</span><span class="ident">stage</span>.<span class="ident">yield_groups</span>.<span class="ident">is_empty</span>() {
<span class="ident">ts</span>.<span class="ident">stages</span>.<span class="ident">push</span>(<span class="ident">stage</span>);
}
}
<span class="ident">ts</span>.<span class="ident">validate</span>().<span class="ident">ok</span>()
}
<span class="comment">// Add all possible protected groups to existing phases.</span>
<span class="kw">fn</span> <span class="ident">expand_all_phases</span>(<span class="ident">ts</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">ControlTrafficSignal</span>) {
<span class="kw">for</span> <span class="ident">phase</span> <span class="kw">in</span> <span class="ident">ts</span>.<span class="ident">phases</span>.<span class="ident">iter_mut</span>() {
<span class="comment">// Add all possible protected groups to existing stages.</span>
<span class="kw">fn</span> <span class="ident">expand_all_stages</span>(<span class="ident">ts</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">ControlTrafficSignal</span>) {
<span class="kw">for</span> <span class="ident">stage</span> <span class="kw">in</span> <span class="ident">ts</span>.<span class="ident">stages</span>.<span class="ident">iter_mut</span>() {
<span class="kw">for</span> <span class="ident">g</span> <span class="kw">in</span> <span class="ident">ts</span>.<span class="ident">turn_groups</span>.<span class="ident">keys</span>() {
<span class="kw">if</span> <span class="ident">phase</span>.<span class="ident">could_be_protected</span>(<span class="kw-2">*</span><span class="ident">g</span>, <span class="kw-2">&amp;</span><span class="ident">ts</span>.<span class="ident">turn_groups</span>) {
<span class="ident">phase</span>.<span class="ident">protected_groups</span>.<span class="ident">insert</span>(<span class="kw-2">*</span><span class="ident">g</span>);
<span class="kw">if</span> <span class="ident">stage</span>.<span class="ident">could_be_protected</span>(<span class="kw-2">*</span><span class="ident">g</span>, <span class="kw-2">&amp;</span><span class="ident">ts</span>.<span class="ident">turn_groups</span>) {
<span class="ident">stage</span>.<span class="ident">protected_groups</span>.<span class="ident">insert</span>(<span class="kw-2">*</span><span class="ident">g</span>);
}
}
}
@ -909,12 +909,12 @@
<span class="kw">const</span> <span class="ident">PROTECTED</span>: <span class="ident">bool</span> <span class="op">=</span> <span class="bool-val">true</span>;
<span class="kw">const</span> <span class="ident">YIELD</span>: <span class="ident">bool</span> <span class="op">=</span> <span class="bool-val">false</span>;
<span class="kw">fn</span> <span class="ident">make_phases</span>(
<span class="kw">fn</span> <span class="ident">make_stages</span>(
<span class="ident">ts</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">ControlTrafficSignal</span>,
<span class="ident">phase_specs</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">Vec</span><span class="op">&lt;</span>(<span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">RoadID</span><span class="op">&gt;</span>, <span class="ident">TurnType</span>, <span class="ident">bool</span>)<span class="op">&gt;</span><span class="op">&gt;</span>,
<span class="ident">stage_specs</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">Vec</span><span class="op">&lt;</span>(<span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">RoadID</span><span class="op">&gt;</span>, <span class="ident">TurnType</span>, <span class="ident">bool</span>)<span class="op">&gt;</span><span class="op">&gt;</span>,
) {
<span class="kw">for</span> <span class="ident">specs</span> <span class="kw">in</span> <span class="ident">phase_specs</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">phase</span> <span class="op">=</span> <span class="ident">Phase</span>::<span class="ident">new</span>();
<span class="kw">for</span> <span class="ident">specs</span> <span class="kw">in</span> <span class="ident">stage_specs</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">stage</span> <span class="op">=</span> <span class="ident">Stage</span>::<span class="ident">new</span>();
<span class="kw">for</span> (<span class="ident">roads</span>, <span class="ident">turn_type</span>, <span class="ident">protected</span>) <span class="kw">in</span> <span class="ident">specs</span>.<span class="ident">into_iter</span>() {
<span class="kw">for</span> <span class="ident">group</span> <span class="kw">in</span> <span class="ident">ts</span>.<span class="ident">turn_groups</span>.<span class="ident">values</span>() {
@ -922,7 +922,7 @@
<span class="kw">continue</span>;
}
<span class="ident">phase</span>.<span class="ident">edit_group</span>(
<span class="ident">stage</span>.<span class="ident">edit_group</span>(
<span class="ident">group</span>,
<span class="kw">if</span> <span class="ident">protected</span> {
<span class="ident">TurnPriority</span>::<span class="ident">Protected</span>
@ -936,40 +936,40 @@
<span class="comment">// Add in all compatible crosswalks. Specifying this in specs explicitly doesn&#39;t work when</span>
<span class="comment">// crosswalks stretch across a road strangely, which happens when one side of a road is</span>
<span class="comment">// missing a sidewalk.</span>
<span class="comment">// TODO If a phase has no protected turns at all, this adds the crosswalk to multiple</span>
<span class="comment">// phases in a pretty weird way. It&#39;d be better to add to just one phase -- the one with</span>
<span class="comment">// TODO If a stage has no protected turns at all, this adds the crosswalk to multiple</span>
<span class="comment">// stages in a pretty weird way. It&#39;d be better to add to just one stage -- the one with</span>
<span class="comment">// the least conflicting yields.</span>
<span class="kw">for</span> <span class="ident">group</span> <span class="kw">in</span> <span class="ident">ts</span>.<span class="ident">turn_groups</span>.<span class="ident">values</span>() {
<span class="kw">if</span> <span class="ident">group</span>.<span class="ident">turn_type</span> <span class="op">=</span><span class="op">=</span> <span class="ident">TurnType</span>::<span class="ident">Crosswalk</span>
<span class="kw-2">&amp;</span><span class="op">&amp;</span> <span class="ident">phase</span>.<span class="ident">could_be_protected</span>(<span class="ident">group</span>.<span class="ident">id</span>, <span class="kw-2">&amp;</span><span class="ident">ts</span>.<span class="ident">turn_groups</span>)
<span class="kw-2">&amp;</span><span class="op">&amp;</span> <span class="ident">stage</span>.<span class="ident">could_be_protected</span>(<span class="ident">group</span>.<span class="ident">id</span>, <span class="kw-2">&amp;</span><span class="ident">ts</span>.<span class="ident">turn_groups</span>)
{
<span class="ident">phase</span>.<span class="ident">edit_group</span>(<span class="ident">group</span>, <span class="ident">TurnPriority</span>::<span class="ident">Protected</span>);
<span class="ident">stage</span>.<span class="ident">edit_group</span>(<span class="ident">group</span>, <span class="ident">TurnPriority</span>::<span class="ident">Protected</span>);
}
}
<span class="comment">// Filter out empty phases if they happen.</span>
<span class="kw">if</span> <span class="ident">phase</span>.<span class="ident">protected_groups</span>.<span class="ident">is_empty</span>() <span class="kw-2">&amp;</span><span class="op">&amp;</span> <span class="ident">phase</span>.<span class="ident">yield_groups</span>.<span class="ident">is_empty</span>() {
<span class="comment">// Filter out empty stages if they happen.</span>
<span class="kw">if</span> <span class="ident">stage</span>.<span class="ident">protected_groups</span>.<span class="ident">is_empty</span>() <span class="kw-2">&amp;</span><span class="op">&amp;</span> <span class="ident">stage</span>.<span class="ident">yield_groups</span>.<span class="ident">is_empty</span>() {
<span class="kw">continue</span>;
}
<span class="ident">ts</span>.<span class="ident">phases</span>.<span class="ident">push</span>(<span class="ident">phase</span>);
<span class="ident">ts</span>.<span class="ident">stages</span>.<span class="ident">push</span>(<span class="ident">stage</span>);
}
<span class="kw">if</span> <span class="ident">ts</span>.<span class="ident">phases</span>.<span class="ident">len</span>() <span class="op">&gt;</span> <span class="number">1</span> {
<span class="comment">// At intersections of one-ways like Terry and Denny, we could get away with a single phase.</span>
<span class="comment">// Really weak form of this now, just collapsing the one smallest phase.</span>
<span class="kw">if</span> <span class="ident">ts</span>.<span class="ident">stages</span>.<span class="ident">len</span>() <span class="op">&gt;</span> <span class="number">1</span> {
<span class="comment">// At intersections of one-ways like Terry and Denny, we could get away with a single stage.</span>
<span class="comment">// Really weak form of this now, just collapsing the one smallest stage.</span>
<span class="kw">let</span> <span class="ident">smallest</span> <span class="op">=</span> <span class="ident">ts</span>
.<span class="ident">phases</span>
.<span class="ident">stages</span>
.<span class="ident">iter</span>()
.<span class="ident">min_by_key</span>(<span class="op">|</span><span class="ident">p</span><span class="op">|</span> <span class="ident">p</span>.<span class="ident">protected_groups</span>.<span class="ident">len</span>() <span class="op">+</span> <span class="ident">p</span>.<span class="ident">yield_groups</span>.<span class="ident">len</span>())
.<span class="ident">cloned</span>()
.<span class="ident">unwrap</span>();
<span class="kw">if</span> <span class="ident">ts</span>.<span class="ident">phases</span>.<span class="ident">iter</span>().<span class="ident">any</span>(<span class="op">|</span><span class="ident">p</span><span class="op">|</span> {
<span class="kw">if</span> <span class="ident">ts</span>.<span class="ident">stages</span>.<span class="ident">iter</span>().<span class="ident">any</span>(<span class="op">|</span><span class="ident">p</span><span class="op">|</span> {
<span class="ident">p</span> <span class="op">!</span><span class="op">=</span> <span class="kw-2">&amp;</span><span class="ident">smallest</span>
<span class="kw-2">&amp;</span><span class="op">&amp;</span> <span class="ident">smallest</span>.<span class="ident">protected_groups</span>.<span class="ident">is_subset</span>(<span class="kw-2">&amp;</span><span class="ident">p</span>.<span class="ident">protected_groups</span>)
<span class="kw-2">&amp;</span><span class="op">&amp;</span> <span class="ident">smallest</span>.<span class="ident">yield_groups</span>.<span class="ident">is_subset</span>(<span class="kw-2">&amp;</span><span class="ident">p</span>.<span class="ident">yield_groups</span>)
}) {
<span class="ident">ts</span>.<span class="ident">phases</span>.<span class="ident">retain</span>(<span class="op">|</span><span class="ident">p</span><span class="op">|</span> <span class="ident">p</span> <span class="op">!</span><span class="op">=</span> <span class="kw-2">&amp;</span><span class="ident">smallest</span>);
<span class="ident">ts</span>.<span class="ident">stages</span>.<span class="ident">retain</span>(<span class="op">|</span><span class="ident">p</span><span class="op">|</span> <span class="ident">p</span> <span class="op">!</span><span class="op">=</span> <span class="kw-2">&amp;</span><span class="ident">smallest</span>);
}
}
}
@ -981,13 +981,13 @@
.<span class="ident">filter_map</span>(<span class="op">|</span>(<span class="ident">id</span>, <span class="ident">tg</span>)<span class="op">|</span> <span class="kw">if</span> <span class="ident">id</span>.<span class="ident">crosswalk</span> { <span class="prelude-val">None</span> } <span class="kw">else</span> { <span class="prelude-val">Some</span>(<span class="ident">tg</span>) })
.<span class="ident">collect</span>();
<span class="kw">let</span> <span class="ident">indices</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">usize</span><span class="op">&gt;</span> <span class="op">=</span> (<span class="number">0</span>..<span class="ident">turn_groups</span>.<span class="ident">len</span>()).<span class="ident">collect</span>();
<span class="kw">for</span> <span class="ident">num_phases</span> <span class="kw">in</span> <span class="number">1</span>..<span class="op">=</span><span class="ident">turn_groups</span>.<span class="ident">len</span>() {
<span class="kw">for</span> <span class="ident">num_stages</span> <span class="kw">in</span> <span class="number">1</span>..<span class="op">=</span><span class="ident">turn_groups</span>.<span class="ident">len</span>() {
<span class="macro">println</span><span class="macro">!</span>(
<span class="string">&quot;For {} turn groups, looking for solution with {} phases&quot;</span>,
<span class="string">&quot;For {} turn groups, looking for solution with {} stages&quot;</span>,
<span class="ident">turn_groups</span>.<span class="ident">len</span>(),
<span class="ident">num_phases</span>
<span class="ident">num_stages</span>
);
<span class="kw">for</span> <span class="ident">partition</span> <span class="kw">in</span> <span class="ident">helper</span>(<span class="kw-2">&amp;</span><span class="ident">indices</span>, <span class="ident">num_phases</span>) {
<span class="kw">for</span> <span class="ident">partition</span> <span class="kw">in</span> <span class="ident">helper</span>(<span class="kw-2">&amp;</span><span class="ident">indices</span>, <span class="ident">num_stages</span>) {
<span class="kw">if</span> <span class="ident">okay_partition</span>(<span class="ident">turn_groups</span>.<span class="ident">iter</span>().<span class="ident">collect</span>(), <span class="ident">partition</span>) {
<span class="kw">return</span>;
}
@ -997,9 +997,9 @@
}
<span class="kw">fn</span> <span class="ident">okay_partition</span>(<span class="ident">turn_groups</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="kw-2">&amp;</span><span class="ident">TurnGroup</span><span class="op">&gt;</span>, <span class="ident">partition</span>: <span class="ident">Partition</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">bool</span> {
<span class="kw">for</span> <span class="ident">phase</span> <span class="kw">in</span> <span class="ident">partition</span>.<span class="number">0</span> {
<span class="kw">for</span> <span class="ident">stage</span> <span class="kw">in</span> <span class="ident">partition</span>.<span class="number">0</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">protected</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="kw-2">&amp;</span><span class="ident">TurnGroup</span><span class="op">&gt;</span> <span class="op">=</span> <span class="ident">Vec</span>::<span class="ident">new</span>();
<span class="kw">for</span> <span class="ident">idx</span> <span class="kw">in</span> <span class="ident">phase</span> {
<span class="kw">for</span> <span class="ident">idx</span> <span class="kw">in</span> <span class="ident">stage</span> {
<span class="kw">let</span> <span class="ident">tg</span> <span class="op">=</span> <span class="ident">turn_groups</span>[<span class="ident">idx</span>];
<span class="kw">if</span> <span class="ident">protected</span>.<span class="ident">iter</span>().<span class="ident">any</span>(<span class="op">|</span><span class="ident">other</span><span class="op">|</span> <span class="ident">tg</span>.<span class="ident">conflicts_with</span>(<span class="ident">other</span>)) {
<span class="kw">return</span> <span class="bool-val">false</span>;
@ -1057,8 +1057,8 @@
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">list</span>) <span class="op">=</span> <span class="ident">IntersectionCluster</span>::<span class="ident">autodetect</span>(<span class="ident">i</span>.<span class="ident">id</span>, <span class="ident">map</span>) {
<span class="kw">let</span> <span class="ident">list</span> <span class="op">=</span> <span class="ident">list</span>.<span class="ident">into_iter</span>().<span class="ident">collect</span>::<span class="op">&lt;</span><span class="ident">Vec</span><span class="op">&lt;</span><span class="kw">_</span><span class="op">&gt;</span><span class="op">&gt;</span>();
<span class="kw">if</span> <span class="ident">list</span>.<span class="ident">len</span>() <span class="op">=</span><span class="op">=</span> <span class="number">2</span>
<span class="kw-2">&amp;</span><span class="op">&amp;</span> <span class="ident">map</span>.<span class="ident">get_traffic_signal</span>(<span class="ident">list</span>[<span class="number">0</span>]).<span class="ident">phases</span>.<span class="ident">len</span>() <span class="op">=</span><span class="op">=</span> <span class="number">2</span>
<span class="kw-2">&amp;</span><span class="op">&amp;</span> <span class="ident">map</span>.<span class="ident">get_traffic_signal</span>(<span class="ident">list</span>[<span class="number">1</span>]).<span class="ident">phases</span>.<span class="ident">len</span>() <span class="op">=</span><span class="op">=</span> <span class="number">2</span>
<span class="kw-2">&amp;</span><span class="op">&amp;</span> <span class="ident">map</span>.<span class="ident">get_traffic_signal</span>(<span class="ident">list</span>[<span class="number">0</span>]).<span class="ident">stages</span>.<span class="ident">len</span>() <span class="op">=</span><span class="op">=</span> <span class="number">2</span>
<span class="kw-2">&amp;</span><span class="op">&amp;</span> <span class="ident">map</span>.<span class="ident">get_traffic_signal</span>(<span class="ident">list</span>[<span class="number">1</span>]).<span class="ident">stages</span>.<span class="ident">len</span>() <span class="op">=</span><span class="op">=</span> <span class="number">2</span>
{
<span class="ident">pairs</span>.<span class="ident">push</span>((<span class="ident">list</span>[<span class="number">0</span>], <span class="ident">list</span>[<span class="number">1</span>]));
<span class="ident">seen</span>.<span class="ident">insert</span>(<span class="ident">list</span>[<span class="number">0</span>]);
@ -1070,26 +1070,26 @@
<span class="kw">for</span> (<span class="ident">i1</span>, <span class="ident">i2</span>) <span class="kw">in</span> <span class="ident">pairs</span> {
<span class="kw">let</span> <span class="ident">ts1</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_traffic_signal</span>(<span class="ident">i1</span>);
<span class="kw">let</span> <span class="ident">ts2</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_traffic_signal</span>(<span class="ident">i2</span>);
<span class="kw">let</span> <span class="ident">flip1</span> <span class="op">=</span> <span class="ident">ts1</span>.<span class="ident">phases</span>[<span class="number">0</span>].<span class="ident">protected_groups</span>.<span class="ident">iter</span>().<span class="ident">any</span>(<span class="op">|</span><span class="ident">tg1</span><span class="op">|</span> {
<span class="kw">let</span> <span class="ident">flip1</span> <span class="op">=</span> <span class="ident">ts1</span>.<span class="ident">stages</span>[<span class="number">0</span>].<span class="ident">protected_groups</span>.<span class="ident">iter</span>().<span class="ident">any</span>(<span class="op">|</span><span class="ident">tg1</span><span class="op">|</span> {
<span class="op">!</span><span class="ident">tg1</span>.<span class="ident">crosswalk</span>
<span class="kw-2">&amp;</span><span class="op">&amp;</span> <span class="ident">ts2</span>.<span class="ident">phases</span>[<span class="number">1</span>]
<span class="kw-2">&amp;</span><span class="op">&amp;</span> <span class="ident">ts2</span>.<span class="ident">stages</span>[<span class="number">1</span>]
.<span class="ident">protected_groups</span>
.<span class="ident">iter</span>()
.<span class="ident">any</span>(<span class="op">|</span><span class="ident">tg2</span><span class="op">|</span> <span class="op">!</span><span class="ident">tg2</span>.<span class="ident">crosswalk</span> <span class="kw-2">&amp;</span><span class="op">&amp;</span> (<span class="ident">tg1</span>.<span class="ident">to</span> <span class="op">=</span><span class="op">=</span> <span class="ident">tg2</span>.<span class="ident">from</span> <span class="op">|</span><span class="op">|</span> <span class="ident">tg1</span>.<span class="ident">from</span> <span class="op">=</span><span class="op">=</span> <span class="ident">tg2</span>.<span class="ident">to</span>))
});
<span class="kw">let</span> <span class="ident">flip2</span> <span class="op">=</span> <span class="ident">ts1</span>.<span class="ident">phases</span>[<span class="number">1</span>].<span class="ident">protected_groups</span>.<span class="ident">iter</span>().<span class="ident">any</span>(<span class="op">|</span><span class="ident">tg1</span><span class="op">|</span> {
<span class="kw">let</span> <span class="ident">flip2</span> <span class="op">=</span> <span class="ident">ts1</span>.<span class="ident">stages</span>[<span class="number">1</span>].<span class="ident">protected_groups</span>.<span class="ident">iter</span>().<span class="ident">any</span>(<span class="op">|</span><span class="ident">tg1</span><span class="op">|</span> {
<span class="op">!</span><span class="ident">tg1</span>.<span class="ident">crosswalk</span>
<span class="kw-2">&amp;</span><span class="op">&amp;</span> <span class="ident">ts2</span>.<span class="ident">phases</span>[<span class="number">0</span>]
<span class="kw-2">&amp;</span><span class="op">&amp;</span> <span class="ident">ts2</span>.<span class="ident">stages</span>[<span class="number">0</span>]
.<span class="ident">protected_groups</span>
.<span class="ident">iter</span>()
.<span class="ident">any</span>(<span class="op">|</span><span class="ident">tg2</span><span class="op">|</span> <span class="op">!</span><span class="ident">tg2</span>.<span class="ident">crosswalk</span> <span class="kw-2">&amp;</span><span class="op">&amp;</span> (<span class="ident">tg1</span>.<span class="ident">to</span> <span class="op">=</span><span class="op">=</span> <span class="ident">tg2</span>.<span class="ident">from</span> <span class="op">|</span><span class="op">|</span> <span class="ident">tg1</span>.<span class="ident">from</span> <span class="op">=</span><span class="op">=</span> <span class="ident">tg2</span>.<span class="ident">to</span>))
});
<span class="kw">if</span> <span class="ident">flip1</span> <span class="op">|</span><span class="op">|</span> <span class="ident">flip2</span> {
<span class="macro">println</span><span class="macro">!</span>(
<span class="string">&quot;Flipping phase order of {} and {} to synchronize them&quot;</span>,
<span class="string">&quot;Flipping stage order of {} and {} to synchronize them&quot;</span>,
<span class="ident">i1</span>, <span class="ident">i2</span>
);
<span class="ident">map</span>.<span class="ident">traffic_signals</span>.<span class="ident">get_mut</span>(<span class="kw-2">&amp;</span><span class="ident">i1</span>).<span class="ident">unwrap</span>().<span class="ident">phases</span>.<span class="ident">swap</span>(<span class="number">0</span>, <span class="number">1</span>);
<span class="ident">map</span>.<span class="ident">traffic_signals</span>.<span class="ident">get_mut</span>(<span class="kw-2">&amp;</span><span class="ident">i1</span>).<span class="ident">unwrap</span>().<span class="ident">stages</span>.<span class="ident">swap</span>(<span class="number">0</span>, <span class="number">1</span>);
}
}
}

View File

@ -386,6 +386,8 @@
<span id="386">386</span>
<span id="387">387</span>
<span id="388">388</span>
<span id="389">389</span>
<span id="390">390</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">make</span>::<span class="ident">traffic_signals</span>::{<span class="ident">brute_force</span>, <span class="ident">get_possible_policies</span>};
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">raw</span>::<span class="ident">OriginalRoad</span>;
@ -402,7 +404,7 @@
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>, <span class="ident">Serialize</span>, <span class="ident">Deserialize</span>, <span class="ident">Clone</span>, <span class="ident">PartialEq</span>)]</span>
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">ControlTrafficSignal</span> {
<span class="kw">pub</span> <span class="ident">id</span>: <span class="ident">IntersectionID</span>,
<span class="kw">pub</span> <span class="ident">phases</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">Phase</span><span class="op">&gt;</span>,
<span class="kw">pub</span> <span class="ident">stages</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">Stage</span><span class="op">&gt;</span>,
<span class="kw">pub</span> <span class="ident">offset</span>: <span class="ident">Duration</span>,
<span class="attribute">#[<span class="ident">serde</span>(
@ -413,17 +415,19 @@
}
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>, <span class="ident">Debug</span>, <span class="ident">Serialize</span>, <span class="ident">Deserialize</span>, <span class="ident">PartialEq</span>)]</span>
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Phase</span> {
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Stage</span> {
<span class="kw">pub</span> <span class="ident">protected_groups</span>: <span class="ident">BTreeSet</span><span class="op">&lt;</span><span class="ident">TurnGroupID</span><span class="op">&gt;</span>,
<span class="kw">pub</span> <span class="ident">yield_groups</span>: <span class="ident">BTreeSet</span><span class="op">&lt;</span><span class="ident">TurnGroupID</span><span class="op">&gt;</span>,
<span class="comment">// TODO Not renaming this, because this is going to change radically in</span>
<span class="comment">// https://github.com/dabreegster/abstreet/pull/298 anyway</span>
<span class="kw">pub</span> <span class="ident">phase_type</span>: <span class="ident">PhaseType</span>,
}
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>, <span class="ident">Debug</span>, <span class="ident">Serialize</span>, <span class="ident">Deserialize</span>, <span class="ident">PartialEq</span>)]</span>
<span class="kw">pub</span> <span class="kw">enum</span> <span class="ident">PhaseType</span> {
<span class="ident">Fixed</span>(<span class="ident">Duration</span>),
<span class="comment">// Same as fixed, but when this phase would normally end, if there&#39;s still incoming demand,</span>
<span class="comment">// repeat the phase entirely.</span>
<span class="comment">// Same as fixed, but when this stage would normally end, if there&#39;s still incoming demand,</span>
<span class="comment">// repeat the stage entirely.</span>
<span class="comment">// TODO This is a silly policy, but a start towards variable timers.</span>
<span class="ident">Adaptive</span>(<span class="ident">Duration</span>),
}
@ -462,9 +466,9 @@
<span class="comment">// Does the assignment cover the correct set of groups?</span>
<span class="kw">let</span> <span class="ident">expected_groups</span>: <span class="ident">BTreeSet</span><span class="op">&lt;</span><span class="ident">TurnGroupID</span><span class="op">&gt;</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">turn_groups</span>.<span class="ident">keys</span>().<span class="ident">cloned</span>().<span class="ident">collect</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">actual_groups</span>: <span class="ident">BTreeSet</span><span class="op">&lt;</span><span class="ident">TurnGroupID</span><span class="op">&gt;</span> <span class="op">=</span> <span class="ident">BTreeSet</span>::<span class="ident">new</span>();
<span class="kw">for</span> <span class="ident">phase</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">phases</span> {
<span class="ident">actual_groups</span>.<span class="ident">extend</span>(<span class="ident">phase</span>.<span class="ident">protected_groups</span>.<span class="ident">iter</span>());
<span class="ident">actual_groups</span>.<span class="ident">extend</span>(<span class="ident">phase</span>.<span class="ident">yield_groups</span>.<span class="ident">iter</span>());
<span class="kw">for</span> <span class="ident">stage</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">stages</span> {
<span class="ident">actual_groups</span>.<span class="ident">extend</span>(<span class="ident">stage</span>.<span class="ident">protected_groups</span>.<span class="ident">iter</span>());
<span class="ident">actual_groups</span>.<span class="ident">extend</span>(<span class="ident">stage</span>.<span class="ident">yield_groups</span>.<span class="ident">iter</span>());
}
<span class="kw">if</span> <span class="ident">expected_groups</span> <span class="op">!</span><span class="op">=</span> <span class="ident">actual_groups</span> {
<span class="kw">return</span> <span class="prelude-val">Err</span>(<span class="macro">format</span><span class="macro">!</span>(
@ -481,14 +485,14 @@
));
}
<span class="kw">for</span> <span class="ident">phase</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">phases</span> {
<span class="comment">// Do any of the priority groups in one phase conflict?</span>
<span class="kw">for</span> <span class="ident">g1</span> <span class="kw">in</span> <span class="ident">phase</span>.<span class="ident">protected_groups</span>.<span class="ident">iter</span>().<span class="ident">map</span>(<span class="op">|</span><span class="ident">g</span><span class="op">|</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">turn_groups</span>[<span class="ident">g</span>]) {
<span class="kw">for</span> <span class="ident">g2</span> <span class="kw">in</span> <span class="ident">phase</span>.<span class="ident">protected_groups</span>.<span class="ident">iter</span>().<span class="ident">map</span>(<span class="op">|</span><span class="ident">g</span><span class="op">|</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">turn_groups</span>[<span class="ident">g</span>]) {
<span class="kw">for</span> <span class="ident">stage</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">stages</span> {
<span class="comment">// Do any of the priority groups in one stage conflict?</span>
<span class="kw">for</span> <span class="ident">g1</span> <span class="kw">in</span> <span class="ident">stage</span>.<span class="ident">protected_groups</span>.<span class="ident">iter</span>().<span class="ident">map</span>(<span class="op">|</span><span class="ident">g</span><span class="op">|</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">turn_groups</span>[<span class="ident">g</span>]) {
<span class="kw">for</span> <span class="ident">g2</span> <span class="kw">in</span> <span class="ident">stage</span>.<span class="ident">protected_groups</span>.<span class="ident">iter</span>().<span class="ident">map</span>(<span class="op">|</span><span class="ident">g</span><span class="op">|</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">turn_groups</span>[<span class="ident">g</span>]) {
<span class="kw">if</span> <span class="ident">g1</span>.<span class="ident">conflicts_with</span>(<span class="ident">g2</span>) {
<span class="kw">return</span> <span class="prelude-val">Err</span>(<span class="macro">format</span><span class="macro">!</span>(
<span class="string">&quot;Traffic signal has conflicting protected groups in one \
phase:\n{:?}\n\n{:?}&quot;</span>,
stage:\n{:?}\n\n{:?}&quot;</span>,
<span class="ident">g1</span>, <span class="ident">g2</span>
));
}
@ -496,7 +500,7 @@
}
<span class="comment">// Do any of the crosswalks yield?</span>
<span class="kw">for</span> <span class="ident">g</span> <span class="kw">in</span> <span class="ident">phase</span>.<span class="ident">yield_groups</span>.<span class="ident">iter</span>().<span class="ident">map</span>(<span class="op">|</span><span class="ident">g</span><span class="op">|</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">turn_groups</span>[<span class="ident">g</span>]) {
<span class="kw">for</span> <span class="ident">g</span> <span class="kw">in</span> <span class="ident">stage</span>.<span class="ident">yield_groups</span>.<span class="ident">iter</span>().<span class="ident">map</span>(<span class="op">|</span><span class="ident">g</span><span class="op">|</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">turn_groups</span>[<span class="ident">g</span>]) {
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">g</span>.<span class="ident">turn_type</span> <span class="op">!</span><span class="op">=</span> <span class="ident">TurnType</span>::<span class="ident">Crosswalk</span>);
}
}
@ -508,43 +512,43 @@
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">convert_to_ped_scramble</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">bool</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="kw">let</span> <span class="kw-2">mut</span> <span class="ident">all_walk_phase</span> <span class="op">=</span> <span class="ident">Phase</span>::<span class="ident">new</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">all_walk_stage</span> <span class="op">=</span> <span class="ident">Stage</span>::<span class="ident">new</span>();
<span class="kw">for</span> <span class="ident">g</span> <span class="kw">in</span> <span class="self">self</span>.<span class="ident">turn_groups</span>.<span class="ident">values</span>() {
<span class="kw">if</span> <span class="ident">g</span>.<span class="ident">turn_type</span> <span class="op">=</span><span class="op">=</span> <span class="ident">TurnType</span>::<span class="ident">Crosswalk</span> {
<span class="ident">all_walk_phase</span>.<span class="ident">edit_group</span>(<span class="ident">g</span>, <span class="ident">TurnPriority</span>::<span class="ident">Protected</span>);
<span class="ident">all_walk_stage</span>.<span class="ident">edit_group</span>(<span class="ident">g</span>, <span class="ident">TurnPriority</span>::<span class="ident">Protected</span>);
}
}
<span class="comment">// Remove Crosswalk groups from existing phases.</span>
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">replaced</span> <span class="op">=</span> <span class="ident">std</span>::<span class="ident">mem</span>::<span class="ident">replace</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>.<span class="ident">phases</span>, <span class="ident">Vec</span>::<span class="ident">new</span>());
<span class="comment">// Remove Crosswalk groups from existing stages.</span>
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">replaced</span> <span class="op">=</span> <span class="ident">std</span>::<span class="ident">mem</span>::<span class="ident">replace</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>.<span class="ident">stages</span>, <span class="ident">Vec</span>::<span class="ident">new</span>());
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">has_all_walk</span> <span class="op">=</span> <span class="bool-val">false</span>;
<span class="kw">for</span> <span class="ident">phase</span> <span class="kw">in</span> <span class="ident">replaced</span>.<span class="ident">iter_mut</span>() {
<span class="kw">if</span> <span class="op">!</span><span class="ident">has_all_walk</span> <span class="kw-2">&amp;</span><span class="op">&amp;</span> <span class="ident">phase</span> <span class="op">=</span><span class="op">=</span> <span class="kw-2">&amp;</span><span class="ident">all_walk_phase</span> {
<span class="kw">for</span> <span class="ident">stage</span> <span class="kw">in</span> <span class="ident">replaced</span>.<span class="ident">iter_mut</span>() {
<span class="kw">if</span> <span class="op">!</span><span class="ident">has_all_walk</span> <span class="kw-2">&amp;</span><span class="op">&amp;</span> <span class="ident">stage</span> <span class="op">=</span><span class="op">=</span> <span class="kw-2">&amp;</span><span class="ident">all_walk_stage</span> {
<span class="ident">has_all_walk</span> <span class="op">=</span> <span class="bool-val">true</span>;
<span class="kw">continue</span>;
}
<span class="comment">// Crosswalks are only in protected_groups.</span>
<span class="ident">retain_btreeset</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">phase</span>.<span class="ident">protected_groups</span>, <span class="op">|</span><span class="ident">g</span><span class="op">|</span> {
<span class="ident">retain_btreeset</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">stage</span>.<span class="ident">protected_groups</span>, <span class="op">|</span><span class="ident">g</span><span class="op">|</span> {
<span class="self">self</span>.<span class="ident">turn_groups</span>[<span class="ident">g</span>].<span class="ident">turn_type</span> <span class="op">!</span><span class="op">=</span> <span class="ident">TurnType</span>::<span class="ident">Crosswalk</span>
});
<span class="comment">// Blindly try to promote yield groups to protected, now that crosswalks are gone.</span>
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">promoted</span> <span class="op">=</span> <span class="ident">Vec</span>::<span class="ident">new</span>();
<span class="kw">for</span> <span class="ident">g</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">phase</span>.<span class="ident">yield_groups</span> {
<span class="kw">if</span> <span class="ident">phase</span>.<span class="ident">could_be_protected</span>(<span class="kw-2">*</span><span class="ident">g</span>, <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">turn_groups</span>) {
<span class="ident">phase</span>.<span class="ident">protected_groups</span>.<span class="ident">insert</span>(<span class="kw-2">*</span><span class="ident">g</span>);
<span class="kw">for</span> <span class="ident">g</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">stage</span>.<span class="ident">yield_groups</span> {
<span class="kw">if</span> <span class="ident">stage</span>.<span class="ident">could_be_protected</span>(<span class="kw-2">*</span><span class="ident">g</span>, <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">turn_groups</span>) {
<span class="ident">stage</span>.<span class="ident">protected_groups</span>.<span class="ident">insert</span>(<span class="kw-2">*</span><span class="ident">g</span>);
<span class="ident">promoted</span>.<span class="ident">push</span>(<span class="kw-2">*</span><span class="ident">g</span>);
}
}
<span class="kw">for</span> <span class="ident">g</span> <span class="kw">in</span> <span class="ident">promoted</span> {
<span class="ident">phase</span>.<span class="ident">yield_groups</span>.<span class="ident">remove</span>(<span class="kw-2">&amp;</span><span class="ident">g</span>);
<span class="ident">stage</span>.<span class="ident">yield_groups</span>.<span class="ident">remove</span>(<span class="kw-2">&amp;</span><span class="ident">g</span>);
}
}
<span class="self">self</span>.<span class="ident">phases</span> <span class="op">=</span> <span class="ident">replaced</span>;
<span class="self">self</span>.<span class="ident">stages</span> <span class="op">=</span> <span class="ident">replaced</span>;
<span class="kw">if</span> <span class="op">!</span><span class="ident">has_all_walk</span> {
<span class="self">self</span>.<span class="ident">phases</span>.<span class="ident">push</span>(<span class="ident">all_walk_phase</span>);
<span class="self">self</span>.<span class="ident">stages</span>.<span class="ident">push</span>(<span class="ident">all_walk_stage</span>);
}
<span class="self">self</span> <span class="op">!</span><span class="op">=</span> <span class="kw-2">&amp;</span><span class="ident">orig</span>
}
@ -563,11 +567,11 @@
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">missing_turns</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">BTreeSet</span><span class="op">&lt;</span><span class="ident">TurnGroupID</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">missing</span>: <span class="ident">BTreeSet</span><span class="op">&lt;</span><span class="ident">TurnGroupID</span><span class="op">&gt;</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">turn_groups</span>.<span class="ident">keys</span>().<span class="ident">cloned</span>().<span class="ident">collect</span>();
<span class="kw">for</span> <span class="ident">phase</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">phases</span> {
<span class="kw">for</span> <span class="ident">g</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">phase</span>.<span class="ident">protected_groups</span> {
<span class="kw">for</span> <span class="ident">stage</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">stages</span> {
<span class="kw">for</span> <span class="ident">g</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">stage</span>.<span class="ident">protected_groups</span> {
<span class="ident">missing</span>.<span class="ident">remove</span>(<span class="ident">g</span>);
}
<span class="kw">for</span> <span class="ident">g</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">phase</span>.<span class="ident">yield_groups</span> {
<span class="kw">for</span> <span class="ident">g</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">stage</span>.<span class="ident">yield_groups</span> {
<span class="ident">missing</span>.<span class="ident">remove</span>(<span class="ident">g</span>);
}
}
@ -587,9 +591,9 @@
}
}
<span class="kw">impl</span> <span class="ident">Phase</span> {
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>() <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Phase</span> {
<span class="ident">Phase</span> {
<span class="kw">impl</span> <span class="ident">Stage</span> {
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>() <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Stage</span> {
<span class="ident">Stage</span> {
<span class="ident">protected_groups</span>: <span class="ident">BTreeSet</span>::<span class="ident">new</span>(),
<span class="ident">yield_groups</span>: <span class="ident">BTreeSet</span>::<span class="ident">new</span>(),
<span class="ident">phase_type</span>: <span class="ident">PhaseType</span>::<span class="ident">Fixed</span>(<span class="ident">Duration</span>::<span class="ident">seconds</span>(<span class="number">30.0</span>)),
@ -651,20 +655,20 @@
<span class="ident">seattle_traffic_signals</span>::<span class="ident">TrafficSignal</span> {
<span class="ident">intersection_osm_node_id</span>: <span class="ident">map</span>.<span class="ident">get_i</span>(<span class="self">self</span>.<span class="ident">id</span>).<span class="ident">orig_id</span>.<span class="number">0</span>,
<span class="ident">phases</span>: <span class="self">self</span>
.<span class="ident">phases</span>
.<span class="ident">stages</span>
.<span class="ident">iter</span>()
.<span class="ident">map</span>(<span class="op">|</span><span class="ident">p</span><span class="op">|</span> <span class="ident">seattle_traffic_signals</span>::<span class="ident">Phase</span> {
<span class="ident">protected_turns</span>: <span class="ident">p</span>
.<span class="ident">map</span>(<span class="op">|</span><span class="ident">s</span><span class="op">|</span> <span class="ident">seattle_traffic_signals</span>::<span class="ident">Phase</span> {
<span class="ident">protected_turns</span>: <span class="ident">s</span>
.<span class="ident">protected_groups</span>
.<span class="ident">iter</span>()
.<span class="ident">map</span>(<span class="op">|</span><span class="ident">t</span><span class="op">|</span> <span class="ident">export_turn_group</span>(<span class="ident">t</span>, <span class="ident">map</span>))
.<span class="ident">collect</span>(),
<span class="ident">permitted_turns</span>: <span class="ident">p</span>
<span class="ident">permitted_turns</span>: <span class="ident">s</span>
.<span class="ident">yield_groups</span>
.<span class="ident">iter</span>()
.<span class="ident">map</span>(<span class="op">|</span><span class="ident">t</span><span class="op">|</span> <span class="ident">export_turn_group</span>(<span class="ident">t</span>, <span class="ident">map</span>))
.<span class="ident">collect</span>(),
<span class="ident">phase_type</span>: <span class="kw">match</span> <span class="ident">p</span>.<span class="ident">phase_type</span> {
<span class="ident">phase_type</span>: <span class="kw">match</span> <span class="ident">s</span>.<span class="ident">phase_type</span> {
<span class="ident">PhaseType</span>::<span class="ident">Fixed</span>(<span class="ident">d</span>) <span class="op">=</span><span class="op">&gt;</span> {
<span class="ident">seattle_traffic_signals</span>::<span class="ident">PhaseType</span>::<span class="ident">Fixed</span>(<span class="ident">d</span>.<span class="ident">inner_seconds</span>() <span class="kw">as</span> <span class="ident">usize</span>)
}
@ -683,25 +687,25 @@
<span class="ident">id</span>: <span class="ident">IntersectionID</span>,
<span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>,
) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">ControlTrafficSignal</span>, <span class="ident">String</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">phases</span> <span class="op">=</span> <span class="ident">Vec</span>::<span class="ident">new</span>();
<span class="kw">for</span> <span class="ident">p</span> <span class="kw">in</span> <span class="ident">raw</span>.<span class="ident">phases</span> {
<span class="kw">let</span> <span class="ident">num_protected</span> <span class="op">=</span> <span class="ident">p</span>.<span class="ident">protected_turns</span>.<span class="ident">len</span>();
<span class="kw">let</span> <span class="ident">num_permitted</span> <span class="op">=</span> <span class="ident">p</span>.<span class="ident">permitted_turns</span>.<span class="ident">len</span>();
<span class="kw">let</span> <span class="ident">protected_groups</span> <span class="op">=</span> <span class="ident">p</span>
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">stages</span> <span class="op">=</span> <span class="ident">Vec</span>::<span class="ident">new</span>();
<span class="kw">for</span> <span class="ident">s</span> <span class="kw">in</span> <span class="ident">raw</span>.<span class="ident">phases</span> {
<span class="kw">let</span> <span class="ident">num_protected</span> <span class="op">=</span> <span class="ident">s</span>.<span class="ident">protected_turns</span>.<span class="ident">len</span>();
<span class="kw">let</span> <span class="ident">num_permitted</span> <span class="op">=</span> <span class="ident">s</span>.<span class="ident">permitted_turns</span>.<span class="ident">len</span>();
<span class="kw">let</span> <span class="ident">protected_groups</span> <span class="op">=</span> <span class="ident">s</span>
.<span class="ident">protected_turns</span>
.<span class="ident">into_iter</span>()
.<span class="ident">filter_map</span>(<span class="op">|</span><span class="ident">t</span><span class="op">|</span> <span class="ident">import_turn_group</span>(<span class="ident">t</span>, <span class="ident">map</span>))
.<span class="ident">collect</span>::<span class="op">&lt;</span><span class="ident">BTreeSet</span><span class="op">&lt;</span><span class="kw">_</span><span class="op">&gt;</span><span class="op">&gt;</span>();
<span class="kw">let</span> <span class="ident">yield_groups</span> <span class="op">=</span> <span class="ident">p</span>
<span class="kw">let</span> <span class="ident">yield_groups</span> <span class="op">=</span> <span class="ident">s</span>
.<span class="ident">permitted_turns</span>
.<span class="ident">into_iter</span>()
.<span class="ident">filter_map</span>(<span class="op">|</span><span class="ident">t</span><span class="op">|</span> <span class="ident">import_turn_group</span>(<span class="ident">t</span>, <span class="ident">map</span>))
.<span class="ident">collect</span>::<span class="op">&lt;</span><span class="ident">BTreeSet</span><span class="op">&lt;</span><span class="kw">_</span><span class="op">&gt;</span><span class="op">&gt;</span>();
<span class="kw">if</span> <span class="ident">protected_groups</span>.<span class="ident">len</span>() <span class="op">=</span><span class="op">=</span> <span class="ident">num_protected</span> <span class="kw-2">&amp;</span><span class="op">&amp;</span> <span class="ident">yield_groups</span>.<span class="ident">len</span>() <span class="op">=</span><span class="op">=</span> <span class="ident">num_permitted</span> {
<span class="ident">phases</span>.<span class="ident">push</span>(<span class="ident">Phase</span> {
<span class="ident">stages</span>.<span class="ident">push</span>(<span class="ident">Stage</span> {
<span class="ident">protected_groups</span>,
<span class="ident">yield_groups</span>,
<span class="ident">phase_type</span>: <span class="kw">match</span> <span class="ident">p</span>.<span class="ident">phase_type</span> {
<span class="ident">phase_type</span>: <span class="kw">match</span> <span class="ident">s</span>.<span class="ident">phase_type</span> {
<span class="ident">seattle_traffic_signals</span>::<span class="ident">PhaseType</span>::<span class="ident">Fixed</span>(<span class="ident">d</span>) <span class="op">=</span><span class="op">&gt;</span> {
<span class="ident">PhaseType</span>::<span class="ident">Fixed</span>(<span class="ident">Duration</span>::<span class="ident">seconds</span>(<span class="ident">d</span> <span class="kw">as</span> <span class="ident">f64</span>))
}
@ -719,7 +723,7 @@
}
<span class="ident">ControlTrafficSignal</span> {
<span class="ident">id</span>,
<span class="ident">phases</span>,
<span class="ident">stages</span>,
<span class="ident">offset</span>: <span class="ident">Duration</span>::<span class="ident">seconds</span>(<span class="ident">raw</span>.<span class="ident">offset_seconds</span> <span class="kw">as</span> <span class="ident">f64</span>),
<span class="ident">turn_groups</span>: <span class="ident">TurnGroup</span>::<span class="ident">for_i</span>(<span class="ident">id</span>, <span class="ident">map</span>).<span class="ident">unwrap</span>(),
}

View File

@ -824,8 +824,8 @@
<span class="ident">reserved</span>: <span class="ident">BTreeSet</span><span class="op">&lt;</span><span class="ident">Request</span><span class="op">&gt;</span>,
<span class="comment">// Only relevant for traffic signals</span>
<span class="ident">current_phase</span>: <span class="ident">usize</span>,
<span class="ident">phase_ends_at</span>: <span class="ident">Time</span>,
<span class="ident">current_stage</span>: <span class="ident">usize</span>,
<span class="ident">stage_ends_at</span>: <span class="ident">Time</span>,
}
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">PartialEq</span>, <span class="ident">Eq</span>, <span class="ident">PartialOrd</span>, <span class="ident">Ord</span>, <span class="ident">Serialize</span>, <span class="ident">Deserialize</span>, <span class="ident">Clone</span>, <span class="ident">Debug</span>)]</span>
@ -858,29 +858,29 @@
<span class="ident">accepted</span>: <span class="ident">BTreeSet</span>::<span class="ident">new</span>(),
<span class="ident">waiting</span>: <span class="ident">BTreeMap</span>::<span class="ident">new</span>(),
<span class="ident">reserved</span>: <span class="ident">BTreeSet</span>::<span class="ident">new</span>(),
<span class="ident">current_phase</span>: <span class="number">0</span>,
<span class="ident">phase_ends_at</span>: <span class="ident">Time</span>::<span class="ident">START_OF_DAY</span>,
<span class="ident">current_stage</span>: <span class="number">0</span>,
<span class="ident">stage_ends_at</span>: <span class="ident">Time</span>::<span class="ident">START_OF_DAY</span>,
};
<span class="kw">if</span> <span class="ident">i</span>.<span class="ident">is_traffic_signal</span>() <span class="kw-2">&amp;</span><span class="op">&amp;</span> <span class="op">!</span><span class="ident">use_freeform_policy_everywhere</span> {
<span class="kw">let</span> <span class="ident">signal</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_traffic_signal</span>(<span class="ident">i</span>.<span class="ident">id</span>);
<span class="comment">// What phase are we starting with?</span>
<span class="comment">// What stage are we starting with?</span>
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">offset</span> <span class="op">=</span> <span class="ident">signal</span>.<span class="ident">offset</span>;
<span class="kw">loop</span> {
<span class="kw">let</span> <span class="ident">dt</span> <span class="op">=</span> <span class="ident">signal</span>.<span class="ident">phases</span>[<span class="ident">state</span>.<span class="ident">current_phase</span>]
<span class="kw">let</span> <span class="ident">dt</span> <span class="op">=</span> <span class="ident">signal</span>.<span class="ident">stages</span>[<span class="ident">state</span>.<span class="ident">current_stage</span>]
.<span class="ident">phase_type</span>
.<span class="ident">simple_duration</span>();
<span class="kw">if</span> <span class="ident">offset</span> <span class="op">&gt;</span><span class="op">=</span> <span class="ident">dt</span> {
<span class="ident">offset</span> <span class="op">-</span><span class="op">=</span> <span class="ident">dt</span>;
<span class="ident">state</span>.<span class="ident">current_phase</span> <span class="op">+</span><span class="op">=</span> <span class="number">1</span>;
<span class="kw">if</span> <span class="ident">state</span>.<span class="ident">current_phase</span> <span class="op">=</span><span class="op">=</span> <span class="ident">signal</span>.<span class="ident">phases</span>.<span class="ident">len</span>() {
<span class="ident">state</span>.<span class="ident">current_phase</span> <span class="op">=</span> <span class="number">0</span>;
<span class="ident">state</span>.<span class="ident">current_stage</span> <span class="op">+</span><span class="op">=</span> <span class="number">1</span>;
<span class="kw">if</span> <span class="ident">state</span>.<span class="ident">current_stage</span> <span class="op">=</span><span class="op">=</span> <span class="ident">signal</span>.<span class="ident">stages</span>.<span class="ident">len</span>() {
<span class="ident">state</span>.<span class="ident">current_stage</span> <span class="op">=</span> <span class="number">0</span>;
}
} <span class="kw">else</span> {
<span class="ident">state</span>.<span class="ident">phase_ends_at</span> <span class="op">=</span> <span class="ident">Time</span>::<span class="ident">START_OF_DAY</span> <span class="op">+</span> <span class="ident">dt</span> <span class="op">-</span> <span class="ident">offset</span>;
<span class="ident">state</span>.<span class="ident">stage_ends_at</span> <span class="op">=</span> <span class="ident">Time</span>::<span class="ident">START_OF_DAY</span> <span class="op">+</span> <span class="ident">dt</span> <span class="op">-</span> <span class="ident">offset</span>;
<span class="kw">break</span>;
}
}
<span class="ident">scheduler</span>.<span class="ident">push</span>(<span class="ident">state</span>.<span class="ident">phase_ends_at</span>, <span class="ident">Command</span>::<span class="ident">UpdateIntersection</span>(<span class="ident">i</span>.<span class="ident">id</span>));
<span class="ident">scheduler</span>.<span class="ident">push</span>(<span class="ident">state</span>.<span class="ident">stage_ends_at</span>, <span class="ident">Command</span>::<span class="ident">UpdateIntersection</span>(<span class="ident">i</span>.<span class="ident">id</span>));
}
<span class="ident">sim</span>.<span class="ident">state</span>.<span class="ident">insert</span>(<span class="ident">i</span>.<span class="ident">id</span>, <span class="ident">state</span>);
}
@ -967,9 +967,9 @@
<span class="ident">protected</span>.<span class="ident">push</span>(<span class="ident">req</span>);
}
} <span class="kw">else</span> <span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="kw-2">ref</span> <span class="ident">signal</span>) <span class="op">=</span> <span class="ident">map</span>.<span class="ident">maybe_get_traffic_signal</span>(<span class="ident">i</span>) {
<span class="kw">let</span> <span class="ident">phase</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="ident">signal</span>.<span class="ident">phases</span>[<span class="self">self</span>.<span class="ident">state</span>[<span class="kw-2">&amp;</span><span class="ident">i</span>].<span class="ident">current_phase</span>];
<span class="kw">let</span> <span class="ident">stage</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="ident">signal</span>.<span class="ident">stages</span>[<span class="self">self</span>.<span class="ident">state</span>[<span class="kw-2">&amp;</span><span class="ident">i</span>].<span class="ident">current_stage</span>];
<span class="kw">for</span> (<span class="ident">req</span>, <span class="kw">_</span>) <span class="kw">in</span> <span class="ident">all</span> {
<span class="kw">match</span> <span class="ident">phase</span>.<span class="ident">get_priority_of_turn</span>(<span class="ident">req</span>.<span class="ident">turn</span>, <span class="ident">signal</span>) {
<span class="kw">match</span> <span class="ident">stage</span>.<span class="ident">get_priority_of_turn</span>(<span class="ident">req</span>.<span class="ident">turn</span>, <span class="ident">signal</span>) {
<span class="ident">TurnPriority</span>::<span class="ident">Protected</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="ident">protected</span>.<span class="ident">push</span>(<span class="ident">req</span>);
}
@ -1019,40 +1019,40 @@
<span class="kw">let</span> <span class="ident">state</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">get_mut</span>(<span class="kw-2">&amp;</span><span class="ident">id</span>).<span class="ident">unwrap</span>();
<span class="kw">let</span> <span class="ident">signal</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_traffic_signal</span>(<span class="ident">id</span>);
<span class="comment">// Switch to a new phase?</span>
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">now</span>, <span class="ident">state</span>.<span class="ident">phase_ends_at</span>);
<span class="kw">let</span> <span class="ident">old_phase</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="ident">signal</span>.<span class="ident">phases</span>[<span class="ident">state</span>.<span class="ident">current_phase</span>];
<span class="kw">match</span> <span class="ident">old_phase</span>.<span class="ident">phase_type</span> {
<span class="comment">// Switch to a new stage?</span>
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">now</span>, <span class="ident">state</span>.<span class="ident">stage_ends_at</span>);
<span class="kw">let</span> <span class="ident">old_stage</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="ident">signal</span>.<span class="ident">stages</span>[<span class="ident">state</span>.<span class="ident">current_stage</span>];
<span class="kw">match</span> <span class="ident">old_stage</span>.<span class="ident">phase_type</span> {
<span class="ident">PhaseType</span>::<span class="ident">Fixed</span>(<span class="kw">_</span>) <span class="op">=</span><span class="op">&gt;</span> {
<span class="ident">state</span>.<span class="ident">current_phase</span> <span class="op">+</span><span class="op">=</span> <span class="number">1</span>;
<span class="ident">state</span>.<span class="ident">current_stage</span> <span class="op">+</span><span class="op">=</span> <span class="number">1</span>;
}
<span class="ident">PhaseType</span>::<span class="ident">Adaptive</span>(<span class="kw">_</span>) <span class="op">=</span><span class="op">&gt;</span> {
<span class="comment">// TODO Make a better policy here. For now, if there&#39;s _anyone_ waiting to start a</span>
<span class="comment">// protected turn, repeat this phase for the full duration. Note that &quot;waiting&quot; is</span>
<span class="comment">// protected turn, repeat this stage for the full duration. Note that &quot;waiting&quot; is</span>
<span class="comment">// only defined as &quot;at the end of the lane, ready to start the turn.&quot; If a</span>
<span class="comment">// vehicle/ped is a second away from the intersection, this won&#39;t detect that. We</span>
<span class="comment">// could pass in all of the Queues here and use that to count all incoming agents,</span>
<span class="comment">// even ones a little farther away.</span>
<span class="kw">if</span> <span class="ident">state</span>.<span class="ident">waiting</span>.<span class="ident">keys</span>().<span class="ident">all</span>(<span class="op">|</span><span class="ident">req</span><span class="op">|</span> {
<span class="ident">old_phase</span>.<span class="ident">get_priority_of_turn</span>(<span class="ident">req</span>.<span class="ident">turn</span>, <span class="ident">signal</span>) <span class="op">!</span><span class="op">=</span> <span class="ident">TurnPriority</span>::<span class="ident">Protected</span>
<span class="ident">old_stage</span>.<span class="ident">get_priority_of_turn</span>(<span class="ident">req</span>.<span class="ident">turn</span>, <span class="ident">signal</span>) <span class="op">!</span><span class="op">=</span> <span class="ident">TurnPriority</span>::<span class="ident">Protected</span>
}) {
<span class="ident">state</span>.<span class="ident">current_phase</span> <span class="op">+</span><span class="op">=</span> <span class="number">1</span>;
<span class="ident">state</span>.<span class="ident">current_stage</span> <span class="op">+</span><span class="op">=</span> <span class="number">1</span>;
<span class="self">self</span>.<span class="ident">events</span>.<span class="ident">push</span>(<span class="ident">Event</span>::<span class="ident">Alert</span>(
<span class="ident">AlertLocation</span>::<span class="ident">Intersection</span>(<span class="ident">id</span>),
<span class="string">&quot;Repeating an adaptive phase&quot;</span>.<span class="ident">to_string</span>(),
<span class="string">&quot;Repeating an adaptive stage&quot;</span>.<span class="ident">to_string</span>(),
));
}
}
}
<span class="kw">if</span> <span class="ident">state</span>.<span class="ident">current_phase</span> <span class="op">=</span><span class="op">=</span> <span class="ident">signal</span>.<span class="ident">phases</span>.<span class="ident">len</span>() {
<span class="ident">state</span>.<span class="ident">current_phase</span> <span class="op">=</span> <span class="number">0</span>;
<span class="kw">if</span> <span class="ident">state</span>.<span class="ident">current_stage</span> <span class="op">=</span><span class="op">=</span> <span class="ident">signal</span>.<span class="ident">stages</span>.<span class="ident">len</span>() {
<span class="ident">state</span>.<span class="ident">current_stage</span> <span class="op">=</span> <span class="number">0</span>;
}
<span class="ident">state</span>.<span class="ident">phase_ends_at</span> <span class="op">=</span> <span class="ident">now</span>
<span class="op">+</span> <span class="ident">signal</span>.<span class="ident">phases</span>[<span class="ident">state</span>.<span class="ident">current_phase</span>]
<span class="ident">state</span>.<span class="ident">stage_ends_at</span> <span class="op">=</span> <span class="ident">now</span>
<span class="op">+</span> <span class="ident">signal</span>.<span class="ident">stages</span>[<span class="ident">state</span>.<span class="ident">current_stage</span>]
.<span class="ident">phase_type</span>
.<span class="ident">simple_duration</span>();
<span class="ident">scheduler</span>.<span class="ident">push</span>(<span class="ident">state</span>.<span class="ident">phase_ends_at</span>, <span class="ident">Command</span>::<span class="ident">UpdateIntersection</span>(<span class="ident">id</span>));
<span class="ident">scheduler</span>.<span class="ident">push</span>(<span class="ident">state</span>.<span class="ident">stage_ends_at</span>, <span class="ident">Command</span>::<span class="ident">UpdateIntersection</span>(<span class="ident">id</span>));
<span class="self">self</span>.<span class="ident">wakeup_waiting</span>(<span class="ident">now</span>, <span class="ident">id</span>, <span class="ident">scheduler</span>, <span class="ident">map</span>);
}
@ -1307,30 +1307,30 @@
(<span class="ident">per_road</span>, <span class="ident">per_intersection</span>)
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">current_phase_and_remaining_time</span>(
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">current_stage_and_remaining_time</span>(
<span class="kw-2">&amp;</span><span class="self">self</span>,
<span class="ident">now</span>: <span class="ident">Time</span>,
<span class="ident">i</span>: <span class="ident">IntersectionID</span>,
) <span class="op">-</span><span class="op">&gt;</span> (<span class="ident">usize</span>, <span class="ident">Duration</span>) {
<span class="kw">let</span> <span class="ident">state</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">state</span>[<span class="kw-2">&amp;</span><span class="ident">i</span>];
<span class="kw">if</span> <span class="ident">now</span> <span class="op">&gt;</span> <span class="ident">state</span>.<span class="ident">phase_ends_at</span> {
<span class="kw">if</span> <span class="ident">now</span> <span class="op">&gt;</span> <span class="ident">state</span>.<span class="ident">stage_ends_at</span> {
<span class="macro">panic</span><span class="macro">!</span>(
<span class="string">&quot;At {}, but {} should have advanced its phase at {}&quot;</span>,
<span class="ident">now</span>, <span class="ident">i</span>, <span class="ident">state</span>.<span class="ident">phase_ends_at</span>
<span class="string">&quot;At {}, but {} should have advanced its stage at {}&quot;</span>,
<span class="ident">now</span>, <span class="ident">i</span>, <span class="ident">state</span>.<span class="ident">stage_ends_at</span>
);
}
(<span class="ident">state</span>.<span class="ident">current_phase</span>, <span class="ident">state</span>.<span class="ident">phase_ends_at</span> <span class="op">-</span> <span class="ident">now</span>)
(<span class="ident">state</span>.<span class="ident">current_stage</span>, <span class="ident">state</span>.<span class="ident">stage_ends_at</span> <span class="op">-</span> <span class="ident">now</span>)
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">handle_live_edited_traffic_signals</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>) {
<span class="kw">for</span> <span class="ident">state</span> <span class="kw">in</span> <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">values_mut</span>() {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">ts</span>) <span class="op">=</span> <span class="ident">map</span>.<span class="ident">maybe_get_traffic_signal</span>(<span class="ident">state</span>.<span class="ident">id</span>) {
<span class="kw">if</span> <span class="ident">state</span>.<span class="ident">current_phase</span> <span class="op">&gt;</span><span class="op">=</span> <span class="ident">ts</span>.<span class="ident">phases</span>.<span class="ident">len</span>() {
<span class="kw">if</span> <span class="ident">state</span>.<span class="ident">current_stage</span> <span class="op">&gt;</span><span class="op">=</span> <span class="ident">ts</span>.<span class="ident">stages</span>.<span class="ident">len</span>() {
<span class="comment">// Just jump back to the first one. Shrug.</span>
<span class="ident">state</span>.<span class="ident">current_phase</span> <span class="op">=</span> <span class="number">0</span>;
<span class="ident">state</span>.<span class="ident">current_stage</span> <span class="op">=</span> <span class="number">0</span>;
<span class="macro">println</span><span class="macro">!</span>(
<span class="string">&quot;WARNING: Traffic signal {} was live-edited in the middle of a phase, so \
jumping back to the first phase&quot;</span>,
<span class="string">&quot;WARNING: Traffic signal {} was live-edited in the middle of a stage, so \
jumping back to the first stage&quot;</span>,
<span class="ident">state</span>.<span class="ident">id</span>
);
}
@ -1393,13 +1393,13 @@
<span class="kw">let</span> <span class="ident">turn</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_t</span>(<span class="ident">req</span>.<span class="ident">turn</span>);
<span class="kw">let</span> <span class="ident">state</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">state</span>[<span class="kw-2">&amp;</span><span class="ident">req</span>.<span class="ident">turn</span>.<span class="ident">parent</span>];
<span class="kw">let</span> <span class="ident">phase</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="ident">signal</span>.<span class="ident">phases</span>[<span class="ident">state</span>.<span class="ident">current_phase</span>];
<span class="kw">let</span> <span class="ident">full_phase_duration</span> <span class="op">=</span> <span class="ident">phase</span>.<span class="ident">phase_type</span>.<span class="ident">simple_duration</span>();
<span class="kw">let</span> <span class="ident">remaining_phase_time</span> <span class="op">=</span> <span class="ident">state</span>.<span class="ident">phase_ends_at</span> <span class="op">-</span> <span class="ident">now</span>;
<span class="kw">let</span> <span class="ident">stage</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="ident">signal</span>.<span class="ident">stages</span>[<span class="ident">state</span>.<span class="ident">current_stage</span>];
<span class="kw">let</span> <span class="ident">full_stage_duration</span> <span class="op">=</span> <span class="ident">stage</span>.<span class="ident">phase_type</span>.<span class="ident">simple_duration</span>();
<span class="kw">let</span> <span class="ident">remaining_stage_time</span> <span class="op">=</span> <span class="ident">state</span>.<span class="ident">stage_ends_at</span> <span class="op">-</span> <span class="ident">now</span>;
<span class="kw">let</span> <span class="ident">our_time</span> <span class="op">=</span> <span class="ident">state</span>.<span class="ident">waiting</span>[<span class="ident">req</span>];
<span class="comment">// Can&#39;t go at all this phase.</span>
<span class="kw">let</span> <span class="ident">our_priority</span> <span class="op">=</span> <span class="ident">phase</span>.<span class="ident">get_priority_of_turn</span>(<span class="ident">req</span>.<span class="ident">turn</span>, <span class="ident">signal</span>);
<span class="comment">// Can&#39;t go at all this stage.</span>
<span class="kw">let</span> <span class="ident">our_priority</span> <span class="op">=</span> <span class="ident">stage</span>.<span class="ident">get_priority_of_turn</span>(<span class="ident">req</span>.<span class="ident">turn</span>, <span class="ident">signal</span>);
<span class="kw">if</span> <span class="ident">our_priority</span> <span class="op">=</span><span class="op">=</span> <span class="ident">TurnPriority</span>::<span class="ident">Banned</span> {
<span class="kw">return</span> <span class="bool-val">false</span>;
}
@ -1430,14 +1430,14 @@
<span class="comment">// turn. Don&#39;t start the turn if we won&#39;t finish by the time the light changes. If we get</span>
<span class="comment">// it wrong, that&#39;s fine -- block the box a bit.</span>
<span class="kw">let</span> <span class="ident">time_to_cross</span> <span class="op">=</span> <span class="ident">turn</span>.<span class="ident">geom</span>.<span class="ident">length</span>() <span class="op">/</span> <span class="ident">speed</span>;
<span class="kw">if</span> <span class="ident">time_to_cross</span> <span class="op">&gt;</span> <span class="ident">remaining_phase_time</span> {
<span class="kw">if</span> <span class="ident">time_to_cross</span> <span class="op">&gt;</span> <span class="ident">remaining_stage_time</span> {
<span class="comment">// Actually, we might have bigger problems...</span>
<span class="kw">if</span> <span class="ident">time_to_cross</span> <span class="op">&gt;</span> <span class="ident">full_phase_duration</span> {
<span class="kw">if</span> <span class="ident">time_to_cross</span> <span class="op">&gt;</span> <span class="ident">full_stage_duration</span> {
<span class="self">self</span>.<span class="ident">events</span>.<span class="ident">push</span>(<span class="ident">Event</span>::<span class="ident">Alert</span>(
<span class="ident">AlertLocation</span>::<span class="ident">Intersection</span>(<span class="ident">req</span>.<span class="ident">turn</span>.<span class="ident">parent</span>),
<span class="macro">format</span><span class="macro">!</span>(
<span class="string">&quot;{:?} is impossible to fit into phase duration of {}&quot;</span>,
<span class="ident">req</span>, <span class="ident">full_phase_duration</span>
<span class="string">&quot;{:?} is impossible to fit into stage duration of {}&quot;</span>,
<span class="ident">req</span>, <span class="ident">full_stage_duration</span>
),
));
} <span class="kw">else</span> {

View File

@ -2397,9 +2397,9 @@
.<span class="ident">max</span>(<span class="ident">Time</span>::<span class="ident">START_OF_DAY</span> <span class="op">+</span> <span class="ident">Duration</span>::<span class="ident">hours</span>(<span class="number">24</span>))
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">current_phase_and_remaining_time</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">i</span>: <span class="ident">IntersectionID</span>) <span class="op">-</span><span class="op">&gt;</span> (<span class="ident">usize</span>, <span class="ident">Duration</span>) {
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">current_stage_and_remaining_time</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">i</span>: <span class="ident">IntersectionID</span>) <span class="op">-</span><span class="op">&gt;</span> (<span class="ident">usize</span>, <span class="ident">Duration</span>) {
<span class="self">self</span>.<span class="ident">intersections</span>
.<span class="ident">current_phase_and_remaining_time</span>(<span class="self">self</span>.<span class="ident">time</span>, <span class="ident">i</span>)
.<span class="ident">current_stage_and_remaining_time</span>(<span class="self">self</span>.<span class="ident">time</span>, <span class="ident">i</span>)
}
<span class="comment">// TODO This is an awkward copy of raw_throughput</span>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -154,11 +154,11 @@ ends at a border or building, there are many combinations of these sequences.
This is a way to categorize them into three groups. I'm not sure it's the
simplest way to express all the state transitons.</p>
<h2><a class="header" href="#walking-only-trips" id="walking-only-trips">Walking-only trips</a></h2>
<p><img src="../mdbook-plantuml-img/e011d046-1efc-42fc-b437-993fce44827a.svg" alt="../mdbook-plantuml-img/e011d046-1efc-42fc-b437-993fce44827a.svg" /></p>
<p><img src="../mdbook-plantuml-img/e03dc25f-efcf-4760-81a0-8c2cadb2ab67.svg" alt="../mdbook-plantuml-img/e03dc25f-efcf-4760-81a0-8c2cadb2ab67.svg" /></p>
<h2><a class="header" href="#trips-starting-from-a-border" id="trips-starting-from-a-border">Trips starting from a border</a></h2>
<p><img src="../mdbook-plantuml-img/f7fd7079-ed5d-4ece-865f-87af6d814cb6.svg" alt="../mdbook-plantuml-img/f7fd7079-ed5d-4ece-865f-87af6d814cb6.svg" /></p>
<p><img src="../mdbook-plantuml-img/f14ae73b-8208-4273-b934-cec712a2e5b9.svg" alt="../mdbook-plantuml-img/f14ae73b-8208-4273-b934-cec712a2e5b9.svg" /></p>
<h2><a class="header" href="#trips-starting-from-a-building" id="trips-starting-from-a-building">Trips starting from a building</a></h2>
<p><img src="../mdbook-plantuml-img/c705130d-1aed-43d2-aea1-4762810f7cb1.svg" alt="../mdbook-plantuml-img/c705130d-1aed-43d2-aea1-4762810f7cb1.svg" /></p>
<p><img src="../mdbook-plantuml-img/6cc88860-e881-4daf-b34b-460134935ac5.svg" alt="../mdbook-plantuml-img/6cc88860-e881-4daf-b34b-460134935ac5.svg" /></p>
</main>