mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-24 23:15:24 +03:00
deploy: 7399f2aff2
This commit is contained in:
parent
a625160f35
commit
3977d114a5
@ -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">☰</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">−</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: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = r"Sun, 25 Jul 2021 17:53:18 +0000";</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">−</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: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = r"Sun, 25 Jul 2021 18:02:14 +0000";</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>
|
@ -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>) -> <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>) -> <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>) -> <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) -> <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>) -> <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>(&self) -> 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) -> <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) -> <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) -> <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: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a><<a class="struct" href="struct.Duration.html" title="struct geom::duration::Duration">Duration</a>></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>) -> <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, they’ll print as if they’re 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) -> <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>
|
||||
|
@ -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>) -> <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>) -> <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>) -> <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) -> <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>) -> <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>(&self) -> 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) -> <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) -> <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) -> <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: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a><<a class="struct" href="duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>></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>) -> <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, they’ll print as if they’re 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) -> <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>
|
||||
|
@ -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">☰</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">−</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() -> <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></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">−</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() -> <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></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>
|
@ -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">☰</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">−</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">−</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>
|
||||
|
@ -178,7 +178,7 @@
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">RUSTDOC_VERSION</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r"rustdoc 1.53.0 (53cb7b09b 2021-06-17)"</span>;
|
||||
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#"The build time in RFC2822, UTC."#</span>]</span>
|
||||
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r"Sun, 25 Jul 2021 17:53:18 +0000"</span>;
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r"Sun, 25 Jul 2021 18:02:14 +0000"</span>;
|
||||
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#"The target architecture, given by `CARGO_CFG_TARGET_ARCH`."#</span>]</span>
|
||||
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CFG_TARGET_ARCH</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r"x86_64"</span>;
|
||||
|
@ -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">></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">"s"</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">"{}{}s"</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">"{}{}.{:01}s"</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">"{}{}.{:1}s"</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">"{}{}s"</span>, <span class="ident">s</span>, <span class="ident">seconds</span>);
|
||||
@ -841,7 +841,7 @@
|
||||
<span class="macro">assert_eq!</span>(<span class="string">"0s"</span>, <span class="ident">Duration::ZERO</span>.<span class="ident">to_string</span>(<span class="kw-2">&</span><span class="ident">dont_round</span>));
|
||||
<span class="macro">assert_eq!</span>(<span class="string">"0s"</span>, <span class="ident">Duration::seconds</span>(<span class="number">0.001</span>).<span class="ident">to_string</span>(<span class="kw-2">&</span><span class="ident">dont_round</span>));
|
||||
<span class="macro">assert_eq!</span>(
|
||||
<span class="string">"1min 30.12s"</span>,
|
||||
<span class="string">"1min 30.1s"</span>,
|
||||
<span class="ident">Duration::seconds</span>(<span class="number">90.123</span>).<span class="ident">to_string</span>(<span class="kw-2">&</span><span class="ident">dont_round</span>)
|
||||
);
|
||||
<span class="macro">assert_eq!</span>(<span class="string">"1min 30s"</span>, <span class="ident">Duration::seconds</span>(<span class="number">90.123</span>).<span class="ident">to_string</span>(<span class="kw-2">&</span><span class="ident">round</span>));
|
||||
|
@ -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">'"'</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">"(\n nwr({});\n node(w)->.x;\n <;\n);\nout meta;\n"</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">"(\n nwr({});\n node(w)->.x;\n <;\n);\nout meta;\n"</span>,
|
||||
<span class="ident">filter</span>
|
||||
);
|
||||
<span class="ident">abstio::download_to_file</span>(<span class="string">"https://overpass-api.de/api/interpreter"</span>, <span class="prelude-val">Some</span>(<span class="ident">query</span>), <span class="kw-2">&</span><span class="ident">osm</span>)
|
||||
.<span class="kw">await</span><span class="question-mark">?</span>;
|
||||
} <span class="kw">else</span> {
|
||||
|
Loading…
Reference in New Issue
Block a user