This commit is contained in:
dabreegster 2020-11-24 21:40:29 +00:00
parent 5df13f9b5d
commit 8ab4b73806
15 changed files with 110 additions and 74 deletions

View File

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

View File

@ -1,7 +1,7 @@
<!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 `isochrone` mod in crate `fifteen_min`."><meta name="keywords" content="rust, rustlang, rust-lang, isochrone"><title>fifteen_min::isochrone - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../fifteen_min/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module isochrone</p><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><p class='location'><a href='../index.html'>fifteen_min</a></p><script>window.sidebarCurrent = {name: 'isochrone', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/fifteen_min/isochrone.rs.html#1-145' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>fifteen_min</a>::<wbr><a class="mod" href=''>isochrone</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/fifteen_min/isochrone.rs.html#1-128' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>fifteen_min</a>::<wbr><a class="mod" href=''>isochrone</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
<table><tr class='module-item'><td><a class="struct" href="struct.Isochrone.html" title='fifteen_min::isochrone::Isochrone struct'>Isochrone</a></td><td class='docblock-short'><p>Represents the area reachable from a single building.</p>
</td></tr></table><h2 id='functions' class='section-header'><a href="#functions">Functions</a></h2>
<table><tr class='module-item'><td><a class="fn" href="fn.draw_isochrone.html" title='fifteen_min::isochrone::draw_isochrone fn'>draw_isochrone</a></td><td class='docblock-short'></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "fifteen_min";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

File diff suppressed because one or more lines are too long

View File

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

File diff suppressed because one or more lines are too long

View File

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

View File

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

View File

@ -1,7 +1,7 @@
<!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 `pathfind` mod in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, pathfind"><title>map_model::pathfind - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module pathfind</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#reexports">Re-exports</a></li><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#functions">Functions</a></li></ul></div><p class='location'><a href='../index.html'>map_model</a></p><script>window.sidebarCurrent = {name: 'pathfind', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/map_model/pathfind/mod.rs.html#1-636' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>map_model</a>::<wbr><a class="mod" href=''>pathfind</a></span></h1><div class='docblock'><p>Everything related to pathfinding through a map for different types of agents.</p>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/map_model/pathfind/mod.rs.html#1-668' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>map_model</a>::<wbr><a class="mod" href=''>pathfind</a></span></h1><div class='docblock'><p>Everything related to pathfinding through a map for different types of agents.</p>
</div><h2 id='reexports' class='section-header'><a href="#reexports">Re-exports</a></h2>
<table><tr><td><code>pub use self::ch::<a class="struct" href="../../map_model/pathfind/ch/struct.ContractionHierarchyPathfinder.html" title="struct map_model::pathfind::ch::ContractionHierarchyPathfinder">ContractionHierarchyPathfinder</a>;</code></td></tr><tr><td><code>pub use self::dijkstra::<a class="fn" href="../../map_model/connectivity/fn.build_graph_for_pedestrians.html" title="fn map_model::connectivity::build_graph_for_pedestrians">build_graph_for_pedestrians</a>;</code></td></tr><tr><td><code>pub use self::dijkstra::<a class="fn" href="../../map_model/connectivity/fn.build_graph_for_vehicles.html" title="fn map_model::connectivity::build_graph_for_vehicles">build_graph_for_vehicles</a>;</code></td></tr><tr><td><code>pub use self::driving::<a class="fn" href="../../map_model/connectivity/fn.driving_cost.html" title="fn map_model::connectivity::driving_cost">driving_cost</a>;</code></td></tr><tr><td><code>pub use self::walking::<a class="fn" href="../../map_model/pathfind/walking/fn.walking_cost.html" title="fn map_model::pathfind::walking::walking_cost">walking_cost</a>;</code></td></tr><tr><td><code>pub use self::walking::<a class="enum" href="../../map_model/connectivity/enum.WalkingNode.html" title="enum map_model::connectivity::WalkingNode">WalkingNode</a>;</code></td></tr></table><h2 id='modules' class='section-header'><a href="#modules">Modules</a></h2>
<table><tr class='module-item'><td><a class="mod" href="ch/index.html" title='map_model::pathfind::ch mod'>ch</a></td><td class='docblock-short'><p>Uses https://github.com/easbar/fast_paths. Slower creation during map importing, but very fast

