This commit is contained in:
dabreegster 2021-07-25 18:03:20 +00:00
parent a625160f35
commit 3977d114a5
8 changed files with 19 additions and 13 deletions

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 build time in RFC2822, UTC."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>BUILT_TIME_UTC in game::pregame::built_info - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="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 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><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><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><button id="copy-path" onclick="copy_path(this)"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-b46195c1bf7e0216/out/built.rs.html#78" 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> = r&quot;Sun, 25 Jul 2021 17:53:18 +0000&quot;;</pre><div class="docblock"><p>The build 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><button id="copy-path" onclick="copy_path(this)"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-b46195c1bf7e0216/out/built.rs.html#78" 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> = r&quot;Sun, 25 Jul 2021 18:02:14 +0000&quot;;</pre><div class="docblock"><p>The build time in RFC2822, UTC.</p>
</div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
<script src="../../../main.js"></script></body></html>

View File

@ -7,7 +7,7 @@
</div><h4 id="method.hours" class="method"><code>pub fn <a href="#method.hours" class="fnname">hours</a>(hours: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="struct.Duration.html" title="struct geom::duration::Duration">Duration</a></code><a href="#method.hours" class="anchor"></a><a class="srclink" href="../../src/geom/duration.rs.html#46-48" title="goto source code">[src]</a></h4><div class="docblock"><p>Creates a duration in hours.</p>
</div><h4 id="method.f64_minutes" class="method"><code>pub fn <a href="#method.f64_minutes" class="fnname">f64_minutes</a>(mins: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -&gt; <a class="struct" href="struct.Duration.html" title="struct geom::duration::Duration">Duration</a></code><a href="#method.f64_minutes" class="anchor"></a><a class="srclink" href="../../src/geom/duration.rs.html#51-53" title="goto source code">[src]</a></h4><div class="docblock"><p>Creates a duration in minutes.</p>
</div><h4 id="method.const_seconds" class="method"><code>pub const fn <a href="#method.const_seconds" class="fnname">const_seconds</a>(value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -&gt; <a class="struct" href="struct.Duration.html" title="struct geom::duration::Duration">Duration</a></code><a href="#method.const_seconds" class="anchor"></a><a class="srclink" href="../../src/geom/duration.rs.html#55-57" title="goto source code">[src]</a></h4><h4 id="method.to_u64" class="method"><code>pub(crate) fn <a href="#method.to_u64" class="fnname">to_u64</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code><a href="#method.to_u64" class="anchor"></a><a class="srclink" href="../../src/geom/duration.rs.html#59-61" title="goto source code">[src]</a></h4><h4 id="method.from_u64" class="method"><code>pub(crate) fn <a href="#method.from_u64" class="fnname">from_u64</a>(x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>) -&gt; <a class="struct" href="struct.Duration.html" title="struct geom::duration::Duration">Duration</a></code><a href="#method.from_u64" class="anchor"></a><a class="srclink" href="../../src/geom/duration.rs.html#63-65" title="goto source code">[src]</a></h4><h4 id="method.abs" class="method"><code>pub fn <a href="#method.abs" class="fnname">abs</a>(&amp;self) -&gt; Self</code><a href="#method.abs" class="anchor"></a><a class="srclink" href="../../src/geom/duration.rs.html#67-69" title="goto source code">[src]</a></h4><h4 id="method.inner_seconds" class="method"><code>pub fn <a href="#method.inner_seconds" class="fnname">inner_seconds</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code><a href="#method.inner_seconds" class="anchor"></a><a class="srclink" href="../../src/geom/duration.rs.html#73-75" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns the duration in seconds. Prefer working in typesafe <code>Duration</code>s.</p>
</div><h4 id="method.get_parts" class="method"><code>fn <a href="#method.get_parts" class="fnname">get_parts</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a href="#method.get_parts" class="anchor"></a><a class="srclink" href="../../src/geom/duration.rs.html#79-96" title="goto source code">[src]</a></h4><div class="docblock"><p>Splits the duration into (hours, minutes, seconds, centiseconds).</p>
</div><h4 id="method.get_parts" class="method"><code>fn <a href="#method.get_parts" class="fnname">get_parts</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a href="#method.get_parts" class="anchor"></a><a class="srclink" href="../../src/geom/duration.rs.html#79-96" title="goto source code">[src]</a></h4><div class="docblock"><p>Splits the duration into (hours, minutes, seconds, deciseconds).</p>
</div><h4 id="method.parse" class="method"><code>pub fn <a href="#method.parse" class="fnname">parse</a>(string: &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.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="struct" href="struct.Duration.html" title="struct geom::duration::Duration">Duration</a>&gt;</code><a href="#method.parse" class="anchor"></a><a class="srclink" href="../../src/geom/duration.rs.html#100-131" title="goto source code">[src]</a></h4><div class="docblock"><p>Parses a duration such as “3:00” to <code>Duration::minutes(3)</code>.</p>
</div><h4 id="method.epsilon_eq" class="method"><code>pub fn <a href="#method.epsilon_eq" class="fnname">epsilon_eq</a>(self, other: <a class="struct" href="struct.Duration.html" title="struct geom::duration::Duration">Duration</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a href="#method.epsilon_eq" class="anchor"></a><a class="srclink" href="../../src/geom/duration.rs.html#134-141" title="goto source code">[src]</a></h4><div class="docblock"><p>If two durations are within this amount, theyll print as if theyre the same.</p>
</div><h4 id="method.realtime_elapsed" class="method"><code>pub fn <a href="#method.realtime_elapsed" class="fnname">realtime_elapsed</a>(since: Instant) -&gt; <a class="struct" href="struct.Duration.html" title="struct geom::duration::Duration">Duration</a></code><a href="#method.realtime_elapsed" class="anchor"></a><a class="srclink" href="../../src/geom/duration.rs.html#144-146" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns the duration elapsed from this moment in real time.</p>

View File

@ -7,7 +7,7 @@
</div><h4 id="method.hours" class="method"><code>pub fn <a href="#method.hours" class="fnname">hours</a>(hours: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a></code><a href="#method.hours" class="anchor"></a><a class="srclink" href="../src/geom/duration.rs.html#46-48" title="goto source code">[src]</a></h4><div class="docblock"><p>Creates a duration in hours.</p>
</div><h4 id="method.f64_minutes" class="method"><code>pub fn <a href="#method.f64_minutes" class="fnname">f64_minutes</a>(mins: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -&gt; <a class="struct" href="duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a></code><a href="#method.f64_minutes" class="anchor"></a><a class="srclink" href="../src/geom/duration.rs.html#51-53" title="goto source code">[src]</a></h4><div class="docblock"><p>Creates a duration in minutes.</p>
</div><h4 id="method.const_seconds" class="method"><code>pub const fn <a href="#method.const_seconds" class="fnname">const_seconds</a>(value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -&gt; <a class="struct" href="duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a></code><a href="#method.const_seconds" class="anchor"></a><a class="srclink" href="../src/geom/duration.rs.html#55-57" title="goto source code">[src]</a></h4><h4 id="method.to_u64" class="method"><code>pub(crate) fn <a href="#method.to_u64" class="fnname">to_u64</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code><a href="#method.to_u64" class="anchor"></a><a class="srclink" href="../src/geom/duration.rs.html#59-61" title="goto source code">[src]</a></h4><h4 id="method.from_u64" class="method"><code>pub(crate) fn <a href="#method.from_u64" class="fnname">from_u64</a>(x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>) -&gt; <a class="struct" href="duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a></code><a href="#method.from_u64" class="anchor"></a><a class="srclink" href="../src/geom/duration.rs.html#63-65" title="goto source code">[src]</a></h4><h4 id="method.abs" class="method"><code>pub fn <a href="#method.abs" class="fnname">abs</a>(&amp;self) -&gt; Self</code><a href="#method.abs" class="anchor"></a><a class="srclink" href="../src/geom/duration.rs.html#67-69" title="goto source code">[src]</a></h4><h4 id="method.inner_seconds" class="method"><code>pub fn <a href="#method.inner_seconds" class="fnname">inner_seconds</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code><a href="#method.inner_seconds" class="anchor"></a><a class="srclink" href="../src/geom/duration.rs.html#73-75" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns the duration in seconds. Prefer working in typesafe <code>Duration</code>s.</p>
</div><h4 id="method.get_parts" class="method"><code>fn <a href="#method.get_parts" class="fnname">get_parts</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a href="#method.get_parts" class="anchor"></a><a class="srclink" href="../src/geom/duration.rs.html#79-96" title="goto source code">[src]</a></h4><div class="docblock"><p>Splits the duration into (hours, minutes, seconds, centiseconds).</p>
</div><h4 id="method.get_parts" class="method"><code>fn <a href="#method.get_parts" class="fnname">get_parts</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a href="#method.get_parts" class="anchor"></a><a class="srclink" href="../src/geom/duration.rs.html#79-96" title="goto source code">[src]</a></h4><div class="docblock"><p>Splits the duration into (hours, minutes, seconds, deciseconds).</p>
</div><h4 id="method.parse" class="method"><code>pub fn <a href="#method.parse" class="fnname">parse</a>(string: &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.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="struct" href="duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>&gt;</code><a href="#method.parse" class="anchor"></a><a class="srclink" href="../src/geom/duration.rs.html#100-131" title="goto source code">[src]</a></h4><div class="docblock"><p>Parses a duration such as “3:00” to <code>Duration::minutes(3)</code>.</p>
</div><h4 id="method.epsilon_eq" class="method"><code>pub fn <a href="#method.epsilon_eq" class="fnname">epsilon_eq</a>(self, other: <a class="struct" href="duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a href="#method.epsilon_eq" class="anchor"></a><a class="srclink" href="../src/geom/duration.rs.html#134-141" title="goto source code">[src]</a></h4><div class="docblock"><p>If two durations are within this amount, theyll print as if theyre the same.</p>
</div><h4 id="method.realtime_elapsed" class="method"><code>pub fn <a href="#method.realtime_elapsed" class="fnname">realtime_elapsed</a>(since: Instant) -&gt; <a class="struct" href="duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a></code><a href="#method.realtime_elapsed" class="anchor"></a><a class="srclink" href="../src/geom/duration.rs.html#144-146" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns the duration elapsed from this moment in real time.</p>

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="Import a one-shot A/B Street map in a single command. Takes a GeoJSON file with a boundary as input. Automatically fetches the OSM data, clips it, and runs the importer."><meta name="keywords" content="rust, rustlang, rust-lang, main"><title>main in one_step_import - 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 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../one_step_import/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">one_step_import</a></p><div id="sidebar-vars" data-name="main" 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><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">one_step_import</a>::<wbr><a class="fn" href="">main</a><button id="copy-path" onclick="copy_path(this)"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/one_step_import/one_step_import.rs.html#14-136" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub(crate) fn main() -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</pre><div class="docblock"><p>Import a one-shot A/B Street map in a single command. Takes a GeoJSON file with a boundary as
<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">one_step_import</a>::<wbr><a class="fn" href="">main</a><button id="copy-path" onclick="copy_path(this)"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/one_step_import/one_step_import.rs.html#14-139" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub(crate) fn main() -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</pre><div class="docblock"><p>Import a one-shot A/B Street map in a single command. Takes a GeoJSON file with a boundary as
input. Automatically fetches the OSM data, clips it, and runs the importer.</p>
</div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="one_step_import" data-search-index-js="../search-index.js" data-search-js="../search.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 `one_step_import` crate."><meta name="keywords" content="rust, rustlang, rust-lang, one_step_import"><title>one_step_import - 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 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../one_step_import/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Crate one_step_import</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 one_step_import's items</p></a><div class="block items"><ul><li><a href="#functions">Functions</a></li></ul></div><p class="location"></p><div id="sidebar-vars" data-name="one_step_import" 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><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="">one_step_import</a><button id="copy-path" onclick="copy_path(this)"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/one_step_import/one_step_import.rs.html#1-136" title="goto source code">[src]</a></span></h1><h2 id="functions" class="section-header"><a href="#functions">Functions</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="">one_step_import</a><button id="copy-path" onclick="copy_path(this)"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/one_step_import/one_step_import.rs.html#1-139" title="goto source code">[src]</a></span></h1><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>
<table><tr class="module-item"><td><a class="fn" href="fn.main.html" title="one_step_import::main fn">main</a></td><td class="docblock-short"><p>Import a one-shot A/B Street map in a single command. Takes a GeoJSON file with a boundary as
input. Automatically fetches the OSM data, clips it, and runs the importer.</p>
</td></tr></table></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="one_step_import" data-search-index-js="../search-index.js" data-search-js="../search.js"></div>

View File

@ -178,7 +178,7 @@
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">RUSTDOC_VERSION</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r&quot;rustdoc 1.53.0 (53cb7b09b 2021-06-17)&quot;</span>;
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#&quot;The build time in RFC2822, UTC.&quot;#</span>]</span>
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r&quot;Sun, 25 Jul 2021 17:53:18 +0000&quot;</span>;
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r&quot;Sun, 25 Jul 2021 18:02:14 +0000&quot;</span>;
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#&quot;The target architecture, given by `CARGO_CFG_TARGET_ARCH`.&quot;#</span>]</span>
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CFG_TARGET_ARCH</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r&quot;x86_64&quot;</span>;

View File

@ -504,7 +504,7 @@
<span class="self">self</span>.<span class="number">0</span>
}
<span class="doccomment">/// Splits the duration into (hours, minutes, seconds, centiseconds).</span>
<span class="doccomment">/// Splits the duration into (hours, minutes, seconds, deciseconds).</span>
<span class="comment">// TODO Could share some of this with Time -- the representations are the same</span>
<span class="kw">fn</span> <span class="ident">get_parts</span>(<span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> (<span class="ident">usize</span>, <span class="ident">usize</span>, <span class="ident">usize</span>, <span class="ident">usize</span>) {
<span class="comment">// Force positive</span>
@ -515,13 +515,13 @@
<span class="ident">remainder</span> <span class="op">-</span><span class="op">=</span> <span class="ident">minutes</span> <span class="op">*</span> <span class="number">60.0</span>;
<span class="kw">let</span> <span class="ident">seconds</span> <span class="op">=</span> <span class="ident">remainder</span>.<span class="ident">floor</span>();
<span class="ident">remainder</span> <span class="op">-</span><span class="op">=</span> <span class="ident">seconds</span>;
<span class="kw">let</span> <span class="ident">centis</span> <span class="op">=</span> (<span class="ident">remainder</span> <span class="op">/</span> <span class="number">0.01</span>).<span class="ident">round</span>();
<span class="kw">let</span> <span class="ident">decis</span> <span class="op">=</span> (<span class="ident">remainder</span> <span class="op">/</span> <span class="number">0.1</span>).<span class="ident">round</span>();
(
<span class="ident">hours</span> <span class="kw">as</span> <span class="ident">usize</span>,
<span class="ident">minutes</span> <span class="kw">as</span> <span class="ident">usize</span>,
<span class="ident">seconds</span> <span class="kw">as</span> <span class="ident">usize</span>,
<span class="ident">centis</span> <span class="kw">as</span> <span class="ident">usize</span>,
<span class="ident">decis</span> <span class="kw">as</span> <span class="ident">usize</span>,
)
}
@ -666,7 +666,7 @@
(<span class="ident">whole</span>, <span class="ident">part</span>, <span class="ident">unit</span>)
} <span class="kw">else</span> {
<span class="kw">let</span> <span class="ident">whole</span> <span class="op">=</span> <span class="ident">seconds</span> <span class="kw">as</span> <span class="ident">f64</span>;
<span class="kw">let</span> <span class="ident">part</span> <span class="op">=</span> <span class="ident">remainder</span> <span class="kw">as</span> <span class="ident">f64</span> <span class="op">/</span> <span class="number">100.0</span>;
<span class="kw">let</span> <span class="ident">part</span> <span class="op">=</span> <span class="ident">remainder</span> <span class="kw">as</span> <span class="ident">f64</span> <span class="op">/</span> <span class="number">10.0</span>;
<span class="kw">let</span> <span class="ident">unit</span> <span class="op">=</span> <span class="string">&quot;s&quot;</span>;
(<span class="ident">whole</span>, <span class="ident">part</span>, <span class="ident">unit</span>)
}
@ -697,7 +697,7 @@
<span class="kw">if</span> <span class="ident">fmt</span>.<span class="ident">round_durations</span> {
<span class="ident">s</span> <span class="op">=</span> <span class="macro">format!</span>(<span class="string">&quot;{}{}s&quot;</span>, <span class="ident">s</span>, <span class="ident">seconds</span>);
} <span class="kw">else</span> {
<span class="ident">s</span> <span class="op">=</span> <span class="macro">format!</span>(<span class="string">&quot;{}{}.{:01}s&quot;</span>, <span class="ident">s</span>, <span class="ident">seconds</span>, <span class="ident">remainder</span>);
<span class="ident">s</span> <span class="op">=</span> <span class="macro">format!</span>(<span class="string">&quot;{}{}.{:1}s&quot;</span>, <span class="ident">s</span>, <span class="ident">seconds</span>, <span class="ident">remainder</span>);
}
} <span class="kw">else</span> <span class="kw">if</span> <span class="ident">seconds</span> <span class="op">!</span><span class="op">=</span> <span class="number">0</span> {
<span class="ident">s</span> <span class="op">=</span> <span class="macro">format!</span>(<span class="string">&quot;{}{}s&quot;</span>, <span class="ident">s</span>, <span class="ident">seconds</span>);
@ -841,7 +841,7 @@
<span class="macro">assert_eq!</span>(<span class="string">&quot;0s&quot;</span>, <span class="ident">Duration::ZERO</span>.<span class="ident">to_string</span>(<span class="kw-2">&amp;</span><span class="ident">dont_round</span>));
<span class="macro">assert_eq!</span>(<span class="string">&quot;0s&quot;</span>, <span class="ident">Duration::seconds</span>(<span class="number">0.001</span>).<span class="ident">to_string</span>(<span class="kw-2">&amp;</span><span class="ident">dont_round</span>));
<span class="macro">assert_eq!</span>(
<span class="string">&quot;1min 30.12s&quot;</span>,
<span class="string">&quot;1min 30.1s&quot;</span>,
<span class="ident">Duration::seconds</span>(<span class="number">90.123</span>).<span class="ident">to_string</span>(<span class="kw-2">&amp;</span><span class="ident">dont_round</span>)
);
<span class="macro">assert_eq!</span>(<span class="string">&quot;1min 30s&quot;</span>, <span class="ident">Duration::seconds</span>(<span class="number">90.123</span>).<span class="ident">to_string</span>(<span class="kw-2">&amp;</span><span class="ident">round</span>));

View File

@ -137,6 +137,9 @@
<span id="134">134</span>
<span id="135">135</span>
<span id="136">136</span>
<span id="137">137</span>
<span id="138">138</span>
<span id="139">139</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="ident">std::io::Write</span>;
<span class="kw">use</span> <span class="ident">std::path::Path</span>;
@ -210,7 +213,10 @@
<span class="ident">filter</span>.<span class="ident">pop</span>();
<span class="ident">filter</span>.<span class="ident">push</span>(<span class="string">&#39;&quot;&#39;</span>);
<span class="comment">// See https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL</span>
<span class="kw">let</span> <span class="ident">query</span> <span class="op">=</span> <span class="macro">format!</span>(<span class="string">&quot;(\n nwr({});\n node(w)-&gt;.x;\n &lt;;\n);\nout meta;\n&quot;</span>, <span class="ident">filter</span>);
<span class="kw">let</span> <span class="ident">query</span> <span class="op">=</span> <span class="macro">format!</span>(
<span class="string">&quot;(\n nwr({});\n node(w)-&gt;.x;\n &lt;;\n);\nout meta;\n&quot;</span>,
<span class="ident">filter</span>
);
<span class="ident">abstio::download_to_file</span>(<span class="string">&quot;https://overpass-api.de/api/interpreter&quot;</span>, <span class="prelude-val">Some</span>(<span class="ident">query</span>), <span class="kw-2">&amp;</span><span class="ident">osm</span>)
.<span class="kw">await</span><span class="question-mark">?</span>;
} <span class="kw">else</span> {