mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-30 18:24:04 +03:00
deploy: b8318917a8
This commit is contained in:
parent
03a5c1beb8
commit
060c1e141a
@ -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="API documentation for the Rust `BUILT_TIME_UTC` constant in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>game::pregame::built_info::BUILT_TIME_UTC - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</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" 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" 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">−</span>]</a></span><a class="srclink" href="../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-e51c0a1cdd4549fe/out/built.rs.html#53" 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> = "Sat, 03 Apr 2021 18:35:49 +0000";</pre><div class="docblock"><p>The built-time in RFC2822, UTC</p>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="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">−</span>]</a></span><a class="srclink" href="../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-e51c0a1cdd4549fe/out/built.rs.html#53" 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> = "Sun, 04 Apr 2021 17:14:31 +0000";</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"></div>
|
||||
<script src="../../../main.js"></script><script defer src="../../../search-index.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 `command` mod in crate `map_gui`."><meta name="keywords" content="rust, rustlang, rust-lang, command"><title>map_gui::tools::command - 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><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">☰</div><a href='../../../map_gui/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Module command</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><p class="location"><a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a></p><div id="sidebar-vars" data-name="command" 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" 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" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a class="mod" href="">command</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">−</span>]</a></span><a class="srclink" href="../../../src/map_gui/tools/command.rs.html#1-160" 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" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">tools</a>::<wbr><a class="mod" href="">command</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">−</span>]</a></span><a class="srclink" href="../../../src/map_gui/tools/command.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.RunCommand.html" title="map_gui::tools::command::RunCommand struct">RunCommand</a></td><td class="docblock-short"><p>Executes a command and displays STDOUT and STDERR in a loading screen window. Only works on
|
||||
native, of course.</p>
|
||||
</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="map_gui"></div>
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -187,7 +187,7 @@
|
||||
|
||||
<span class="ident">timer</span>.<span class="ident">start</span>(<span class="string">"run elevation_lookups"</span>);
|
||||
<span class="ident">std</span>::<span class="ident">fs</span>::<span class="ident">create_dir_all</span>(<span class="string">"elevation_output"</span>)<span class="question-mark">?</span>;
|
||||
<span class="ident">std</span>::<span class="ident">fs</span>::<span class="ident">create_dir_all</span>(<span class="string">"data/input/shared/elevation"</span>)<span class="question-mark">?</span>;
|
||||
<span class="ident">std</span>::<span class="ident">fs</span>::<span class="ident">create_dir_all</span>(<span class="ident">abstio</span>::<span class="ident">path_shared_input</span>(<span class="string">"elevation"</span>))<span class="question-mark">?</span>;
|
||||
<span class="kw">let</span> <span class="ident">pwd</span> <span class="op">=</span> <span class="ident">std</span>::<span class="ident">env</span>::<span class="ident">current_dir</span>()<span class="question-mark">?</span>.<span class="ident">display</span>().<span class="ident">to_string</span>();
|
||||
<span class="comment">// Because elevation_lookups has so many dependencies, just depend on Docker.</span>
|
||||
<span class="kw">let</span> <span class="ident">status</span> <span class="op">=</span> <span class="ident">Command</span>::<span class="ident">new</span>(<span class="string">"docker"</span>)
|
||||
@ -202,8 +202,8 @@
|
||||
<span class="comment">// our data/input/shared directory.</span>
|
||||
.<span class="ident">arg</span>(<span class="string">"--mount"</span>)
|
||||
.<span class="ident">arg</span>(<span class="macro">format</span><span class="macro">!</span>(
|
||||
<span class="string">"type=bind,source={}/data/input/shared/elevation,target=/elevation/data"</span>,
|
||||
<span class="ident">pwd</span>
|
||||
<span class="string">"type=bind,source={},target=/elevation/data"</span>,
|
||||
<span class="ident">abstio</span>::<span class="ident">path_shared_input</span>(<span class="string">"elevation"</span>)
|
||||
))
|
||||
.<span class="ident">arg</span>(<span class="string">"--mount"</span>)
|
||||
.<span class="ident">arg</span>(<span class="macro">format</span><span class="macro">!</span>(
|
||||
|
@ -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">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"rustdoc 1.51.0 (2fd73fabe 2021-03-23)"</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">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"Sat, 03 Apr 2021 18:35:49 +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">"Sun, 04 Apr 2021 17:14:31 +0000"</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">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"x86_64"</span>;
|
||||
<span class="doccomment">/// The endianness, given by `cfg!(target_endian)`.</span>
|
||||
|
@ -161,6 +161,11 @@
|
||||
<span id="158">158</span>
|
||||
<span id="159">159</span>
|
||||
<span id="160">160</span>
|
||||
<span id="161">161</span>
|
||||
<span id="162">162</span>
|
||||
<span id="163">163</span>
|
||||
<span id="164">164</span>
|
||||
<span id="165">165</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">VecDeque</span>;
|
||||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">time</span>::<span class="ident">Duration</span>;
|
||||
@ -183,6 +188,7 @@
|
||||
<span class="ident">lines</span>: <span class="ident">VecDeque</span><span class="op"><</span><span class="ident">String</span><span class="op">></span>,
|
||||
<span class="ident">max_capacity</span>: <span class="ident">usize</span>,
|
||||
<span class="ident">started</span>: <span class="ident">Instant</span>,
|
||||
<span class="ident">last_drawn</span>: <span class="ident">Instant</span>,
|
||||
<span class="comment">// Wrapped in an Option just to make calling from event() work. The bool is success, and the</span>
|
||||
<span class="comment">// strings are the last lines of output.</span>
|
||||
<span class="ident">on_load</span>: <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Box</span><span class="op"><</span><span class="kw">dyn</span> <span class="ident">FnOnce</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">A</span>, <span class="ident">bool</span>, <span class="ident">Vec</span><span class="op"><</span><span class="ident">String</span><span class="op">></span>) <span class="op">-</span><span class="op">></span> <span class="ident">Transition</span><span class="op"><</span><span class="ident">A</span><span class="op">></span><span class="op">></span><span class="op">></span>,
|
||||
@ -219,6 +225,7 @@
|
||||
<span class="ident">lines</span>: <span class="ident">VecDeque</span>::<span class="ident">new</span>(),
|
||||
<span class="ident">max_capacity</span>,
|
||||
<span class="ident">started</span>: <span class="ident">Instant</span>::<span class="ident">now</span>(),
|
||||
<span class="ident">last_drawn</span>: <span class="ident">Instant</span>::<span class="ident">now</span>(),
|
||||
<span class="ident">on_load</span>: <span class="prelude-val">Some</span>(<span class="ident">on_load</span>),
|
||||
})
|
||||
}
|
||||
@ -275,18 +282,21 @@
|
||||
|
||||
<span class="self">self</span>.<span class="ident">read_output</span>();
|
||||
|
||||
<span class="comment">// Throttle rerendering?</span>
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">txt</span> <span class="op">=</span> <span class="ident">Text</span>::<span class="ident">from</span>(
|
||||
<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(
|
||||
<span class="string">"Running command... {} so far"</span>,
|
||||
<span class="ident">geom</span>::<span class="ident">Duration</span>::<span class="ident">realtime_elapsed</span>(<span class="self">self</span>.<span class="ident">started</span>)
|
||||
))
|
||||
.<span class="ident">small_heading</span>(),
|
||||
);
|
||||
<span class="kw">for</span> <span class="ident">line</span> <span class="kw">in</span> <span class="kw-2">&</span><span class="self">self</span>.<span class="ident">lines</span> {
|
||||
<span class="ident">txt</span>.<span class="ident">add_line</span>(<span class="ident">line</span>);
|
||||
<span class="comment">// Throttle rerendering</span>
|
||||
<span class="kw">if</span> <span class="ident">abstutil</span>::<span class="ident">elapsed_seconds</span>(<span class="self">self</span>.<span class="ident">last_drawn</span>) <span class="op">></span> <span class="number">0.1</span> {
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">txt</span> <span class="op">=</span> <span class="ident">Text</span>::<span class="ident">from</span>(
|
||||
<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(
|
||||
<span class="string">"Running command... {} so far"</span>,
|
||||
<span class="ident">geom</span>::<span class="ident">Duration</span>::<span class="ident">realtime_elapsed</span>(<span class="self">self</span>.<span class="ident">started</span>)
|
||||
))
|
||||
.<span class="ident">small_heading</span>(),
|
||||
);
|
||||
<span class="kw">for</span> <span class="ident">line</span> <span class="kw">in</span> <span class="kw-2">&</span><span class="self">self</span>.<span class="ident">lines</span> {
|
||||
<span class="ident">txt</span>.<span class="ident">add_line</span>(<span class="ident">line</span>);
|
||||
}
|
||||
<span class="self">self</span>.<span class="ident">panel</span> <span class="op">=</span> <span class="ident">ctx</span>.<span class="ident">make_loading_screen</span>(<span class="ident">txt</span>);
|
||||
<span class="self">self</span>.<span class="ident">last_drawn</span> <span class="op">=</span> <span class="ident">Instant</span>::<span class="ident">now</span>();
|
||||
}
|
||||
<span class="self">self</span>.<span class="ident">panel</span> <span class="op">=</span> <span class="ident">ctx</span>.<span class="ident">make_loading_screen</span>(<span class="ident">txt</span>);
|
||||
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">status</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">p</span>.<span class="ident">poll</span>() {
|
||||
<span class="comment">// Make sure to grab all remaining output.</span>
|
||||
|
Loading…
Reference in New Issue
Block a user