View File

@ -1,12 +1,15 @@
<!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 `PathRequest` struct in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, PathRequest"><title>map_model::pathfind::PathRequest - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Struct PathRequest</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.constraints">constraints</a><a href="#structfield.end">end</a><a href="#structfield.start">start</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-Deserialize%3C%27de%3E">Deserialize&lt;&#39;de&gt;</a><a href="#impl-Display">Display</a><a href="#impl-Eq">Eq</a><a href="#impl-PartialEq%3CPathRequest%3E">PartialEq&lt;PathRequest&gt;</a><a href="#impl-Serialize">Serialize</a><a href="#impl-StructuralEq">StructuralEq</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-Equivalent%3CK%3E">Equivalent&lt;K&gt;</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-ToString">ToString</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><p class='location'><a href='../index.html'>map_model</a>::<wbr><a href='index.html'>pathfind</a></p><script>window.sidebarCurrent = {name: 'PathRequest', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Struct PathRequest</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.constraints">constraints</a><a href="#structfield.end">end</a><a href="#structfield.start">start</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.between_buildings">between_buildings</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-Deserialize%3C%27de%3E">Deserialize&lt;&#39;de&gt;</a><a href="#impl-Display">Display</a><a href="#impl-Eq">Eq</a><a href="#impl-PartialEq%3CPathRequest%3E">PartialEq&lt;PathRequest&gt;</a><a href="#impl-Serialize">Serialize</a><a href="#impl-StructuralEq">StructuralEq</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-Equivalent%3CK%3E">Equivalent&lt;K&gt;</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-ToString">ToString</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><p class='location'><a href='../index.html'>map_model</a>::<wbr><a href='index.html'>pathfind</a></p><script>window.sidebarCurrent = {name: 'PathRequest', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/map_model/pathfind/mod.rs.html#507-511' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='../index.html'>map_model</a>::<wbr><a href='index.html'>pathfind</a>::<wbr><a class="struct" href=''>PathRequest</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct PathRequest {
pub start: <a class="struct" href="../../map_model/struct.Position.html" title="struct map_model::Position">Position</a>,
pub end: <a class="struct" href="../../map_model/struct.Position.html" title="struct map_model::Position">Position</a>,
pub constraints: <a class="enum" href="../../map_model/enum.PathConstraints.html" title="enum map_model::PathConstraints">PathConstraints</a>,
}</pre></div><h2 id='fields' class='fields small-section-header'>
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.start" class="structfield small-section-header"><a href="#structfield.start" class="anchor field"></a><code>start: <a class="struct" href="../../map_model/struct.Position.html" title="struct map_model::Position">Position</a></code></span><span id="structfield.end" class="structfield small-section-header"><a href="#structfield.end" class="anchor field"></a><code>end: <a class="struct" href="../../map_model/struct.Position.html" title="struct map_model::Position">Position</a></code></span><span id="structfield.constraints" class="structfield small-section-header"><a href="#structfield.constraints" class="anchor field"></a><code>constraints: <a class="enum" href="../../map_model/enum.PathConstraints.html" title="enum map_model::PathConstraints">PathConstraints</a></code></span><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../map_model/struct.PathRequest.html" title="struct map_model::PathRequest">PathRequest</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../../src/map_model/pathfind/mod.rs.html#506' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class="struct" href="../../map_model/struct.PathRequest.html" title="struct map_model::PathRequest">PathRequest</a></code><a class='srclink' href='../../src/map_model/pathfind/mod.rs.html#506' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.start" class="structfield small-section-header"><a href="#structfield.start" class="anchor field"></a><code>start: <a class="struct" href="../../map_model/struct.Position.html" title="struct map_model::Position">Position</a></code></span><span id="structfield.end" class="structfield small-section-header"><a href="#structfield.end" class="anchor field"></a><code>end: <a class="struct" href="../../map_model/struct.Position.html" title="struct map_model::Position">Position</a></code></span><span id="structfield.constraints" class="structfield small-section-header"><a href="#structfield.constraints" class="anchor field"></a><code>constraints: <a class="enum" href="../../map_model/enum.PathConstraints.html" title="enum map_model::PathConstraints">PathConstraints</a></code></span><h2 id='implementations' class='small-section-header'>Implementations<a href='#implementations' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="struct" href="../../map_model/struct.PathRequest.html" title="struct map_model::PathRequest">PathRequest</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../src/map_model/pathfind/mod.rs.html#527-557' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.between_buildings' class="method"><code>pub fn <a href='#method.between_buildings' class='fnname'>between_buildings</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;from: <a class="struct" href="../../map_model/struct.BuildingID.html" title="struct map_model::BuildingID">BuildingID</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;to: <a class="struct" href="../../map_model/struct.BuildingID.html" title="struct map_model::BuildingID">BuildingID</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;constraints: <a class="enum" href="../../map_model/enum.PathConstraints.html" title="enum map_model::PathConstraints">PathConstraints</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../map_model/struct.PathRequest.html" title="struct map_model::PathRequest">PathRequest</a>&gt;</code><a class='srclink' href='../../src/map_model/pathfind/mod.rs.html#531-556' title='goto source code'>[src]</a></h4><div class='docblock'><p>Determines the start and end position to travel between two buildings for a certain mode.
The path won't cover modality transfers -- if somebody has to walk between the building and
a parking spot or bikeable position, that won't be captured here.</p>
</div></div><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../map_model/struct.PathRequest.html" title="struct map_model::PathRequest">PathRequest</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../../src/map_model/pathfind/mod.rs.html#506' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class="struct" href="../../map_model/struct.PathRequest.html" title="struct map_model::PathRequest">PathRequest</a></code><a class='srclink' href='../../src/map_model/pathfind/mod.rs.html#506' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id='method.clone_from' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self)</code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#128-130' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div><h3 id='impl-Debug' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../../map_model/struct.PathRequest.html" title="struct map_model::PathRequest">PathRequest</a></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../../src/map_model/pathfind/mod.rs.html#506' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../../src/map_model/pathfind/mod.rs.html#506' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id='impl-Deserialize%3C%27de%3E' class='impl'><code class='in-band'>impl&lt;'de&gt; <a class="trait" href="https://docs.rs/serde/1.0.117/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt; for <a class="struct" href="../../map_model/struct.PathRequest.html" title="struct map_model::PathRequest">PathRequest</a></code><a href='#impl-Deserialize%3C%27de%3E' class='anchor'></a><a class='srclink' href='../../src/map_model/pathfind/mod.rs.html#506' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.deserialize' class="method hidden"><code>fn <a href='https://docs.rs/serde/1.0.117/serde/de/trait.Deserialize.html#tymethod.deserialize' class='fnname'>deserialize</a>&lt;__D&gt;(__deserializer: __D) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, __D::<a class="type" href="https://docs.rs/serde/1.0.117/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__D: <a class="trait" href="https://docs.rs/serde/1.0.117/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a>&lt;'de&gt;,&nbsp;</span></code><a class='srclink' href='../../src/map_model/pathfind/mod.rs.html#506' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.117/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>

