This commit is contained in:
dabreegster 2021-05-15 16:16:26 +00:00
parent dea9abc5b4
commit 4d884ec376
57 changed files with 363 additions and 401 deletions

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 `parse_args` fn in crate `abstutil`."><meta name="keywords" content="rust, rustlang, rust-lang, parse_args"><title>abstutil::cli::parse_args - 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="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" role="button">&#9776;</div><a href='../../abstutil/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">abstutil</a>::<wbr><a href="index.html">cli</a></p><div id="sidebar-vars" data-name="parse_args" 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"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></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><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">abstutil</a>::<wbr><a href="index.html">cli</a>::<wbr><a class="fn" href="">parse_args</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/abstutil/cli.rs.html#165-167" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn parse_args() -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.38/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="abstutil" data-search-js="../../search-index.js"></div>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">abstutil</a>::<wbr><a href="index.html">cli</a>::<wbr><a class="fn" href="">parse_args</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/abstutil/cli.rs.html#163-165" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn parse_args() -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.38/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="abstutil" data-search-js="../../search-index.js"></div>
<script src="../../main.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 `cli` mod in crate `abstutil`."><meta name="keywords" content="rust, rustlang, rust-lang, cli"><title>abstutil::cli - 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="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" role="button">&#9776;</div><a href='../../abstutil/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module cli</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">abstutil</a></p><div id="sidebar-vars" data-name="cli" 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"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></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><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">abstutil</a>::<wbr><a class="mod" href="">cli</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/abstutil/cli.rs.html#1-167" title="goto source code">[src]</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" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">abstutil</a>::<wbr><a class="mod" href="">cli</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/abstutil/cli.rs.html#1-165" title="goto source code">[src]</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.CmdArgs.html" title="abstutil::cli::CmdArgs struct">CmdArgs</a></td><td class="docblock-short"><p>Yet another barebones command-line flag parsing library.</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.parse_args.html" title="abstutil::cli::parse_args fn">parse_args</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="abstutil" data-search-js="../../search-index.js"></div>

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 `contains_duplicates` fn in crate `abstutil`."><meta name="keywords" content="rust, rustlang, rust-lang, contains_duplicates"><title>abstutil::collections::contains_duplicates - 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="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" role="button">&#9776;</div><a href='../../abstutil/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">abstutil</a>::<wbr><a href="index.html">collections</a></p><div id="sidebar-vars" data-name="contains_duplicates" 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"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></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><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">abstutil</a>::<wbr><a href="index.html">collections</a>::<wbr><a class="fn" href="">contains_duplicates</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/abstutil/collections.rs.html#204-213" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn contains_duplicates&lt;T:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>&gt;(vec: &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;T&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="abstutil" data-search-js="../../search-index.js"></div>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">abstutil</a>::<wbr><a href="index.html">collections</a>::<wbr><a class="fn" href="">contains_duplicates</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/abstutil/collections.rs.html#206-215" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn contains_duplicates&lt;T:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>&gt;(vec: &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;T&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="abstutil" data-search-js="../../search-index.js"></div>
<script src="../../main.js"></script></body></html>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `retain_btreemap` fn in crate `abstutil`."><meta name="keywords" content="rust, rustlang, rust-lang, retain_btreemap"><title>abstutil::collections::retain_btreemap - 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="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" role="button">&#9776;</div><a href='../../abstutil/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">abstutil</a>::<wbr><a href="index.html">collections</a></p><div id="sidebar-vars" data-name="retain_btreemap" 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"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></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><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">abstutil</a>::<wbr><a href="index.html">collections</a>::<wbr><a class="fn" href="">retain_btreemap</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/abstutil/collections.rs.html#177-190" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn retain_btreemap&lt;K:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, V, F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>K, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>V) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a>&lt;K, V&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;keep: F<br>)</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="abstutil" data-search-js="../../search-index.js"></div>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">abstutil</a>::<wbr><a href="index.html">collections</a>::<wbr><a class="fn" href="">retain_btreemap</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/abstutil/collections.rs.html#179-192" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn retain_btreemap&lt;K:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, V, F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>K, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>V) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a>&lt;K, V&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;keep: F<br>)</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="abstutil" data-search-js="../../search-index.js"></div>
<script src="../../main.js"></script></body></html>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `retain_btreeset` fn in crate `abstutil`."><meta name="keywords" content="rust, rustlang, rust-lang, retain_btreeset"><title>abstutil::collections::retain_btreeset - 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="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" role="button">&#9776;</div><a href='../../abstutil/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">abstutil</a>::<wbr><a href="index.html">collections</a></p><div id="sidebar-vars" data-name="retain_btreeset" 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"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></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><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">abstutil</a>::<wbr><a href="index.html">collections</a>::<wbr><a class="fn" href="">retain_btreeset</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/abstutil/collections.rs.html#192-202" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn retain_btreeset&lt;K:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>K) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;set: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a>&lt;K&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;keep: F<br>)</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="abstutil" data-search-js="../../search-index.js"></div>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">abstutil</a>::<wbr><a href="index.html">collections</a>::<wbr><a class="fn" href="">retain_btreeset</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/abstutil/collections.rs.html#194-204" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn retain_btreeset&lt;K:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>K) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;set: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a>&lt;K&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;keep: F<br>)</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="abstutil" data-search-js="../../search-index.js"></div>
<script src="../../main.js"></script></body></html>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `wraparound_get` fn in crate `abstutil`."><meta name="keywords" content="rust, rustlang, rust-lang, wraparound_get"><title>abstutil::collections::wraparound_get - 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="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" role="button">&#9776;</div><a href='../../abstutil/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">abstutil</a>::<wbr><a href="index.html">collections</a></p><div id="sidebar-vars" data-name="wraparound_get" 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"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></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><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">abstutil</a>::<wbr><a href="index.html">collections</a>::<wbr><a class="fn" href="">wraparound_get</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/abstutil/collections.rs.html#170-175" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn wraparound_get&lt;T&gt;(vec: &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;T&gt;, idx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="abstutil" data-search-js="../../search-index.js"></div>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">abstutil</a>::<wbr><a href="index.html">collections</a>::<wbr><a class="fn" href="">wraparound_get</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/abstutil/collections.rs.html#172-177" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn wraparound_get&lt;T&gt;(vec: &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;T&gt;, idx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="abstutil" data-search-js="../../search-index.js"></div>
<script src="../../main.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 `collections` mod in crate `abstutil`."><meta name="keywords" content="rust, rustlang, rust-lang, collections"><title>abstutil::collections - 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="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" role="button">&#9776;</div><a href='../../abstutil/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module collections</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li></ul></div><p class="location"><a href="../index.html">abstutil</a></p><div id="sidebar-vars" data-name="collections" 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"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></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><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">abstutil</a>::<wbr><a class="mod" href="">collections</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/abstutil/collections.rs.html#1-365" title="goto source code">[src]</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" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">abstutil</a>::<wbr><a class="mod" href="">collections</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/abstutil/collections.rs.html#1-371" title="goto source code">[src]</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.Counter.html" title="abstutil::collections::Counter struct">Counter</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.FixedMap.html" title="abstutil::collections::FixedMap struct">FixedMap</a></td><td class="docblock-short"><p>A drop-in replacement for <code>BTreeMap</code>, where the keys have the property of being array indices.
Some values may be missing. Much more efficient at operations on individual objects, because
it just becomes a simple array lookup.</p>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,10 +1,10 @@
<!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="Use with `FixedMap`. From a particular key, extract a `usize`. These values should be roughly contiguous; the space used by the `FixedMap` will be `O(n)` with respect to the largest value returned here."><meta name="keywords" content="rust, rustlang, rust-lang, IndexableKey"><title>abstutil::collections::IndexableKey - 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="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 trait"><!--[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" role="button">&#9776;</div><a href='../../abstutil/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Trait IndexableKey</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.index">index</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class="location"><a href="../index.html">abstutil</a>::<wbr><a href="index.html">collections</a></p><div id="sidebar-vars" data-name="IndexableKey" data-ty="trait" 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"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></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><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Trait <a href="../index.html">abstutil</a>::<wbr><a href="index.html">collections</a>::<wbr><a class="trait" href="">IndexableKey</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/abstutil/collections.rs.html#297-299" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust trait">pub trait IndexableKey {
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Trait <a href="../index.html">abstutil</a>::<wbr><a href="index.html">collections</a>::<wbr><a class="trait" href="">IndexableKey</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/abstutil/collections.rs.html#303-305" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust trait">pub trait IndexableKey {
fn <a href="#tymethod.index" class="fnname">index</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>;
}</pre></div><div class="docblock"><p>Use with <code>FixedMap</code>. From a particular key, extract a <code>usize</code>. These values should be
roughly contiguous; the space used by the <code>FixedMap</code> will be <code>O(n)</code> with respect to the largest
value returned here.</p>
</div><h2 id="required-methods" class="small-section-header">Required methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><h3 id="tymethod.index" class="method"><code>fn <a href="#tymethod.index" class="fnname">index</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class="srclink" href="../../src/abstutil/collections.rs.html#298" title="goto source code">[src]</a></h3></div><span class="loading-content">Loading content...</span><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"></div><span class="loading-content">Loading content...</span><script type="text/javascript" src="../../implementors/abstutil/collections/trait.IndexableKey.js" async></script></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="abstutil" data-search-js="../../search-index.js"></div>
</div><h2 id="required-methods" class="small-section-header">Required methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><h3 id="tymethod.index" class="method"><code>fn <a href="#tymethod.index" class="fnname">index</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class="srclink" href="../../src/abstutil/collections.rs.html#304" title="goto source code">[src]</a></h3></div><span class="loading-content">Loading content...</span><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"></div><span class="loading-content">Loading content...</span><script type="text/javascript" src="../../implementors/abstutil/collections/trait.IndexableKey.js" async></script></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="abstutil" data-search-js="../../search-index.js"></div>
<script src="../../main.js"></script></body></html>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `PROGRESS_FREQUENCY_SECONDS` constant in crate `abstutil`."><meta name="keywords" content="rust, rustlang, rust-lang, PROGRESS_FREQUENCY_SECONDS"><title>abstutil::PROGRESS_FREQUENCY_SECONDS - 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="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" role="button">&#9776;</div><a href='../abstutil/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">abstutil</a></p><div id="sidebar-vars" data-name="PROGRESS_FREQUENCY_SECONDS" 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"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></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><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="index.html">abstutil</a>::<wbr><a class="constant" href="">PROGRESS_FREQUENCY_SECONDS</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/abstutil/lib.rs.html#26" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const PROGRESS_FREQUENCY_SECONDS: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a> = 0.2;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="abstutil" data-search-js="../search-index.js"></div>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="index.html">abstutil</a>::<wbr><a class="constant" href="">PROGRESS_FREQUENCY_SECONDS</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/abstutil/lib.rs.html#29" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const PROGRESS_FREQUENCY_SECONDS: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a> = 0.2;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="abstutil" data-search-js="../search-index.js"></div>
<script src="../main.js"></script></body></html>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `contains_duplicates` fn in crate `abstutil`."><meta name="keywords" content="rust, rustlang, rust-lang, contains_duplicates"><title>abstutil::contains_duplicates - 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="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" role="button">&#9776;</div><a href='../abstutil/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">abstutil</a></p><div id="sidebar-vars" data-name="contains_duplicates" 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"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></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><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="index.html">abstutil</a>::<wbr><a class="fn" href="">contains_duplicates</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/abstutil/collections.rs.html#204-213" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn contains_duplicates&lt;T:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>&gt;(vec: &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;T&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="abstutil" data-search-js="../search-index.js"></div>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="index.html">abstutil</a>::<wbr><a class="fn" href="">contains_duplicates</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/abstutil/collections.rs.html#206-215" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn contains_duplicates&lt;T:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>&gt;(vec: &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;T&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="abstutil" data-search-js="../search-index.js"></div>
<script src="../main.js"></script></body></html>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `retain_btreemap` fn in crate `abstutil`."><meta name="keywords" content="rust, rustlang, rust-lang, retain_btreemap"><title>abstutil::retain_btreemap - 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="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" role="button">&#9776;</div><a href='../abstutil/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">abstutil</a></p><div id="sidebar-vars" data-name="retain_btreemap" 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"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></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><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="index.html">abstutil</a>::<wbr><a class="fn" href="">retain_btreemap</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/abstutil/collections.rs.html#177-190" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn retain_btreemap&lt;K:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, V, F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>K, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>V) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a>&lt;K, V&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;keep: F<br>)</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="abstutil" data-search-js="../search-index.js"></div>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="index.html">abstutil</a>::<wbr><a class="fn" href="">retain_btreemap</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/abstutil/collections.rs.html#179-192" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn retain_btreemap&lt;K:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, V, F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>K, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>V) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a>&lt;K, V&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;keep: F<br>)</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="abstutil" data-search-js="../search-index.js"></div>
<script src="../main.js"></script></body></html>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `retain_btreeset` fn in crate `abstutil`."><meta name="keywords" content="rust, rustlang, rust-lang, retain_btreeset"><title>abstutil::retain_btreeset - 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="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" role="button">&#9776;</div><a href='../abstutil/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">abstutil</a></p><div id="sidebar-vars" data-name="retain_btreeset" 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"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></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><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="index.html">abstutil</a>::<wbr><a class="fn" href="">retain_btreeset</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/abstutil/collections.rs.html#192-202" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn retain_btreeset&lt;K:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>K) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;set: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a>&lt;K&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;keep: F<br>)</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="abstutil" data-search-js="../search-index.js"></div>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="index.html">abstutil</a>::<wbr><a class="fn" href="">retain_btreeset</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/abstutil/collections.rs.html#194-204" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn retain_btreeset&lt;K:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>K) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;set: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a>&lt;K&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;keep: F<br>)</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="abstutil" data-search-js="../search-index.js"></div>
<script src="../main.js"></script></body></html>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `wraparound_get` fn in crate `abstutil`."><meta name="keywords" content="rust, rustlang, rust-lang, wraparound_get"><title>abstutil::wraparound_get - 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="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" role="button">&#9776;</div><a href='../abstutil/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">abstutil</a></p><div id="sidebar-vars" data-name="wraparound_get" 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"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></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><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="index.html">abstutil</a>::<wbr><a class="fn" href="">wraparound_get</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/abstutil/collections.rs.html#170-175" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn wraparound_get&lt;T&gt;(vec: &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;T&gt;, idx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="abstutil" data-search-js="../search-index.js"></div>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="index.html">abstutil</a>::<wbr><a class="fn" href="">wraparound_get</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/abstutil/collections.rs.html#172-177" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn wraparound_get&lt;T&gt;(vec: &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;T&gt;, idx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="abstutil" data-search-js="../search-index.js"></div>
<script src="../main.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="The contents of this crate need to be organized better:"><meta name="keywords" content="rust, rustlang, rust-lang, abstutil"><title>abstutil - 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="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" role="button">&#9776;</div><a href='../abstutil/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Crate abstutil</p><div class="block version"><p>Version 0.1.0</p></div><div class="sidebar-elems"><a id="all-types" href="all.html"><p>See all abstutil's items</p></a><div class="block items"><ul><li><a href="#reexports">Re-exports</a></li><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#constants">Constants</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li></ul></div><p class="location"></p><div id="sidebar-vars" data-name="abstutil" data-ty="mod" data-relpath="../"></div></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></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><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Crate <a class="mod" href="">abstutil</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/abstutil/lib.rs.html#1-26" title="goto source code">[src]</a></span></h1><div class="docblock"><p>The contents of this crate need to be organized better:</p>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Crate <a class="mod" href="">abstutil</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/abstutil/lib.rs.html#1-29" title="goto source code">[src]</a></span></h1><div class="docblock"><p>The contents of this crate need to be organized better:</p>
<ul>
<li>Timer (a mix of logging, profiling, and even parallel execution)</li>
<li>true utility functions (collections, prettyprinting, CLI parsing</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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,10 +1,10 @@
<!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="Use with `FixedMap`. From a particular key, extract a `usize`. These values should be roughly contiguous; the space used by the `FixedMap` will be `O(n)` with respect to the largest value returned here."><meta name="keywords" content="rust, rustlang, rust-lang, IndexableKey"><title>abstutil::IndexableKey - 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="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 trait"><!--[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" role="button">&#9776;</div><a href='../abstutil/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Trait IndexableKey</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.index">index</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class="location"><a href="index.html">abstutil</a></p><div id="sidebar-vars" data-name="IndexableKey" data-ty="trait" 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"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></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><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Trait <a href="index.html">abstutil</a>::<wbr><a class="trait" href="">IndexableKey</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/abstutil/collections.rs.html#297-299" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust trait">pub trait IndexableKey {
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Trait <a href="index.html">abstutil</a>::<wbr><a class="trait" href="">IndexableKey</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/abstutil/collections.rs.html#303-305" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust trait">pub trait IndexableKey {
fn <a href="#tymethod.index" class="fnname">index</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>;
}</pre></div><div class="docblock"><p>Use with <code>FixedMap</code>. From a particular key, extract a <code>usize</code>. These values should be
roughly contiguous; the space used by the <code>FixedMap</code> will be <code>O(n)</code> with respect to the largest
value returned here.</p>
</div><h2 id="required-methods" class="small-section-header">Required methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><h3 id="tymethod.index" class="method"><code>fn <a href="#tymethod.index" class="fnname">index</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class="srclink" href="../src/abstutil/collections.rs.html#298" title="goto source code">[src]</a></h3></div><span class="loading-content">Loading content...</span><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"></div><span class="loading-content">Loading content...</span><script type="text/javascript" src="../implementors/abstutil/trait.IndexableKey.js" async></script></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="abstutil" data-search-js="../search-index.js"></div>
</div><h2 id="required-methods" class="small-section-header">Required methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><h3 id="tymethod.index" class="method"><code>fn <a href="#tymethod.index" class="fnname">index</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class="srclink" href="../src/abstutil/collections.rs.html#304" title="goto source code">[src]</a></h3></div><span class="loading-content">Loading content...</span><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"></div><span class="loading-content">Loading content...</span><script type="text/javascript" src="../implementors/abstutil/trait.IndexableKey.js" async></script></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="abstutil" data-search-js="../search-index.js"></div>
<script src="../main.js"></script></body></html>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `add_extra_buildings` fn in crate `convert_osm`."><meta name="keywords" content="rust, rustlang, rust-lang, add_extra_buildings"><title>convert_osm::add_extra_buildings - 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="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" role="button">&#9776;</div><a href='../convert_osm/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">convert_osm</a></p><div id="sidebar-vars" data-name="add_extra_buildings" 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"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></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><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="index.html">convert_osm</a>::<wbr><a class="fn" href="">add_extra_buildings</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/convert_osm/lib.rs.html#147-193" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub(crate) fn add_extra_buildings(map: &amp;mut <a class="struct" href="../map_model/raw/struct.RawMap.html" title="struct map_model::raw::RawMap">RawMap</a>, path: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.38/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="convert_osm" data-search-js="../search-index.js"></div>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="index.html">convert_osm</a>::<wbr><a class="fn" href="">add_extra_buildings</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/convert_osm/lib.rs.html#147-167" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub(crate) fn add_extra_buildings(map: &amp;mut <a class="struct" href="../map_model/raw/struct.RawMap.html" title="struct map_model::raw::RawMap">RawMap</a>, path: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.38/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="convert_osm" data-search-js="../search-index.js"></div>
<script src="../main.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 `convert_osm` crate."><meta name="keywords" content="rust, rustlang, rust-lang, convert_osm"><title>convert_osm - 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="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" role="button">&#9776;</div><a href='../convert_osm/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Crate convert_osm</p><div class="block version"><p>Version 0.1.0</p></div><div class="sidebar-elems"><a id="all-types" href="all.html"><p>See all convert_osm's items</p></a><div class="block items"><ul><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"></p><div id="sidebar-vars" data-name="convert_osm" data-ty="mod" data-relpath="../"></div></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></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><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Crate <a class="mod" href="">convert_osm</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/convert_osm/lib.rs.html#1-193" title="goto source code">[src]</a></span></h1><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Crate <a class="mod" href="">convert_osm</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/convert_osm/lib.rs.html#1-167" title="goto source code">[src]</a></span></h1><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2>
<table><tr class="module-item"><td><a class="mod" href="clip/index.html" title="convert_osm::clip mod">clip</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="elevation/index.html" title="convert_osm::elevation mod">elevation</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="extract/index.html" title="convert_osm::extract mod">extract</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="osm_geom/index.html" title="convert_osm::osm_geom mod">osm_geom</a></td><td class="docblock-short"><p>Utilities for extracting concrete geometry from OSM objects.</p>
</td></tr><tr class="module-item"><td><a class="mod" href="parking/index.html" title="convert_osm::parking mod">parking</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="reader/index.html" title="convert_osm::reader mod">reader</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="snappy/index.html" title="convert_osm::snappy mod">snappy</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="split_ways/index.html" title="convert_osm::split_ways mod">split_ways</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="transit/index.html" title="convert_osm::transit mod">transit</a></td><td class="docblock-short"></td></tr></table><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<table><tr class="module-item"><td><a class="struct" href="struct.Options.html" title="convert_osm::Options struct">Options</a></td><td class="docblock-short"></td></tr></table><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2>

View File

@ -1,6 +1,6 @@
<!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="Load an extra GeoJSON file, and add the area to the map dynamically."><meta name="keywords" content="rust, rustlang, rust-lang, add_study_area"><title>game::app::add_study_area - 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="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" role="button">&#9776;</div><a href='../../game/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">game</a>::<wbr><a href="index.html">app</a></p><div id="sidebar-vars" data-name="add_study_area" 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"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></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><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></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">app</a>::<wbr><a class="fn" href="">add_study_area</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/app.rs.html#882-914" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn add_study_area(map: &amp;mut <a class="struct" href="../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.38/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</pre><div class="docblock"><p>Load an extra GeoJSON file, and add the area to the map dynamically.</p>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></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">app</a>::<wbr><a class="fn" href="">add_study_area</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/app.rs.html#882-892" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn add_study_area(map: &amp;mut <a class="struct" href="../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.38/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</pre><div class="docblock"><p>Load an extra GeoJSON file, and add the area to the map dynamically.</p>
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="game" data-search-js="../../search-index.js"></div>
<script src="../../main.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 `app` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, app"><title>game::app - 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="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" role="button">&#9776;</div><a href='../../game/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module app</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li><li><a href="#types">Type Definitions</a></li></ul></div><p class="location"><a href="../index.html">game</a></p><div id="sidebar-vars" data-name="app" 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"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></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><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">game</a>::<wbr><a class="mod" href="">app</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/app.rs.html#1-914" title="goto source code">[src]</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" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">game</a>::<wbr><a class="mod" href="">app</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/app.rs.html#1-892" title="goto source code">[src]</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.App.html" title="game::app::App struct">App</a></td><td class="docblock-short"><p>The top-level data that lasts through the entire game, no matter what state the game is in.</p>
</td></tr><tr class="module-item"><td><a class="struct" href="struct.FindDelayedIntersections.html" title="game::app::FindDelayedIntersections struct">FindDelayedIntersections</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.Flags.html" title="game::app::Flags struct">Flags</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.PerMap.html" title="game::app::PerMap struct">PerMap</a></td><td class="docblock-short"><p>All of the state thats bound to a specific map.</p>
</td></tr><tr class="module-item"><td><a class="struct" href="struct.PerObjectActions.html" title="game::app::PerObjectActions struct">PerObjectActions</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.SessionState.html" title="game::app::SessionState struct">SessionState</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.ShowEverything.html" title="game::app::ShowEverything struct">ShowEverything</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.ShowLayers.html" title="game::app::ShowLayers struct">ShowLayers</a></td><td class="docblock-short"></td></tr></table><h2 id="traits" class="section-header"><a href="#traits">Traits</a></h2>

View File

@ -1,6 +1,6 @@
<!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 built-time in RFC2822, UTC"><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 id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.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" role="button">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><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><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"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></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><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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><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-8fd4d727846ff3e4/out/built.rs.html#53" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const BUILT_TIME_UTC: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = &quot;Sat, 15 May 2021 00:39:58 +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" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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><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-8fd4d727846ff3e4/out/built.rs.html#53" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const BUILT_TIME_UTC: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = &quot;Sat, 15 May 2021 16:13:54 +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><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-js="../../../search-index.js"></div>
<script src="../../../main.js"></script></body></html>

View File

@ -3,5 +3,5 @@
<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" role="button">&#9776;</div><a href='../geom/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Crate geom</p><div class="block version"><p>Version 0.1.0</p></div><a id="all-types" href="index.html"><p>Back to index</p></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></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><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">List of all items</span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span>
</span>
</h1><h3 id="Structs">Structs</h3><ul class="structs docblock"><li><a href="struct.Angle.html">Angle</a></li><li><a href="struct.Bounds.html">Bounds</a></li><li><a href="struct.Circle.html">Circle</a></li><li><a href="struct.CornerRadii.html">CornerRadii</a></li><li><a href="struct.Distance.html">Distance</a></li><li><a href="struct.Duration.html">Duration</a></li><li><a href="struct.FindClosest.html">FindClosest</a></li><li><a href="struct.GPSBounds.html">GPSBounds</a></li><li><a href="struct.HashablePt2D.html">HashablePt2D</a></li><li><a href="struct.Histogram.html">Histogram</a></li><li><a href="struct.InfiniteLine.html">InfiniteLine</a></li><li><a href="struct.Line.html">Line</a></li><li><a href="struct.LonLat.html">LonLat</a></li><li><a href="struct.Percent.html">Percent</a></li><li><a href="struct.PolyLine.html">PolyLine</a></li><li><a href="struct.Polygon.html">Polygon</a></li><li><a href="struct.Pt2D.html">Pt2D</a></li><li><a href="struct.Ring.html">Ring</a></li><li><a href="struct.Speed.html">Speed</a></li><li><a href="struct.Time.html">Time</a></li><li><a href="struct.Triangle.html">Triangle</a></li><li><a href="struct.UnitFmt.html">UnitFmt</a></li><li><a href="angle/struct.Angle.html">angle::Angle</a></li><li><a href="bounds/struct.Bounds.html">bounds::Bounds</a></li><li><a href="bounds/struct.GPSBounds.html">bounds::GPSBounds</a></li><li><a href="circle/struct.Circle.html">circle::Circle</a></li><li><a href="distance/struct.Distance.html">distance::Distance</a></li><li><a href="duration/struct.Duration.html">duration::Duration</a></li><li><a href="find_closest/struct.FindClosest.html">find_closest::FindClosest</a></li><li><a href="gps/struct.LonLat.html">gps::LonLat</a></li><li><a href="line/struct.InfiniteLine.html">line::InfiniteLine</a></li><li><a href="line/struct.Line.html">line::Line</a></li><li><a href="percent/struct.Percent.html">percent::Percent</a></li><li><a href="polygon/struct.Polygon.html">polygon::Polygon</a></li><li><a href="polygon/struct.Triangle.html">polygon::Triangle</a></li><li><a href="polyline/struct.PolyLine.html">polyline::PolyLine</a></li><li><a href="pt/struct.HashablePt2D.html">pt::HashablePt2D</a></li><li><a href="pt/struct.Pt2D.html">pt::Pt2D</a></li><li><a href="ring/struct.Ring.html">ring::Ring</a></li><li><a href="speed/struct.Speed.html">speed::Speed</a></li><li><a href="stats/struct.Histogram.html">stats::Histogram</a></li><li><a href="time/struct.Time.html">time::Time</a></li></ul><h3 id="Enums">Enums</h3><ul class="enums docblock"><li><a href="enum.ArrowCap.html">ArrowCap</a></li><li><a href="enum.Statistic.html">Statistic</a></li><li><a href="polyline/enum.ArrowCap.html">polyline::ArrowCap</a></li><li><a href="stats/enum.Statistic.html">stats::Statistic</a></li></ul><h3 id="Traits">Traits</h3><ul class="traits docblock"><li><a href="trait.HgramValue.html">HgramValue</a></li><li><a href="stats/trait.HgramValue.html">stats::HgramValue</a></li></ul><h3 id="Functions">Functions</h3><ul class="functions docblock"><li><a href="find_closest/fn.pts_to_line_string.html">find_closest::pts_to_line_string</a></li><li><a href="line/fn.is_counter_clockwise.html">line::is_counter_clockwise</a></li><li><a href="polygon/fn.downsize.html">polygon::downsize</a></li><li><a href="polygon/fn.from_multi.html">polygon::from_multi</a></li><li><a href="polygon/fn.to_geo.html">polygon::to_geo</a></li><li><a href="polyline/fn.fix_angles.html">polyline::fix_angles</a></li><li><a href="polyline/fn.pts_to_line_string.html">polyline::pts_to_line_string</a></li><li><a href="polyline/fn.to_set.html">polyline::to_set</a></li><li><a href="fn.trim_f64.html">trim_f64</a></li></ul><h3 id="Constants">Constants</h3><ul class="constants docblock"><li><a href="constant.EPSILON_DIST.html">EPSILON_DIST</a></li><li><a href="circle/constant.TRIANGLES_PER_CIRCLE.html">circle::TRIANGLES_PER_CIRCLE</a></li><li><a href="polyline/constant.MITER_THRESHOLD.html">polyline::MITER_THRESHOLD</a></li></ul></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="geom" data-search-js="../search-index.js"></div>
</h1><h3 id="Structs">Structs</h3><ul class="structs docblock"><li><a href="struct.Angle.html">Angle</a></li><li><a href="struct.Bounds.html">Bounds</a></li><li><a href="struct.Circle.html">Circle</a></li><li><a href="struct.CornerRadii.html">CornerRadii</a></li><li><a href="struct.Distance.html">Distance</a></li><li><a href="struct.Duration.html">Duration</a></li><li><a href="struct.FindClosest.html">FindClosest</a></li><li><a href="struct.GPSBounds.html">GPSBounds</a></li><li><a href="struct.HashablePt2D.html">HashablePt2D</a></li><li><a href="struct.Histogram.html">Histogram</a></li><li><a href="struct.InfiniteLine.html">InfiniteLine</a></li><li><a href="struct.Line.html">Line</a></li><li><a href="struct.LonLat.html">LonLat</a></li><li><a href="struct.Percent.html">Percent</a></li><li><a href="struct.PolyLine.html">PolyLine</a></li><li><a href="struct.Polygon.html">Polygon</a></li><li><a href="struct.Pt2D.html">Pt2D</a></li><li><a href="struct.Ring.html">Ring</a></li><li><a href="struct.Speed.html">Speed</a></li><li><a href="struct.Time.html">Time</a></li><li><a href="struct.Triangle.html">Triangle</a></li><li><a href="struct.UnitFmt.html">UnitFmt</a></li><li><a href="angle/struct.Angle.html">angle::Angle</a></li><li><a href="bounds/struct.Bounds.html">bounds::Bounds</a></li><li><a href="bounds/struct.GPSBounds.html">bounds::GPSBounds</a></li><li><a href="circle/struct.Circle.html">circle::Circle</a></li><li><a href="distance/struct.Distance.html">distance::Distance</a></li><li><a href="duration/struct.Duration.html">duration::Duration</a></li><li><a href="find_closest/struct.FindClosest.html">find_closest::FindClosest</a></li><li><a href="gps/struct.LonLat.html">gps::LonLat</a></li><li><a href="line/struct.InfiniteLine.html">line::InfiniteLine</a></li><li><a href="line/struct.Line.html">line::Line</a></li><li><a href="percent/struct.Percent.html">percent::Percent</a></li><li><a href="polygon/struct.Polygon.html">polygon::Polygon</a></li><li><a href="polygon/struct.Triangle.html">polygon::Triangle</a></li><li><a href="polyline/struct.PolyLine.html">polyline::PolyLine</a></li><li><a href="pt/struct.HashablePt2D.html">pt::HashablePt2D</a></li><li><a href="pt/struct.Pt2D.html">pt::Pt2D</a></li><li><a href="ring/struct.Ring.html">ring::Ring</a></li><li><a href="speed/struct.Speed.html">speed::Speed</a></li><li><a href="stats/struct.Histogram.html">stats::Histogram</a></li><li><a href="time/struct.Time.html">time::Time</a></li></ul><h3 id="Enums">Enums</h3><ul class="enums docblock"><li><a href="enum.ArrowCap.html">ArrowCap</a></li><li><a href="enum.Statistic.html">Statistic</a></li><li><a href="polyline/enum.ArrowCap.html">polyline::ArrowCap</a></li><li><a href="stats/enum.Statistic.html">stats::Statistic</a></li></ul><h3 id="Traits">Traits</h3><ul class="traits docblock"><li><a href="trait.HgramValue.html">HgramValue</a></li><li><a href="stats/trait.HgramValue.html">stats::HgramValue</a></li></ul><h3 id="Functions">Functions</h3><ul class="functions docblock"><li><a href="find_closest/fn.pts_to_line_string.html">find_closest::pts_to_line_string</a></li><li><a href="line/fn.is_counter_clockwise.html">line::is_counter_clockwise</a></li><li><a href="polygon/fn.downsize.html">polygon::downsize</a></li><li><a href="polygon/fn.from_geojson_file_inner.html">polygon::from_geojson_file_inner</a></li><li><a href="polygon/fn.from_multi.html">polygon::from_multi</a></li><li><a href="polygon/fn.to_geo.html">polygon::to_geo</a></li><li><a href="polyline/fn.fix_angles.html">polyline::fix_angles</a></li><li><a href="polyline/fn.pts_to_line_string.html">polyline::pts_to_line_string</a></li><li><a href="polyline/fn.to_set.html">polyline::to_set</a></li><li><a href="fn.trim_f64.html">trim_f64</a></li></ul><h3 id="Constants">Constants</h3><ul class="constants docblock"><li><a href="constant.EPSILON_DIST.html">EPSILON_DIST</a></li><li><a href="circle/constant.TRIANGLES_PER_CIRCLE.html">circle::TRIANGLES_PER_CIRCLE</a></li><li><a href="polyline/constant.MITER_THRESHOLD.html">polyline::MITER_THRESHOLD</a></li></ul></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="geom" data-search-js="../search-index.js"></div>
<script src="../main.js"></script></body></html>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `downsize` fn in crate `geom`."><meta name="keywords" content="rust, rustlang, rust-lang, downsize"><title>geom::polygon::downsize - 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="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" role="button">&#9776;</div><a href='../../geom/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">geom</a>::<wbr><a href="index.html">polygon</a></p><div id="sidebar-vars" data-name="downsize" 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"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></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><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">geom</a>::<wbr><a href="index.html">polygon</a>::<wbr><a class="fn" href="">downsize</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/geom/polygon.rs.html#595-605" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn downsize(input: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="geom" data-search-js="../../search-index.js"></div>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">geom</a>::<wbr><a href="index.html">polygon</a>::<wbr><a class="fn" href="">downsize</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/geom/polygon.rs.html#613-623" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn downsize(input: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="geom" data-search-js="../../search-index.js"></div>
<script src="../../main.js"></script></body></html>

View File

@ -0,0 +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 `from_geojson_file_inner` fn in crate `geom`."><meta name="keywords" content="rust, rustlang, rust-lang, from_geojson_file_inner"><title>geom::polygon::from_geojson_file_inner - 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="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" role="button">&#9776;</div><a href='../../geom/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">geom</a>::<wbr><a href="index.html">polygon</a></p><div id="sidebar-vars" data-name="from_geojson_file_inner" 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"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></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><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">geom</a>::<wbr><a href="index.html">polygon</a>::<wbr><a class="fn" href="">from_geojson_file_inner</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/geom/polygon.rs.html#625-673" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn from_geojson_file_inner(<br>&nbsp;&nbsp;&nbsp;&nbsp;path: &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/std/path/struct.Path.html" title="struct std::path::Path">Path</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;gps_bounds: &amp;<a class="struct" href="../../geom/bounds/struct.GPSBounds.html" title="struct geom::bounds::GPSBounds">GPSBounds</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;require_in_bounds: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><br>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.38/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>, <a class="struct" href="../../abstutil/collections/struct.Tags.html" title="struct abstutil::collections::Tags">Tags</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="geom" data-search-js="../../search-index.js"></div>
<script src="../../main.js"></script></body></html>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `from_multi` fn in crate `geom`."><meta name="keywords" content="rust, rustlang, rust-lang, from_multi"><title>geom::polygon::from_multi - 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="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" role="button">&#9776;</div><a href='../../geom/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">geom</a>::<wbr><a href="index.html">polygon</a></p><div id="sidebar-vars" data-name="from_multi" 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"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></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><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">geom</a>::<wbr><a href="index.html">polygon</a>::<wbr><a class="fn" href="">from_multi</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/geom/polygon.rs.html#577-593" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn from_multi(multi: MultiPolygon&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="geom" data-search-js="../../search-index.js"></div>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">geom</a>::<wbr><a href="index.html">polygon</a>::<wbr><a class="fn" href="">from_multi</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/geom/polygon.rs.html#595-611" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn from_multi(multi: MultiPolygon&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="geom" data-search-js="../../search-index.js"></div>
<script src="../../main.js"></script></body></html>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `to_geo` fn in crate `geom`."><meta name="keywords" content="rust, rustlang, rust-lang, to_geo"><title>geom::polygon::to_geo - 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="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" role="button">&#9776;</div><a href='../../geom/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">geom</a>::<wbr><a href="index.html">polygon</a></p><div id="sidebar-vars" data-name="to_geo" 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"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></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><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">geom</a>::<wbr><a href="index.html">polygon</a>::<wbr><a class="fn" href="">to_geo</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/geom/polygon.rs.html#537-546" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn to_geo(pts: &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="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>&gt;) -&gt; Polygon&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="geom" data-search-js="../../search-index.js"></div>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">geom</a>::<wbr><a href="index.html">polygon</a>::<wbr><a class="fn" href="">to_geo</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/geom/polygon.rs.html#555-564" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn to_geo(pts: &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="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>&gt;) -&gt; Polygon&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="geom" data-search-js="../../search-index.js"></div>
<script src="../../main.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 `polygon` mod in crate `geom`."><meta name="keywords" content="rust, rustlang, rust-lang, polygon"><title>geom::polygon - 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="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" role="button">&#9776;</div><a href='../../geom/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module polygon</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">geom</a></p><div id="sidebar-vars" data-name="polygon" 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"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></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><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></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="">polygon</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/geom/polygon.rs.html#1-605" title="goto source code">[src]</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" height="18" alt="Change settings"></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="">polygon</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/geom/polygon.rs.html#1-673" title="goto source code">[src]</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.Polygon.html" title="geom::polygon::Polygon struct">Polygon</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.Triangle.html" title="geom::polygon::Triangle struct">Triangle</a></td><td class="docblock-short"></td></tr></table><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>
<table><tr class="module-item"><td><a class="fn" href="fn.downsize.html" title="geom::polygon::downsize fn">downsize</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.from_multi.html" title="geom::polygon::from_multi fn">from_multi</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.to_geo.html" title="geom::polygon::to_geo fn">to_geo</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="geom" data-search-js="../../search-index.js"></div>
<table><tr class="module-item"><td><a class="fn" href="fn.downsize.html" title="geom::polygon::downsize fn">downsize</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.from_geojson_file_inner.html" title="geom::polygon::from_geojson_file_inner fn">from_geojson_file_inner</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.from_multi.html" title="geom::polygon::from_multi fn">from_multi</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.to_geo.html" title="geom::polygon::to_geo fn">to_geo</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="geom" data-search-js="../../search-index.js"></div>
<script src="../../main.js"></script></body></html>

View File

@ -1 +1 @@
initSidebarItems({"fn":[["downsize",""],["from_multi",""],["to_geo",""]],"struct":[["Polygon",""],["Triangle",""]]});
initSidebarItems({"fn":[["downsize",""],["from_geojson_file_inner",""],["from_multi",""],["to_geo",""]],"struct":[["Polygon",""],["Triangle",""]]});

File diff suppressed because one or more lines are too long

View File

@ -1,14 +1,14 @@
<!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 `Triangle` struct in crate `geom`."><meta name="keywords" content="rust, rustlang, rust-lang, Triangle"><title>geom::polygon::Triangle - 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="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" role="button">&#9776;</div><a href='../../geom/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Struct Triangle</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.pt1">pt1</a><a href="#structfield.pt2">pt2</a><a href="#structfield.pt3">pt3</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.contains_pt">contains_pt</a><a href="#method.new">new</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></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-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-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class="location"><a href="../index.html">geom</a>::<wbr><a href="index.html">polygon</a></p><div id="sidebar-vars" data-name="Triangle" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></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><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">geom</a>::<wbr><a href="index.html">polygon</a>::<wbr><a class="struct" href="">Triangle</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/geom/polygon.rs.html#498-502" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct Triangle {
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">geom</a>::<wbr><a href="index.html">polygon</a>::<wbr><a class="struct" href="">Triangle</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/geom/polygon.rs.html#516-520" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct Triangle {
pub pt1: <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>,
pub pt2: <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>,
pub pt3: <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>,
}</pre></div><h2 id="fields" class="fields small-section-header">
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.pt1" class="structfield small-section-header"><a href="#structfield.pt1" class="anchor field"></a><code>pt1: <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a></code></span><span id="structfield.pt2" class="structfield small-section-header"><a href="#structfield.pt2" class="anchor field"></a><code>pt2: <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a></code></span><span id="structfield.pt3" class="structfield small-section-header"><a href="#structfield.pt3" class="anchor field"></a><code>pt3: <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</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="../../geom/polygon/struct.Triangle.html" title="struct geom::polygon::Triangle">Triangle</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/geom/polygon.rs.html#504-535" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>(pt1: <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>, pt2: <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>, pt3: <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>) -&gt; <a class="struct" href="../../geom/polygon/struct.Triangle.html" title="struct geom::polygon::Triangle">Triangle</a></code><a class="srclink" href="../../src/geom/polygon.rs.html#505-507" title="goto source code">[src]</a></h4><h4 id="method.contains_pt" class="method"><code>fn <a href="#method.contains_pt" class="fnname">contains_pt</a>(&amp;self, pt: <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../src/geom/polygon.rs.html#509-534" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../geom/polygon/struct.Triangle.html" title="struct geom::polygon::Triangle">Triangle</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../src/geom/polygon.rs.html#497" 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="../../geom/polygon/struct.Triangle.html" title="struct geom::polygon::Triangle">Triangle</a></code><a class="srclink" href="../../src/geom/polygon.rs.html#497" 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.pt1" class="structfield small-section-header"><a href="#structfield.pt1" class="anchor field"></a><code>pt1: <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a></code></span><span id="structfield.pt2" class="structfield small-section-header"><a href="#structfield.pt2" class="anchor field"></a><code>pt2: <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a></code></span><span id="structfield.pt3" class="structfield small-section-header"><a href="#structfield.pt3" class="anchor field"></a><code>pt3: <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</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="../../geom/polygon/struct.Triangle.html" title="struct geom::polygon::Triangle">Triangle</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/geom/polygon.rs.html#522-553" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>(pt1: <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>, pt2: <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>, pt3: <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>) -&gt; <a class="struct" href="../../geom/polygon/struct.Triangle.html" title="struct geom::polygon::Triangle">Triangle</a></code><a class="srclink" href="../../src/geom/polygon.rs.html#523-525" title="goto source code">[src]</a></h4><h4 id="method.contains_pt" class="method"><code>fn <a href="#method.contains_pt" class="fnname">contains_pt</a>(&amp;self, pt: <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../src/geom/polygon.rs.html#527-552" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../geom/polygon/struct.Triangle.html" title="struct geom::polygon::Triangle">Triangle</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../src/geom/polygon.rs.html#515" 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="../../geom/polygon/struct.Triangle.html" title="struct geom::polygon::Triangle">Triangle</a></code><a class="srclink" href="../../src/geom/polygon.rs.html#515" 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>pub 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#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="../../geom/polygon/struct.Triangle.html" title="struct geom::polygon::Triangle">Triangle</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/geom/polygon.rs.html#497" 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/geom/polygon.rs.html#497" 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-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="../../geom/polygon/struct.Triangle.html" title="struct geom::polygon::Triangle">Triangle</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/geom/polygon.rs.html#515" 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/geom/polygon.rs.html#515" 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></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../geom/polygon/struct.Triangle.html" title="struct geom::polygon::Triangle">Triangle</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../geom/polygon/struct.Triangle.html" title="struct geom::polygon::Triangle">Triangle</a></code><a href="#impl-Send" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../geom/polygon/struct.Triangle.html" title="struct geom::polygon::Triangle">Triangle</a></code><a href="#impl-Sync" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../geom/polygon/struct.Triangle.html" title="struct geom::polygon::Triangle">Triangle</a></code><a href="#impl-Unpin" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../geom/polygon/struct.Triangle.html" title="struct geom::polygon::Triangle">Triangle</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#131-135" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>

File diff suppressed because one or more lines are too long

View File

@ -1,14 +1,14 @@
<!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 `Triangle` struct in crate `geom`."><meta name="keywords" content="rust, rustlang, rust-lang, Triangle"><title>geom::Triangle - 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="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" role="button">&#9776;</div><a href='../geom/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Struct Triangle</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.pt1">pt1</a><a href="#structfield.pt2">pt2</a><a href="#structfield.pt3">pt3</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.contains_pt">contains_pt</a><a href="#method.new">new</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></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-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-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class="location"><a href="index.html">geom</a></p><div id="sidebar-vars" data-name="Triangle" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></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><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="index.html">geom</a>::<wbr><a class="struct" href="">Triangle</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/geom/polygon.rs.html#498-502" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct Triangle {
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="index.html">geom</a>::<wbr><a class="struct" href="">Triangle</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/geom/polygon.rs.html#516-520" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct Triangle {
pub pt1: <a class="struct" href="../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>,
pub pt2: <a class="struct" href="../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>,
pub pt3: <a class="struct" href="../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>,
}</pre></div><h2 id="fields" class="fields small-section-header">
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.pt1" class="structfield small-section-header"><a href="#structfield.pt1" class="anchor field"></a><code>pt1: <a class="struct" href="../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a></code></span><span id="structfield.pt2" class="structfield small-section-header"><a href="#structfield.pt2" class="anchor field"></a><code>pt2: <a class="struct" href="../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a></code></span><span id="structfield.pt3" class="structfield small-section-header"><a href="#structfield.pt3" class="anchor field"></a><code>pt3: <a class="struct" href="../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</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="../geom/polygon/struct.Triangle.html" title="struct geom::polygon::Triangle">Triangle</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/geom/polygon.rs.html#504-535" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>(pt1: <a class="struct" href="../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>, pt2: <a class="struct" href="../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>, pt3: <a class="struct" href="../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>) -&gt; <a class="struct" href="../geom/polygon/struct.Triangle.html" title="struct geom::polygon::Triangle">Triangle</a></code><a class="srclink" href="../src/geom/polygon.rs.html#505-507" title="goto source code">[src]</a></h4><h4 id="method.contains_pt" class="method"><code>fn <a href="#method.contains_pt" class="fnname">contains_pt</a>(&amp;self, pt: <a class="struct" href="../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../src/geom/polygon.rs.html#509-534" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../geom/polygon/struct.Triangle.html" title="struct geom::polygon::Triangle">Triangle</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../src/geom/polygon.rs.html#497" 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="../geom/polygon/struct.Triangle.html" title="struct geom::polygon::Triangle">Triangle</a></code><a class="srclink" href="../src/geom/polygon.rs.html#497" 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.pt1" class="structfield small-section-header"><a href="#structfield.pt1" class="anchor field"></a><code>pt1: <a class="struct" href="../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a></code></span><span id="structfield.pt2" class="structfield small-section-header"><a href="#structfield.pt2" class="anchor field"></a><code>pt2: <a class="struct" href="../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a></code></span><span id="structfield.pt3" class="structfield small-section-header"><a href="#structfield.pt3" class="anchor field"></a><code>pt3: <a class="struct" href="../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</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="../geom/polygon/struct.Triangle.html" title="struct geom::polygon::Triangle">Triangle</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/geom/polygon.rs.html#522-553" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>(pt1: <a class="struct" href="../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>, pt2: <a class="struct" href="../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>, pt3: <a class="struct" href="../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>) -&gt; <a class="struct" href="../geom/polygon/struct.Triangle.html" title="struct geom::polygon::Triangle">Triangle</a></code><a class="srclink" href="../src/geom/polygon.rs.html#523-525" title="goto source code">[src]</a></h4><h4 id="method.contains_pt" class="method"><code>fn <a href="#method.contains_pt" class="fnname">contains_pt</a>(&amp;self, pt: <a class="struct" href="../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../src/geom/polygon.rs.html#527-552" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../geom/polygon/struct.Triangle.html" title="struct geom::polygon::Triangle">Triangle</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../src/geom/polygon.rs.html#515" 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="../geom/polygon/struct.Triangle.html" title="struct geom::polygon::Triangle">Triangle</a></code><a class="srclink" href="../src/geom/polygon.rs.html#515" 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>pub 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#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="../geom/polygon/struct.Triangle.html" title="struct geom::polygon::Triangle">Triangle</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/geom/polygon.rs.html#497" 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/geom/polygon.rs.html#497" 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-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="../geom/polygon/struct.Triangle.html" title="struct geom::polygon::Triangle">Triangle</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/geom/polygon.rs.html#515" 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/geom/polygon.rs.html#515" 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></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../geom/polygon/struct.Triangle.html" title="struct geom::polygon::Triangle">Triangle</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../geom/polygon/struct.Triangle.html" title="struct geom::polygon::Triangle">Triangle</a></code><a href="#impl-Send" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../geom/polygon/struct.Triangle.html" title="struct geom::polygon::Triangle">Triangle</a></code><a href="#impl-Sync" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../geom/polygon/struct.Triangle.html" title="struct geom::polygon::Triangle">Triangle</a></code><a href="#impl-Unpin" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../geom/polygon/struct.Triangle.html" title="struct geom::polygon::Triangle">Triangle</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#131-135" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>

View File

@ -3,5 +3,5 @@
<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" role="button">&#9776;</div><a href='../importer/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Crate importer</p><div class="block version"><p>Version 0.1.0</p></div><a id="all-types" href="index.html"><p>Back to index</p></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></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><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">List of all items</span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span>
</span>
</h1><h3 id="Structs">Structs</h3><ul class="structs docblock"><li><a href="struct.Job.html">Job</a></li><li><a href="berlin/struct.Record.html">berlin::Record</a></li><li><a href="configuration/struct.ImporterConfiguration.html">configuration::ImporterConfiguration</a></li><li><a href="generic/struct.GenericCityImporter.html">generic::GenericCityImporter</a></li><li><a href="seattle/struct.StopTimeRecord.html">seattle::StopTimeRecord</a></li><li><a href="seattle/struct.TripRecord.html">seattle::TripRecord</a></li><li><a href="soundcast/popdat/struct.Endpoint.html">soundcast::popdat::Endpoint</a></li><li><a href="soundcast/popdat/struct.OrigTrip.html">soundcast::popdat::OrigTrip</a></li><li><a href="soundcast/popdat/struct.PopDat.html">soundcast::popdat::PopDat</a></li><li><a href="soundcast/popdat/struct.RawParcel.html">soundcast::popdat::RawParcel</a></li><li><a href="soundcast/popdat/struct.RawTrip.html">soundcast::popdat::RawTrip</a></li><li><a href="soundcast/trips/struct.Trip.html">soundcast::trips::Trip</a></li><li><a href="uk/struct.Record.html">uk::Record</a></li></ul><h3 id="Functions">Functions</h3><ul class="functions docblock"><li><a href="berlin/fn.correlate_population.html">berlin::correlate_population</a></li><li><a href="berlin/fn.distribute_residents.html">berlin::distribute_residents</a></li><li><a href="berlin/fn.import_extra_data.html">berlin::import_extra_data</a></li><li><a href="configuration/fn.load_configuration.html">configuration::load_configuration</a></li><li><a href="fn.main.html">main</a></li><li><a href="fn.oneshot.html">oneshot</a></li><li><a href="fn.regenerate_everything.html">regenerate_everything</a></li><li><a href="seattle/fn.add_gtfs_schedules.html">seattle::add_gtfs_schedules</a></li><li><a href="seattle/fn.adjust_private_parking.html">seattle::adjust_private_parking</a></li><li><a href="seattle/fn.ensure_popdat_exists.html">seattle::ensure_popdat_exists</a></li><li><a href="seattle/fn.input.html">seattle::input</a></li><li><a href="seattle/fn.match_parcels_to_buildings.html">seattle::match_parcels_to_buildings</a></li><li><a href="seattle/fn.osm_to_raw.html">seattle::osm_to_raw</a></li><li><a href="soundcast/popdat/fn.get_mode.html">soundcast::popdat::get_mode</a></li><li><a href="soundcast/popdat/fn.get_purpose.html">soundcast::popdat::get_purpose</a></li><li><a href="soundcast/popdat/fn.import_data.html">soundcast::popdat::import_data</a></li><li><a href="soundcast/popdat/fn.import_parcels.html">soundcast::popdat::import_parcels</a></li><li><a href="soundcast/popdat/fn.import_trips.html">soundcast::popdat::import_trips</a></li><li><a href="soundcast/trips/fn.clip_trips.html">soundcast::trips::clip_trips</a></li><li><a href="soundcast/trips/fn.endpoints.html">soundcast::trips::endpoints</a></li><li><a href="soundcast/trips/fn.make_weekday_scenario.html">soundcast::trips::make_weekday_scenario</a></li><li><a href="soundcast/trips/fn.other_border.html">soundcast::trips::other_border</a></li><li><a href="uk/fn.generate_scenario.html">uk::generate_scenario</a></li><li><a href="uk/fn.import_collision_data.html">uk::import_collision_data</a></li><li><a href="uk/fn.load_study_area.html">uk::load_study_area</a></li><li><a href="uk/fn.parse_desire_lines.html">uk::parse_desire_lines</a></li><li><a href="uk/fn.parse_polygon.html">uk::parse_polygon</a></li><li><a href="uk/fn.parse_zones.html">uk::parse_zones</a></li><li><a href="utils/fn.download.html">utils::download</a></li><li><a href="utils/fn.download_kml.html">utils::download_kml</a></li><li><a href="utils/fn.osmconvert.html">utils::osmconvert</a></li><li><a href="utils/fn.raw_to_map.html">utils::raw_to_map</a></li></ul></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="importer" data-search-js="../search-index.js"></div>
</h1><h3 id="Structs">Structs</h3><ul class="structs docblock"><li><a href="struct.Job.html">Job</a></li><li><a href="berlin/struct.Record.html">berlin::Record</a></li><li><a href="configuration/struct.ImporterConfiguration.html">configuration::ImporterConfiguration</a></li><li><a href="generic/struct.GenericCityImporter.html">generic::GenericCityImporter</a></li><li><a href="seattle/struct.StopTimeRecord.html">seattle::StopTimeRecord</a></li><li><a href="seattle/struct.TripRecord.html">seattle::TripRecord</a></li><li><a href="soundcast/popdat/struct.Endpoint.html">soundcast::popdat::Endpoint</a></li><li><a href="soundcast/popdat/struct.OrigTrip.html">soundcast::popdat::OrigTrip</a></li><li><a href="soundcast/popdat/struct.PopDat.html">soundcast::popdat::PopDat</a></li><li><a href="soundcast/popdat/struct.RawParcel.html">soundcast::popdat::RawParcel</a></li><li><a href="soundcast/popdat/struct.RawTrip.html">soundcast::popdat::RawTrip</a></li><li><a href="soundcast/trips/struct.Trip.html">soundcast::trips::Trip</a></li><li><a href="uk/struct.Record.html">uk::Record</a></li></ul><h3 id="Functions">Functions</h3><ul class="functions docblock"><li><a href="berlin/fn.correlate_population.html">berlin::correlate_population</a></li><li><a href="berlin/fn.distribute_residents.html">berlin::distribute_residents</a></li><li><a href="berlin/fn.import_extra_data.html">berlin::import_extra_data</a></li><li><a href="configuration/fn.load_configuration.html">configuration::load_configuration</a></li><li><a href="fn.main.html">main</a></li><li><a href="fn.oneshot.html">oneshot</a></li><li><a href="fn.regenerate_everything.html">regenerate_everything</a></li><li><a href="seattle/fn.add_gtfs_schedules.html">seattle::add_gtfs_schedules</a></li><li><a href="seattle/fn.adjust_private_parking.html">seattle::adjust_private_parking</a></li><li><a href="seattle/fn.ensure_popdat_exists.html">seattle::ensure_popdat_exists</a></li><li><a href="seattle/fn.input.html">seattle::input</a></li><li><a href="seattle/fn.match_parcels_to_buildings.html">seattle::match_parcels_to_buildings</a></li><li><a href="seattle/fn.osm_to_raw.html">seattle::osm_to_raw</a></li><li><a href="soundcast/popdat/fn.get_mode.html">soundcast::popdat::get_mode</a></li><li><a href="soundcast/popdat/fn.get_purpose.html">soundcast::popdat::get_purpose</a></li><li><a href="soundcast/popdat/fn.import_data.html">soundcast::popdat::import_data</a></li><li><a href="soundcast/popdat/fn.import_parcels.html">soundcast::popdat::import_parcels</a></li><li><a href="soundcast/popdat/fn.import_trips.html">soundcast::popdat::import_trips</a></li><li><a href="soundcast/trips/fn.clip_trips.html">soundcast::trips::clip_trips</a></li><li><a href="soundcast/trips/fn.endpoints.html">soundcast::trips::endpoints</a></li><li><a href="soundcast/trips/fn.make_weekday_scenario.html">soundcast::trips::make_weekday_scenario</a></li><li><a href="soundcast/trips/fn.other_border.html">soundcast::trips::other_border</a></li><li><a href="uk/fn.generate_scenario.html">uk::generate_scenario</a></li><li><a href="uk/fn.import_collision_data.html">uk::import_collision_data</a></li><li><a href="uk/fn.load_study_area.html">uk::load_study_area</a></li><li><a href="uk/fn.parse_desire_lines.html">uk::parse_desire_lines</a></li><li><a href="uk/fn.parse_zones.html">uk::parse_zones</a></li><li><a href="utils/fn.download.html">utils::download</a></li><li><a href="utils/fn.download_kml.html">utils::download_kml</a></li><li><a href="utils/fn.osmconvert.html">utils::osmconvert</a></li><li><a href="utils/fn.raw_to_map.html">utils::raw_to_map</a></li></ul></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="importer" data-search-js="../search-index.js"></div>
<script src="../main.js"></script></body></html>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `load_study_area` fn in crate `importer`."><meta name="keywords" content="rust, rustlang, rust-lang, load_study_area"><title>importer::uk::load_study_area - 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="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" role="button">&#9776;</div><a href='../../importer/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">importer</a>::<wbr><a href="index.html">uk</a></p><div id="sidebar-vars" data-name="load_study_area" 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"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></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><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">importer</a>::<wbr><a href="index.html">uk</a>::<wbr><a class="fn" href="">load_study_area</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/importer/uk.rs.html#240-258" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn load_study_area(map: &amp;<a class="struct" href="../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.38/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="importer" data-search-js="../../search-index.js"></div>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">importer</a>::<wbr><a href="index.html">uk</a>::<wbr><a class="fn" href="">load_study_area</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/importer/uk.rs.html#195-209" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn load_study_area(map: &amp;<a class="struct" href="../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.38/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="importer" data-search-js="../../search-index.js"></div>
<script src="../../main.js"></script></body></html>

View File

@ -1,5 +0,0 @@
<!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_polygon` fn in crate `importer`."><meta name="keywords" content="rust, rustlang, rust-lang, parse_polygon"><title>importer::uk::parse_polygon - 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="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" role="button">&#9776;</div><a href='../../importer/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">importer</a>::<wbr><a href="index.html">uk</a></p><div id="sidebar-vars" data-name="parse_polygon" 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"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></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><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">importer</a>::<wbr><a href="index.html">uk</a>::<wbr><a class="fn" href="">parse_polygon</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/importer/uk.rs.html#227-238" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn parse_polygon(<br>&nbsp;&nbsp;&nbsp;&nbsp;input: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>&gt;&gt;&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;gps_bounds: &amp;<a class="struct" href="../../geom/bounds/struct.GPSBounds.html" title="struct geom::bounds::GPSBounds">GPSBounds</a><br>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.38/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="importer" data-search-js="../../search-index.js"></div>
<script src="../../main.js"></script></body></html>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `parse_zones` fn in crate `importer`."><meta name="keywords" content="rust, rustlang, rust-lang, parse_zones"><title>importer::uk::parse_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="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" role="button">&#9776;</div><a href='../../importer/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">importer</a>::<wbr><a href="index.html">uk</a></p><div id="sidebar-vars" data-name="parse_zones" 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"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></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><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">importer</a>::<wbr><a href="index.html">uk</a>::<wbr><a class="fn" href="">parse_zones</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/importer/uk.rs.html#186-224" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn parse_zones(<br>&nbsp;&nbsp;&nbsp;&nbsp;gps_bounds: &amp;<a class="struct" href="../../geom/bounds/struct.GPSBounds.html" title="struct geom::bounds::GPSBounds">GPSBounds</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;path: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a><br>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.38/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<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="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>&gt;&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="importer" data-search-js="../../search-index.js"></div>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">importer</a>::<wbr><a href="index.html">uk</a>::<wbr><a class="fn" href="">parse_zones</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/importer/uk.rs.html#186-193" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn parse_zones(<br>&nbsp;&nbsp;&nbsp;&nbsp;gps_bounds: &amp;<a class="struct" href="../../geom/bounds/struct.GPSBounds.html" title="struct geom::bounds::GPSBounds">GPSBounds</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;path: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a><br>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.38/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<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="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>&gt;&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="importer" data-search-js="../../search-index.js"></div>
<script src="../../main.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 `uk` mod in crate `importer`."><meta name="keywords" content="rust, rustlang, rust-lang, uk"><title>importer::uk - 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="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" role="button">&#9776;</div><a href='../../importer/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module uk</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">importer</a></p><div id="sidebar-vars" data-name="uk" 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"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></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><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">importer</a>::<wbr><a class="mod" href="">uk</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/importer/uk.rs.html#1-258" title="goto source code">[src]</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" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">importer</a>::<wbr><a class="mod" href="">uk</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/importer/uk.rs.html#1-209" title="goto source code">[src]</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.Record.html" title="importer::uk::Record struct">Record</a></td><td class="docblock-short"></td></tr></table><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>
<table><tr class="module-item"><td><a class="fn" href="fn.generate_scenario.html" title="importer::uk::generate_scenario fn">generate_scenario</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.import_collision_data.html" title="importer::uk::import_collision_data fn">import_collision_data</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.load_study_area.html" title="importer::uk::load_study_area fn">load_study_area</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.parse_desire_lines.html" title="importer::uk::parse_desire_lines fn">parse_desire_lines</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.parse_polygon.html" title="importer::uk::parse_polygon fn">parse_polygon</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.parse_zones.html" title="importer::uk::parse_zones fn">parse_zones</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="importer" data-search-js="../../search-index.js"></div>
<table><tr class="module-item"><td><a class="fn" href="fn.generate_scenario.html" title="importer::uk::generate_scenario fn">generate_scenario</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.import_collision_data.html" title="importer::uk::import_collision_data fn">import_collision_data</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.load_study_area.html" title="importer::uk::load_study_area fn">load_study_area</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.parse_desire_lines.html" title="importer::uk::parse_desire_lines fn">parse_desire_lines</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.parse_zones.html" title="importer::uk::parse_zones fn">parse_zones</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="importer" data-search-js="../../search-index.js"></div>
<script src="../../main.js"></script></body></html>

View File

@ -1 +1 @@
initSidebarItems({"fn":[["generate_scenario",""],["import_collision_data",""],["load_study_area",""],["parse_desire_lines",""],["parse_polygon",""],["parse_zones",""]],"struct":[["Record",""]]});
initSidebarItems({"fn":[["generate_scenario",""],["import_collision_data",""],["load_study_area",""],["parse_desire_lines",""],["parse_zones",""]],"struct":[["Record",""]]});

File diff suppressed because one or more lines are too long

View File

@ -166,8 +166,6 @@
<span id="163">163</span>
<span id="164">164</span>
<span id="165">165</span>
<span id="166">166</span>
<span id="167">167</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>, <span class="ident">HashSet</span>};
@ -312,8 +310,6 @@
<span class="doccomment">/// between arguments. So for instance &quot;?--dev&amp;--color_scheme=night%20mode&quot; becomes vec![&quot;--dev&quot;,</span>
<span class="doccomment">/// &quot;--color_scheme=night mode&quot;].</span>
<span class="kw">fn</span> <span class="ident">parse_args</span>() <span class="op">-</span><span class="op">&gt;</span> <span class="ident">anyhow</span>::<span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">String</span><span class="op">&gt;</span><span class="op">&gt;</span> {
<span class="kw">use</span> <span class="ident">anyhow</span>::{<span class="ident">anyhow</span>, <span class="ident">bail</span>};
<span class="kw">let</span> <span class="ident">window</span> <span class="op">=</span> <span class="ident">web_sys</span>::<span class="ident">window</span>().<span class="ident">ok_or</span>(<span class="macro">anyhow</span><span class="macro">!</span>(<span class="string">&quot;no window?&quot;</span>))<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">url</span> <span class="op">=</span> <span class="ident">window</span>.<span class="ident">location</span>().<span class="ident">href</span>().<span class="ident">map_err</span>(<span class="op">|</span><span class="ident">err</span><span class="op">|</span> {
<span class="macro">anyhow</span><span class="macro">!</span>(<span class="ident">err</span>

View File

@ -366,11 +366,19 @@
<span id="363">363</span>
<span id="364">364</span>
<span id="365">365</span>
<span id="366">366</span>
<span id="367">367</span>
<span id="368">368</span>
<span id="369">369</span>
<span id="370">370</span>
<span id="371">371</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">cmp</span>::<span class="ident">Ord</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">collections</span>::{<span class="ident">BTreeMap</span>, <span class="ident">BTreeSet</span>};
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">marker</span>::<span class="ident">PhantomData</span>;
<span class="kw">use</span> <span class="ident">anyhow</span>::<span class="prelude-ty">Result</span>;
<span class="kw">use</span> <span class="ident">itertools</span>::<span class="ident">Itertools</span>;
<span class="kw">use</span> <span class="ident">serde</span>::{<span class="ident">Deserialize</span>, <span class="ident">Serialize</span>};
@ -627,6 +635,10 @@
<span class="self">self</span>.<span class="number">0</span>.<span class="ident">get</span>(<span class="ident">k</span>)
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">get_result</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">k</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="kw-2">&amp;</span><span class="ident">String</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="number">0</span>.<span class="ident">get</span>(<span class="ident">k</span>).<span class="ident">ok_or_else</span>(<span class="op">|</span><span class="op">|</span> <span class="macro">anyhow</span><span class="macro">!</span>(<span class="string">&quot;missing {}&quot;</span>, <span class="ident">k</span>))
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">contains_key</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">k</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">bool</span> {
<span class="self">self</span>.<span class="number">0</span>.<span class="ident">contains_key</span>(<span class="ident">k</span>)
}

View File

@ -27,6 +27,9 @@
<span id="24">24</span>
<span id="25">25</span>
<span id="26">26</span>
<span id="27">27</span>
<span id="28">28</span>
<span id="29">29</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="doccomment">//! The contents of this crate need to be organized better:</span>
<span class="doccomment">//!</span>
@ -36,6 +39,9 @@
<span class="attribute">#![<span class="ident">allow</span>(<span class="ident">clippy</span>::<span class="ident">ptr_arg</span>)]</span> <span class="comment">// very noisy</span>
<span class="attribute">#![<span class="ident">allow</span>(<span class="ident">clippy</span>::<span class="ident">new_without_default</span>)]</span>
<span class="attribute">#[<span class="ident">macro_use</span>]</span>
<span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">anyhow</span>;
<span class="comment">// I&#39;m not generally a fan of wildcard exports, but they&#39;re more maintable here.</span>
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">serde</span>::<span class="kw-2">*</span>;
<span class="kw">pub</span> <span class="kw">use</span> <span class="ident">cli</span>::<span class="kw-2">*</span>;

View File

@ -168,32 +168,6 @@
<span id="165">165</span>
<span id="166">166</span>
<span id="167">167</span>
<span id="168">168</span>
<span id="169">169</span>
<span id="170">170</span>
<span id="171">171</span>
<span id="172">172</span>
<span id="173">173</span>
<span id="174">174</span>
<span id="175">175</span>
<span id="176">176</span>
<span id="177">177</span>
<span id="178">178</span>
<span id="179">179</span>
<span id="180">180</span>
<span id="181">181</span>
<span id="182">182</span>
<span id="183">183</span>
<span id="184">184</span>
<span id="185">185</span>
<span id="186">186</span>
<span id="187">187</span>
<span id="188">188</span>
<span id="189">189</span>
<span id="190">190</span>
<span id="191">191</span>
<span id="192">192</span>
<span id="193">193</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="attribute">#[<span class="ident">macro_use</span>]</span>
<span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">anyhow</span>;
@ -204,7 +178,7 @@
<span class="kw">use</span> <span class="ident">abstio</span>::<span class="ident">MapName</span>;
<span class="kw">use</span> <span class="ident">abstutil</span>::{<span class="ident">Tags</span>, <span class="ident">Timer</span>};
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Distance</span>, <span class="ident">FindClosest</span>, <span class="ident">GPSBounds</span>, <span class="ident">LonLat</span>, <span class="ident">Pt2D</span>, <span class="ident">Ring</span>};
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Distance</span>, <span class="ident">FindClosest</span>, <span class="ident">GPSBounds</span>, <span class="ident">LonLat</span>, <span class="ident">Polygon</span>, <span class="ident">Pt2D</span>, <span class="ident">Ring</span>};
<span class="kw">use</span> <span class="ident">map_model</span>::<span class="ident">raw</span>::<span class="ident">RawMap</span>;
<span class="kw">use</span> <span class="ident">map_model</span>::{<span class="ident">osm</span>, <span class="ident">raw</span>, <span class="ident">Amenity</span>, <span class="ident">MapConfig</span>};
<span class="kw">use</span> <span class="ident">serde</span>::{<span class="ident">Deserialize</span>, <span class="ident">Serialize</span>};
@ -342,35 +316,10 @@
}
<span class="kw">fn</span> <span class="ident">add_extra_buildings</span>(<span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">RawMap</span>, <span class="ident">path</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Result</span><span class="op">&lt;</span>()<span class="op">&gt;</span> {
<span class="comment">// TODO Refactor code that just extracts polygons from geojson.</span>
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">polygons</span> <span class="op">=</span> <span class="ident">Vec</span>::<span class="ident">new</span>();
<span class="kw">let</span> <span class="ident">bytes</span> <span class="op">=</span> <span class="ident">abstio</span>::<span class="ident">slurp_file</span>(<span class="ident">path</span>)<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">raw_string</span> <span class="op">=</span> <span class="ident">std</span>::<span class="ident">str</span>::<span class="ident">from_utf8</span>(<span class="kw-2">&amp;</span><span class="ident">bytes</span>)<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">geojson</span> <span class="op">=</span> <span class="ident">raw_string</span>.<span class="ident">parse</span>::<span class="op">&lt;</span><span class="ident">geojson</span>::<span class="ident">GeoJson</span><span class="op">&gt;</span>()<span class="question-mark">?</span>;
<span class="kw">if</span> <span class="kw">let</span> <span class="ident">geojson</span>::<span class="ident">GeoJson</span>::<span class="ident">FeatureCollection</span>(<span class="ident">collection</span>) <span class="op">=</span> <span class="ident">geojson</span> {
<span class="kw">for</span> <span class="ident">feature</span> <span class="kw">in</span> <span class="ident">collection</span>.<span class="ident">features</span> {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">geom</span>) <span class="op">=</span> <span class="ident">feature</span>.<span class="ident">geometry</span> {
<span class="kw">if</span> <span class="kw">let</span> <span class="ident">geojson</span>::<span class="ident">Value</span>::<span class="ident">Polygon</span>(<span class="ident">raw_pts</span>) <span class="op">=</span> <span class="ident">geom</span>.<span class="ident">value</span> {
<span class="comment">// TODO Handle holes, and also, refactor this!</span>
<span class="kw">let</span> <span class="ident">gps_pts</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">LonLat</span><span class="op">&gt;</span> <span class="op">=</span> <span class="ident">raw_pts</span>[<span class="number">0</span>]
.<span class="ident">iter</span>()
.<span class="ident">map</span>(<span class="op">|</span><span class="ident">pt</span><span class="op">|</span> <span class="ident">LonLat</span>::<span class="ident">new</span>(<span class="ident">pt</span>[<span class="number">0</span>], <span class="ident">pt</span>[<span class="number">1</span>]))
.<span class="ident">collect</span>();
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">pts</span>) <span class="op">=</span> <span class="ident">map</span>.<span class="ident">gps_bounds</span>.<span class="ident">try_convert</span>(<span class="kw-2">&amp;</span><span class="ident">gps_pts</span>) {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Ok</span>(<span class="ident">ring</span>) <span class="op">=</span> <span class="ident">Ring</span>::<span class="ident">new</span>(<span class="ident">pts</span>) {
<span class="ident">polygons</span>.<span class="ident">push</span>(<span class="ident">ring</span>.<span class="ident">into_polygon</span>());
}
}
}
}
}
}
<span class="comment">// Add these as new buildings, generating a new dummy OSM ID.</span>
<span class="kw">let</span> <span class="ident">require_in_bounds</span> <span class="op">=</span> <span class="bool-val">true</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">id</span> <span class="op">=</span> <span class="op">-</span><span class="number">1</span>;
<span class="kw">for</span> <span class="ident">polygon</span> <span class="kw">in</span> <span class="ident">polygons</span> {
<span class="kw">for</span> (<span class="ident">polygon</span>, <span class="kw">_</span>) <span class="kw">in</span> <span class="ident">Polygon</span>::<span class="ident">from_geojson_file</span>(<span class="ident">path</span>, <span class="kw-2">&amp;</span><span class="ident">map</span>.<span class="ident">gps_bounds</span>, <span class="ident">require_in_bounds</span>)<span class="question-mark">?</span> {
<span class="comment">// Add these as new buildings, generating a new dummy OSM ID.</span>
<span class="ident">map</span>.<span class="ident">buildings</span>.<span class="ident">insert</span>(
<span class="ident">osm</span>::<span class="ident">OsmID</span>::<span class="ident">Way</span>(<span class="ident">osm</span>::<span class="ident">WayID</span>(<span class="ident">id</span>)),
<span class="ident">raw</span>::<span class="ident">RawBuilding</span> {
@ -385,7 +334,6 @@
<span class="comment">// new OSM IDs.</span>
<span class="ident">id</span> <span class="op">-</span><span class="op">=</span> <span class="op">-</span><span class="number">1</span>;
}
<span class="prelude-val">Ok</span>(())
}
</pre></div>

View File

@ -893,28 +893,6 @@
<span id="890">890</span>
<span id="891">891</span>
<span id="892">892</span>
<span id="893">893</span>
<span id="894">894</span>
<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>
<span id="901">901</span>
<span id="902">902</span>
<span id="903">903</span>
<span id="904">904</span>
<span id="905">905</span>
<span id="906">906</span>
<span id="907">907</span>
<span id="908">908</span>
<span id="909">909</span>
<span id="910">910</span>
<span id="911">911</span>
<span id="912">912</span>
<span id="913">913</span>
<span id="914">914</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">cell</span>::<span class="ident">RefCell</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">collections</span>::<span class="ident">BTreeMap</span>;
@ -924,8 +902,8 @@
<span class="kw">use</span> <span class="ident">rand</span>::<span class="ident">seq</span>::{<span class="ident">IteratorRandom</span>, <span class="ident">SliceRandom</span>};
<span class="kw">use</span> <span class="ident">abstio</span>::<span class="ident">MapName</span>;
<span class="kw">use</span> <span class="ident">abstutil</span>::{<span class="ident">Tags</span>, <span class="ident">Timer</span>};
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Bounds</span>, <span class="ident">Circle</span>, <span class="ident">Distance</span>, <span class="ident">Duration</span>, <span class="ident">LonLat</span>, <span class="ident">Pt2D</span>, <span class="ident">Ring</span>, <span class="ident">Time</span>};
<span class="kw">use</span> <span class="ident">abstutil</span>::<span class="ident">Timer</span>;
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Bounds</span>, <span class="ident">Circle</span>, <span class="ident">Distance</span>, <span class="ident">Duration</span>, <span class="ident">Polygon</span>, <span class="ident">Pt2D</span>, <span class="ident">Time</span>};
<span class="kw">use</span> <span class="ident">map_gui</span>::<span class="ident">colors</span>::<span class="ident">ColorScheme</span>;
<span class="kw">use</span> <span class="ident">map_gui</span>::<span class="ident">load</span>::<span class="ident">FileLoader</span>;
<span class="kw">use</span> <span class="ident">map_gui</span>::<span class="ident">options</span>::<span class="ident">Options</span>;
@ -1798,36 +1776,14 @@
<span class="doccomment">/// Load an extra GeoJSON file, and add the area to the map dynamically.</span>
<span class="kw">fn</span> <span class="ident">add_study_area</span>(<span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">Map</span>, <span class="ident">name</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Result</span><span class="op">&lt;</span>()<span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">bytes</span> <span class="op">=</span> <span class="ident">abstio</span>::<span class="ident">slurp_file</span>(<span class="ident">abstio</span>::<span class="ident">path</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;system/study_areas/{}.geojson&quot;</span>, <span class="ident">name</span>)))<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">raw_string</span> <span class="op">=</span> <span class="ident">std</span>::<span class="ident">str</span>::<span class="ident">from_utf8</span>(<span class="kw-2">&amp;</span><span class="ident">bytes</span>)<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">geojson</span> <span class="op">=</span> <span class="ident">raw_string</span>.<span class="ident">parse</span>::<span class="op">&lt;</span><span class="ident">geojson</span>::<span class="ident">GeoJson</span><span class="op">&gt;</span>()<span class="question-mark">?</span>;
<span class="kw">if</span> <span class="kw">let</span> <span class="ident">geojson</span>::<span class="ident">GeoJson</span>::<span class="ident">FeatureCollection</span>(<span class="ident">collection</span>) <span class="op">=</span> <span class="ident">geojson</span> {
<span class="kw">for</span> <span class="ident">feature</span> <span class="kw">in</span> <span class="ident">collection</span>.<span class="ident">features</span> {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">geom</span>) <span class="op">=</span> <span class="ident">feature</span>.<span class="ident">geometry</span> {
<span class="kw">if</span> <span class="kw">let</span> <span class="ident">geojson</span>::<span class="ident">Value</span>::<span class="ident">Polygon</span>(<span class="ident">raw_pts</span>) <span class="op">=</span> <span class="ident">geom</span>.<span class="ident">value</span> {
<span class="comment">// TODO Handle holes, and also, refactor this!</span>
<span class="kw">let</span> <span class="ident">gps_pts</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">LonLat</span><span class="op">&gt;</span> <span class="op">=</span> <span class="ident">raw_pts</span>[<span class="number">0</span>]
.<span class="ident">iter</span>()
.<span class="ident">map</span>(<span class="op">|</span><span class="ident">pt</span><span class="op">|</span> <span class="ident">LonLat</span>::<span class="ident">new</span>(<span class="ident">pt</span>[<span class="number">0</span>], <span class="ident">pt</span>[<span class="number">1</span>]))
.<span class="ident">collect</span>();
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">pts</span>) <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_gps_bounds</span>().<span class="ident">try_convert</span>(<span class="kw-2">&amp;</span><span class="ident">gps_pts</span>) {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">tags</span> <span class="op">=</span> <span class="ident">Tags</span>::<span class="ident">empty</span>();
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">props</span>) <span class="op">=</span> <span class="ident">feature</span>.<span class="ident">properties</span> {
<span class="kw">for</span> (<span class="ident">k</span>, <span class="ident">v</span>) <span class="kw">in</span> <span class="ident">props</span> {
<span class="ident">tags</span>.<span class="ident">insert</span>(<span class="ident">k</span>, <span class="ident">v</span>.<span class="ident">to_string</span>());
}
}
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Ok</span>(<span class="ident">ring</span>) <span class="op">=</span> <span class="ident">Ring</span>::<span class="ident">new</span>(<span class="ident">pts</span>) {
<span class="ident">map</span>.<span class="ident">hack_add_area</span>(<span class="ident">AreaType</span>::<span class="ident">StudyArea</span>, <span class="ident">ring</span>.<span class="ident">into_polygon</span>(), <span class="ident">tags</span>);
}
}
}
}
}
<span class="kw">let</span> <span class="ident">require_in_bounds</span> <span class="op">=</span> <span class="bool-val">true</span>;
<span class="kw">for</span> (<span class="ident">polygon</span>, <span class="ident">tags</span>) <span class="kw">in</span> <span class="ident">Polygon</span>::<span class="ident">from_geojson_file</span>(
<span class="ident">abstio</span>::<span class="ident">path</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;system/study_areas/{}.geojson&quot;</span>, <span class="ident">name</span>)),
<span class="ident">map</span>.<span class="ident">get_gps_bounds</span>(),
<span class="ident">require_in_bounds</span>,
)<span class="question-mark">?</span> {
<span class="ident">map</span>.<span class="ident">hack_add_area</span>(<span class="ident">AreaType</span>::<span class="ident">StudyArea</span>, <span class="ident">polygon</span>, <span class="ident">tags</span>);
}
<span class="prelude-val">Ok</span>(())
}
</pre></div>

View File

@ -122,7 +122,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.52.1 (9bc8c42bb 2021-05-09)&quot;</span>;
<span class="doccomment">/// The built-time in RFC2822, UTC</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;Sat, 15 May 2021 00:39:58 +0000&quot;</span>;
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;Sat, 15 May 2021 16:13:54 +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

@ -606,11 +606,80 @@
<span id="603">603</span>
<span id="604">604</span>
<span id="605">605</span>
<span id="606">606</span>
<span id="607">607</span>
<span id="608">608</span>
<span id="609">609</span>
<span id="610">610</span>
<span id="611">611</span>
<span id="612">612</span>
<span id="613">613</span>
<span id="614">614</span>
<span id="615">615</span>
<span id="616">616</span>
<span id="617">617</span>
<span id="618">618</span>
<span id="619">619</span>
<span id="620">620</span>
<span id="621">621</span>
<span id="622">622</span>
<span id="623">623</span>
<span id="624">624</span>
<span id="625">625</span>
<span id="626">626</span>
<span id="627">627</span>
<span id="628">628</span>
<span id="629">629</span>
<span id="630">630</span>
<span id="631">631</span>
<span id="632">632</span>
<span id="633">633</span>
<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>
<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>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">convert</span>::<span class="ident">TryFrom</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">fmt</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::<span class="ident">Path</span>;
<span class="kw">use</span> <span class="ident">anyhow</span>::<span class="prelude-ty">Result</span>;
<span class="kw">use</span> <span class="ident">anyhow</span>::{<span class="ident">Context</span>, <span class="prelude-ty">Result</span>};
<span class="kw">use</span> <span class="ident">geo</span>::<span class="ident">algorithm</span>::<span class="ident">area</span>::<span class="ident">Area</span>;
<span class="kw">use</span> <span class="ident">geo</span>::<span class="ident">algorithm</span>::<span class="ident">concave_hull</span>::<span class="ident">ConcaveHull</span>;
<span class="kw">use</span> <span class="ident">geo</span>::<span class="ident">algorithm</span>::<span class="ident">convex_hull</span>::<span class="ident">ConvexHull</span>;
@ -618,7 +687,11 @@
<span class="kw">use</span> <span class="ident">geo_booleanop</span>::<span class="ident">boolean</span>::<span class="ident">BooleanOp</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">Angle</span>, <span class="ident">Bounds</span>, <span class="ident">CornerRadii</span>, <span class="ident">Distance</span>, <span class="ident">GPSBounds</span>, <span class="ident">HashablePt2D</span>, <span class="ident">PolyLine</span>, <span class="ident">Pt2D</span>, <span class="ident">Ring</span>};
<span class="kw">use</span> <span class="ident">abstutil</span>::<span class="ident">Tags</span>;
<span class="kw">use</span> <span class="kw">crate</span>::{
<span class="ident">Angle</span>, <span class="ident">Bounds</span>, <span class="ident">CornerRadii</span>, <span class="ident">Distance</span>, <span class="ident">GPSBounds</span>, <span class="ident">HashablePt2D</span>, <span class="ident">LonLat</span>, <span class="ident">PolyLine</span>, <span class="ident">Pt2D</span>, <span class="ident">Ring</span>,
};
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">PartialEq</span>, <span class="ident">Serialize</span>, <span class="ident">Deserialize</span>, <span class="ident">Clone</span>, <span class="ident">Debug</span>)]</span>
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Polygon</span> {
@ -1082,6 +1155,19 @@
<span class="ident">geojson</span>::<span class="ident">Geometry</span>::<span class="ident">new</span>(<span class="ident">geojson</span>::<span class="ident">Value</span>::<span class="ident">MultiPolygon</span>(<span class="ident">polygons</span>))
}
<span class="doccomment">/// Extracts all polygons from a GeoJSON file, along with the string key/value properties. Only</span>
<span class="doccomment">/// the first polygon from multipolygons is returned. If `require_in_bounds` is set, then the</span>
<span class="doccomment">/// polygon must completely fit within the `gps_bounds`.</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">from_geojson_file</span><span class="op">&lt;</span><span class="ident">P</span>: <span class="ident">AsRef</span><span class="op">&lt;</span><span class="ident">Path</span><span class="op">&gt;</span><span class="op">&gt;</span>(
<span class="ident">path</span>: <span class="ident">P</span>,
<span class="ident">gps_bounds</span>: <span class="kw-2">&amp;</span><span class="ident">GPSBounds</span>,
<span class="ident">require_in_bounds</span>: <span class="ident">bool</span>,
) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">Vec</span><span class="op">&lt;</span>(<span class="ident">Polygon</span>, <span class="ident">Tags</span>)<span class="op">&gt;</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">path</span> <span class="op">=</span> <span class="ident">path</span>.<span class="ident">as_ref</span>();
<span class="ident">from_geojson_file_inner</span>(<span class="ident">path</span>, <span class="ident">gps_bounds</span>, <span class="ident">require_in_bounds</span>)
.<span class="ident">with_context</span>(<span class="op">|</span><span class="op">|</span> <span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;polygons from {}&quot;</span>, <span class="ident">path</span>.<span class="ident">display</span>()))
}
}
<span class="kw">impl</span> <span class="ident">fmt</span>::<span class="ident">Display</span> <span class="kw">for</span> <span class="ident">Polygon</span> {
@ -1212,6 +1298,56 @@
}
<span class="ident">output</span>
}
<span class="kw">fn</span> <span class="ident">from_geojson_file_inner</span>(
<span class="ident">path</span>: <span class="kw-2">&amp;</span><span class="ident">Path</span>,
<span class="ident">gps_bounds</span>: <span class="kw-2">&amp;</span><span class="ident">GPSBounds</span>,
<span class="ident">require_in_bounds</span>: <span class="ident">bool</span>,
) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">Vec</span><span class="op">&lt;</span>(<span class="ident">Polygon</span>, <span class="ident">Tags</span>)<span class="op">&gt;</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">raw_string</span> <span class="op">=</span> <span class="ident">std</span>::<span class="ident">fs</span>::<span class="ident">read_to_string</span>(<span class="ident">path</span>)<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">geojson</span> <span class="op">=</span> <span class="ident">raw_string</span>.<span class="ident">parse</span>::<span class="op">&lt;</span><span class="ident">geojson</span>::<span class="ident">GeoJson</span><span class="op">&gt;</span>()<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">features</span> <span class="op">=</span> <span class="kw">match</span> <span class="ident">geojson</span> {
<span class="ident">geojson</span>::<span class="ident">GeoJson</span>::<span class="ident">Feature</span>(<span class="ident">feature</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="macro">vec</span><span class="macro">!</span>[<span class="ident">feature</span>],
<span class="ident">geojson</span>::<span class="ident">GeoJson</span>::<span class="ident">FeatureCollection</span>(<span class="ident">collection</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="ident">collection</span>.<span class="ident">features</span>,
<span class="kw">_</span> <span class="op">=</span><span class="op">&gt;</span> <span class="ident">anyhow</span>::<span class="macro">bail</span><span class="macro">!</span>(<span class="string">&quot;Unexpected geojson: {:?}&quot;</span>, <span class="ident">geojson</span>),
};
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">results</span> <span class="op">=</span> <span class="ident">Vec</span>::<span class="ident">new</span>();
<span class="kw">for</span> <span class="ident">feature</span> <span class="kw">in</span> <span class="ident">features</span> {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">geom</span>) <span class="op">=</span> <span class="kw-2">&amp;</span><span class="ident">feature</span>.<span class="ident">geometry</span> {
<span class="kw">let</span> <span class="ident">raw_pts</span> <span class="op">=</span> <span class="kw">match</span> <span class="kw-2">&amp;</span><span class="ident">geom</span>.<span class="ident">value</span> {
<span class="ident">geojson</span>::<span class="ident">Value</span>::<span class="ident">Polygon</span>(<span class="ident">pts</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="ident">pts</span>,
<span class="comment">// If there are multiple, just use the first</span>
<span class="ident">geojson</span>::<span class="ident">Value</span>::<span class="ident">MultiPolygon</span>(<span class="ident">polygons</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="kw-2">&amp;</span><span class="ident">polygons</span>[<span class="number">0</span>],
<span class="kw">_</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">continue</span>;
}
};
<span class="comment">// TODO Handle holes</span>
<span class="kw">let</span> <span class="ident">gps_pts</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">LonLat</span><span class="op">&gt;</span> <span class="op">=</span> <span class="ident">raw_pts</span>[<span class="number">0</span>]
.<span class="ident">iter</span>()
.<span class="ident">map</span>(<span class="op">|</span><span class="ident">pt</span><span class="op">|</span> <span class="ident">LonLat</span>::<span class="ident">new</span>(<span class="ident">pt</span>[<span class="number">0</span>], <span class="ident">pt</span>[<span class="number">1</span>]))
.<span class="ident">collect</span>();
<span class="kw">let</span> <span class="ident">pts</span> <span class="op">=</span> <span class="kw">if</span> <span class="op">!</span><span class="ident">require_in_bounds</span> {
<span class="ident">gps_bounds</span>.<span class="ident">convert</span>(<span class="kw-2">&amp;</span><span class="ident">gps_pts</span>)
} <span class="kw">else</span> <span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">pts</span>) <span class="op">=</span> <span class="ident">gps_bounds</span>.<span class="ident">try_convert</span>(<span class="kw-2">&amp;</span><span class="ident">gps_pts</span>) {
<span class="ident">pts</span>
} <span class="kw">else</span> {
<span class="kw">continue</span>;
};
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Ok</span>(<span class="ident">ring</span>) <span class="op">=</span> <span class="ident">Ring</span>::<span class="ident">new</span>(<span class="ident">pts</span>) {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">tags</span> <span class="op">=</span> <span class="ident">Tags</span>::<span class="ident">empty</span>();
<span class="kw">for</span> (<span class="ident">key</span>, <span class="ident">value</span>) <span class="kw">in</span> <span class="ident">feature</span>.<span class="ident">properties_iter</span>() {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">value</span>) <span class="op">=</span> <span class="ident">value</span>.<span class="ident">as_str</span>() {
<span class="ident">tags</span>.<span class="ident">insert</span>(<span class="ident">key</span>, <span class="ident">value</span>);
}
}
<span class="ident">results</span>.<span class="ident">push</span>((<span class="ident">ring</span>.<span class="ident">into_polygon</span>(), <span class="ident">tags</span>));
}
}
}
<span class="prelude-val">Ok</span>(<span class="ident">results</span>)
}
</pre></div>
</section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="geom" data-search-js="../../search-index.js"></div>
<script src="../../main.js"></script><script src="../../source-script.js"></script><script src="../../source-files.js"></script></body></html>

View File

@ -210,55 +210,6 @@
<span id="207">207</span>
<span id="208">208</span>
<span id="209">209</span>
<span id="210">210</span>
<span id="211">211</span>
<span id="212">212</span>
<span id="213">213</span>
<span id="214">214</span>
<span id="215">215</span>
<span id="216">216</span>
<span id="217">217</span>
<span id="218">218</span>
<span id="219">219</span>
<span id="220">220</span>
<span id="221">221</span>
<span id="222">222</span>
<span id="223">223</span>
<span id="224">224</span>
<span id="225">225</span>
<span id="226">226</span>
<span id="227">227</span>
<span id="228">228</span>
<span id="229">229</span>
<span id="230">230</span>
<span id="231">231</span>
<span id="232">232</span>
<span id="233">233</span>
<span id="234">234</span>
<span id="235">235</span>
<span id="236">236</span>
<span id="237">237</span>
<span id="238">238</span>
<span id="239">239</span>
<span id="240">240</span>
<span id="241">241</span>
<span id="242">242</span>
<span id="243">243</span>
<span id="244">244</span>
<span id="245">245</span>
<span id="246">246</span>
<span id="247">247</span>
<span id="248">248</span>
<span id="249">249</span>
<span id="250">250</span>
<span id="251">251</span>
<span id="252">252</span>
<span id="253">253</span>
<span id="254">254</span>
<span id="255">255</span>
<span id="256">256</span>
<span id="257">257</span>
<span id="258">258</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>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">fs</span>::<span class="ident">File</span>;
@ -270,7 +221,7 @@
<span class="kw">use</span> <span class="ident">abstio</span>::<span class="ident">path_shared_input</span>;
<span class="kw">use</span> <span class="ident">abstutil</span>::{<span class="ident">prettyprint_usize</span>, <span class="ident">Timer</span>};
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">GPSBounds</span>, <span class="ident">LonLat</span>, <span class="ident">Polygon</span>, <span class="ident">Ring</span>};
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">GPSBounds</span>, <span class="ident">Polygon</span>};
<span class="kw">use</span> <span class="ident">map_model</span>::<span class="ident">raw</span>::<span class="ident">RawMap</span>;
<span class="kw">use</span> <span class="ident">map_model</span>::<span class="ident">Map</span>;
<span class="kw">use</span> <span class="ident">popdat</span>::<span class="ident">od</span>::<span class="ident">DesireLine</span>;
@ -447,76 +398,27 @@
<span class="comment">// Transforms all zones into the map&#39;s coordinate space, no matter how far out-of-bounds they are.</span>
<span class="kw">fn</span> <span class="ident">parse_zones</span>(<span class="ident">gps_bounds</span>: <span class="kw-2">&amp;</span><span class="ident">GPSBounds</span>, <span class="ident">path</span>: <span class="ident">String</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">HashMap</span><span class="op">&lt;</span><span class="ident">String</span>, <span class="ident">Polygon</span><span class="op">&gt;</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">zones</span> <span class="op">=</span> <span class="ident">HashMap</span>::<span class="ident">new</span>();
<span class="kw">let</span> <span class="ident">bytes</span> <span class="op">=</span> <span class="ident">abstio</span>::<span class="ident">slurp_file</span>(<span class="ident">path</span>)<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">raw_string</span> <span class="op">=</span> <span class="ident">std</span>::<span class="ident">str</span>::<span class="ident">from_utf8</span>(<span class="kw-2">&amp;</span><span class="ident">bytes</span>)<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">geojson</span> <span class="op">=</span> <span class="ident">raw_string</span>.<span class="ident">parse</span>::<span class="op">&lt;</span><span class="ident">geojson</span>::<span class="ident">GeoJson</span><span class="op">&gt;</span>()<span class="question-mark">?</span>;
<span class="kw">if</span> <span class="kw">let</span> <span class="ident">geojson</span>::<span class="ident">GeoJson</span>::<span class="ident">FeatureCollection</span>(<span class="ident">collection</span>) <span class="op">=</span> <span class="ident">geojson</span> {
<span class="kw">for</span> <span class="ident">feature</span> <span class="kw">in</span> <span class="ident">collection</span>.<span class="ident">features</span> {
<span class="kw">let</span> <span class="ident">zone</span> <span class="op">=</span> <span class="ident">feature</span>
.<span class="ident">property</span>(<span class="string">&quot;geo_code&quot;</span>)
.<span class="ident">and_then</span>(<span class="op">|</span><span class="ident">x</span><span class="op">|</span> <span class="ident">x</span>.<span class="ident">as_str</span>())
.<span class="ident">ok_or_else</span>(<span class="op">|</span><span class="op">|</span> <span class="macro">anyhow</span><span class="macro">!</span>(<span class="string">&quot;no geo_code&quot;</span>))<span class="question-mark">?</span>
.<span class="ident">to_string</span>();
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">geom</span>) <span class="op">=</span> <span class="ident">feature</span>.<span class="ident">geometry</span> {
<span class="kw">if</span> <span class="kw">let</span> <span class="ident">geojson</span>::<span class="ident">Value</span>::<span class="ident">MultiPolygon</span>(<span class="kw-2">mut</span> <span class="ident">raw_polygons</span>) <span class="op">=</span> <span class="ident">geom</span>.<span class="ident">value</span> {
<span class="kw">if</span> <span class="ident">raw_polygons</span>.<span class="ident">len</span>() <span class="op">!</span><span class="op">=</span> <span class="number">1</span> {
<span class="comment">// We&#39;ll just one of them arbitrarily</span>
<span class="macro">warn</span><span class="macro">!</span>(
<span class="string">&quot;Zone {} has a multipolygon with {} members&quot;</span>,
<span class="ident">zone</span>,
<span class="ident">raw_polygons</span>.<span class="ident">len</span>()
);
}
<span class="kw">match</span> <span class="ident">parse_polygon</span>(<span class="ident">raw_polygons</span>.<span class="ident">pop</span>().<span class="ident">unwrap</span>(), <span class="ident">gps_bounds</span>) {
<span class="prelude-val">Ok</span>(<span class="ident">polygon</span>) <span class="op">=</span><span class="op">&gt;</span> {
<span class="ident">zones</span>.<span class="ident">insert</span>(<span class="ident">zone</span>, <span class="ident">polygon</span>);
}
<span class="prelude-val">Err</span>(<span class="ident">err</span>) <span class="op">=</span><span class="op">&gt;</span> {
<span class="macro">warn</span><span class="macro">!</span>(<span class="string">&quot;Zone {} has bad geometry: {}&quot;</span>, <span class="ident">zone</span>, <span class="ident">err</span>);
}
}
}
}
}
<span class="kw">let</span> <span class="ident">require_in_bounds</span> <span class="op">=</span> <span class="bool-val">false</span>;
<span class="kw">for</span> (<span class="ident">polygon</span>, <span class="ident">tags</span>) <span class="kw">in</span> <span class="ident">Polygon</span>::<span class="ident">from_geojson_file</span>(<span class="ident">path</span>, <span class="ident">gps_bounds</span>, <span class="ident">require_in_bounds</span>)<span class="question-mark">?</span> {
<span class="ident">zones</span>.<span class="ident">insert</span>(<span class="ident">tags</span>.<span class="ident">get_result</span>(<span class="string">&quot;geo_code&quot;</span>)<span class="question-mark">?</span>.<span class="ident">to_string</span>(), <span class="ident">polygon</span>);
}
<span class="prelude-val">Ok</span>(<span class="ident">zones</span>)
}
<span class="comment">// TODO Clean up the exploding number of geojson readers everywhere.</span>
<span class="kw">fn</span> <span class="ident">parse_polygon</span>(<span class="ident">input</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">f64</span><span class="op">&gt;</span><span class="op">&gt;</span><span class="op">&gt;</span>, <span class="ident">gps_bounds</span>: <span class="kw-2">&amp;</span><span class="ident">GPSBounds</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">Polygon</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rings</span> <span class="op">=</span> <span class="ident">Vec</span>::<span class="ident">new</span>();
<span class="kw">for</span> <span class="ident">ring</span> <span class="kw">in</span> <span class="ident">input</span> {
<span class="kw">let</span> <span class="ident">gps_pts</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">LonLat</span><span class="op">&gt;</span> <span class="op">=</span> <span class="ident">ring</span>
.<span class="ident">into_iter</span>()
.<span class="ident">map</span>(<span class="op">|</span><span class="ident">pt</span><span class="op">|</span> <span class="ident">LonLat</span>::<span class="ident">new</span>(<span class="ident">pt</span>[<span class="number">0</span>], <span class="ident">pt</span>[<span class="number">1</span>]))
.<span class="ident">collect</span>();
<span class="kw">let</span> <span class="ident">pts</span> <span class="op">=</span> <span class="ident">gps_bounds</span>.<span class="ident">convert</span>(<span class="kw-2">&amp;</span><span class="ident">gps_pts</span>);
<span class="ident">rings</span>.<span class="ident">push</span>(<span class="ident">Ring</span>::<span class="ident">new</span>(<span class="ident">pts</span>)<span class="question-mark">?</span>);
}
<span class="prelude-val">Ok</span>(<span class="ident">Polygon</span>::<span class="ident">from_rings</span>(<span class="ident">rings</span>))
}
<span class="kw">fn</span> <span class="ident">load_study_area</span>(<span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">Polygon</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">bytes</span> <span class="op">=</span> <span class="ident">abstio</span>::<span class="ident">slurp_file</span>(<span class="ident">abstio</span>::<span class="ident">path</span>(<span class="macro">format</span><span class="macro">!</span>(
<span class="string">&quot;system/study_areas/{}.geojson&quot;</span>,
<span class="ident">map</span>.<span class="ident">get_name</span>().<span class="ident">city</span>.<span class="ident">city</span>.<span class="ident">replace</span>(<span class="string">&quot;_&quot;</span>, <span class="string">&quot;-&quot;</span>)
)))<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">raw_string</span> <span class="op">=</span> <span class="ident">std</span>::<span class="ident">str</span>::<span class="ident">from_utf8</span>(<span class="kw-2">&amp;</span><span class="ident">bytes</span>)<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">geojson</span> <span class="op">=</span> <span class="ident">raw_string</span>.<span class="ident">parse</span>::<span class="op">&lt;</span><span class="ident">geojson</span>::<span class="ident">GeoJson</span><span class="op">&gt;</span>()<span class="question-mark">?</span>;
<span class="kw">if</span> <span class="kw">let</span> <span class="ident">geojson</span>::<span class="ident">GeoJson</span>::<span class="ident">FeatureCollection</span>(<span class="ident">collection</span>) <span class="op">=</span> <span class="ident">geojson</span> {
<span class="kw">for</span> <span class="ident">feature</span> <span class="kw">in</span> <span class="ident">collection</span>.<span class="ident">features</span> {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">geom</span>) <span class="op">=</span> <span class="ident">feature</span>.<span class="ident">geometry</span> {
<span class="kw">if</span> <span class="kw">let</span> <span class="ident">geojson</span>::<span class="ident">Value</span>::<span class="ident">Polygon</span>(<span class="ident">raw_pts</span>) <span class="op">=</span> <span class="ident">geom</span>.<span class="ident">value</span> {
<span class="kw">return</span> <span class="ident">parse_polygon</span>(<span class="ident">raw_pts</span>, <span class="ident">map</span>.<span class="ident">get_gps_bounds</span>());
}
}
}
<span class="kw">let</span> <span class="ident">require_in_bounds</span> <span class="op">=</span> <span class="bool-val">true</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">list</span> <span class="op">=</span> <span class="ident">Polygon</span>::<span class="ident">from_geojson_file</span>(
<span class="ident">abstio</span>::<span class="ident">path</span>(<span class="macro">format</span><span class="macro">!</span>(
<span class="string">&quot;system/study_areas/{}.geojson&quot;</span>,
<span class="ident">map</span>.<span class="ident">get_name</span>().<span class="ident">city</span>.<span class="ident">city</span>.<span class="ident">replace</span>(<span class="string">&quot;_&quot;</span>, <span class="string">&quot;-&quot;</span>)
)),
<span class="ident">map</span>.<span class="ident">get_gps_bounds</span>(),
<span class="ident">require_in_bounds</span>,
)<span class="question-mark">?</span>;
<span class="kw">if</span> <span class="ident">list</span>.<span class="ident">len</span>() <span class="op">!</span><span class="op">=</span> <span class="number">1</span> {
<span class="macro">bail</span><span class="macro">!</span>(<span class="string">&quot;study area geojson has {} polygons&quot;</span>, <span class="ident">list</span>.<span class="ident">len</span>());
}
<span class="macro">bail</span><span class="macro">!</span>(<span class="string">&quot;no study area&quot;</span>);
<span class="prelude-val">Ok</span>(<span class="ident">list</span>.<span class="ident">pop</span>().<span class="ident">unwrap</span>().<span class="number">0</span>)
}
</pre></div>
</section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="importer" data-search-js="../../search-index.js"></div>

View File

@ -1207,8 +1207,8 @@
};
<span class="kw">match</span> <span class="ident">panel</span>.<span class="ident">dims</span> {
<span class="ident">Dims</span>::<span class="ident">ExactPercent</span>(<span class="ident">w</span>, <span class="ident">h</span>) <span class="op">=</span><span class="op">&gt;</span> {
<span class="comment">// Don&#39;t set size, because then scrolling breaks -- the actual size has to be based on</span>
<span class="comment">// the contents.</span>
<span class="comment">// Don&#39;t set size, because then scrolling breaks -- the actual size has to be based</span>
<span class="comment">// on the contents.</span>
<span class="ident">panel</span>.<span class="ident">top_level</span>.<span class="ident">layout</span>.<span class="ident">style</span>.<span class="ident">min_size</span> <span class="op">=</span> <span class="ident">Size</span> {
<span class="ident">width</span>: <span class="ident">Dimension</span>::<span class="ident">Points</span>((<span class="ident">w</span> <span class="op">*</span> <span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">window_width</span>) <span class="kw">as</span> <span class="ident">f32</span>),
<span class="ident">height</span>: <span class="ident">Dimension</span>::<span class="ident">Points</span>((<span class="ident">h</span> <span class="op">*</span> <span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">window_height</span>) <span class="kw">as</span> <span class="ident">f32</span>),