mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-23 22:42:32 +03:00
deploy: 8ff4c41ea1
This commit is contained in:
parent
1a19ce1f0c
commit
3d8704a91f
@ -1,3 +1,3 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `draw_zone` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, draw_zone"><title>draw_zone in game::edit::zones - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">game</a>::<wbr><a href="../index.html">edit</a>::<wbr><a href="index.html">zones</a></h2><div id="sidebar-vars" data-name="draw_zone" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">edit</a>::<wbr><a href="index.html">zones</a>::<wbr><a class="fn" href="#">draw_zone</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/game/edit/zones.rs.html#168-190" title="goto source code">[src]</a></span></h1><pre class="rust fn"><code>fn draw_zone(<br> ctx: &mut EventCtx<'_>, <br> app: &<a class="struct" href="../../app/struct.App.html" title="struct game::app::App">App</a>, <br> members: &<a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a><<a class="struct" href="../../../map_model/objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>><br>) -> <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.tuple.html">(</a>ToggleZoomed, Widget<a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.tuple.html">)</a></code></pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
|
||||
<!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_zone` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, draw_zone"><title>draw_zone in game::edit::zones - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">game</a>::<wbr><a href="../index.html">edit</a>::<wbr><a href="index.html">zones</a></h2><div id="sidebar-vars" data-name="draw_zone" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">edit</a>::<wbr><a href="index.html">zones</a>::<wbr><a class="fn" href="#">draw_zone</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/game/edit/zones.rs.html#168-192" title="goto source code">[src]</a></span></h1><pre class="rust fn"><code>fn draw_zone(<br> ctx: &mut EventCtx<'_>, <br> app: &<a class="struct" href="../../app/struct.App.html" title="struct game::app::App">App</a>, <br> members: &<a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a><<a class="struct" href="../../../map_model/objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>><br>) -> <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.tuple.html">(</a>ToggleZoomed, Widget<a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.tuple.html">)</a></code></pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
|
||||
<script src="../../../main.js"></script>
|
||||
</body></html>
|
@ -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 `make_instructions` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, make_instructions"><title>make_instructions in game::edit::zones - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">game</a>::<wbr><a href="../index.html">edit</a>::<wbr><a href="index.html">zones</a></h2><div id="sidebar-vars" data-name="make_instructions" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">edit</a>::<wbr><a href="index.html">zones</a>::<wbr><a class="fn" href="#">make_instructions</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/game/edit/zones.rs.html#192-204" title="goto source code">[src]</a></span></h1><pre class="rust fn"><code>fn make_instructions(<br> ctx: &mut EventCtx<'_>, <br> allow_through_traffic: &<a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a><<a class="enum" href="../../../sim/trips/enum.TripMode.html" title="enum sim::trips::TripMode">TripMode</a>><br>) -> Widget</code></pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
|
||||
<!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_instructions` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, make_instructions"><title>make_instructions in game::edit::zones - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">game</a>::<wbr><a href="../index.html">edit</a>::<wbr><a href="index.html">zones</a></h2><div id="sidebar-vars" data-name="make_instructions" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">edit</a>::<wbr><a href="index.html">zones</a>::<wbr><a class="fn" href="#">make_instructions</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/game/edit/zones.rs.html#194-206" title="goto source code">[src]</a></span></h1><pre class="rust fn"><code>fn make_instructions(<br> ctx: &mut EventCtx<'_>, <br> allow_through_traffic: &<a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a><<a class="enum" href="../../../sim/trips/enum.TripMode.html" title="enum sim::trips::TripMode">TripMode</a>><br>) -> Widget</code></pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
|
||||
<script src="../../../main.js"></script>
|
||||
</body></html>
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `zones` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, zones"><title>game::edit::zones - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module zones</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="zones" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">game</a>::<wbr><a href="../index.html">edit</a>::<wbr><a class="mod" href="#">zones</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/game/edit/zones.rs.html#1-204" title="goto source code">[src]</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 `zones` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, zones"><title>game::edit::zones - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module zones</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="zones" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">game</a>::<wbr><a href="../index.html">edit</a>::<wbr><a class="mod" href="#">zones</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/game/edit/zones.rs.html#1-206" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.ZoneEditor.html" title="game::edit::zones::ZoneEditor struct">ZoneEditor</a></div><div class="item-right docblock-short"></div></div></div><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.draw_zone.html" title="game::edit::zones::draw_zone fn">draw_zone</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.make_instructions.html" title="game::edit::zones::make_instructions fn">make_instructions</a></div><div class="item-right docblock-short"></div></div></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
|
||||
<script src="../../../main.js"></script>
|
||||
|
@ -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 `ring` mod in crate `geom`."><meta name="keywords" content="rust, rustlang, rust-lang, ring"><title>geom::ring - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../geom/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module ring</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><div id="sidebar-vars" data-name="ring" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">geom</a>::<wbr><a class="mod" href="#">ring</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/geom/ring.rs.html#1-282" title="goto source code">[src]</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 `ring` mod in crate `geom`."><meta name="keywords" content="rust, rustlang, rust-lang, ring"><title>geom::ring - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../geom/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module ring</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><div id="sidebar-vars" data-name="ring" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">geom</a>::<wbr><a class="mod" href="#">ring</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/geom/ring.rs.html#1-294" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Ring.html" title="geom::ring::Ring struct">Ring</a></div><div class="item-right docblock-short"><p>Maybe a misnomer, but like a PolyLine, but closed.</p>
|
||||
</div></div></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="geom" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
|
||||
<script src="../../main.js"></script>
|
||||
|
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
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="The build time in RFC2822, UTC."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>BUILT_TIME_UTC in map_gui::tools::title_screen::built_info - Rust</title><link rel="stylesheet" type="text/css" href="../../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../../storage.js"></script><script src="../../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../../map_gui/index.html'><div class='logo-container rust-logo'><img src='../../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../../index.html">map_gui</a>::<wbr><a href="../../index.html">tools</a>::<wbr><a href="../index.html">title_screen</a>::<wbr><a href="index.html">built_info</a></h2><div id="sidebar-vars" data-name="BUILT_TIME_UTC" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="../../../index.html">map_gui</a>::<wbr><a href="../../index.html">tools</a>::<wbr><a href="../index.html">title_screen</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="#">BUILT_TIME_UTC</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../../src/map_gui/home/runner/work/abstreet/abstreet/target/debug/build/map_gui-5b11ba30aa99b1f3/out/built.rs.html#78" title="goto source code">[src]</a></span></h1><pre class="rust const"><code>pub const BUILT_TIME_UTC: &<a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.str.html">str</a> = r"Thu, 06 Jan 2022 17:35:55 +0000";</code></pre><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The build time in RFC2822, UTC.</p>
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="The build time in RFC2822, UTC."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>BUILT_TIME_UTC in map_gui::tools::title_screen::built_info - Rust</title><link rel="stylesheet" type="text/css" href="../../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../../storage.js"></script><script src="../../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../../map_gui/index.html'><div class='logo-container rust-logo'><img src='../../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../../index.html">map_gui</a>::<wbr><a href="../../index.html">tools</a>::<wbr><a href="../index.html">title_screen</a>::<wbr><a href="index.html">built_info</a></h2><div id="sidebar-vars" data-name="BUILT_TIME_UTC" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="../../../index.html">map_gui</a>::<wbr><a href="../../index.html">tools</a>::<wbr><a href="../index.html">title_screen</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="#">BUILT_TIME_UTC</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../../src/map_gui/home/runner/work/abstreet/abstreet/target/debug/build/map_gui-5b11ba30aa99b1f3/out/built.rs.html#78" title="goto source code">[src]</a></span></h1><pre class="rust const"><code>pub const BUILT_TIME_UTC: &<a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.str.html">str</a> = r"Sun, 09 Jan 2022 11:16:29 +0000";</code></pre><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The build time in RFC2822, UTC.</p>
|
||||
</div></details></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="map_gui" data-search-index-js="../../../../search-index.js" data-search-js="../../../../search.js"></div>
|
||||
<script src="../../../../main.js"></script>
|
||||
</body></html>
|
File diff suppressed because one or more lines are too long
25
rustdoc/map_model/enum.CommonEndpoint.html
Normal file
25
rustdoc/map_model/enum.CommonEndpoint.html
Normal file
File diff suppressed because one or more lines are too long
@ -84,7 +84,7 @@ Intersection is needed to distinguish crosswalks that exist at two ends of a sid
|
||||
kept cached for performance.</p>
|
||||
</div></div></div><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.AmenityType.html" title="map_model::AmenityType enum">AmenityType</a></div><div class="item-right docblock-short"><p>Businesses are categorized into one of these types.</p>
|
||||
</div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.AreaType.html" title="map_model::AreaType enum">AreaType</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.BufferType.html" title="map_model::BufferType enum">BufferType</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.BuildingType.html" title="map_model::BuildingType enum">BuildingType</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.Direction.html" title="map_model::Direction enum">Direction</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.DrivingSide.html" title="map_model::DrivingSide enum">DrivingSide</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.EditCmd.html" title="map_model::EditCmd enum">EditCmd</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.EditIntersection.html" title="map_model::EditIntersection enum">EditIntersection</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.IntersectionType.html" title="map_model::IntersectionType enum">IntersectionType</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.LaneType.html" title="map_model::LaneType enum">LaneType</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.OffstreetParking.html" title="map_model::OffstreetParking enum">OffstreetParking</a></div><div class="item-right docblock-short"><p>Represent no parking as Private(0, false).</p>
|
||||
</div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.AreaType.html" title="map_model::AreaType enum">AreaType</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.BufferType.html" title="map_model::BufferType enum">BufferType</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.BuildingType.html" title="map_model::BuildingType enum">BuildingType</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.CommonEndpoint.html" title="map_model::CommonEndpoint enum">CommonEndpoint</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.Direction.html" title="map_model::Direction enum">Direction</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.DrivingSide.html" title="map_model::DrivingSide enum">DrivingSide</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.EditCmd.html" title="map_model::EditCmd enum">EditCmd</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.EditIntersection.html" title="map_model::EditIntersection enum">EditIntersection</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.IntersectionType.html" title="map_model::IntersectionType enum">IntersectionType</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.LaneType.html" title="map_model::LaneType enum">LaneType</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.OffstreetParking.html" title="map_model::OffstreetParking enum">OffstreetParking</a></div><div class="item-right docblock-short"><p>Represent no parking as Private(0, false).</p>
|
||||
</div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.PathConstraints.html" title="map_model::PathConstraints enum">PathConstraints</a></div><div class="item-right docblock-short"><p>Who’s asking for a path?</p>
|
||||
</div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.PathStep.html" title="map_model::PathStep enum">PathStep</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.PathStepV2.html" title="map_model::PathStepV2 enum">PathStepV2</a></div><div class="item-right docblock-short"><p>One step along a path.</p>
|
||||
</div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.SideOfRoad.html" title="map_model::SideOfRoad enum">SideOfRoad</a></div><div class="item-right docblock-short"><p>See https://wiki.openstreetmap.org/wiki/Forward_%26_backward,<em>left</em>%26_right.</p>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="A bunch of (mostly read-only) queries on a Map."><meta name="keywords" content="rust, rustlang, rust-lang, map"><title>map_model::map - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module map</h2><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><div id="sidebar-vars" data-name="map" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">map_model</a>::<wbr><a class="mod" href="#">map</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/map_model/map.rs.html#1-897" title="goto source code">[src]</a></span></h1><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A bunch of (mostly read-only) queries on a Map.</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="A bunch of (mostly read-only) queries on a Map."><meta name="keywords" content="rust, rustlang, rust-lang, map"><title>map_model::map - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module map</h2><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><div id="sidebar-vars" data-name="map" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">map_model</a>::<wbr><a class="mod" href="#">map</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/map_model/map.rs.html#1-900" title="goto source code">[src]</a></span></h1><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A bunch of (mostly read-only) queries on a Map.</p>
|
||||
</div></details><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.MapConfig.html" title="map_model::map::MapConfig struct">MapConfig</a></div><div class="item-right docblock-short"></div></div></div><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.DrivingSide.html" title="map_model::map::DrivingSide enum">DrivingSide</a></div><div class="item-right docblock-short"></div></div></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="map_model" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
|
||||
|
@ -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 `block` mod in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, block"><title>map_model::objects::block - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module block</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><div id="sidebar-vars" data-name="block" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">objects</a>::<wbr><a class="mod" href="#">block</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/map_model/objects/block.rs.html#1-520" title="goto source code">[src]</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 `block` mod in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, block"><title>map_model::objects::block - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module block</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><div id="sidebar-vars" data-name="block" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">objects</a>::<wbr><a class="mod" href="#">block</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/map_model/objects/block.rs.html#1-523" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Block.html" title="map_model::objects::block::Block struct">Block</a></div><div class="item-right docblock-short"><p>A block is defined by a perimeter that traces along the sides of roads. Inside the perimeter,
|
||||
the block may contain buildings and interior roads. In the simple case, a block represents a
|
||||
single “city block”, with no interior roads. It may also cover a “neighborhood”, where the
|
||||
|
File diff suppressed because one or more lines are too long
@ -4,7 +4,7 @@
|
||||
}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A sequence of roads in order, beginning and ending at the same place. No “crossings” – tracing
|
||||
along this sequence should geometrically yield a simple polygon.</p>
|
||||
</div></details><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.roads" class="structfield small-section-header"><a href="#structfield.roads" class="anchor field"></a><code>roads: <a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="../road/struct.RoadSideID.html" title="struct map_model::objects::road::RoadSideID">RoadSideID</a>></code></span><span id="structfield.interior" class="structfield small-section-header"><a href="#structfield.interior" class="anchor field"></a><code>interior: <a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a><<a class="struct" href="../road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>></code></span><div class="docblock"><p>These roads exist entirely within the perimeter</p>
|
||||
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#34-412" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.single_block" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#38-82" title="goto source code">[src]</a></div><a href="#method.single_block" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.single_block" class="fnname">single_block</a>(map: &<a class="struct" href="../../struct.Map.html" title="struct map_model::Map">Map</a>, start: <a class="struct" href="../lane/struct.LaneID.html" title="struct map_model::objects::lane::LaneID">LaneID</a>) -> <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a><<a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>></h4></div></summary><div class="docblock"><p>Starting at any lane, snap to the nearest side of that road, then begin tracing a single
|
||||
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#34-513" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.single_block" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#38-82" title="goto source code">[src]</a></div><a href="#method.single_block" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.single_block" class="fnname">single_block</a>(map: &<a class="struct" href="../../struct.Map.html" title="struct map_model::Map">Map</a>, start: <a class="struct" href="../lane/struct.LaneID.html" title="struct map_model::objects::lane::LaneID">LaneID</a>) -> <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a><<a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>></h4></div></summary><div class="docblock"><p>Starting at any lane, snap to the nearest side of that road, then begin tracing a single
|
||||
block, with no interior roads. This will fail if a map boundary is reached. The results are
|
||||
unusual when crossing the entrance to a tunnel or bridge.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.find_all_single_blocks" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#86-111" title="goto source code">[src]</a></div><a href="#method.find_all_single_blocks" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.find_all_single_blocks" class="fnname">find_all_single_blocks</a>(map: &<a class="struct" href="../../struct.Map.html" title="struct map_model::Map">Map</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>></h4></div></summary><div class="docblock"><p>This calculates all single block perimeters for the entire map. The resulting list does not
|
||||
@ -13,24 +13,24 @@ cover roads near the map boundary.</p>
|
||||
work with. Temporarily undo that.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.restore_invariant" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#121-123" title="goto source code">[src]</a></div><a href="#method.restore_invariant" class="anchor"></a><h4 class="code-header">fn <a href="#method.restore_invariant" class="fnname">restore_invariant</a>(&mut self)</h4></div></summary><div class="docblock"><p>Restore the first=last invariant. Methods may temporarily break this, but must restore it
|
||||
before returning.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_to_merge" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#130-223" title="goto source code">[src]</a></div><a href="#method.try_to_merge" class="anchor"></a><h4 class="code-header">fn <a href="#method.try_to_merge" class="fnname">try_to_merge</a>(&mut self, other: &mut <a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>, debug_failures: <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.bool.html">bool</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Try to merge two blocks. Returns true if this is successful, which will only be when the
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_to_merge" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#131-224" title="goto source code">[src]</a></div><a href="#method.try_to_merge" class="anchor"></a><h4 class="code-header">fn <a href="#method.try_to_merge" class="fnname">try_to_merge</a>(&mut self, other: &mut <a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>, debug_failures: <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.bool.html">bool</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Try to merge two blocks. Returns true if this is successful, which will only be when the
|
||||
blocks are adjacent, but the merge wouldn’t create an interior “hole”.</p>
|
||||
<p>Note this may modify both perimeters and still return <code>false</code>. The modification is just to
|
||||
rotate the order of the road loop; this doesn’t logically change the perimeter.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.merge_all" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#228-264" title="goto source code">[src]</a></div><a href="#method.merge_all" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.merge_all" class="fnname">merge_all</a>(input: <a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>>, stepwise_debug: <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.bool.html">bool</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>></h4></div></summary><div class="docblock"><p>Try to merge all given perimeters. If successful, only one perimeter will be returned.
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.merge_all" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#229-265" title="goto source code">[src]</a></div><a href="#method.merge_all" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.merge_all" class="fnname">merge_all</a>(input: <a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>>, stepwise_debug: <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.bool.html">bool</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>></h4></div></summary><div class="docblock"><p>Try to merge all given perimeters. If successful, only one perimeter will be returned.
|
||||
Perimeters are never “destroyed” – if not merged, they’ll appear in the results. If
|
||||
<code>stepwise_debug</code> is true, returns after performing just one merge.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.collapse_deadends" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#268-296" title="goto source code">[src]</a></div><a href="#method.collapse_deadends" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.collapse_deadends" class="fnname">collapse_deadends</a>(&mut self)</h4></div></summary><div class="docblock"><p>If the perimeter follows any dead-end roads, “collapse” them and instead make the perimeter
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.collapse_deadends" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#269-297" title="goto source code">[src]</a></div><a href="#method.collapse_deadends" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.collapse_deadends" class="fnname">collapse_deadends</a>(&mut self)</h4></div></summary><div class="docblock"><p>If the perimeter follows any dead-end roads, “collapse” them and instead make the perimeter
|
||||
contain the dead-end.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.partition_by_predicate" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#301-361" title="goto source code">[src]</a></div><a href="#method.partition_by_predicate" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.partition_by_predicate" class="fnname">partition_by_predicate</a><F: <a class="trait" href="https://doc.rust-lang.org/1.57.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(<a class="struct" href="../road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.bool.html">bool</a>>(<br> input: <a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>>, <br> predicate: F<br>) -> <a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>>></h4></div></summary><div class="docblock"><p>Consider the perimeters as a graph, with adjacency determined by sharing any road in common.
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.partition_by_predicate" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#302-362" title="goto source code">[src]</a></div><a href="#method.partition_by_predicate" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.partition_by_predicate" class="fnname">partition_by_predicate</a><F: <a class="trait" href="https://doc.rust-lang.org/1.57.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(<a class="struct" href="../road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.bool.html">bool</a>>(<br> input: <a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>>, <br> predicate: F<br>) -> <a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>>></h4></div></summary><div class="docblock"><p>Consider the perimeters as a graph, with adjacency determined by sharing any road in common.
|
||||
Partition adjacent perimeters, subject to the predicate. Each partition should produce a
|
||||
single result with <code>merge_all</code>.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.calculate_coloring" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#365-399" title="goto source code">[src]</a></div><a href="#method.calculate_coloring" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.calculate_coloring" class="fnname">calculate_coloring</a>(<br> input: <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.slice.html">&[</a><a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a><a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.slice.html">]</a>, <br> num_colors: <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.usize.html">usize</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/1.57.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.usize.html">usize</a>>></h4></div></summary><div class="docblock"><p>Assign each perimeter one of <code>num_colors</code>, such that no two adjacent perimeters share the
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.calculate_coloring" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#366-400" title="goto source code">[src]</a></div><a href="#method.calculate_coloring" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.calculate_coloring" class="fnname">calculate_coloring</a>(<br> input: <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.slice.html">&[</a><a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a><a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.slice.html">]</a>, <br> num_colors: <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.usize.html">usize</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/1.57.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.usize.html">usize</a>>></h4></div></summary><div class="docblock"><p>Assign each perimeter one of <code>num_colors</code>, such that no two adjacent perimeters share the
|
||||
same color. May fail. The resulting colors are expressed as <code>[0, num_colors)</code>.</p>
|
||||
</div></details><div id="method.to_block" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#401-403" title="goto source code">[src]</a></div><a href="#method.to_block" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.to_block" class="fnname">to_block</a>(self, map: &<a class="struct" href="../../struct.Map.html" title="struct map_model::Map">Map</a>) -> <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a><<a class="struct" href="struct.Block.html" title="struct map_model::objects::block::Block">Block</a>></h4></div><details class="rustdoc-toggle method-toggle" open><summary><div id="method.contains" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#406-411" title="goto source code">[src]</a></div><a href="#method.contains" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.contains" class="fnname">contains</a>(&self, other: &<a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Does this perimeter completely enclose the other?</p>
|
||||
</div></details><div id="method.to_block" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#402-504" title="goto source code">[src]</a></div><a href="#method.to_block" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.to_block" class="fnname">to_block</a>(self, map: &<a class="struct" href="../../struct.Map.html" title="struct map_model::Map">Map</a>) -> <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a><<a class="struct" href="struct.Block.html" title="struct map_model::objects::block::Block">Block</a>></h4></div><details class="rustdoc-toggle method-toggle" open><summary><div id="method.contains" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#507-512" title="goto source code">[src]</a></div><a href="#method.contains" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.contains" class="fnname">contains</a>(&self, other: &<a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Does this perimeter completely enclose the other?</p>
|
||||
</div></details></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Clone" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#27" title="goto source code">[src]</a></div><a href="#impl-Clone" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.57.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#27" title="goto source code">[src]</a></div><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.57.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h4></div></summary><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.57.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone_from" class="method trait-impl has-srclink"><div class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/1.57.0/src/core/clone.rs.html#131" title="goto source code">[src]</a></div><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.57.0/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.reference.html">&</a>Self)</h4></div></summary><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.57.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Debug" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#414-422" title="goto source code">[src]</a></div><a href="#impl-Debug" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.57.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#415-421" title="goto source code">[src]</a></div><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.57.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.57.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.57.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.57.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Debug" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#515-523" title="goto source code">[src]</a></div><a href="#impl-Debug" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.57.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/block.rs.html#516-522" title="goto source code">[src]</a></div><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.57.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.57.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.57.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.57.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-RefUnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.57.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div><div id="impl-Send" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Send" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.57.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div><div id="impl-Sync" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Sync" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.57.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div><div id="impl-Unpin" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Unpin" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.57.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div><div id="impl-UnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-UnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.57.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Any" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.57.0/src/core/any.rs.html#132-136" title="goto source code">[src]</a></div><a href="#impl-Any" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.57.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.57.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.57.0/src/core/any.rs.html#133" title="goto source code">[src]</a></div><a href="#method.type_id" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.57.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.57.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.57.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Borrow%3CT%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.57.0/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></div><a href="#impl-Borrow%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.57.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.57.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.57.0/src/core/borrow.rs.html#210" title="goto source code">[src]</a></div><a href="#method.borrow" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.57.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.reference.html">&</a>T</h4></div></summary><div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.57.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-BorrowMut%3CT%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.57.0/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></div><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.57.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.57.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow_mut" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.57.0/src/core/borrow.rs.html#217" title="goto source code">[src]</a></div><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.57.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.reference.html">&mut </a>T</h4></div></summary><div class='docblock'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.57.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||
|
25
rustdoc/map_model/objects/lane/enum.CommonEndpoint.html
Normal file
25
rustdoc/map_model/objects/lane/enum.CommonEndpoint.html
Normal file
File diff suppressed because one or more lines are too long
@ -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 `parse_turn_type_from_osm` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, parse_turn_type_from_osm"><title>parse_turn_type_from_osm in map_model::objects::lane - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">map_model</a>::<wbr><a href="../index.html">objects</a>::<wbr><a href="index.html">lane</a></h2><div id="sidebar-vars" data-name="parse_turn_type_from_osm" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">objects</a>::<wbr><a href="index.html">lane</a>::<wbr><a class="fn" href="#">parse_turn_type_from_osm</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/map_model/objects/lane.rs.html#550-568" title="goto source code">[src]</a></span></h1><pre class="rust fn"><code>fn parse_turn_type_from_osm(x: &<a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.str.html">str</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="enum" href="../turn/enum.TurnType.html" title="enum map_model::objects::turn::TurnType">TurnType</a>></code></pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
|
||||
<!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 `parse_turn_type_from_osm` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, parse_turn_type_from_osm"><title>parse_turn_type_from_osm in map_model::objects::lane - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">map_model</a>::<wbr><a href="../index.html">objects</a>::<wbr><a href="index.html">lane</a></h2><div id="sidebar-vars" data-name="parse_turn_type_from_osm" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">objects</a>::<wbr><a href="index.html">lane</a>::<wbr><a class="fn" href="#">parse_turn_type_from_osm</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/map_model/objects/lane.rs.html#566-584" title="goto source code">[src]</a></span></h1><pre class="rust fn"><code>fn parse_turn_type_from_osm(x: &<a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.str.html">str</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="enum" href="../turn/enum.TurnType.html" title="enum map_model::objects::turn::TurnType">TurnType</a>></code></pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
|
||||
<script src="../../../main.js"></script>
|
||||
</body></html>
|
@ -1,8 +1,8 @@
|
||||
<!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 `lane` mod in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, lane"><title>map_model::objects::lane - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module lane</h2><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="#constants">Constants</a></li><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="lane" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">objects</a>::<wbr><a class="mod" href="#">lane</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/map_model/objects/lane.rs.html#1-582" title="goto source code">[src]</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 `lane` mod in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, lane"><title>map_model::objects::lane - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module lane</h2><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="#constants">Constants</a></li><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="lane" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">objects</a>::<wbr><a class="mod" href="#">lane</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/map_model/objects/lane.rs.html#1-598" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Lane.html" title="map_model::objects::lane::Lane struct">Lane</a></div><div class="item-right docblock-short"><p>A road segment is broken down into individual lanes, which have a LaneType.</p>
|
||||
</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.LaneID.html" title="map_model::objects::lane::LaneID struct">LaneID</a></div><div class="item-right docblock-short"><p>A lane is identified by its parent road and its position, ordered from the left.</p>
|
||||
</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.LaneSpec.html" title="map_model::objects::lane::LaneSpec struct">LaneSpec</a></div><div class="item-right docblock-short"></div></div></div><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.BufferType.html" title="map_model::objects::lane::BufferType enum">BufferType</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.LaneType.html" title="map_model::objects::lane::LaneType enum">LaneType</a></div><div class="item-right docblock-short"></div></div></div><h2 id="constants" class="section-header"><a href="#constants">Constants</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.BufferType.html" title="map_model::objects::lane::BufferType enum">BufferType</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.CommonEndpoint.html" title="map_model::objects::lane::CommonEndpoint enum">CommonEndpoint</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.LaneType.html" title="map_model::objects::lane::LaneType enum">LaneType</a></div><div class="item-right docblock-short"></div></div></div><h2 id="constants" class="section-header"><a href="#constants">Constants</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.NORMAL_LANE_THICKNESS.html" title="map_model::objects::lane::NORMAL_LANE_THICKNESS constant">NORMAL_LANE_THICKNESS</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.PARKING_LOT_SPOT_LENGTH.html" title="map_model::objects::lane::PARKING_LOT_SPOT_LENGTH constant">PARKING_LOT_SPOT_LENGTH</a></div><div class="item-right docblock-short"><p>From some manually audited cases in Seattle, the length of parallel street parking spots is a
|
||||
bit different than the length in parking lots, so set a different value here.</p>
|
||||
</div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.SERVICE_ROAD_LANE_THICKNESS.html" title="map_model::objects::lane::SERVICE_ROAD_LANE_THICKNESS constant">SERVICE_ROAD_LANE_THICKNESS</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.SHOULDER_THICKNESS.html" title="map_model::objects::lane::SHOULDER_THICKNESS constant">SHOULDER_THICKNESS</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.SIDEWALK_THICKNESS.html" title="map_model::objects::lane::SIDEWALK_THICKNESS constant">SIDEWALK_THICKNESS</a></div><div class="item-right docblock-short"></div></div></div><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>
|
||||
|
@ -1 +1 @@
|
||||
initSidebarItems({"constant":[["NORMAL_LANE_THICKNESS",""],["PARKING_LOT_SPOT_LENGTH","From some manually audited cases in Seattle, the length of parallel street parking spots is a bit different than the length in parking lots, so set a different value here."],["SERVICE_ROAD_LANE_THICKNESS",""],["SHOULDER_THICKNESS",""],["SIDEWALK_THICKNESS",""]],"enum":[["BufferType",""],["LaneType",""]],"fn":[["parse_turn_type_from_osm",""]],"struct":[["Lane","A road segment is broken down into individual lanes, which have a LaneType."],["LaneID","A lane is identified by its parent road and its position, ordered from the left."],["LaneSpec",""]]});
|
||||
initSidebarItems({"constant":[["NORMAL_LANE_THICKNESS",""],["PARKING_LOT_SPOT_LENGTH","From some manually audited cases in Seattle, the length of parallel street parking spots is a bit different than the length in parking lots, so set a different value here."],["SERVICE_ROAD_LANE_THICKNESS",""],["SHOULDER_THICKNESS",""],["SIDEWALK_THICKNESS",""]],"enum":[["BufferType",""],["CommonEndpoint",""],["LaneType",""]],"fn":[["parse_turn_type_from_osm",""]],"struct":[["Lane","A road segment is broken down into individual lanes, which have a LaneType."],["LaneID","A lane is identified by its parent road and its position, ordered from the left."],["LaneSpec",""]]});
|
File diff suppressed because one or more lines are too long
@ -2,7 +2,7 @@
|
||||
pub lt: <a class="enum" href="enum.LaneType.html" title="enum map_model::objects::lane::LaneType">LaneType</a>,
|
||||
pub dir: <a class="enum" href="../road/enum.Direction.html" title="enum map_model::objects::road::Direction">Direction</a>,
|
||||
pub width: <a class="struct" href="../../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a>,
|
||||
}</code></pre></div><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.lt" class="structfield small-section-header"><a href="#structfield.lt" class="anchor field"></a><code>lt: <a class="enum" href="enum.LaneType.html" title="enum map_model::objects::lane::LaneType">LaneType</a></code></span><span id="structfield.dir" class="structfield small-section-header"><a href="#structfield.dir" class="anchor field"></a><code>dir: <a class="enum" href="../road/enum.Direction.html" title="enum map_model::objects::road::Direction">Direction</a></code></span><span id="structfield.width" class="structfield small-section-header"><a href="#structfield.width" class="anchor field"></a><code>width: <a class="struct" href="../../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/lane.rs.html#478-547" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.LaneSpec.html" title="struct map_model::objects::lane::LaneSpec">LaneSpec</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.typical_lane_widths" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/lane.rs.html#481-546" title="goto source code">[src]</a></div><a href="#method.typical_lane_widths" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.typical_lane_widths" class="fnname">typical_lane_widths</a>(<br> lt: <a class="enum" href="enum.LaneType.html" title="enum map_model::objects::lane::LaneType">LaneType</a>, <br> tags: &<a class="struct" href="../../../abstutil/collections/struct.Tags.html" title="struct abstutil::collections::Tags">Tags</a><br>) -> <a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.tuple.html">(</a><a class="struct" href="../../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a>, &'static <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.str.html">str</a><a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.tuple.html">)</a>></h4></div></summary><div class="docblock"><p>For a given lane type, returns some likely widths. This may depend on the type of the road,
|
||||
}</code></pre></div><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.lt" class="structfield small-section-header"><a href="#structfield.lt" class="anchor field"></a><code>lt: <a class="enum" href="enum.LaneType.html" title="enum map_model::objects::lane::LaneType">LaneType</a></code></span><span id="structfield.dir" class="structfield small-section-header"><a href="#structfield.dir" class="anchor field"></a><code>dir: <a class="enum" href="../road/enum.Direction.html" title="enum map_model::objects::road::Direction">Direction</a></code></span><span id="structfield.width" class="structfield small-section-header"><a href="#structfield.width" class="anchor field"></a><code>width: <a class="struct" href="../../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/lane.rs.html#494-563" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.LaneSpec.html" title="struct map_model::objects::lane::LaneSpec">LaneSpec</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.typical_lane_widths" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/lane.rs.html#497-562" title="goto source code">[src]</a></div><a href="#method.typical_lane_widths" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.typical_lane_widths" class="fnname">typical_lane_widths</a>(<br> lt: <a class="enum" href="enum.LaneType.html" title="enum map_model::objects::lane::LaneType">LaneType</a>, <br> tags: &<a class="struct" href="../../../abstutil/collections/struct.Tags.html" title="struct abstutil::collections::Tags">Tags</a><br>) -> <a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.tuple.html">(</a><a class="struct" href="../../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a>, &'static <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.str.html">str</a><a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.tuple.html">)</a>></h4></div></summary><div class="docblock"><p>For a given lane type, returns some likely widths. This may depend on the type of the road,
|
||||
so the OSM tags are also passed in. The first value returned will be used as a default.</p>
|
||||
</div></details></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Clone" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/lane.rs.html#259" title="goto source code">[src]</a></div><a href="#impl-Clone" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.57.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.LaneSpec.html" title="struct map_model::objects::lane::LaneSpec">LaneSpec</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/map_model/objects/lane.rs.html#259" title="goto source code">[src]</a></div><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.57.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.LaneSpec.html" title="struct map_model::objects::lane::LaneSpec">LaneSpec</a></h4></div></summary><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.57.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone_from" class="method trait-impl has-srclink"><div class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/1.57.0/src/core/clone.rs.html#131" title="goto source code">[src]</a></div><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.57.0/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.reference.html">&</a>Self)</h4></div></summary><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.57.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `road` mod in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, road"><title>map_model::objects::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="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module road</h2><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><div id="sidebar-vars" data-name="road" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">objects</a>::<wbr><a class="mod" href="#">road</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/map_model/objects/road.rs.html#1-678" title="goto source code">[src]</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 `road` mod in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, road"><title>map_model::objects::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="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module road</h2><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><div id="sidebar-vars" data-name="road" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">objects</a>::<wbr><a class="mod" href="#">road</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/map_model/objects/road.rs.html#1-670" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.DirectedRoadID.html" title="map_model::objects::road::DirectedRoadID struct">DirectedRoadID</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Road.html" title="map_model::objects::road::Road struct">Road</a></div><div class="item-right docblock-short"><p>A Road represents a segment between exactly two Intersections. It contains Lanes as children.</p>
|
||||
</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.RoadID.html" title="map_model::objects::road::RoadID struct">RoadID</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.RoadSideID.html" title="map_model::objects::road::RoadSideID struct">RoadSideID</a></div><div class="item-right docblock-short"></div></div></div><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.Direction.html" title="map_model::objects::road::Direction enum">Direction</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.SideOfRoad.html" title="map_model::objects::road::SideOfRoad enum">SideOfRoad</a></div><div class="item-right docblock-short"><p>See https://wiki.openstreetmap.org/wiki/Forward_%26_backward,<em>left</em>%26_right.</p>
|
||||
|
File diff suppressed because one or more lines are too long
@ -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 `floodfill` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, floodfill"><title>floodfill in map_model::objects::zone - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">map_model</a>::<wbr><a href="../index.html">objects</a>::<wbr><a href="index.html">zone</a></h2><div id="sidebar-vars" data-name="floodfill" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">objects</a>::<wbr><a href="index.html">zone</a>::<wbr><a class="fn" href="#">floodfill</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/map_model/objects/zone.rs.html#62-90" title="goto source code">[src]</a></span></h1><pre class="rust fn"><code>fn floodfill(map: &<a class="struct" href="../../struct.Map.html" title="struct map_model::Map">Map</a>, start: <a class="struct" href="../road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>) -> <a class="struct" href="struct.Zone.html" title="struct map_model::objects::zone::Zone">Zone</a></code></pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
|
||||
<!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 `floodfill` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, floodfill"><title>floodfill in map_model::objects::zone - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">map_model</a>::<wbr><a href="../index.html">objects</a>::<wbr><a href="index.html">zone</a></h2><div id="sidebar-vars" data-name="floodfill" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">objects</a>::<wbr><a href="index.html">zone</a>::<wbr><a class="fn" href="#">floodfill</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/map_model/objects/zone.rs.html#62-93" title="goto source code">[src]</a></span></h1><pre class="rust fn"><code>fn floodfill(map: &<a class="struct" href="../../struct.Map.html" title="struct map_model::Map">Map</a>, start: <a class="struct" href="../road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>) -> <a class="struct" href="struct.Zone.html" title="struct map_model::objects::zone::Zone">Zone</a></code></pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
|
||||
<script src="../../../main.js"></script>
|
||||
</body></html>
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Zones and AccessRestrictions are used to model things like:"><meta name="keywords" content="rust, rustlang, rust-lang, zone"><title>map_model::objects::zone - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module zone</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="zone" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">objects</a>::<wbr><a class="mod" href="#">zone</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/map_model/objects/zone.rs.html#1-90" title="goto source code">[src]</a></span></h1><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Zones and AccessRestrictions are used to model things like:</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="Zones and AccessRestrictions are used to model things like:"><meta name="keywords" content="rust, rustlang, rust-lang, zone"><title>map_model::objects::zone - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module zone</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="zone" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">objects</a>::<wbr><a class="mod" href="#">zone</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/map_model/objects/zone.rs.html#1-93" title="goto source code">[src]</a></span></h1><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Zones and AccessRestrictions are used to model things like:</p>
|
||||
<ol>
|
||||
<li>gated communities, where only trips beginning or ending at a building in the neighborhood may
|
||||
use any of the private roads</li>
|
||||
|
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
@ -2,7 +2,7 @@
|
||||
pub lt: <a class="enum" href="objects/lane/enum.LaneType.html" title="enum map_model::objects::lane::LaneType">LaneType</a>,
|
||||
pub dir: <a class="enum" href="objects/road/enum.Direction.html" title="enum map_model::objects::road::Direction">Direction</a>,
|
||||
pub width: <a class="struct" href="../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a>,
|
||||
}</code></pre></div><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.lt" class="structfield small-section-header"><a href="#structfield.lt" class="anchor field"></a><code>lt: <a class="enum" href="objects/lane/enum.LaneType.html" title="enum map_model::objects::lane::LaneType">LaneType</a></code></span><span id="structfield.dir" class="structfield small-section-header"><a href="#structfield.dir" class="anchor field"></a><code>dir: <a class="enum" href="objects/road/enum.Direction.html" title="enum map_model::objects::road::Direction">Direction</a></code></span><span id="structfield.width" class="structfield small-section-header"><a href="#structfield.width" class="anchor field"></a><code>width: <a class="struct" href="../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/lane.rs.html#478-547" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="objects/lane/struct.LaneSpec.html" title="struct map_model::objects::lane::LaneSpec">LaneSpec</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.typical_lane_widths" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/lane.rs.html#481-546" title="goto source code">[src]</a></div><a href="#method.typical_lane_widths" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.typical_lane_widths" class="fnname">typical_lane_widths</a>(<br> lt: <a class="enum" href="objects/lane/enum.LaneType.html" title="enum map_model::objects::lane::LaneType">LaneType</a>, <br> tags: &<a class="struct" href="../abstutil/collections/struct.Tags.html" title="struct abstutil::collections::Tags">Tags</a><br>) -> <a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.tuple.html">(</a><a class="struct" href="../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a>, &'static <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.str.html">str</a><a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.tuple.html">)</a>></h4></div></summary><div class="docblock"><p>For a given lane type, returns some likely widths. This may depend on the type of the road,
|
||||
}</code></pre></div><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.lt" class="structfield small-section-header"><a href="#structfield.lt" class="anchor field"></a><code>lt: <a class="enum" href="objects/lane/enum.LaneType.html" title="enum map_model::objects::lane::LaneType">LaneType</a></code></span><span id="structfield.dir" class="structfield small-section-header"><a href="#structfield.dir" class="anchor field"></a><code>dir: <a class="enum" href="objects/road/enum.Direction.html" title="enum map_model::objects::road::Direction">Direction</a></code></span><span id="structfield.width" class="structfield small-section-header"><a href="#structfield.width" class="anchor field"></a><code>width: <a class="struct" href="../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/lane.rs.html#494-563" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="objects/lane/struct.LaneSpec.html" title="struct map_model::objects::lane::LaneSpec">LaneSpec</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.typical_lane_widths" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/lane.rs.html#497-562" title="goto source code">[src]</a></div><a href="#method.typical_lane_widths" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.typical_lane_widths" class="fnname">typical_lane_widths</a>(<br> lt: <a class="enum" href="objects/lane/enum.LaneType.html" title="enum map_model::objects::lane::LaneType">LaneType</a>, <br> tags: &<a class="struct" href="../abstutil/collections/struct.Tags.html" title="struct abstutil::collections::Tags">Tags</a><br>) -> <a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.tuple.html">(</a><a class="struct" href="../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a>, &'static <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.str.html">str</a><a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.tuple.html">)</a>></h4></div></summary><div class="docblock"><p>For a given lane type, returns some likely widths. This may depend on the type of the road,
|
||||
so the OSM tags are also passed in. The first value returned will be used as a default.</p>
|
||||
</div></details></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Clone" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/lane.rs.html#259" title="goto source code">[src]</a></div><a href="#impl-Clone" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.57.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="objects/lane/struct.LaneSpec.html" title="struct map_model::objects::lane::LaneSpec">LaneSpec</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/lane.rs.html#259" title="goto source code">[src]</a></div><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.57.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="objects/lane/struct.LaneSpec.html" title="struct map_model::objects::lane::LaneSpec">LaneSpec</a></h4></div></summary><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.57.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone_from" class="method trait-impl has-srclink"><div class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/1.57.0/src/core/clone.rs.html#131" title="goto source code">[src]</a></div><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.57.0/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.reference.html">&</a>Self)</h4></div></summary><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.57.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
|
@ -27,7 +27,7 @@ before the simulation resumes.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.incremental_edit_traffic_signal" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/edits/mod.rs.html#988-994" title="goto source code">[src]</a></div><a href="#method.incremental_edit_traffic_signal" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.incremental_edit_traffic_signal" class="fnname">incremental_edit_traffic_signal</a>(&mut self, signal: <a class="struct" href="objects/traffic_signals/struct.ControlTrafficSignal.html" title="struct map_model::objects::traffic_signals::ControlTrafficSignal">ControlTrafficSignal</a>)</h4></div></summary><div class="docblock"><p>Since the player is in the middle of editing, the signal may not be valid. Don’t go through
|
||||
the entire apply_edits flow.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_edits_change_key" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/edits/mod.rs.html#997-999" title="goto source code">[src]</a></div><a href="#method.get_edits_change_key" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_edits_change_key" class="fnname">get_edits_change_key</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.usize.html">usize</a></h4></div></summary><div class="docblock"><p>If you need to regenerate anything when the map is edited, use this key to detect edits.</p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-1" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/make/mod.rs.html#48-301" title="goto source code">[src]</a></div><a href="#impl-1" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.Map.html" title="struct map_model::Map">Map</a></h3></div></summary><div class="impl-items"><div id="method.create_from_raw" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/make/mod.rs.html#49-300" title="goto source code">[src]</a></div><a href="#method.create_from_raw" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.create_from_raw" class="fnname">create_from_raw</a>(<br> raw: <a class="struct" href="raw/struct.RawMap.html" title="struct map_model::raw::RawMap">RawMap</a>, <br> opts: <a class="struct" href="make/struct.RawToMapOptions.html" title="struct map_model::make::RawToMapOptions">RawToMapOptions</a>, <br> timer: &mut <a class="struct" href="../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a><'_><br>) -> <a class="struct" href="struct.Map.html" title="struct map_model::Map">Map</a></h4></div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-2" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/map.rs.html#48-897" title="goto source code">[src]</a></div><a href="#impl-2" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.Map.html" title="struct map_model::Map">Map</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.load_synchronously" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/map.rs.html#51-86" title="goto source code">[src]</a></div><a href="#method.load_synchronously" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.load_synchronously" class="fnname">load_synchronously</a>(path: <a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, timer: &mut <a class="struct" href="../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a><'_>) -> <a class="struct" href="struct.Map.html" title="struct map_model::Map">Map</a></h4></div></summary><div class="docblock"><p>Load a map from a local serialized Map or RawMap. Note this won’t work on web. This should
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-1" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/make/mod.rs.html#48-301" title="goto source code">[src]</a></div><a href="#impl-1" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.Map.html" title="struct map_model::Map">Map</a></h3></div></summary><div class="impl-items"><div id="method.create_from_raw" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/make/mod.rs.html#49-300" title="goto source code">[src]</a></div><a href="#method.create_from_raw" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.create_from_raw" class="fnname">create_from_raw</a>(<br> raw: <a class="struct" href="raw/struct.RawMap.html" title="struct map_model::raw::RawMap">RawMap</a>, <br> opts: <a class="struct" href="make/struct.RawToMapOptions.html" title="struct map_model::make::RawToMapOptions">RawToMapOptions</a>, <br> timer: &mut <a class="struct" href="../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a><'_><br>) -> <a class="struct" href="struct.Map.html" title="struct map_model::Map">Map</a></h4></div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-2" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/map.rs.html#48-900" title="goto source code">[src]</a></div><a href="#impl-2" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.Map.html" title="struct map_model::Map">Map</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.load_synchronously" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/map.rs.html#51-86" title="goto source code">[src]</a></div><a href="#method.load_synchronously" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.load_synchronously" class="fnname">load_synchronously</a>(path: <a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, timer: &mut <a class="struct" href="../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a><'_>) -> <a class="struct" href="struct.Map.html" title="struct map_model::Map">Map</a></h4></div></summary><div class="docblock"><p>Load a map from a local serialized Map or RawMap. Note this won’t work on web. This should
|
||||
only be used by non-UI tools.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.map_loaded_directly" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/map.rs.html#89-150" title="goto source code">[src]</a></div><a href="#method.map_loaded_directly" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.map_loaded_directly" class="fnname">map_loaded_directly</a>(&mut self, timer: &mut <a class="struct" href="../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a><'_>)</h4></div></summary><div class="docblock"><p>After deserializing a map directly, call this after.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.blank" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/map.rs.html#153-189" title="goto source code">[src]</a></div><a href="#method.blank" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.blank" class="fnname">blank</a>() -> <a class="struct" href="struct.Map.html" title="struct map_model::Map">Map</a></h4></div></summary><div class="docblock"><p>Just for temporary std::mem::replace tricks.</p>
|
||||
@ -52,10 +52,10 @@ last step can be on any road connected to the intersection.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.routing_params" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/map.rs.html#813-815" title="goto source code">[src]</a></div><a href="#method.routing_params" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.routing_params" class="fnname">routing_params</a>(&self) -> &<a class="struct" href="pathfind/struct.RoutingParams.html" title="struct map_model::pathfind::RoutingParams">RoutingParams</a></h4></div></summary><div class="docblock"><p>Returns the routing params baked into the map.</p>
|
||||
</div></details><div id="method.road_to_buildings" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/map.rs.html#817-819" title="goto source code">[src]</a></div><a href="#method.road_to_buildings" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.road_to_buildings" class="fnname">road_to_buildings</a>(&self, r: <a class="struct" href="objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>) -> &<a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a><<a class="struct" href="objects/building/struct.BuildingID.html" title="struct map_model::objects::building::BuildingID">BuildingID</a>></h4></div><div id="method.recalculate_road_to_buildings" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/map.rs.html#821-827" title="goto source code">[src]</a></div><a href="#method.recalculate_road_to_buildings" class="anchor"></a><h4 class="code-header">pub(crate) fn <a href="#method.recalculate_road_to_buildings" class="fnname">recalculate_road_to_buildings</a>(&mut self)</h4></div><div id="method.recalculate_all_movements" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/map.rs.html#829-838" title="goto source code">[src]</a></div><a href="#method.recalculate_all_movements" class="anchor"></a><h4 class="code-header">pub(crate) fn <a href="#method.recalculate_all_movements" class="fnname">recalculate_all_movements</a>(&mut self, timer: &mut <a class="struct" href="../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a><'_>)</h4></div><details class="rustdoc-toggle method-toggle" open><summary><div id="method.find_road_between" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/map.rs.html#841-849" title="goto source code">[src]</a></div><a href="#method.find_road_between" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.find_road_between" class="fnname">find_road_between</a>(<br> &self, <br> i1: <a class="struct" href="objects/intersection/struct.IntersectionID.html" title="struct map_model::objects::intersection::IntersectionID">IntersectionID</a>, <br> i2: <a class="struct" href="objects/intersection/struct.IntersectionID.html" title="struct map_model::objects::intersection::IntersectionID">IntersectionID</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/1.57.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>></h4></div></summary><div class="docblock"><p>Finds the road directly connecting two intersections.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.max_elevation" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/map.rs.html#852-859" title="goto source code">[src]</a></div><a href="#method.max_elevation" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.max_elevation" class="fnname">max_elevation</a>(&self) -> <a class="struct" href="../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a></h4></div></summary><div class="docblock"><p>Returns the highest elevation in the map</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.is_unprotected_turn" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/map.rs.html#864-875" title="goto source code">[src]</a></div><a href="#method.is_unprotected_turn" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.is_unprotected_turn" class="fnname">is_unprotected_turn</a>(<br> &self, <br> from: <a class="struct" href="objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>, <br> to: <a class="struct" href="objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>, <br> turn_type: <a class="enum" href="objects/turn/enum.TurnType.html" title="enum map_model::objects::turn::TurnType">TurnType</a><br>) -> <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Does a turn at a stop sign go from a smaller to a larger road?
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.is_unprotected_turn" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/map.rs.html#864-878" title="goto source code">[src]</a></div><a href="#method.is_unprotected_turn" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.is_unprotected_turn" class="fnname">is_unprotected_turn</a>(<br> &self, <br> from: <a class="struct" href="objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>, <br> to: <a class="struct" href="objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>, <br> turn_type: <a class="enum" href="objects/turn/enum.TurnType.html" title="enum map_model::objects::turn::TurnType">TurnType</a><br>) -> <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Does a turn at a stop sign go from a smaller to a larger road?
|
||||
(Note this doesn’t look at unprotected movements in traffic signals, since we don’t yet
|
||||
have good heuristics for when those exist)</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.minify" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/map.rs.html#878-896" title="goto source code">[src]</a></div><a href="#method.minify" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.minify" class="fnname">minify</a>(&mut self, timer: &mut <a class="struct" href="../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a><'_>)</h4></div></summary><div class="docblock"><p>Modifies the map in-place, removing parts not essential for the bike network tool.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.minify" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/map.rs.html#881-899" title="goto source code">[src]</a></div><a href="#method.minify" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.minify" class="fnname">minify</a>(&mut self, timer: &mut <a class="struct" href="../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a><'_>)</h4></div></summary><div class="docblock"><p>Modifies the map in-place, removing parts not essential for the bike network tool.</p>
|
||||
</div></details></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Clone" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/lib.rs.html#83" title="goto source code">[src]</a></div><a href="#impl-Clone" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.57.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.Map.html" title="struct map_model::Map">Map</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/lib.rs.html#83" title="goto source code">[src]</a></div><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.57.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.Map.html" title="struct map_model::Map">Map</a></h4></div></summary><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.57.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone_from" class="method trait-impl has-srclink"><div class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/1.57.0/src/core/clone.rs.html#131" title="goto source code">[src]</a></div><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.57.0/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.reference.html">&</a>Self)</h4></div></summary><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.57.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Deserialize%3C%27de%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/lib.rs.html#83" title="goto source code">[src]</a></div><a href="#impl-Deserialize%3C%27de%3E" class="anchor"></a><h3 class="code-header in-band">impl<'de> <a class="trait" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a><'de> for <a class="struct" href="struct.Map.html" title="struct map_model::Map">Map</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.deserialize" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/lib.rs.html#83" title="goto source code">[src]</a></div><a href="#method.deserialize" class="anchor"></a><h4 class="code-header">fn <a href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html#tymethod.deserialize" class="fnname">deserialize</a><__D>(__deserializer: __D) -> <a class="enum" href="https://doc.rust-lang.org/1.57.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, __D::<a class="type" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>> <span class="where fmt-newline">where<br> __D: <a class="trait" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a><'de>, </span></h4></div></summary><div class='docblock'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
|
||||
|
@ -4,7 +4,7 @@
|
||||
}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A sequence of roads in order, beginning and ending at the same place. No “crossings” – tracing
|
||||
along this sequence should geometrically yield a simple polygon.</p>
|
||||
</div></details><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.roads" class="structfield small-section-header"><a href="#structfield.roads" class="anchor field"></a><code>roads: <a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="objects/road/struct.RoadSideID.html" title="struct map_model::objects::road::RoadSideID">RoadSideID</a>></code></span><span id="structfield.interior" class="structfield small-section-header"><a href="#structfield.interior" class="anchor field"></a><code>interior: <a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a><<a class="struct" href="objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>></code></span><div class="docblock"><p>These roads exist entirely within the perimeter</p>
|
||||
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#34-412" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.single_block" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#38-82" title="goto source code">[src]</a></div><a href="#method.single_block" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.single_block" class="fnname">single_block</a>(map: &<a class="struct" href="struct.Map.html" title="struct map_model::Map">Map</a>, start: <a class="struct" href="objects/lane/struct.LaneID.html" title="struct map_model::objects::lane::LaneID">LaneID</a>) -> <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a><<a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>></h4></div></summary><div class="docblock"><p>Starting at any lane, snap to the nearest side of that road, then begin tracing a single
|
||||
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#34-513" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.single_block" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#38-82" title="goto source code">[src]</a></div><a href="#method.single_block" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.single_block" class="fnname">single_block</a>(map: &<a class="struct" href="struct.Map.html" title="struct map_model::Map">Map</a>, start: <a class="struct" href="objects/lane/struct.LaneID.html" title="struct map_model::objects::lane::LaneID">LaneID</a>) -> <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a><<a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>></h4></div></summary><div class="docblock"><p>Starting at any lane, snap to the nearest side of that road, then begin tracing a single
|
||||
block, with no interior roads. This will fail if a map boundary is reached. The results are
|
||||
unusual when crossing the entrance to a tunnel or bridge.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.find_all_single_blocks" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#86-111" title="goto source code">[src]</a></div><a href="#method.find_all_single_blocks" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.find_all_single_blocks" class="fnname">find_all_single_blocks</a>(map: &<a class="struct" href="struct.Map.html" title="struct map_model::Map">Map</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>></h4></div></summary><div class="docblock"><p>This calculates all single block perimeters for the entire map. The resulting list does not
|
||||
@ -13,24 +13,24 @@ cover roads near the map boundary.</p>
|
||||
work with. Temporarily undo that.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.restore_invariant" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#121-123" title="goto source code">[src]</a></div><a href="#method.restore_invariant" class="anchor"></a><h4 class="code-header">fn <a href="#method.restore_invariant" class="fnname">restore_invariant</a>(&mut self)</h4></div></summary><div class="docblock"><p>Restore the first=last invariant. Methods may temporarily break this, but must restore it
|
||||
before returning.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_to_merge" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#130-223" title="goto source code">[src]</a></div><a href="#method.try_to_merge" class="anchor"></a><h4 class="code-header">fn <a href="#method.try_to_merge" class="fnname">try_to_merge</a>(&mut self, other: &mut <a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>, debug_failures: <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.bool.html">bool</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Try to merge two blocks. Returns true if this is successful, which will only be when the
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_to_merge" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#131-224" title="goto source code">[src]</a></div><a href="#method.try_to_merge" class="anchor"></a><h4 class="code-header">fn <a href="#method.try_to_merge" class="fnname">try_to_merge</a>(&mut self, other: &mut <a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>, debug_failures: <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.bool.html">bool</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Try to merge two blocks. Returns true if this is successful, which will only be when the
|
||||
blocks are adjacent, but the merge wouldn’t create an interior “hole”.</p>
|
||||
<p>Note this may modify both perimeters and still return <code>false</code>. The modification is just to
|
||||
rotate the order of the road loop; this doesn’t logically change the perimeter.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.merge_all" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#228-264" title="goto source code">[src]</a></div><a href="#method.merge_all" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.merge_all" class="fnname">merge_all</a>(input: <a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>>, stepwise_debug: <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.bool.html">bool</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>></h4></div></summary><div class="docblock"><p>Try to merge all given perimeters. If successful, only one perimeter will be returned.
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.merge_all" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#229-265" title="goto source code">[src]</a></div><a href="#method.merge_all" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.merge_all" class="fnname">merge_all</a>(input: <a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>>, stepwise_debug: <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.bool.html">bool</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>></h4></div></summary><div class="docblock"><p>Try to merge all given perimeters. If successful, only one perimeter will be returned.
|
||||
Perimeters are never “destroyed” – if not merged, they’ll appear in the results. If
|
||||
<code>stepwise_debug</code> is true, returns after performing just one merge.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.collapse_deadends" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#268-296" title="goto source code">[src]</a></div><a href="#method.collapse_deadends" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.collapse_deadends" class="fnname">collapse_deadends</a>(&mut self)</h4></div></summary><div class="docblock"><p>If the perimeter follows any dead-end roads, “collapse” them and instead make the perimeter
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.collapse_deadends" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#269-297" title="goto source code">[src]</a></div><a href="#method.collapse_deadends" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.collapse_deadends" class="fnname">collapse_deadends</a>(&mut self)</h4></div></summary><div class="docblock"><p>If the perimeter follows any dead-end roads, “collapse” them and instead make the perimeter
|
||||
contain the dead-end.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.partition_by_predicate" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#301-361" title="goto source code">[src]</a></div><a href="#method.partition_by_predicate" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.partition_by_predicate" class="fnname">partition_by_predicate</a><F: <a class="trait" href="https://doc.rust-lang.org/1.57.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(<a class="struct" href="objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.bool.html">bool</a>>(<br> input: <a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>>, <br> predicate: F<br>) -> <a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>>></h4></div></summary><div class="docblock"><p>Consider the perimeters as a graph, with adjacency determined by sharing any road in common.
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.partition_by_predicate" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#302-362" title="goto source code">[src]</a></div><a href="#method.partition_by_predicate" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.partition_by_predicate" class="fnname">partition_by_predicate</a><F: <a class="trait" href="https://doc.rust-lang.org/1.57.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(<a class="struct" href="objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.bool.html">bool</a>>(<br> input: <a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>>, <br> predicate: F<br>) -> <a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>>></h4></div></summary><div class="docblock"><p>Consider the perimeters as a graph, with adjacency determined by sharing any road in common.
|
||||
Partition adjacent perimeters, subject to the predicate. Each partition should produce a
|
||||
single result with <code>merge_all</code>.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.calculate_coloring" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#365-399" title="goto source code">[src]</a></div><a href="#method.calculate_coloring" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.calculate_coloring" class="fnname">calculate_coloring</a>(<br> input: <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.slice.html">&[</a><a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a><a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.slice.html">]</a>, <br> num_colors: <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.usize.html">usize</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/1.57.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.usize.html">usize</a>>></h4></div></summary><div class="docblock"><p>Assign each perimeter one of <code>num_colors</code>, such that no two adjacent perimeters share the
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.calculate_coloring" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#366-400" title="goto source code">[src]</a></div><a href="#method.calculate_coloring" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.calculate_coloring" class="fnname">calculate_coloring</a>(<br> input: <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.slice.html">&[</a><a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a><a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.slice.html">]</a>, <br> num_colors: <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.usize.html">usize</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/1.57.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.usize.html">usize</a>>></h4></div></summary><div class="docblock"><p>Assign each perimeter one of <code>num_colors</code>, such that no two adjacent perimeters share the
|
||||
same color. May fail. The resulting colors are expressed as <code>[0, num_colors)</code>.</p>
|
||||
</div></details><div id="method.to_block" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#401-403" title="goto source code">[src]</a></div><a href="#method.to_block" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.to_block" class="fnname">to_block</a>(self, map: &<a class="struct" href="struct.Map.html" title="struct map_model::Map">Map</a>) -> <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a><<a class="struct" href="objects/block/struct.Block.html" title="struct map_model::objects::block::Block">Block</a>></h4></div><details class="rustdoc-toggle method-toggle" open><summary><div id="method.contains" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#406-411" title="goto source code">[src]</a></div><a href="#method.contains" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.contains" class="fnname">contains</a>(&self, other: &<a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Does this perimeter completely enclose the other?</p>
|
||||
</div></details><div id="method.to_block" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#402-504" title="goto source code">[src]</a></div><a href="#method.to_block" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.to_block" class="fnname">to_block</a>(self, map: &<a class="struct" href="struct.Map.html" title="struct map_model::Map">Map</a>) -> <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a><<a class="struct" href="objects/block/struct.Block.html" title="struct map_model::objects::block::Block">Block</a>></h4></div><details class="rustdoc-toggle method-toggle" open><summary><div id="method.contains" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#507-512" title="goto source code">[src]</a></div><a href="#method.contains" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.contains" class="fnname">contains</a>(&self, other: &<a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Does this perimeter completely enclose the other?</p>
|
||||
</div></details></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Clone" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#27" title="goto source code">[src]</a></div><a href="#impl-Clone" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.57.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#27" title="goto source code">[src]</a></div><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.57.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h4></div></summary><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.57.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone_from" class="method trait-impl has-srclink"><div class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/1.57.0/src/core/clone.rs.html#131" title="goto source code">[src]</a></div><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.57.0/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.reference.html">&</a>Self)</h4></div></summary><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.57.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Debug" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#414-422" title="goto source code">[src]</a></div><a href="#impl-Debug" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.57.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#415-421" title="goto source code">[src]</a></div><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.57.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.57.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.57.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.57.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Debug" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#515-523" title="goto source code">[src]</a></div><a href="#impl-Debug" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.57.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/map_model/objects/block.rs.html#516-522" title="goto source code">[src]</a></div><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.57.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.57.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.57.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.57.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-RefUnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.57.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div><div id="impl-Send" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Send" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.57.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div><div id="impl-Sync" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Sync" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.57.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div><div id="impl-Unpin" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Unpin" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.57.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div><div id="impl-UnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-UnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.57.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a></h3></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Any" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.57.0/src/core/any.rs.html#132-136" title="goto source code">[src]</a></div><a href="#impl-Any" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.57.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.57.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.57.0/src/core/any.rs.html#133" title="goto source code">[src]</a></div><a href="#method.type_id" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.57.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.57.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.57.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Borrow%3CT%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.57.0/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></div><a href="#impl-Borrow%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.57.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.57.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.57.0/src/core/borrow.rs.html#210" title="goto source code">[src]</a></div><a href="#method.borrow" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.57.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.reference.html">&</a>T</h4></div></summary><div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.57.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-BorrowMut%3CT%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.57.0/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></div><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.57.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.57.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow_mut" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.57.0/src/core/borrow.rs.html#217" title="goto source code">[src]</a></div><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.57.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.reference.html">&mut </a>T</h4></div></summary><div class='docblock'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.57.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">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
@ -202,13 +202,15 @@
|
||||
<span id="202">202</span>
|
||||
<span id="203">203</span>
|
||||
<span id="204">204</span>
|
||||
<span id="205">205</span>
|
||||
<span id="206">206</span>
|
||||
</pre><pre class="rust"><code><span class="kw">use</span> <span class="ident">std::collections::BTreeSet</span>;
|
||||
|
||||
<span class="kw">use</span> <span class="ident">enumset::EnumSet</span>;
|
||||
<span class="kw">use</span> <span class="ident">maplit::btreeset</span>;
|
||||
|
||||
<span class="kw">use</span> <span class="ident">map_gui::tools::ColorDiscrete</span>;
|
||||
<span class="kw">use</span> <span class="ident">map_model</span>::{<span class="ident">AccessRestrictions</span>, <span class="ident">PathConstraints</span>, <span class="ident">RoadID</span>};
|
||||
<span class="kw">use</span> <span class="ident">map_model</span>::{<span class="ident">AccessRestrictions</span>, <span class="ident">CommonEndpoint</span>, <span class="ident">PathConstraints</span>, <span class="ident">RoadID</span>};
|
||||
<span class="kw">use</span> <span class="ident">sim::TripMode</span>;
|
||||
<span class="kw">use</span> <span class="ident">widgetry::mapspace::ToggleZoomed</span>;
|
||||
<span class="kw">use</span> <span class="ident">widgetry</span>::{
|
||||
@ -383,7 +385,9 @@
|
||||
<span class="ident">colorer</span>.<span class="ident">add_r</span>(<span class="ident">r</span>.<span class="ident">id</span>, <span class="string">"restricted road"</span>);
|
||||
<span class="kw">for</span> <span class="ident">next</span> <span class="kw">in</span> <span class="ident">map</span>.<span class="ident">get_next_roads</span>(<span class="ident">r</span>.<span class="ident">id</span>) {
|
||||
<span class="kw">if</span> <span class="op">!</span><span class="ident">members</span>.<span class="ident">contains</span>(<span class="kw-2">&</span><span class="ident">next</span>) {
|
||||
<span class="ident">colorer</span>.<span class="ident">add_i</span>(<span class="ident">r</span>.<span class="ident">common_endpt</span>(<span class="ident">map</span>.<span class="ident">get_r</span>(<span class="ident">next</span>)), <span class="string">"entrance/exit"</span>);
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="ident">CommonEndpoint::One</span>(<span class="ident">i</span>) <span class="op">=</span> <span class="ident">r</span>.<span class="ident">common_endpoint</span>(<span class="ident">map</span>.<span class="ident">get_r</span>(<span class="ident">next</span>)) {
|
||||
<span class="ident">colorer</span>.<span class="ident">add_i</span>(<span class="ident">i</span>, <span class="string">"entrance/exit"</span>);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -280,8 +280,21 @@
|
||||
<span id="280">280</span>
|
||||
<span id="281">281</span>
|
||||
<span id="282">282</span>
|
||||
<span id="283">283</span>
|
||||
<span id="284">284</span>
|
||||
<span id="285">285</span>
|
||||
<span id="286">286</span>
|
||||
<span id="287">287</span>
|
||||
<span id="288">288</span>
|
||||
<span id="289">289</span>
|
||||
<span id="290">290</span>
|
||||
<span id="291">291</span>
|
||||
<span id="292">292</span>
|
||||
<span id="293">293</span>
|
||||
<span id="294">294</span>
|
||||
</pre><pre class="rust"><code><span class="kw">use</span> <span class="ident">std::collections::HashSet</span>;
|
||||
<span class="kw">use</span> <span class="ident">std::fmt</span>;
|
||||
<span class="kw">use</span> <span class="ident">std::fmt::Write</span>;
|
||||
|
||||
<span class="kw">use</span> <span class="ident">anyhow::Result</span>;
|
||||
<span class="kw">use</span> <span class="ident">serde</span>::{<span class="ident">Deserialize</span>, <span class="ident">Serialize</span>};
|
||||
@ -531,6 +544,17 @@
|
||||
<span class="comment">// Do they match up?</span>
|
||||
<span class="ident">orig</span> <span class="op">!</span><span class="op">=</span> <span class="ident">sorted</span>
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Print the coordinates of this ring as a `geo::LineString` for easy bug reports</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">as_geo_linestring</span>(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="ident">String</span> {
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">output</span> <span class="op">=</span> <span class="ident">String::new</span>();
|
||||
<span class="macro">writeln!</span>(<span class="ident">output</span>, <span class="string">"let line_string = geo_types::line_string!["</span>).<span class="ident">unwrap</span>();
|
||||
<span class="kw">for</span> <span class="ident">pt</span> <span class="kw">in</span> <span class="kw-2">&</span><span class="self">self</span>.<span class="ident">pts</span> {
|
||||
<span class="macro">writeln!</span>(<span class="ident">output</span>, <span class="string">" (x: {}, y: {}),"</span>, <span class="ident">pt</span>.<span class="ident">x</span>(), <span class="ident">pt</span>.<span class="ident">y</span>()).<span class="ident">unwrap</span>();
|
||||
}
|
||||
<span class="macro">writeln!</span>(<span class="ident">output</span>, <span class="string">"];"</span>).<span class="ident">unwrap</span>();
|
||||
<span class="ident">output</span>
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">fmt::Display</span> <span class="kw">for</span> <span class="ident">Ring</span> {
|
||||
|
@ -174,7 +174,7 @@
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">RUSTDOC_VERSION</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r"rustdoc 1.57.0 (f1edd0429 2021-11-29)"</span>;
|
||||
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#"The build time in RFC2822, UTC."#</span>]</span>
|
||||
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r"Thu, 06 Jan 2022 17:35:55 +0000"</span>;
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r"Sun, 09 Jan 2022 11:16:29 +0000"</span>;
|
||||
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#"The target architecture, given by `CARGO_CFG_TARGET_ARCH`."#</span>]</span>
|
||||
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CFG_TARGET_ARCH</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r"x86_64"</span>;
|
||||
|
@ -169,8 +169,8 @@
|
||||
};
|
||||
<span class="kw">pub</span> <span class="kw">use</span> <span class="ident"><span class="kw">crate</span>::objects::intersection</span>::{<span class="ident">Intersection</span>, <span class="ident">IntersectionID</span>, <span class="ident">IntersectionType</span>};
|
||||
<span class="kw">pub</span> <span class="kw">use</span> <span class="ident"><span class="kw">crate</span>::objects::lane</span>::{
|
||||
<span class="ident">BufferType</span>, <span class="ident">Lane</span>, <span class="ident">LaneID</span>, <span class="ident">LaneSpec</span>, <span class="ident">LaneType</span>, <span class="ident">NORMAL_LANE_THICKNESS</span>, <span class="ident">PARKING_LOT_SPOT_LENGTH</span>,
|
||||
<span class="ident">SIDEWALK_THICKNESS</span>,
|
||||
<span class="ident">BufferType</span>, <span class="ident">CommonEndpoint</span>, <span class="ident">Lane</span>, <span class="ident">LaneID</span>, <span class="ident">LaneSpec</span>, <span class="ident">LaneType</span>, <span class="ident">NORMAL_LANE_THICKNESS</span>,
|
||||
<span class="ident">PARKING_LOT_SPOT_LENGTH</span>, <span class="ident">SIDEWALK_THICKNESS</span>,
|
||||
};
|
||||
<span class="kw">pub</span> <span class="kw">use</span> <span class="ident"><span class="kw">crate</span>::objects::movement</span>::{<span class="ident">CompressedMovementID</span>, <span class="ident">Movement</span>, <span class="ident">MovementID</span>};
|
||||
<span class="kw">pub</span> <span class="kw">use</span> <span class="ident"><span class="kw">crate</span>::objects::parking_lot</span>::{<span class="ident">ParkingLot</span>, <span class="ident">ParkingLotID</span>};
|
||||
|
@ -895,6 +895,9 @@
|
||||
<span id="895">895</span>
|
||||
<span id="896">896</span>
|
||||
<span id="897">897</span>
|
||||
<span id="898">898</span>
|
||||
<span id="899">899</span>
|
||||
<span id="900">900</span>
|
||||
</pre><pre class="rust"><code><span class="doccomment">//! A bunch of (mostly read-only) queries on a Map.</span>
|
||||
|
||||
<span class="kw">use</span> <span class="ident">std::collections</span>::{<span class="ident">BTreeMap</span>, <span class="ident">BTreeSet</span>, <span class="ident">HashMap</span>, <span class="ident">HashSet</span>, <span class="ident">VecDeque</span>};
|
||||
@ -909,12 +912,12 @@
|
||||
|
||||
<span class="kw">use</span> <span class="ident"><span class="kw">crate</span>::raw</span>::{<span class="ident">OriginalRoad</span>, <span class="ident">RawMap</span>};
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::{
|
||||
<span class="ident">osm</span>, <span class="ident">Area</span>, <span class="ident">AreaID</span>, <span class="ident">AreaType</span>, <span class="ident">Building</span>, <span class="ident">BuildingID</span>, <span class="ident">BuildingType</span>, <span class="ident">CompressedMovementID</span>,
|
||||
<span class="ident">ControlStopSign</span>, <span class="ident">ControlTrafficSignal</span>, <span class="ident">DirectedRoadID</span>, <span class="ident">Direction</span>, <span class="ident">Intersection</span>, <span class="ident">IntersectionID</span>,
|
||||
<span class="ident">Lane</span>, <span class="ident">LaneID</span>, <span class="ident">LaneType</span>, <span class="ident">Map</span>, <span class="ident">MapEdits</span>, <span class="ident">Movement</span>, <span class="ident">MovementID</span>, <span class="ident">OffstreetParking</span>, <span class="ident">ParkingLot</span>,
|
||||
<span class="ident">ParkingLotID</span>, <span class="ident">Path</span>, <span class="ident">PathConstraints</span>, <span class="ident">PathRequest</span>, <span class="ident">PathV2</span>, <span class="ident">Pathfinder</span>, <span class="ident">Position</span>, <span class="ident">Road</span>, <span class="ident">RoadID</span>,
|
||||
<span class="ident">RoutingParams</span>, <span class="ident">TransitRoute</span>, <span class="ident">TransitRouteID</span>, <span class="ident">TransitStop</span>, <span class="ident">TransitStopID</span>, <span class="ident">Turn</span>, <span class="ident">TurnID</span>,
|
||||
<span class="ident">TurnType</span>, <span class="ident">Zone</span>,
|
||||
<span class="ident">osm</span>, <span class="ident">Area</span>, <span class="ident">AreaID</span>, <span class="ident">AreaType</span>, <span class="ident">Building</span>, <span class="ident">BuildingID</span>, <span class="ident">BuildingType</span>, <span class="ident">CommonEndpoint</span>,
|
||||
<span class="ident">CompressedMovementID</span>, <span class="ident">ControlStopSign</span>, <span class="ident">ControlTrafficSignal</span>, <span class="ident">DirectedRoadID</span>, <span class="ident">Direction</span>,
|
||||
<span class="ident">Intersection</span>, <span class="ident">IntersectionID</span>, <span class="ident">Lane</span>, <span class="ident">LaneID</span>, <span class="ident">LaneType</span>, <span class="ident">Map</span>, <span class="ident">MapEdits</span>, <span class="ident">Movement</span>, <span class="ident">MovementID</span>,
|
||||
<span class="ident">OffstreetParking</span>, <span class="ident">ParkingLot</span>, <span class="ident">ParkingLotID</span>, <span class="ident">Path</span>, <span class="ident">PathConstraints</span>, <span class="ident">PathRequest</span>, <span class="ident">PathV2</span>,
|
||||
<span class="ident">Pathfinder</span>, <span class="ident">Position</span>, <span class="ident">Road</span>, <span class="ident">RoadID</span>, <span class="ident">RoutingParams</span>, <span class="ident">TransitRoute</span>, <span class="ident">TransitRouteID</span>, <span class="ident">TransitStop</span>,
|
||||
<span class="ident">TransitStopID</span>, <span class="ident">Turn</span>, <span class="ident">TurnID</span>, <span class="ident">TurnType</span>, <span class="ident">Zone</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>
|
||||
@ -1768,7 +1771,10 @@
|
||||
<span class="kw">let</span> <span class="ident">to</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">get_r</span>(<span class="ident">to</span>);
|
||||
<span class="ident">turn_type</span> <span class="op">==</span> <span class="ident">unprotected_turn_type</span>
|
||||
<span class="op">&&</span> <span class="ident">from</span>.<span class="ident">get_detailed_rank</span>() <span class="op"><</span> <span class="ident">to</span>.<span class="ident">get_detailed_rank</span>()
|
||||
<span class="op">&&</span> <span class="self">self</span>.<span class="ident">get_i</span>(<span class="ident">from</span>.<span class="ident">common_endpt</span>(<span class="ident">to</span>)).<span class="ident">is_stop_sign</span>()
|
||||
<span class="op">&&</span> <span class="kw">match</span> <span class="ident">from</span>.<span class="ident">common_endpoint</span>(<span class="ident">to</span>) {
|
||||
<span class="ident">CommonEndpoint::One</span>(<span class="ident">i</span>) => <span class="self">self</span>.<span class="ident">get_i</span>(<span class="ident">i</span>).<span class="ident">is_stop_sign</span>(),
|
||||
<span class="kw">_</span> => <span class="bool-val">false</span>,
|
||||
}
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Modifies the map in-place, removing parts not essential for the bike network tool.</span>
|
||||
|
@ -518,6 +518,9 @@
|
||||
<span id="518">518</span>
|
||||
<span id="519">519</span>
|
||||
<span id="520">520</span>
|
||||
<span id="521">521</span>
|
||||
<span id="522">522</span>
|
||||
<span id="523">523</span>
|
||||
</pre><pre class="rust"><code><span class="kw">use</span> <span class="ident">std::collections</span>::{<span class="ident">BTreeSet</span>, <span class="ident">HashMap</span>, <span class="ident">HashSet</span>};
|
||||
<span class="kw">use</span> <span class="ident">std::fmt</span>;
|
||||
|
||||
@ -526,7 +529,7 @@
|
||||
<span class="kw">use</span> <span class="ident">abstutil::wraparound_get</span>;
|
||||
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Polygon</span>, <span class="ident">Pt2D</span>, <span class="ident">Ring</span>};
|
||||
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::{<span class="ident">Direction</span>, <span class="ident">LaneID</span>, <span class="ident">Map</span>, <span class="ident">RoadID</span>, <span class="ident">RoadSideID</span>, <span class="ident">SideOfRoad</span>};
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::{<span class="ident">CommonEndpoint</span>, <span class="ident">Direction</span>, <span class="ident">LaneID</span>, <span class="ident">Map</span>, <span class="ident">RoadID</span>, <span class="ident">RoadSideID</span>, <span class="ident">SideOfRoad</span>};
|
||||
|
||||
<span class="doccomment">/// A block is defined by a perimeter that traces along the sides of roads. Inside the perimeter,</span>
|
||||
<span class="doccomment">/// the block may contain buildings and interior roads. In the simple case, a block represents a</span>
|
||||
@ -647,6 +650,7 @@
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// Note this may modify both perimeters and still return `false`. The modification is just to</span>
|
||||
<span class="doccomment">/// rotate the order of the road loop; this doesn't logically change the perimeter.</span>
|
||||
<span class="comment">// TODO Would it be cleaner to return a Result here and always restore the invariant?</span>
|
||||
<span class="kw">fn</span> <span class="ident">try_to_merge</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">other</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">Perimeter</span>, <span class="ident">debug_failures</span>: <span class="ident">bool</span>) -> <span class="ident">bool</span> {
|
||||
<span class="self">self</span>.<span class="ident">undo_invariant</span>();
|
||||
<span class="ident">other</span>.<span class="ident">undo_invariant</span>();
|
||||
@ -919,34 +923,10 @@
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">to_block</span>(<span class="self">self</span>, <span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>) -> <span class="prelude-ty">Result</span><span class="op"><</span><span class="ident">Block</span><span class="op">></span> {
|
||||
<span class="ident">Block::from_perimeter</span>(<span class="ident">map</span>, <span class="self">self</span>)
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Does this perimeter completely enclose the other?</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">contains</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">other</span>: <span class="kw-2">&</span><span class="ident">Perimeter</span>) -> <span class="ident">bool</span> {
|
||||
<span class="ident">other</span>
|
||||
.<span class="ident">roads</span>
|
||||
.<span class="ident">iter</span>()
|
||||
.<span class="ident">all</span>(<span class="op">|</span><span class="ident">id</span><span class="op">|</span> <span class="self">self</span>.<span class="ident">interior</span>.<span class="ident">contains</span>(<span class="kw-2">&</span><span class="ident">id</span>.<span class="ident">road</span>) <span class="op">|</span><span class="op">|</span> <span class="self">self</span>.<span class="ident">roads</span>.<span class="ident">contains</span>(<span class="ident">id</span>))
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">fmt::Debug</span> <span class="kw">for</span> <span class="ident">Perimeter</span> {
|
||||
<span class="kw">fn</span> <span class="ident">fmt</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">f</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">fmt::Formatter</span><span class="op"><</span><span class="lifetime">'_</span><span class="op">></span>) -> <span class="ident">fmt::Result</span> {
|
||||
<span class="macro">writeln!</span>(<span class="ident">f</span>, <span class="string">"Perimeter:"</span>)<span class="question-mark">?</span>;
|
||||
<span class="kw">for</span> <span class="ident">id</span> <span class="kw">in</span> <span class="kw-2">&</span><span class="self">self</span>.<span class="ident">roads</span> {
|
||||
<span class="macro">writeln!</span>(<span class="ident">f</span>, <span class="string">"- {:?} of {}"</span>, <span class="ident">id</span>.<span class="ident">side</span>, <span class="ident">id</span>.<span class="ident">road</span>)<span class="question-mark">?</span>;
|
||||
}
|
||||
<span class="prelude-val">Ok</span>(())
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">Block</span> {
|
||||
<span class="kw">fn</span> <span class="ident">from_perimeter</span>(<span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>, <span class="ident">perimeter</span>: <span class="ident">Perimeter</span>) -> <span class="prelude-ty">Result</span><span class="op"><</span><span class="ident">Block</span><span class="op">></span> {
|
||||
<span class="comment">// Trace along the perimeter and build the polygon</span>
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">pts</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">Pt2D</span><span class="op">></span> <span class="op">=</span> <span class="ident">Vec::new</span>();
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">first_intersection</span> <span class="op">=</span> <span class="prelude-val">None</span>;
|
||||
<span class="kw">for</span> <span class="ident">pair</span> <span class="kw">in</span> <span class="ident">perimeter</span>.<span class="ident">roads</span>.<span class="ident">windows</span>(<span class="number">2</span>) {
|
||||
<span class="kw">for</span> <span class="ident">pair</span> <span class="kw">in</span> <span class="self">self</span>.<span class="ident">roads</span>.<span class="ident">windows</span>(<span class="number">2</span>) {
|
||||
<span class="kw">let</span> <span class="ident">lane1</span> <span class="op">=</span> <span class="ident">pair</span>[<span class="number">0</span>].<span class="ident">get_outermost_lane</span>(<span class="ident">map</span>);
|
||||
<span class="kw">let</span> <span class="ident">road1</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_parent</span>(<span class="ident">lane1</span>.<span class="ident">id</span>);
|
||||
<span class="kw">let</span> <span class="ident">lane2</span> <span class="op">=</span> <span class="ident">pair</span>[<span class="number">1</span>].<span class="ident">get_outermost_lane</span>(<span class="ident">map</span>);
|
||||
@ -965,9 +945,9 @@
|
||||
<span class="comment">// We're doubling back at a dead-end. Always follow the orientation of the lane.</span>
|
||||
<span class="bool-val">true</span>
|
||||
} <span class="kw">else</span> {
|
||||
<span class="kw">match</span> <span class="ident">lane1</span>.<span class="ident">common_endpt</span>(<span class="ident">lane2</span>) {
|
||||
<span class="prelude-val">Some</span>(<span class="ident">i</span>) => <span class="ident">i</span> <span class="op">==</span> <span class="ident">lane1</span>.<span class="ident">dst_i</span>,
|
||||
<span class="prelude-val">None</span> => {
|
||||
<span class="kw">match</span> <span class="ident">lane1</span>.<span class="ident">common_endpoint</span>(<span class="ident">lane2</span>) {
|
||||
<span class="ident">CommonEndpoint::One</span>(<span class="ident">i</span>) => <span class="ident">i</span> <span class="op">==</span> <span class="ident">lane1</span>.<span class="ident">dst_i</span>,
|
||||
<span class="ident">CommonEndpoint::Both</span> => {
|
||||
<span class="comment">// Two different roads link the same two intersections. I don't think we</span>
|
||||
<span class="comment">// can decide the order of points other than seeing which endpoint is</span>
|
||||
<span class="comment">// closest to our last point.</span>
|
||||
@ -978,6 +958,11 @@
|
||||
<span class="bool-val">true</span>
|
||||
}
|
||||
}
|
||||
<span class="ident">CommonEndpoint::None</span> => <span class="macro">bail!</span>(
|
||||
<span class="string">"{} and {} don't share a common endpoint"</span>,
|
||||
<span class="ident">lane1</span>.<span class="ident">id</span>,
|
||||
<span class="ident">lane2</span>.<span class="ident">id</span>
|
||||
),
|
||||
}
|
||||
};
|
||||
<span class="kw">if</span> <span class="op">!</span><span class="ident">keep_lane_orientation</span> {
|
||||
@ -1035,7 +1020,28 @@
|
||||
<span class="comment">// in the map geometry that should be properly fixed.</span>
|
||||
<span class="comment">//let polygon = Polygon::buggy_new(pts);</span>
|
||||
|
||||
<span class="prelude-val">Ok</span>(<span class="ident">Block</span> { <span class="ident">perimeter</span>, <span class="ident">polygon</span> })
|
||||
<span class="prelude-val">Ok</span>(<span class="ident">Block</span> {
|
||||
<span class="ident">perimeter</span>: <span class="self">self</span>,
|
||||
<span class="ident">polygon</span>,
|
||||
})
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Does this perimeter completely enclose the other?</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">contains</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">other</span>: <span class="kw-2">&</span><span class="ident">Perimeter</span>) -> <span class="ident">bool</span> {
|
||||
<span class="ident">other</span>
|
||||
.<span class="ident">roads</span>
|
||||
.<span class="ident">iter</span>()
|
||||
.<span class="ident">all</span>(<span class="op">|</span><span class="ident">id</span><span class="op">|</span> <span class="self">self</span>.<span class="ident">interior</span>.<span class="ident">contains</span>(<span class="kw-2">&</span><span class="ident">id</span>.<span class="ident">road</span>) <span class="op">|</span><span class="op">|</span> <span class="self">self</span>.<span class="ident">roads</span>.<span class="ident">contains</span>(<span class="ident">id</span>))
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">fmt::Debug</span> <span class="kw">for</span> <span class="ident">Perimeter</span> {
|
||||
<span class="kw">fn</span> <span class="ident">fmt</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">f</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">fmt::Formatter</span><span class="op"><</span><span class="lifetime">'_</span><span class="op">></span>) -> <span class="ident">fmt::Result</span> {
|
||||
<span class="macro">writeln!</span>(<span class="ident">f</span>, <span class="string">"Perimeter:"</span>)<span class="question-mark">?</span>;
|
||||
<span class="kw">for</span> <span class="ident">id</span> <span class="kw">in</span> <span class="kw-2">&</span><span class="self">self</span>.<span class="ident">roads</span> {
|
||||
<span class="macro">writeln!</span>(<span class="ident">f</span>, <span class="string">"- {:?} of {}"</span>, <span class="ident">id</span>.<span class="ident">side</span>, <span class="ident">id</span>.<span class="ident">road</span>)<span class="question-mark">?</span>;
|
||||
}
|
||||
<span class="prelude-val">Ok</span>(())
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
|
@ -580,6 +580,22 @@
|
||||
<span id="580">580</span>
|
||||
<span id="581">581</span>
|
||||
<span id="582">582</span>
|
||||
<span id="583">583</span>
|
||||
<span id="584">584</span>
|
||||
<span id="585">585</span>
|
||||
<span id="586">586</span>
|
||||
<span id="587">587</span>
|
||||
<span id="588">588</span>
|
||||
<span id="589">589</span>
|
||||
<span id="590">590</span>
|
||||
<span id="591">591</span>
|
||||
<span id="592">592</span>
|
||||
<span id="593">593</span>
|
||||
<span id="594">594</span>
|
||||
<span id="595">595</span>
|
||||
<span id="596">596</span>
|
||||
<span id="597">597</span>
|
||||
<span id="598">598</span>
|
||||
</pre><pre class="rust"><code><span class="kw">use</span> <span class="ident">std::collections::BTreeSet</span>;
|
||||
<span class="kw">use</span> <span class="ident">std::fmt</span>;
|
||||
|
||||
@ -950,6 +966,7 @@
|
||||
|
||||
<span class="doccomment">/// This is just based on typical driving sides. Bidirectional or contraflow cycletracks as</span>
|
||||
<span class="doccomment">/// input may produce weird results.</span>
|
||||
<span class="comment">// TODO Reconsider this -- it's confusing</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">get_nearest_side_of_road</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>) -> <span class="ident">RoadSideID</span> {
|
||||
<span class="kw">let</span> <span class="ident">side</span> <span class="op">=</span> <span class="kw">match</span> (<span class="self">self</span>.<span class="ident">dir</span>, <span class="ident">map</span>.<span class="ident">get_config</span>().<span class="ident">driving_side</span>) {
|
||||
(<span class="ident">Direction::Fwd</span>, <span class="ident">DrivingSide::Right</span>) => <span class="ident">SideOfRoad::Right</span>,
|
||||
@ -1032,24 +1049,8 @@
|
||||
<span class="prelude-val">Some</span>(<span class="ident">part</span>.<span class="ident">split</span>(<span class="string">';'</span>).<span class="ident">flat_map</span>(<span class="ident">parse_turn_type_from_osm</span>).<span class="ident">collect</span>())
|
||||
}
|
||||
|
||||
<span class="doccomment">/// If the lanes share one endpoint, returns it. If they share two -- because they belong to</span>
|
||||
<span class="doccomment">/// the same road or there are two different roads connecting the same pair of intersections --</span>
|
||||
<span class="doccomment">/// then return `None`. If they share no common endpoint, panic.</span>
|
||||
<span class="doccomment">/// (This is a weird API, really should be an enum with 3 cases)</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">common_endpt</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">other</span>: <span class="kw-2">&</span><span class="ident">Lane</span>) -> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">IntersectionID</span><span class="op">></span> {
|
||||
<span class="attribute">#![<span class="ident">allow</span>(<span class="ident">clippy::suspicious_operation_groupings</span>)]</span>
|
||||
<span class="kw">let</span> <span class="ident">src</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">src_i</span> <span class="op">==</span> <span class="ident">other</span>.<span class="ident">src_i</span> <span class="op">|</span><span class="op">|</span> <span class="self">self</span>.<span class="ident">src_i</span> <span class="op">==</span> <span class="ident">other</span>.<span class="ident">dst_i</span>;
|
||||
<span class="kw">let</span> <span class="ident">dst</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">dst_i</span> <span class="op">==</span> <span class="ident">other</span>.<span class="ident">src_i</span> <span class="op">|</span><span class="op">|</span> <span class="self">self</span>.<span class="ident">dst_i</span> <span class="op">==</span> <span class="ident">other</span>.<span class="ident">dst_i</span>;
|
||||
<span class="kw">if</span> <span class="ident">src</span> <span class="op">&&</span> <span class="ident">dst</span> {
|
||||
<span class="kw">return</span> <span class="prelude-val">None</span>;
|
||||
}
|
||||
<span class="kw">if</span> <span class="ident">src</span> {
|
||||
<span class="kw">return</span> <span class="prelude-val">Some</span>(<span class="self">self</span>.<span class="ident">src_i</span>);
|
||||
}
|
||||
<span class="kw">if</span> <span class="ident">dst</span> {
|
||||
<span class="kw">return</span> <span class="prelude-val">Some</span>(<span class="self">self</span>.<span class="ident">dst_i</span>);
|
||||
}
|
||||
<span class="macro">panic!</span>(<span class="string">"{} and {} have no common_endpt"</span>, <span class="self">self</span>.<span class="ident">id</span>, <span class="ident">other</span>.<span class="ident">id</span>);
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">common_endpoint</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">other</span>: <span class="kw-2">&</span><span class="ident">Lane</span>) -> <span class="ident">CommonEndpoint</span> {
|
||||
<span class="ident">CommonEndpoint::new</span>((<span class="self">self</span>.<span class="ident">src_i</span>, <span class="self">self</span>.<span class="ident">dst_i</span>), (<span class="ident">other</span>.<span class="ident">src_i</span>, <span class="ident">other</span>.<span class="ident">dst_i</span>))
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">get_thick_polygon</span>(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="ident">Polygon</span> {
|
||||
@ -1057,6 +1058,37 @@
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">enum</span> <span class="ident">CommonEndpoint</span> {
|
||||
<span class="doccomment">/// Two lanes/roads share one endpoint</span>
|
||||
<span class="ident">One</span>(<span class="ident">IntersectionID</span>),
|
||||
<span class="doccomment">/// Two lanes/roads share both endpoints, because they both belong to the same road, or there</span>
|
||||
<span class="doccomment">/// are two different roads connecting the same pair of intersections</span>
|
||||
<span class="ident">Both</span>,
|
||||
<span class="doccomment">/// Two lanes/roads don't have any common endpoints</span>
|
||||
<span class="prelude-val">None</span>,
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">CommonEndpoint</span> {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(
|
||||
<span class="ident">obj1</span>: (<span class="ident">IntersectionID</span>, <span class="ident">IntersectionID</span>),
|
||||
<span class="ident">obj2</span>: (<span class="ident">IntersectionID</span>, <span class="ident">IntersectionID</span>),
|
||||
) -> <span class="ident">CommonEndpoint</span> {
|
||||
<span class="attribute">#![<span class="ident">allow</span>(<span class="ident">clippy::suspicious_operation_groupings</span>)]</span>
|
||||
<span class="kw">let</span> <span class="ident">src</span> <span class="op">=</span> <span class="ident">obj1</span>.<span class="number">0</span> <span class="op">==</span> <span class="ident">obj2</span>.<span class="number">0</span> <span class="op">|</span><span class="op">|</span> <span class="ident">obj1</span>.<span class="number">0</span> <span class="op">==</span> <span class="ident">obj2</span>.<span class="number">1</span>;
|
||||
<span class="kw">let</span> <span class="ident">dst</span> <span class="op">=</span> <span class="ident">obj1</span>.<span class="number">1</span> <span class="op">==</span> <span class="ident">obj2</span>.<span class="number">0</span> <span class="op">|</span><span class="op">|</span> <span class="ident">obj1</span>.<span class="number">1</span> <span class="op">==</span> <span class="ident">obj2</span>.<span class="number">1</span>;
|
||||
<span class="kw">if</span> <span class="ident">src</span> <span class="op">&&</span> <span class="ident">dst</span> {
|
||||
<span class="kw">return</span> <span class="ident">CommonEndpoint::Both</span>;
|
||||
}
|
||||
<span class="kw">if</span> <span class="ident">src</span> {
|
||||
<span class="kw">return</span> <span class="ident">CommonEndpoint::One</span>(<span class="ident">obj1</span>.<span class="number">0</span>);
|
||||
}
|
||||
<span class="kw">if</span> <span class="ident">dst</span> {
|
||||
<span class="kw">return</span> <span class="ident">CommonEndpoint::One</span>(<span class="ident">obj1</span>.<span class="number">1</span>);
|
||||
}
|
||||
<span class="ident">CommonEndpoint::None</span>
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">LaneSpec</span> {
|
||||
<span class="doccomment">/// For a given lane type, returns some likely widths. This may depend on the type of the road,</span>
|
||||
<span class="doccomment">/// so the OSM tags are also passed in. The first value returned will be used as a default.</span>
|
||||
|
@ -668,14 +668,6 @@
|
||||
<span id="668">668</span>
|
||||
<span id="669">669</span>
|
||||
<span id="670">670</span>
|
||||
<span id="671">671</span>
|
||||
<span id="672">672</span>
|
||||
<span id="673">673</span>
|
||||
<span id="674">674</span>
|
||||
<span id="675">675</span>
|
||||
<span id="676">676</span>
|
||||
<span id="677">677</span>
|
||||
<span id="678">678</span>
|
||||
</pre><pre class="rust"><code><span class="kw">use</span> <span class="ident">std::collections::BTreeSet</span>;
|
||||
<span class="kw">use</span> <span class="ident">std::fmt</span>;
|
||||
|
||||
@ -688,8 +680,8 @@
|
||||
|
||||
<span class="kw">use</span> <span class="ident"><span class="kw">crate</span>::raw</span>::{<span class="ident">OriginalRoad</span>, <span class="ident">RestrictionType</span>};
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::{
|
||||
<span class="ident">osm</span>, <span class="ident">AccessRestrictions</span>, <span class="ident">DrivingSide</span>, <span class="ident">IntersectionID</span>, <span class="ident">Lane</span>, <span class="ident">LaneID</span>, <span class="ident">LaneSpec</span>, <span class="ident">LaneType</span>, <span class="ident">Map</span>,
|
||||
<span class="ident">PathConstraints</span>, <span class="ident">TransitStopID</span>, <span class="ident">Zone</span>,
|
||||
<span class="ident">osm</span>, <span class="ident">AccessRestrictions</span>, <span class="ident">CommonEndpoint</span>, <span class="ident">DrivingSide</span>, <span class="ident">IntersectionID</span>, <span class="ident">Lane</span>, <span class="ident">LaneID</span>, <span class="ident">LaneSpec</span>,
|
||||
<span class="ident">LaneType</span>, <span class="ident">Map</span>, <span class="ident">PathConstraints</span>, <span class="ident">TransitStopID</span>, <span class="ident">Zone</span>,
|
||||
};
|
||||
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>, <span class="ident">Copy</span>, <span class="ident">Debug</span>, <span class="ident">Eq</span>, <span class="ident">Hash</span>, <span class="ident">PartialEq</span>, <span class="ident">PartialOrd</span>, <span class="ident">Ord</span>, <span class="ident">Serialize</span>, <span class="ident">Deserialize</span>)]</span>
|
||||
@ -1122,21 +1114,13 @@
|
||||
<span class="ident">bike</span>
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Returns the common intersection between two roads, panicking if they're not adjacent</span>
|
||||
<span class="comment">// TODO Doesn't handle two roads between the same pair of intersections</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">common_endpt</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">other</span>: <span class="kw-2">&</span><span class="ident">Road</span>) -> <span class="ident">IntersectionID</span> {
|
||||
<span class="attribute">#![<span class="ident">allow</span>(<span class="ident">clippy::suspicious_operation_groupings</span>)]</span> <span class="comment">// false positive</span>
|
||||
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">src_i</span> <span class="op">==</span> <span class="ident">other</span>.<span class="ident">src_i</span> <span class="op">|</span><span class="op">|</span> <span class="self">self</span>.<span class="ident">src_i</span> <span class="op">==</span> <span class="ident">other</span>.<span class="ident">dst_i</span> {
|
||||
<span class="self">self</span>.<span class="ident">src_i</span>
|
||||
} <span class="kw">else</span> <span class="kw">if</span> <span class="self">self</span>.<span class="ident">dst_i</span> <span class="op">==</span> <span class="ident">other</span>.<span class="ident">src_i</span> <span class="op">|</span><span class="op">|</span> <span class="self">self</span>.<span class="ident">dst_i</span> <span class="op">==</span> <span class="ident">other</span>.<span class="ident">dst_i</span> {
|
||||
<span class="self">self</span>.<span class="ident">dst_i</span>
|
||||
} <span class="kw">else</span> {
|
||||
<span class="macro">panic!</span>(<span class="string">"{} and {} don't share an endpoint"</span>, <span class="self">self</span>.<span class="ident">id</span>, <span class="ident">other</span>.<span class="ident">id</span>);
|
||||
}
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">common_endpoint</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">other</span>: <span class="kw-2">&</span><span class="ident">Road</span>) -> <span class="ident">CommonEndpoint</span> {
|
||||
<span class="ident">CommonEndpoint::new</span>((<span class="self">self</span>.<span class="ident">src_i</span>, <span class="self">self</span>.<span class="ident">dst_i</span>), (<span class="ident">other</span>.<span class="ident">src_i</span>, <span class="ident">other</span>.<span class="ident">dst_i</span>))
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Returns the other intersection of this road, panicking if this road doesn't connect to the</span>
|
||||
<span class="doccomment">/// input</span>
|
||||
<span class="doccomment">/// TODO This should use CommonEndpoint</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">other_endpt</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">i</span>: <span class="ident">IntersectionID</span>) -> <span class="ident">IntersectionID</span> {
|
||||
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">src_i</span> <span class="op">==</span> <span class="ident">i</span> {
|
||||
<span class="self">self</span>.<span class="ident">dst_i</span>
|
||||
|
@ -88,6 +88,9 @@
|
||||
<span id="88">88</span>
|
||||
<span id="89">89</span>
|
||||
<span id="90">90</span>
|
||||
<span id="91">91</span>
|
||||
<span id="92">92</span>
|
||||
<span id="93">93</span>
|
||||
</pre><pre class="rust"><code><span class="doccomment">//! Zones and AccessRestrictions are used to model things like:</span>
|
||||
<span class="doccomment">//! 1) gated communities, where only trips beginning or ending at a building in the neighborhood may</span>
|
||||
<span class="doccomment">//! use any of the private roads</span>
|
||||
@ -100,7 +103,7 @@
|
||||
<span class="kw">use</span> <span class="ident">enumset::EnumSet</span>;
|
||||
<span class="kw">use</span> <span class="ident">serde</span>::{<span class="ident">Deserialize</span>, <span class="ident">Serialize</span>};
|
||||
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::{<span class="ident">IntersectionID</span>, <span class="ident">Map</span>, <span class="ident">PathConstraints</span>, <span class="ident">RoadID</span>};
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::{<span class="ident">CommonEndpoint</span>, <span class="ident">IntersectionID</span>, <span class="ident">Map</span>, <span class="ident">PathConstraints</span>, <span class="ident">RoadID</span>};
|
||||
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Serialize</span>, <span class="ident">Deserialize</span>, <span class="ident">Debug</span>, <span class="ident">PartialEq</span>, <span class="ident">Clone</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">AccessRestrictions</span> {
|
||||
@ -166,7 +169,10 @@
|
||||
<span class="kw">if</span> <span class="ident">r</span>.<span class="ident">access_restrictions</span> <span class="op">==</span> <span class="ident">match_constraints</span> <span class="op">&&</span> <span class="ident">merge_zones</span> {
|
||||
<span class="ident">queue</span>.<span class="ident">push</span>(<span class="ident">r</span>.<span class="ident">id</span>);
|
||||
} <span class="kw">else</span> {
|
||||
<span class="ident">borders</span>.<span class="ident">insert</span>(<span class="ident">map</span>.<span class="ident">get_r</span>(<span class="ident">current</span>).<span class="ident">common_endpt</span>(<span class="ident">r</span>));
|
||||
<span class="comment">// TODO Handle other cases</span>
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="ident">CommonEndpoint::One</span>(<span class="ident">i</span>) <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_r</span>(<span class="ident">current</span>).<span class="ident">common_endpoint</span>(<span class="ident">r</span>) {
|
||||
<span class="ident">borders</span>.<span class="ident">insert</span>(<span class="ident">i</span>);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user