View File

@ -1,12 +1,15 @@
<!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 `PathRequest` struct in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, PathRequest"><title>map_model::PathRequest - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../map_model/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Struct PathRequest</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.constraints">constraints</a><a href="#structfield.end">end</a><a href="#structfield.start">start</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-Deserialize%3C%27de%3E">Deserialize&lt;&#39;de&gt;</a><a href="#impl-Display">Display</a><a href="#impl-Eq">Eq</a><a href="#impl-PartialEq%3CPathRequest%3E">PartialEq&lt;PathRequest&gt;</a><a href="#impl-Serialize">Serialize</a><a href="#impl-StructuralEq">StructuralEq</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-Equivalent%3CK%3E">Equivalent&lt;K&gt;</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-ToString">ToString</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><p class='location'><a href='index.html'>map_model</a></p><script>window.sidebarCurrent = {name: 'PathRequest', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../map_model/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Struct PathRequest</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.constraints">constraints</a><a href="#structfield.end">end</a><a href="#structfield.start">start</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.between_buildings">between_buildings</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-Deserialize%3C%27de%3E">Deserialize&lt;&#39;de&gt;</a><a href="#impl-Display">Display</a><a href="#impl-Eq">Eq</a><a href="#impl-PartialEq%3CPathRequest%3E">PartialEq&lt;PathRequest&gt;</a><a href="#impl-Serialize">Serialize</a><a href="#impl-StructuralEq">StructuralEq</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-Equivalent%3CK%3E">Equivalent&lt;K&gt;</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-ToString">ToString</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><p class='location'><a href='index.html'>map_model</a></p><script>window.sidebarCurrent = {name: 'PathRequest', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../src/map_model/pathfind/mod.rs.html#507-511' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='index.html'>map_model</a>::<wbr><a class="struct" href=''>PathRequest</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct PathRequest {
pub start: <a class="struct" href="../map_model/struct.Position.html" title="struct map_model::Position">Position</a>,
pub end: <a class="struct" href="../map_model/struct.Position.html" title="struct map_model::Position">Position</a>,
pub constraints: <a class="enum" href="../map_model/enum.PathConstraints.html" title="enum map_model::PathConstraints">PathConstraints</a>,
}</pre></div><h2 id='fields' class='fields small-section-header'>
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.start" class="structfield small-section-header"><a href="#structfield.start" class="anchor field"></a><code>start: <a class="struct" href="../map_model/struct.Position.html" title="struct map_model::Position">Position</a></code></span><span id="structfield.end" class="structfield small-section-header"><a href="#structfield.end" class="anchor field"></a><code>end: <a class="struct" href="../map_model/struct.Position.html" title="struct map_model::Position">Position</a></code></span><span id="structfield.constraints" class="structfield small-section-header"><a href="#structfield.constraints" class="anchor field"></a><code>constraints: <a class="enum" href="../map_model/enum.PathConstraints.html" title="enum map_model::PathConstraints">PathConstraints</a></code></span><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../map_model/struct.PathRequest.html" title="struct map_model::PathRequest">PathRequest</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../src/map_model/pathfind/mod.rs.html#506' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class="struct" href="../map_model/struct.PathRequest.html" title="struct map_model::PathRequest">PathRequest</a></code><a class='srclink' href='../src/map_model/pathfind/mod.rs.html#506' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.start" class="structfield small-section-header"><a href="#structfield.start" class="anchor field"></a><code>start: <a class="struct" href="../map_model/struct.Position.html" title="struct map_model::Position">Position</a></code></span><span id="structfield.end" class="structfield small-section-header"><a href="#structfield.end" class="anchor field"></a><code>end: <a class="struct" href="../map_model/struct.Position.html" title="struct map_model::Position">Position</a></code></span><span id="structfield.constraints" class="structfield small-section-header"><a href="#structfield.constraints" class="anchor field"></a><code>constraints: <a class="enum" href="../map_model/enum.PathConstraints.html" title="enum map_model::PathConstraints">PathConstraints</a></code></span><h2 id='implementations' class='small-section-header'>Implementations<a href='#implementations' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="struct" href="../map_model/struct.PathRequest.html" title="struct map_model::PathRequest">PathRequest</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../src/map_model/pathfind/mod.rs.html#527-557' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.between_buildings' class="method"><code>pub fn <a href='#method.between_buildings' class='fnname'>between_buildings</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;from: <a class="struct" href="../map_model/struct.BuildingID.html" title="struct map_model::BuildingID">BuildingID</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;to: <a class="struct" href="../map_model/struct.BuildingID.html" title="struct map_model::BuildingID">BuildingID</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;constraints: <a class="enum" href="../map_model/enum.PathConstraints.html" title="enum map_model::PathConstraints">PathConstraints</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../map_model/struct.PathRequest.html" title="struct map_model::PathRequest">PathRequest</a>&gt;</code><a class='srclink' href='../src/map_model/pathfind/mod.rs.html#531-556' title='goto source code'>[src]</a></h4><div class='docblock'><p>Determines the start and end position to travel between two buildings for a certain mode.
The path won't cover modality transfers -- if somebody has to walk between the building and
a parking spot or bikeable position, that won't be captured here.</p>
</div></div><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../map_model/struct.PathRequest.html" title="struct map_model::PathRequest">PathRequest</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../src/map_model/pathfind/mod.rs.html#506' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class="struct" href="../map_model/struct.PathRequest.html" title="struct map_model::PathRequest">PathRequest</a></code><a class='srclink' href='../src/map_model/pathfind/mod.rs.html#506' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id='method.clone_from' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self)</code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#128-130' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div><h3 id='impl-Debug' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../map_model/struct.PathRequest.html" title="struct map_model::PathRequest">PathRequest</a></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../src/map_model/pathfind/mod.rs.html#506' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../src/map_model/pathfind/mod.rs.html#506' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id='impl-Deserialize%3C%27de%3E' class='impl'><code class='in-band'>impl&lt;'de&gt; <a class="trait" href="https://docs.rs/serde/1.0.117/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt; for <a class="struct" href="../map_model/struct.PathRequest.html" title="struct map_model::PathRequest">PathRequest</a></code><a href='#impl-Deserialize%3C%27de%3E' class='anchor'></a><a class='srclink' href='../src/map_model/pathfind/mod.rs.html#506' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.deserialize' class="method hidden"><code>fn <a href='https://docs.rs/serde/1.0.117/serde/de/trait.Deserialize.html#tymethod.deserialize' class='fnname'>deserialize</a>&lt;__D&gt;(__deserializer: __D) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, __D::<a class="type" href="https://docs.rs/serde/1.0.117/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__D: <a class="trait" href="https://docs.rs/serde/1.0.117/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a>&lt;'de&gt;,&nbsp;</span></code><a class='srclink' href='../src/map_model/pathfind/mod.rs.html#506' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.117/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>

File diff suppressed because one or more lines are too long

View File

@ -129,23 +129,6 @@
<span id="126">126</span>
<span id="127">127</span>
<span id="128">128</span>
<span id="129">129</span>
<span id="130">130</span>
<span id="131">131</span>
<span id="132">132</span>
<span id="133">133</span>
<span id="134">134</span>
<span id="135">135</span>
<span id="136">136</span>
<span id="137">137</span>
<span id="138">138</span>
<span id="139">139</span>
<span id="140">140</span>
<span id="141">141</span>
<span id="142">142</span>
<span id="143">143</span>
<span id="144">144</span>
<span id="145">145</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">collections</span>::<span class="ident">HashMap</span>;
@ -153,7 +136,7 @@
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Duration</span>, <span class="ident">Polygon</span>};
<span class="kw">use</span> <span class="ident">map_gui</span>::<span class="ident">tools</span>::{<span class="ident">amenity_type</span>, <span class="ident">Grid</span>};
<span class="kw">use</span> <span class="ident">map_gui</span>::<span class="ident">SimpleApp</span>;
<span class="kw">use</span> <span class="ident">map_model</span>::{<span class="ident">connectivity</span>, <span class="ident">BuildingID</span>, <span class="ident">Map</span>, <span class="ident">PathConstraints</span>, <span class="ident">PathRequest</span>};
<span class="kw">use</span> <span class="ident">map_model</span>::{<span class="ident">connectivity</span>, <span class="ident">BuildingID</span>, <span class="ident">Map</span>, <span class="ident">Path</span>, <span class="ident">PathConstraints</span>, <span class="ident">PathRequest</span>};
<span class="kw">use</span> <span class="ident">widgetry</span>::{<span class="ident">Color</span>, <span class="ident">Drawable</span>, <span class="ident">EventCtx</span>, <span class="ident">GeomBatch</span>};
<span class="doccomment">/// Represents the area reachable from a single building.</span>
@ -200,26 +183,9 @@
}
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">path_to</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>, <span class="ident">destination_id</span>: <span class="ident">BuildingID</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">map_model</span>::<span class="ident">Path</span><span class="op">&gt;</span> {
<span class="kw">let</span> (<span class="ident">start</span>, <span class="ident">end</span>) <span class="op">=</span> <span class="kw">match</span> <span class="self">self</span>.<span class="ident">constraints</span> {
<span class="ident">PathConstraints</span>::<span class="ident">Pedestrian</span> <span class="op">=</span><span class="op">&gt;</span> (
<span class="ident">map</span>.<span class="ident">get_b</span>(<span class="self">self</span>.<span class="ident">start</span>).<span class="ident">sidewalk_pos</span>,
<span class="ident">map</span>.<span class="ident">get_b</span>(<span class="ident">destination_id</span>).<span class="ident">sidewalk_pos</span>,
),
<span class="ident">PathConstraints</span>::<span class="ident">Bike</span> <span class="op">=</span><span class="op">&gt;</span> (
<span class="ident">map</span>.<span class="ident">get_b</span>(<span class="self">self</span>.<span class="ident">start</span>).<span class="ident">biking_connection</span>(<span class="ident">map</span>)<span class="question-mark">?</span>.<span class="number">0</span>,
<span class="ident">map</span>.<span class="ident">get_b</span>(<span class="ident">destination_id</span>).<span class="ident">biking_connection</span>(<span class="ident">map</span>)<span class="question-mark">?</span>.<span class="number">0</span>,
),
<span class="kw">_</span> <span class="op">=</span><span class="op">&gt;</span> <span class="macro">unimplemented</span><span class="macro">!</span>(<span class="string">&quot;unhandled constraints: {:?}&quot;</span>, <span class="self">self</span>.<span class="ident">constraints</span>),
};
<span class="kw">let</span> <span class="ident">path_request</span> <span class="op">=</span> <span class="ident">PathRequest</span> {
<span class="ident">start</span>,
<span class="ident">end</span>,
<span class="ident">constraints</span>: <span class="self">self</span>.<span class="ident">constraints</span>,
};
<span class="ident">map</span>.<span class="ident">pathfind</span>(<span class="ident">path_request</span>)
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">path_to</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>, <span class="ident">to</span>: <span class="ident">BuildingID</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">Path</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">req</span> <span class="op">=</span> <span class="ident">PathRequest</span>::<span class="ident">between_buildings</span>(<span class="ident">map</span>, <span class="self">self</span>.<span class="ident">start</span>, <span class="ident">to</span>, <span class="self">self</span>.<span class="ident">constraints</span>)<span class="question-mark">?</span>;
<span class="ident">map</span>.<span class="ident">pathfind</span>(<span class="ident">req</span>)
}
}

View File

@ -114,7 +114,7 @@
<span class="doccomment">/// The output of `rustdoc -V`</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">RUSTDOC_VERSION</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;rustdoc 1.48.0 (7eac88abb 2020-11-16)&quot;</span>;
<span class="doccomment">/// The built-time in RFC2822, UTC</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;Tue, 24 Nov 2020 20:09:00 +0000&quot;</span>;
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;Tue, 24 Nov 2020 21:37:35 +0000&quot;</span>;
<span class="doccomment">/// The target architecture, given by `cfg!(target_arch)`.</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CFG_TARGET_ARCH</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;x86_64&quot;</span>;
<span class="doccomment">/// The endianness, given by `cfg!(target_endian)`.</span>

View File

@ -637,6 +637,38 @@
<span id="634">634</span>
<span id="635">635</span>
<span id="636">636</span>
<span id="637">637</span>
<span id="638">638</span>
<span id="639">639</span>
<span id="640">640</span>
<span id="641">641</span>
<span id="642">642</span>
<span id="643">643</span>
<span id="644">644</span>
<span id="645">645</span>
<span id="646">646</span>
<span id="647">647</span>
<span id="648">648</span>
<span id="649">649</span>
<span id="650">650</span>
<span id="651">651</span>
<span id="652">652</span>
<span id="653">653</span>
<span id="654">654</span>
<span id="655">655</span>
<span id="656">656</span>
<span id="657">657</span>
<span id="658">658</span>
<span id="659">659</span>
<span id="660">660</span>
<span id="661">661</span>
<span id="662">662</span>
<span id="663">663</span>
<span id="664">664</span>
<span id="665">665</span>
<span id="666">666</span>
<span id="667">667</span>
<span id="668">668</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="doccomment">//! Everything related to pathfinding through a map for different types of agents.</span>
@ -654,8 +686,8 @@
<span class="kw">pub</span> <span class="kw">use</span> <span class="self">self</span>::<span class="ident">driving</span>::<span class="ident">driving_cost</span>;
<span class="kw">pub</span> <span class="kw">use</span> <span class="self">self</span>::<span class="ident">walking</span>::{<span class="ident">walking_cost</span>, <span class="ident">WalkingNode</span>};
<span class="kw">use</span> <span class="kw">crate</span>::{
<span class="ident">osm</span>, <span class="ident">BusRouteID</span>, <span class="ident">BusStopID</span>, <span class="ident">Lane</span>, <span class="ident">LaneID</span>, <span class="ident">LaneType</span>, <span class="ident">Map</span>, <span class="ident">Position</span>, <span class="ident">Traversable</span>, <span class="ident">TurnID</span>,
<span class="ident">UberTurn</span>,
<span class="ident">osm</span>, <span class="ident">BuildingID</span>, <span class="ident">BusRouteID</span>, <span class="ident">BusStopID</span>, <span class="ident">Lane</span>, <span class="ident">LaneID</span>, <span class="ident">LaneType</span>, <span class="ident">Map</span>, <span class="ident">Position</span>, <span class="ident">Traversable</span>,
<span class="ident">TurnID</span>, <span class="ident">UberTurn</span>,
};
<span class="kw">mod</span> <span class="ident">ch</span>;
@ -1164,6 +1196,38 @@
}
}
<span class="kw">impl</span> <span class="ident">PathRequest</span> {
<span class="doccomment">/// Determines the start and end position to travel between two buildings for a certain mode.</span>
<span class="doccomment">/// The path won&#39;t cover modality transfers -- if somebody has to walk between the building and</span>
<span class="doccomment">/// a parking spot or bikeable position, that won&#39;t be captured here.</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">between_buildings</span>(
<span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>,
<span class="ident">from</span>: <span class="ident">BuildingID</span>,
<span class="ident">to</span>: <span class="ident">BuildingID</span>,
<span class="ident">constraints</span>: <span class="ident">PathConstraints</span>,
) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">PathRequest</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">from</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_b</span>(<span class="ident">from</span>);
<span class="kw">let</span> <span class="ident">to</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_b</span>(<span class="ident">to</span>);
<span class="kw">let</span> (<span class="ident">start</span>, <span class="ident">end</span>) <span class="op">=</span> <span class="kw">match</span> <span class="ident">constraints</span> {
<span class="ident">PathConstraints</span>::<span class="ident">Pedestrian</span> <span class="op">=</span><span class="op">&gt;</span> (<span class="ident">from</span>.<span class="ident">sidewalk_pos</span>, <span class="ident">to</span>.<span class="ident">sidewalk_pos</span>),
<span class="ident">PathConstraints</span>::<span class="ident">Bike</span> <span class="op">=</span><span class="op">&gt;</span> (<span class="ident">from</span>.<span class="ident">biking_connection</span>(<span class="ident">map</span>)<span class="question-mark">?</span>.<span class="number">0</span>, <span class="ident">to</span>.<span class="ident">biking_connection</span>(<span class="ident">map</span>)<span class="question-mark">?</span>.<span class="number">0</span>),
<span class="ident">PathConstraints</span>::<span class="ident">Car</span> <span class="op">=</span><span class="op">&gt;</span> (
<span class="ident">from</span>.<span class="ident">driving_connection</span>(<span class="ident">map</span>)<span class="question-mark">?</span>.<span class="number">0</span>,
<span class="ident">to</span>.<span class="ident">driving_connection</span>(<span class="ident">map</span>)<span class="question-mark">?</span>.<span class="number">0</span>,
),
<span class="comment">// These two aren&#39;t useful here. A pedestrian using transit would pass in</span>
<span class="comment">// PathConstraints::Pedestrian. There&#39;s no reason yet to find a route for a bus or</span>
<span class="comment">// train to travel between buildings.</span>
<span class="ident">PathConstraints</span>::<span class="ident">Bus</span> <span class="op">|</span> <span class="ident">PathConstraints</span>::<span class="ident">Train</span> <span class="op">=</span><span class="op">&gt;</span> <span class="macro">unimplemented</span><span class="macro">!</span>(),
};
<span class="prelude-val">Some</span>(<span class="ident">PathRequest</span> {
<span class="ident">start</span>,
<span class="ident">end</span>,
<span class="ident">constraints</span>,
})
}
}
<span class="kw">fn</span> <span class="ident">validate_continuity</span>(<span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>, <span class="ident">steps</span>: <span class="kw-2">&amp;</span><span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">PathStep</span><span class="op">&gt;</span>) {
<span class="kw">if</span> <span class="ident">steps</span>.<span class="ident">is_empty</span>() {
<span class="macro">panic</span><span class="macro">!</span>(<span class="string">&quot;Empty path&quot;</span>);

View File

@ -547,15 +547,15 @@
(<span class="ident">TripEndpoint</span>::<span class="ident">Bldg</span>(<span class="ident">home_bldg</span>), <span class="ident">TripEndpoint</span>::<span class="ident">Bldg</span>(<span class="ident">work_bldg</span>)) <span class="op">=</span><span class="op">&gt;</span> {
<span class="comment">// Decide mode based on walking distance. If the buildings aren&#39;t connected,</span>
<span class="comment">// probably a bug in importing; just skip this person.</span>
<span class="kw">let</span> <span class="ident">dist</span> <span class="op">=</span> <span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">dist</span>) <span class="op">=</span> <span class="ident">map</span>
.<span class="ident">pathfind</span>(<span class="ident">PathRequest</span> {
<span class="ident">start</span>: <span class="ident">map</span>.<span class="ident">get_b</span>(<span class="kw-2">*</span><span class="ident">home_bldg</span>).<span class="ident">sidewalk_pos</span>,
<span class="ident">end</span>: <span class="ident">map</span>.<span class="ident">get_b</span>(<span class="kw-2">*</span><span class="ident">work_bldg</span>).<span class="ident">sidewalk_pos</span>,
<span class="ident">constraints</span>: <span class="ident">PathConstraints</span>::<span class="ident">Pedestrian</span>,
})
.<span class="ident">map</span>(<span class="op">|</span><span class="ident">p</span><span class="op">|</span> <span class="ident">p</span>.<span class="ident">total_length</span>())
<span class="kw">let</span> <span class="ident">dist</span> <span class="op">=</span> <span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">path</span>) <span class="op">=</span> <span class="ident">PathRequest</span>::<span class="ident">between_buildings</span>(
<span class="ident">map</span>,
<span class="kw-2">*</span><span class="ident">home_bldg</span>,
<span class="kw-2">*</span><span class="ident">work_bldg</span>,
<span class="ident">PathConstraints</span>::<span class="ident">Pedestrian</span>,
)
.<span class="ident">and_then</span>(<span class="op">|</span><span class="ident">req</span><span class="op">|</span> <span class="ident">map</span>.<span class="ident">pathfind</span>(<span class="ident">req</span>))
{
<span class="ident">dist</span>
<span class="ident">path</span>.<span class="ident">total_length</span>()
} <span class="kw">else</span> {
<span class="kw">return</span> <span class="prelude-val">Err</span>(<span class="string">&quot;no path found&quot;</span>.<span class="ident">into</span>());
};