mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-24 01:15:12 +03:00
deploy: 491f4bbffe
This commit is contained in:
parent
d7a941fbfb
commit
8c5a6478d1
File diff suppressed because one or more lines are too long
@ -1,2 +1,2 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `contains_duplicates` fn in crate `abstutil`."><meta name="keywords" content="rust, rustlang, rust-lang, contains_duplicates"><title>abstutil::collections::contains_duplicates - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../abstutil/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../index.html'>abstutil</a>::<wbr><a href='index.html'>collections</a></p><script>window.sidebarCurrent = {name: 'contains_duplicates', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/abstutil/collections.rs.html#172-181' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>abstutil</a>::<wbr><a href='index.html'>collections</a>::<wbr><a class="fn" href=''>contains_duplicates</a></span></h1><pre class='rust fn'>pub fn contains_duplicates<T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>>(vec: &<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><T>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "abstutil";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/abstutil/collections.rs.html#173-182' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>abstutil</a>::<wbr><a href='index.html'>collections</a>::<wbr><a class="fn" href=''>contains_duplicates</a></span></h1><pre class='rust fn'>pub fn contains_duplicates<T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>>(vec: &<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><T>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "abstutil";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
@ -1,2 +1,2 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `retain_btreemap` fn in crate `abstutil`."><meta name="keywords" content="rust, rustlang, rust-lang, retain_btreemap"><title>abstutil::collections::retain_btreemap - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../abstutil/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../index.html'>abstutil</a>::<wbr><a href='index.html'>collections</a></p><script>window.sidebarCurrent = {name: 'retain_btreemap', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/abstutil/collections.rs.html#145-158' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>abstutil</a>::<wbr><a href='index.html'>collections</a>::<wbr><a class="fn" href=''>retain_btreemap</a></span></h1><pre class='rust fn'>pub fn retain_btreemap<K: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, V, F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>K, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>V) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>>(<br> map: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><K, V>, <br> keep: F<br>)</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "abstutil";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/abstutil/collections.rs.html#146-159' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>abstutil</a>::<wbr><a href='index.html'>collections</a>::<wbr><a class="fn" href=''>retain_btreemap</a></span></h1><pre class='rust fn'>pub fn retain_btreemap<K: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, V, F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>K, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>V) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>>(<br> map: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><K, V>, <br> keep: F<br>)</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "abstutil";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
@ -1,2 +1,2 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `retain_btreeset` fn in crate `abstutil`."><meta name="keywords" content="rust, rustlang, rust-lang, retain_btreeset"><title>abstutil::collections::retain_btreeset - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../abstutil/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../index.html'>abstutil</a>::<wbr><a href='index.html'>collections</a></p><script>window.sidebarCurrent = {name: 'retain_btreeset', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/abstutil/collections.rs.html#160-170' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>abstutil</a>::<wbr><a href='index.html'>collections</a>::<wbr><a class="fn" href=''>retain_btreeset</a></span></h1><pre class='rust fn'>pub fn retain_btreeset<K: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>K) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>>(<br> set: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a><K>, <br> keep: F<br>)</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "abstutil";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/abstutil/collections.rs.html#161-171' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>abstutil</a>::<wbr><a href='index.html'>collections</a>::<wbr><a class="fn" href=''>retain_btreeset</a></span></h1><pre class='rust fn'>pub fn retain_btreeset<K: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>K) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>>(<br> set: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a><K>, <br> keep: F<br>)</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "abstutil";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
@ -1,2 +1,2 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `wraparound_get` fn in crate `abstutil`."><meta name="keywords" content="rust, rustlang, rust-lang, wraparound_get"><title>abstutil::collections::wraparound_get - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../abstutil/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../index.html'>abstutil</a>::<wbr><a href='index.html'>collections</a></p><script>window.sidebarCurrent = {name: 'wraparound_get', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/abstutil/collections.rs.html#138-143' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>abstutil</a>::<wbr><a href='index.html'>collections</a>::<wbr><a class="fn" href=''>wraparound_get</a></span></h1><pre class='rust fn'>pub fn wraparound_get<T>(vec: &<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><T>, idx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "abstutil";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/abstutil/collections.rs.html#139-144' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>abstutil</a>::<wbr><a href='index.html'>collections</a>::<wbr><a class="fn" href=''>wraparound_get</a></span></h1><pre class='rust fn'>pub fn wraparound_get<T>(vec: &<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><T>, idx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "abstutil";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
@ -1,6 +1,13 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `collections` mod in crate `abstutil`."><meta name="keywords" content="rust, rustlang, rust-lang, collections"><title>abstutil::collections - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><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='../../abstutil/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module collections</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div><p class='location'><a href='../index.html'>abstutil</a></p><script>window.sidebarCurrent = {name: 'collections', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/abstutil/collections.rs.html#1-246' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>abstutil</a>::<wbr><a class="mod" href=''>collections</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||||
<table><tr class='module-item'><td><a class="struct" href="struct.Counter.html" title='abstutil::collections::Counter struct'>Counter</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.MultiMap.html" title='abstutil::collections::MultiMap struct'>MultiMap</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Tags.html" title='abstutil::collections::Tags struct'>Tags</a></td><td class='docblock-short'><p>Convenience functions around a string->string map</p>
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `collections` mod in crate `abstutil`."><meta name="keywords" content="rust, rustlang, rust-lang, collections"><title>abstutil::collections - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><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='../../abstutil/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module collections</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li></ul></div><p class='location'><a href='../index.html'>abstutil</a></p><script>window.sidebarCurrent = {name: 'collections', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/abstutil/collections.rs.html#1-311' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>abstutil</a>::<wbr><a class="mod" href=''>collections</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||||
<table><tr class='module-item'><td><a class="struct" href="struct.Counter.html" title='abstutil::collections::Counter struct'>Counter</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.FixedMap.html" title='abstutil::collections::FixedMap struct'>FixedMap</a></td><td class='docblock-short'><p>A drop-in replacement for <code>BTreeMap</code>, where the keys have the property of being array indices.
|
||||
Some values may be missing. Much more efficient at operations on individual objects, because
|
||||
it just becomes a simple array lookup.</p>
|
||||
</td></tr><tr class='module-item'><td><a class="struct" href="struct.MultiMap.html" title='abstutil::collections::MultiMap struct'>MultiMap</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Tags.html" title='abstutil::collections::Tags struct'>Tags</a></td><td class='docblock-short'><p>Convenience functions around a string->string map</p>
|
||||
</td></tr><tr class='module-item'><td><a class="struct" href="struct.VecMap.html" title='abstutil::collections::VecMap struct'>VecMap</a></td><td class='docblock-short'><p>Use when your key is just PartialEq, not Ord or Hash.</p>
|
||||
</td></tr></table><h2 id='traits' class='section-header'><a href="#traits">Traits</a></h2>
|
||||
<table><tr class='module-item'><td><a class="trait" href="trait.IndexableKey.html" title='abstutil::collections::IndexableKey trait'>IndexableKey</a></td><td class='docblock-short'><p>Use with <code>FixedMap</code>. From a particular key, extract a <code>usize</code>. These values should be
|
||||
roughly contiguous; the space used by the <code>FixedMap</code> will be <code>O(n)</code> with respect to the largest
|
||||
value returned here.</p>
|
||||
</td></tr></table><h2 id='functions' class='section-header'><a href="#functions">Functions</a></h2>
|
||||
<table><tr class='module-item'><td><a class="fn" href="fn.contains_duplicates.html" title='abstutil::collections::contains_duplicates fn'>contains_duplicates</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.retain_btreemap.html" title='abstutil::collections::retain_btreemap fn'>retain_btreemap</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.retain_btreeset.html" title='abstutil::collections::retain_btreeset fn'>retain_btreeset</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.wraparound_get.html" title='abstutil::collections::wraparound_get fn'>wraparound_get</a></td><td class='docblock-short'></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "abstutil";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
@ -1 +1 @@
|
||||
initSidebarItems({"fn":[["contains_duplicates",""],["retain_btreemap",""],["retain_btreeset",""],["wraparound_get",""]],"struct":[["Counter",""],["MultiMap",""],["Tags","Convenience functions around a string->string map"],["VecMap","Use when your key is just PartialEq, not Ord or Hash."]]});
|
||||
initSidebarItems({"fn":[["contains_duplicates",""],["retain_btreemap",""],["retain_btreeset",""],["wraparound_get",""]],"struct":[["Counter",""],["FixedMap","A drop-in replacement for `BTreeMap`, where the keys have the property of being array indices. Some values may be missing. Much more efficient at operations on individual objects, because it just becomes a simple array lookup."],["MultiMap",""],["Tags","Convenience functions around a string->string map"],["VecMap","Use when your key is just PartialEq, not Ord or Hash."]],"trait":[["IndexableKey","Use with `FixedMap`. From a particular key, extract a `usize`. These values should be roughly contiguous; the space used by the `FixedMap` will be `O(n)` with respect to the largest value returned here."]]});
|
File diff suppressed because one or more lines are too long
28
rustdoc/abstutil/collections/struct.FixedMap.html
Normal file
28
rustdoc/abstutil/collections/struct.FixedMap.html
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
9
rustdoc/abstutil/collections/trait.IndexableKey.html
Normal file
9
rustdoc/abstutil/collections/trait.IndexableKey.html
Normal file
@ -0,0 +1,9 @@
|
||||
<!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 `IndexableKey` trait in crate `abstutil`."><meta name="keywords" content="rust, rustlang, rust-lang, IndexableKey"><title>abstutil::collections::IndexableKey - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../abstutil/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Trait IndexableKey</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.index">index</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class='location'><a href='../index.html'>abstutil</a>::<wbr><a href='index.html'>collections</a></p><script>window.sidebarCurrent = {name: 'IndexableKey', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/abstutil/collections.rs.html#252-254' title='goto source code'>[src]</a></span><span class='in-band'>Trait <a href='../index.html'>abstutil</a>::<wbr><a href='index.html'>collections</a>::<wbr><a class="trait" href=''>IndexableKey</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust trait'>pub trait IndexableKey {
|
||||
fn <a href='#tymethod.index' class='fnname'>index</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>;
|
||||
}</pre></div><div class='docblock'><p>Use with <code>FixedMap</code>. From a particular key, extract a <code>usize</code>. These values should be
|
||||
roughly contiguous; the space used by the <code>FixedMap</code> will be <code>O(n)</code> with respect to the largest
|
||||
value returned here.</p>
|
||||
</div>
|
||||
<h2 id='required-methods' class='small-section-header'>Required methods<a href='#required-methods' class='anchor'></a></h2><div class='methods'><h3 id='tymethod.index' class='method'><code>fn <a href='#tymethod.index' class='fnname'>index</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></h3></div><span class='loading-content'>Loading content...</span>
|
||||
<h2 id='implementors' class='small-section-header'>Implementors<a href='#implementors' class='anchor'></a></h2><div class='item-list' id='implementors-list'></div><span class='loading-content'>Loading content...</span><script type="text/javascript" src="../../implementors/abstutil/collections/trait.IndexableKey.js" async></script></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "abstutil";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
@ -1,2 +1,2 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `contains_duplicates` fn in crate `abstutil`."><meta name="keywords" content="rust, rustlang, rust-lang, contains_duplicates"><title>abstutil::contains_duplicates - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../abstutil/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='index.html'>abstutil</a></p><script>window.sidebarCurrent = {name: 'contains_duplicates', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/abstutil/collections.rs.html#172-181' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='index.html'>abstutil</a>::<wbr><a class="fn" href=''>contains_duplicates</a></span></h1><pre class='rust fn'>pub fn contains_duplicates<T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>>(vec: &<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><T>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "abstutil";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/abstutil/collections.rs.html#173-182' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='index.html'>abstutil</a>::<wbr><a class="fn" href=''>contains_duplicates</a></span></h1><pre class='rust fn'>pub fn contains_duplicates<T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>>(vec: &<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><T>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "abstutil";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|
@ -1,2 +1,2 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `retain_btreemap` fn in crate `abstutil`."><meta name="keywords" content="rust, rustlang, rust-lang, retain_btreemap"><title>abstutil::retain_btreemap - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../abstutil/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='index.html'>abstutil</a></p><script>window.sidebarCurrent = {name: 'retain_btreemap', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/abstutil/collections.rs.html#145-158' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='index.html'>abstutil</a>::<wbr><a class="fn" href=''>retain_btreemap</a></span></h1><pre class='rust fn'>pub fn retain_btreemap<K: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, V, F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>K, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>V) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>>(<br> map: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><K, V>, <br> keep: F<br>)</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "abstutil";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/abstutil/collections.rs.html#146-159' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='index.html'>abstutil</a>::<wbr><a class="fn" href=''>retain_btreemap</a></span></h1><pre class='rust fn'>pub fn retain_btreemap<K: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, V, F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>K, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>V) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>>(<br> map: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><K, V>, <br> keep: F<br>)</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "abstutil";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|
@ -1,2 +1,2 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `retain_btreeset` fn in crate `abstutil`."><meta name="keywords" content="rust, rustlang, rust-lang, retain_btreeset"><title>abstutil::retain_btreeset - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../abstutil/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='index.html'>abstutil</a></p><script>window.sidebarCurrent = {name: 'retain_btreeset', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/abstutil/collections.rs.html#160-170' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='index.html'>abstutil</a>::<wbr><a class="fn" href=''>retain_btreeset</a></span></h1><pre class='rust fn'>pub fn retain_btreeset<K: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>K) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>>(<br> set: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a><K>, <br> keep: F<br>)</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "abstutil";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/abstutil/collections.rs.html#161-171' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='index.html'>abstutil</a>::<wbr><a class="fn" href=''>retain_btreeset</a></span></h1><pre class='rust fn'>pub fn retain_btreeset<K: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>K) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>>(<br> set: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a><K>, <br> keep: F<br>)</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "abstutil";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|
@ -1,2 +1,2 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `wraparound_get` fn in crate `abstutil`."><meta name="keywords" content="rust, rustlang, rust-lang, wraparound_get"><title>abstutil::wraparound_get - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../abstutil/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='index.html'>abstutil</a></p><script>window.sidebarCurrent = {name: 'wraparound_get', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/abstutil/collections.rs.html#138-143' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='index.html'>abstutil</a>::<wbr><a class="fn" href=''>wraparound_get</a></span></h1><pre class='rust fn'>pub fn wraparound_get<T>(vec: &<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><T>, idx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "abstutil";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/abstutil/collections.rs.html#139-144' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='index.html'>abstutil</a>::<wbr><a class="fn" href=''>wraparound_get</a></span></h1><pre class='rust fn'>pub fn wraparound_get<T>(vec: &<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><T>, idx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "abstutil";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|
@ -13,13 +13,19 @@ downloading updates or, for developers, uploading them.</p>
|
||||
</td></tr><tr class='module-item'><td><a class="mod" href="cli/index.html" title='abstutil::cli mod'>cli</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="collections/index.html" title='abstutil::collections mod'>collections</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="io/index.html" title='abstutil::io mod'>io</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="io_native/index.html" title='abstutil::io_native mod'>io_native</a></td><td class='docblock-short'><p>Normal file IO using the filesystem</p>
|
||||
</td></tr><tr class='module-item'><td><a class="mod" href="serde/index.html" title='abstutil::serde mod'>serde</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="time/index.html" title='abstutil::time mod'>time</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="utils/index.html" title='abstutil::utils mod'>utils</a></td><td class='docblock-short'></td></tr></table><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||||
<table><tr class='module-item'><td><a class="struct" href="struct.CmdArgs.html" title='abstutil::CmdArgs struct'>CmdArgs</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Counter.html" title='abstutil::Counter struct'>Counter</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Entry.html" title='abstutil::Entry struct'>Entry</a></td><td class='docblock-short'><p>A single file</p>
|
||||
</td></tr><tr class='module-item'><td><a class="struct" href="struct.FileWithProgress.html" title='abstutil::FileWithProgress struct'>FileWithProgress</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Manifest.html" title='abstutil::Manifest struct'>Manifest</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.MultiMap.html" title='abstutil::MultiMap struct'>MultiMap</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Tags.html" title='abstutil::Tags struct'>Tags</a></td><td class='docblock-short'><p>Convenience functions around a string->string map</p>
|
||||
</td></tr><tr class='module-item'><td><a class="struct" href="struct.FileWithProgress.html" title='abstutil::FileWithProgress struct'>FileWithProgress</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.FixedMap.html" title='abstutil::FixedMap struct'>FixedMap</a></td><td class='docblock-short'><p>A drop-in replacement for <code>BTreeMap</code>, where the keys have the property of being array indices.
|
||||
Some values may be missing. Much more efficient at operations on individual objects, because
|
||||
it just becomes a simple array lookup.</p>
|
||||
</td></tr><tr class='module-item'><td><a class="struct" href="struct.Manifest.html" title='abstutil::Manifest struct'>Manifest</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.MultiMap.html" title='abstutil::MultiMap struct'>MultiMap</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Tags.html" title='abstutil::Tags struct'>Tags</a></td><td class='docblock-short'><p>Convenience functions around a string->string map</p>
|
||||
</td></tr><tr class='module-item'><td><a class="struct" href="struct.Timer.html" title='abstutil::Timer struct'>Timer</a></td><td class='docblock-short'><p>Hierarchial magic</p>
|
||||
</td></tr><tr class='module-item'><td><a class="struct" href="struct.VecMap.html" title='abstutil::VecMap struct'>VecMap</a></td><td class='docblock-short'><p>Use when your key is just PartialEq, not Ord or Hash.</p>
|
||||
</td></tr></table><h2 id='enums' class='section-header'><a href="#enums">Enums</a></h2>
|
||||
<table><tr class='module-item'><td><a class="enum" href="enum.Parallelism.html" title='abstutil::Parallelism enum'>Parallelism</a></td><td class='docblock-short'></td></tr></table><h2 id='constants' class='section-header'><a href="#constants">Constants</a></h2>
|
||||
<table><tr class='module-item'><td><a class="constant" href="constant.PROGRESS_FREQUENCY_SECONDS.html" title='abstutil::PROGRESS_FREQUENCY_SECONDS constant'>PROGRESS_FREQUENCY_SECONDS</a></td><td class='docblock-short'></td></tr></table><h2 id='traits' class='section-header'><a href="#traits">Traits</a></h2>
|
||||
<table><tr class='module-item'><td><a class="trait" href="trait.TimerSink.html" title='abstutil::TimerSink trait'>TimerSink</a></td><td class='docblock-short'></td></tr></table><h2 id='functions' class='section-header'><a href="#functions">Functions</a></h2>
|
||||
<table><tr class='module-item'><td><a class="trait" href="trait.IndexableKey.html" title='abstutil::IndexableKey trait'>IndexableKey</a></td><td class='docblock-short'><p>Use with <code>FixedMap</code>. From a particular key, extract a <code>usize</code>. These values should be
|
||||
roughly contiguous; the space used by the <code>FixedMap</code> will be <code>O(n)</code> with respect to the largest
|
||||
value returned here.</p>
|
||||
</td></tr><tr class='module-item'><td><a class="trait" href="trait.TimerSink.html" title='abstutil::TimerSink trait'>TimerSink</a></td><td class='docblock-short'></td></tr></table><h2 id='functions' class='section-header'><a href="#functions">Functions</a></h2>
|
||||
<table><tr class='module-item'><td><a class="fn" href="fn.basename.html" title='abstutil::basename fn'>basename</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.clamp.html" title='abstutil::clamp fn'>clamp</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.contains_duplicates.html" title='abstutil::contains_duplicates fn'>contains_duplicates</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.delete_file.html" title='abstutil::delete_file fn'>delete_file</a></td><td class='docblock-short'><p>Idempotent</p>
|
||||
</td></tr><tr class='module-item'><td><a class="fn" href="fn.deserialize_btreemap.html" title='abstutil::deserialize_btreemap fn'>deserialize_btreemap</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.deserialize_multimap.html" title='abstutil::deserialize_multimap fn'>deserialize_multimap</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.deserialize_usize.html" title='abstutil::deserialize_usize fn'>deserialize_usize</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.elapsed_seconds.html" title='abstutil::elapsed_seconds fn'>elapsed_seconds</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.file_exists.html" title='abstutil::file_exists fn'>file_exists</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.find_next_file.html" title='abstutil::find_next_file fn'>find_next_file</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.find_prev_file.html" title='abstutil::find_prev_file fn'>find_prev_file</a></td><td class='docblock-short'><p>Keeps file extensions</p>
|
||||
</td></tr><tr class='module-item'><td><a class="fn" href="fn.from_binary.html" title='abstutil::from_binary fn'>from_binary</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.from_json.html" title='abstutil::from_json fn'>from_json</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.list_all_objects.html" title='abstutil::list_all_objects fn'>list_all_objects</a></td><td class='docblock-short'><p>Just list all things from a directory, return sorted by name, with file extension removed.</p>
|
||||
|
@ -1 +1 @@
|
||||
initSidebarItems({"constant":[["PROGRESS_FREQUENCY_SECONDS",""]],"enum":[["Parallelism",""]],"fn":[["basename",""],["clamp",""],["contains_duplicates",""],["delete_file","Idempotent"],["deserialize_btreemap",""],["deserialize_multimap",""],["deserialize_usize",""],["elapsed_seconds",""],["file_exists",""],["find_next_file",""],["find_prev_file","Keeps file extensions"],["from_binary",""],["from_json",""],["list_all_objects","Just list all things from a directory, return sorted by name, with file extension removed."],["list_dir","Returns full paths"],["load_all_objects","Load all serialized things from a directory, return sorted by name, with file extension removed. Detects JSON or binary. Filters out broken files."],["maybe_read_binary",""],["maybe_read_json",""],["parent_path",""],["path",""],["path_all_edits",""],["path_all_maps",""],["path_all_raw_maps",""],["path_all_saves",""],["path_all_scenarios",""],["path_camera_state",""],["path_edits",""],["path_map",""],["path_popdat",""],["path_prebaked_results",""],["path_raw_map",""],["path_save",""],["path_scenario",""],["plain_list_names",""],["prettyprint_time",""],["prettyprint_usize",""],["read_binary",""],["read_json",""],["read_object",""],["retain_btreemap",""],["retain_btreeset",""],["serialize_btreemap",""],["serialize_multimap",""],["serialize_usize",""],["serialized_size_bytes",""],["slurp_file",""],["to_json",""],["to_json_terse",""],["wraparound_get",""],["write_binary",""],["write_json",""]],"mod":[["abst_data","A list of all data files that're part of A/B Street. The updater crate manages this file, either downloading updates or, for developers, uploading them."],["abst_paths","Generate paths for different A/B Street files"],["cli",""],["collections",""],["io",""],["io_native","Normal file IO using the filesystem"],["serde",""],["time",""],["utils",""]],"struct":[["CmdArgs",""],["Counter",""],["Entry","A single file"],["FileWithProgress",""],["Manifest",""],["MultiMap",""],["Tags","Convenience functions around a string->string map"],["Timer","Hierarchial magic"],["VecMap","Use when your key is just PartialEq, not Ord or Hash."]],"trait":[["TimerSink",""]]});
|
||||
initSidebarItems({"constant":[["PROGRESS_FREQUENCY_SECONDS",""]],"enum":[["Parallelism",""]],"fn":[["basename",""],["clamp",""],["contains_duplicates",""],["delete_file","Idempotent"],["deserialize_btreemap",""],["deserialize_multimap",""],["deserialize_usize",""],["elapsed_seconds",""],["file_exists",""],["find_next_file",""],["find_prev_file","Keeps file extensions"],["from_binary",""],["from_json",""],["list_all_objects","Just list all things from a directory, return sorted by name, with file extension removed."],["list_dir","Returns full paths"],["load_all_objects","Load all serialized things from a directory, return sorted by name, with file extension removed. Detects JSON or binary. Filters out broken files."],["maybe_read_binary",""],["maybe_read_json",""],["parent_path",""],["path",""],["path_all_edits",""],["path_all_maps",""],["path_all_raw_maps",""],["path_all_saves",""],["path_all_scenarios",""],["path_camera_state",""],["path_edits",""],["path_map",""],["path_popdat",""],["path_prebaked_results",""],["path_raw_map",""],["path_save",""],["path_scenario",""],["plain_list_names",""],["prettyprint_time",""],["prettyprint_usize",""],["read_binary",""],["read_json",""],["read_object",""],["retain_btreemap",""],["retain_btreeset",""],["serialize_btreemap",""],["serialize_multimap",""],["serialize_usize",""],["serialized_size_bytes",""],["slurp_file",""],["to_json",""],["to_json_terse",""],["wraparound_get",""],["write_binary",""],["write_json",""]],"mod":[["abst_data","A list of all data files that're part of A/B Street. The updater crate manages this file, either downloading updates or, for developers, uploading them."],["abst_paths","Generate paths for different A/B Street files"],["cli",""],["collections",""],["io",""],["io_native","Normal file IO using the filesystem"],["serde",""],["time",""],["utils",""]],"struct":[["CmdArgs",""],["Counter",""],["Entry","A single file"],["FileWithProgress",""],["FixedMap","A drop-in replacement for `BTreeMap`, where the keys have the property of being array indices. Some values may be missing. Much more efficient at operations on individual objects, because it just becomes a simple array lookup."],["Manifest",""],["MultiMap",""],["Tags","Convenience functions around a string->string map"],["Timer","Hierarchial magic"],["VecMap","Use when your key is just PartialEq, not Ord or Hash."]],"trait":[["IndexableKey","Use with `FixedMap`. From a particular key, extract a `usize`. These values should be roughly contiguous; the space used by the `FixedMap` will be `O(n)` with respect to the largest value returned here."],["TimerSink",""]]});
|
File diff suppressed because one or more lines are too long
28
rustdoc/abstutil/struct.FixedMap.html
Normal file
28
rustdoc/abstutil/struct.FixedMap.html
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
9
rustdoc/abstutil/trait.IndexableKey.html
Normal file
9
rustdoc/abstutil/trait.IndexableKey.html
Normal file
@ -0,0 +1,9 @@
|
||||
<!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 `IndexableKey` trait in crate `abstutil`."><meta name="keywords" content="rust, rustlang, rust-lang, IndexableKey"><title>abstutil::IndexableKey - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../abstutil/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Trait IndexableKey</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.index">index</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class='location'><a href='index.html'>abstutil</a></p><script>window.sidebarCurrent = {name: 'IndexableKey', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/abstutil/collections.rs.html#252-254' title='goto source code'>[src]</a></span><span class='in-band'>Trait <a href='index.html'>abstutil</a>::<wbr><a class="trait" href=''>IndexableKey</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust trait'>pub trait IndexableKey {
|
||||
fn <a href='#tymethod.index' class='fnname'>index</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>;
|
||||
}</pre></div><div class='docblock'><p>Use with <code>FixedMap</code>. From a particular key, extract a <code>usize</code>. These values should be
|
||||
roughly contiguous; the space used by the <code>FixedMap</code> will be <code>O(n)</code> with respect to the largest
|
||||
value returned here.</p>
|
||||
</div>
|
||||
<h2 id='required-methods' class='small-section-header'>Required methods<a href='#required-methods' class='anchor'></a></h2><div class='methods'><h3 id='tymethod.index' class='method'><code>fn <a href='#tymethod.index' class='fnname'>index</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></h3></div><span class='loading-content'>Loading content...</span>
|
||||
<h2 id='implementors' class='small-section-header'>Implementors<a href='#implementors' class='anchor'></a></h2><div class='item-list' id='implementors-list'></div><span class='loading-content'>Loading content...</span><script type="text/javascript" src="../implementors/abstutil/trait.IndexableKey.js" async></script></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "abstutil";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|
@ -1,3 +1,3 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `BUILT_TIME_UTC` constant in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>game::pregame::built_info::BUILT_TIME_UTC - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><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><script>window.sidebarCurrent = {name: 'BUILT_TIME_UTC', ty: 'constant', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-e788b46a21eaee2a/out/built.rs.html#49' title='goto source code'>[src]</a></span><span class='in-band'>Constant <a href='../../index.html'>game</a>::<wbr><a href='../index.html'>pregame</a>::<wbr><a href='index.html'>built_info</a>::<wbr><a class="constant" href=''>BUILT_TIME_UTC</a></span></h1><pre class='rust const'>pub const BUILT_TIME_UTC: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = "Thu, 15 Oct 2020 22:28:20 +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='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-e788b46a21eaee2a/out/built.rs.html#49' title='goto source code'>[src]</a></span><span class='in-band'>Constant <a href='../../index.html'>game</a>::<wbr><a href='../index.html'>pregame</a>::<wbr><a href='index.html'>built_info</a>::<wbr><a class="constant" href=''>BUILT_TIME_UTC</a></span></h1><pre class='rust const'>pub const BUILT_TIME_UTC: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = "Fri, 16 Oct 2020 17:30:49 +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><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
@ -0,0 +1,3 @@
|
||||
(function() {var implementors = {};
|
||||
implementors["sim"] = [{"text":"impl IndexableKey for CarID","synthetic":false,"types":[]},{"text":"impl IndexableKey for PedestrianID","synthetic":false,"types":[]}];
|
||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
@ -1,5 +1,5 @@
|
||||
(function() {var implementors = {};
|
||||
implementors["abstutil"] = [{"text":"impl<K: Clone, V: Clone> Clone for MultiMap<K, V> <span class=\"where fmt-newline\">where<br> K: Ord + PartialEq + Clone,<br> V: Ord + PartialEq + Clone, </span>","synthetic":false,"types":[]},{"text":"impl<T: Clone + Ord + PartialEq> Clone for Counter<T>","synthetic":false,"types":[]},{"text":"impl Clone for Tags","synthetic":false,"types":[]}];
|
||||
implementors["abstutil"] = [{"text":"impl<K: Clone, V: Clone> Clone for MultiMap<K, V> <span class=\"where fmt-newline\">where<br> K: Ord + PartialEq + Clone,<br> V: Ord + PartialEq + Clone, </span>","synthetic":false,"types":[]},{"text":"impl<T: Clone + Ord + PartialEq> Clone for Counter<T>","synthetic":false,"types":[]},{"text":"impl Clone for Tags","synthetic":false,"types":[]},{"text":"impl<K: Clone + IndexableKey, V: Clone> Clone for FixedMap<K, V>","synthetic":false,"types":[]}];
|
||||
implementors["game"] = [{"text":"impl Clone for Flags","synthetic":false,"types":[]},{"text":"impl Clone for ColorSchemeChoice","synthetic":false,"types":[]},{"text":"impl Clone for HeatmapOptions","synthetic":false,"types":[]},{"text":"impl Clone for Source","synthetic":false,"types":[]},{"text":"impl Clone for Show","synthetic":false,"types":[]},{"text":"impl Clone for Value","synthetic":false,"types":[]},{"text":"impl Clone for RecordedStoryMap","synthetic":false,"types":[]},{"text":"impl Clone for BundleEdits","synthetic":false,"types":[]},{"text":"impl Clone for ID","synthetic":false,"types":[]},{"text":"impl Clone for OpenTrip","synthetic":false,"types":[]},{"text":"impl Clone for Tab","synthetic":false,"types":[]},{"text":"impl Clone for DataOptions","synthetic":false,"types":[]},{"text":"impl Clone for SEIR","synthetic":false,"types":[]},{"text":"impl Clone for Options","synthetic":false,"types":[]},{"text":"impl Clone for Loc","synthetic":false,"types":[]},{"text":"impl Clone for Options","synthetic":false,"types":[]},{"text":"impl Clone for Options","synthetic":false,"types":[]},{"text":"impl Clone for TrafficSignalStyle","synthetic":false,"types":[]},{"text":"impl Clone for CameraAngle","synthetic":false,"types":[]},{"text":"impl Clone for UnzoomedAgents","synthetic":false,"types":[]},{"text":"impl Clone for DrawOptions","synthetic":false,"types":[]},{"text":"impl Clone for BlockSelection","synthetic":false,"types":[]},{"text":"impl Clone for DashTab","synthetic":false,"types":[]},{"text":"impl Clone for TutorialPointer","synthetic":false,"types":[]},{"text":"impl Clone for Task","synthetic":false,"types":[]},{"text":"impl Clone for GameplayMode","synthetic":false,"types":[]},{"text":"impl Clone for SpeedSetting","synthetic":false,"types":[]}];
|
||||
implementors["geom"] = [{"text":"impl Clone for Angle","synthetic":false,"types":[]},{"text":"impl Clone for Bounds","synthetic":false,"types":[]},{"text":"impl Clone for GPSBounds","synthetic":false,"types":[]},{"text":"impl Clone for Circle","synthetic":false,"types":[]},{"text":"impl Clone for Distance","synthetic":false,"types":[]},{"text":"impl Clone for Duration","synthetic":false,"types":[]},{"text":"impl Clone for LonLat","synthetic":false,"types":[]},{"text":"impl Clone for Line","synthetic":false,"types":[]},{"text":"impl Clone for InfiniteLine","synthetic":false,"types":[]},{"text":"impl Clone for Percent","synthetic":false,"types":[]},{"text":"impl Clone for Polygon","synthetic":false,"types":[]},{"text":"impl Clone for Triangle","synthetic":false,"types":[]},{"text":"impl Clone for PolyLine","synthetic":false,"types":[]},{"text":"impl Clone for Pt2D","synthetic":false,"types":[]},{"text":"impl Clone for HashablePt2D","synthetic":false,"types":[]},{"text":"impl Clone for Ring","synthetic":false,"types":[]},{"text":"impl Clone for Speed","synthetic":false,"types":[]},{"text":"impl Clone for Statistic","synthetic":false,"types":[]},{"text":"impl<T: Clone + HgramValue<T>> Clone for Histogram<T>","synthetic":false,"types":[]},{"text":"impl Clone for Time","synthetic":false,"types":[]},{"text":"impl Clone for UnitFmt","synthetic":false,"types":[]}];
|
||||
implementors["kml"] = [{"text":"impl Clone for ExtraShape","synthetic":false,"types":[]}];
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
3
rustdoc/implementors/core/ops/index/trait.Index.js
Normal file
3
rustdoc/implementors/core/ops/index/trait.Index.js
Normal file
@ -0,0 +1,3 @@
|
||||
(function() {var implementors = {};
|
||||
implementors["abstutil"] = [{"text":"impl<K: IndexableKey, V, '_> Index<&'_ K> for FixedMap<K, V>","synthetic":false,"types":[]}];
|
||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
@ -1,5 +1,5 @@
|
||||
(function() {var implementors = {};
|
||||
implementors["abstutil"] = [{"text":"impl<'de> Deserialize<'de> for Manifest","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Entry","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Tags","synthetic":false,"types":[]}];
|
||||
implementors["abstutil"] = [{"text":"impl<'de> Deserialize<'de> for Manifest","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Entry","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Tags","synthetic":false,"types":[]},{"text":"impl<'de, K: IndexableKey, V> Deserialize<'de> for FixedMap<K, V> <span class=\"where fmt-newline\">where<br> V: Deserialize<'de>, </span>","synthetic":false,"types":[]}];
|
||||
implementors["game"] = [{"text":"impl<'de> Deserialize<'de> for RecordedStoryMap","synthetic":false,"types":[]}];
|
||||
implementors["geom"] = [{"text":"impl<'de> Deserialize<'de> for Angle","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Bounds","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for GPSBounds","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Circle","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Distance","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Duration","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for LonLat","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Line","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for InfiniteLine","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Polygon","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for PolyLine","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Pt2D","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Ring","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Speed","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Statistic","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Time","synthetic":false,"types":[]}];
|
||||
implementors["headless"] = [{"text":"impl<'de> Deserialize<'de> for LoadSim","synthetic":false,"types":[]}];
|
||||
|
@ -1,5 +1,5 @@
|
||||
(function() {var implementors = {};
|
||||
implementors["abstutil"] = [{"text":"impl Serialize for Manifest","synthetic":false,"types":[]},{"text":"impl Serialize for Entry","synthetic":false,"types":[]},{"text":"impl Serialize for Tags","synthetic":false,"types":[]}];
|
||||
implementors["abstutil"] = [{"text":"impl Serialize for Manifest","synthetic":false,"types":[]},{"text":"impl Serialize for Entry","synthetic":false,"types":[]},{"text":"impl Serialize for Tags","synthetic":false,"types":[]},{"text":"impl<K: IndexableKey, V> Serialize for FixedMap<K, V> <span class=\"where fmt-newline\">where<br> V: Serialize, </span>","synthetic":false,"types":[]}];
|
||||
implementors["game"] = [{"text":"impl Serialize for RecordedStoryMap","synthetic":false,"types":[]}];
|
||||
implementors["geom"] = [{"text":"impl Serialize for Angle","synthetic":false,"types":[]},{"text":"impl Serialize for Bounds","synthetic":false,"types":[]},{"text":"impl Serialize for GPSBounds","synthetic":false,"types":[]},{"text":"impl Serialize for Circle","synthetic":false,"types":[]},{"text":"impl Serialize for Distance","synthetic":false,"types":[]},{"text":"impl Serialize for Duration","synthetic":false,"types":[]},{"text":"impl Serialize for LonLat","synthetic":false,"types":[]},{"text":"impl Serialize for Line","synthetic":false,"types":[]},{"text":"impl Serialize for InfiniteLine","synthetic":false,"types":[]},{"text":"impl Serialize for Polygon","synthetic":false,"types":[]},{"text":"impl Serialize for PolyLine","synthetic":false,"types":[]},{"text":"impl Serialize for Pt2D","synthetic":false,"types":[]},{"text":"impl Serialize for Ring","synthetic":false,"types":[]},{"text":"impl Serialize for Speed","synthetic":false,"types":[]},{"text":"impl Serialize for Statistic","synthetic":false,"types":[]},{"text":"impl Serialize for Time","synthetic":false,"types":[]}];
|
||||
implementors["headless"] = [{"text":"impl Serialize for FinishedTrip","synthetic":false,"types":[]},{"text":"impl Serialize for Delays","synthetic":false,"types":[]},{"text":"impl Serialize for Throughput","synthetic":false,"types":[]},{"text":"impl Serialize for AgentPositions","synthetic":false,"types":[]},{"text":"impl Serialize for AgentPosition","synthetic":false,"types":[]},{"text":"impl Serialize for RoadThroughput","synthetic":false,"types":[]},{"text":"impl Serialize for TrafficSignalState","synthetic":false,"types":[]}];
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `driving` mod in crate `sim`."><meta name="keywords" content="rust, rustlang, rust-lang, driving"><title>sim::mechanics::driving - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><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='../../../sim/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class='location'>Module driving</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#constants">Constants</a></li></ul></div><p class='location'><a href='../../index.html'>sim</a>::<wbr><a href='../index.html'>mechanics</a></p><script>window.sidebarCurrent = {name: 'driving', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/sim/mechanics/driving.rs.html#1-1081' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../../index.html'>sim</a>::<wbr><a href='../index.html'>mechanics</a>::<wbr><a class="mod" href=''>driving</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/sim/mechanics/driving.rs.html#1-1087' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../../index.html'>sim</a>::<wbr><a href='../index.html'>mechanics</a>::<wbr><a class="mod" href=''>driving</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.DrivingSimState.html" title='sim::mechanics::driving::DrivingSimState struct'>DrivingSimState</a></td><td class='docblock-short'><p>Simulates vehicles!</p>
|
||||
</td></tr></table><h2 id='constants' class='section-header'><a href="#constants">Constants</a></h2>
|
||||
<table><tr class='module-item'><td><a class="constant" href="constant.BLIND_RETRY_TO_CREEP_FORWARDS.html" title='sim::mechanics::driving::BLIND_RETRY_TO_CREEP_FORWARDS constant'>BLIND_RETRY_TO_CREEP_FORWARDS</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="constant" href="constant.BLIND_RETRY_TO_REACH_END_DIST.html" title='sim::mechanics::driving::BLIND_RETRY_TO_REACH_END_DIST constant'>BLIND_RETRY_TO_REACH_END_DIST</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="constant" href="constant.TIME_TO_WAIT_AT_BUS_STOP.html" title='sim::mechanics::driving::TIME_TO_WAIT_AT_BUS_STOP constant'>TIME_TO_WAIT_AT_BUS_STOP</a></td><td class='docblock-short'></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "sim";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,2 +1,2 @@
|
||||
<!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 `dump_cars` fn in crate `sim`."><meta name="keywords" content="rust, rustlang, rust-lang, dump_cars"><title>sim::mechanics::queue::dump_cars - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../../sim/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'>sim</a>::<wbr><a href='../index.html'>mechanics</a>::<wbr><a href='index.html'>queue</a></p><script>window.sidebarCurrent = {name: 'dump_cars', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#274-309' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>sim</a>::<wbr><a href='../index.html'>mechanics</a>::<wbr><a href='index.html'>queue</a>::<wbr><a class="fn" href=''>dump_cars</a></span></h1><pre class='rust fn'>fn dump_cars(<br> dists: &<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../../sim/struct.CarID.html" title="struct sim::CarID">CarID</a>, <a class="struct" href="../../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>>, <br> cars: &<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="struct" href="../../../sim/struct.CarID.html" title="struct sim::CarID">CarID</a>, <a class="struct" href="../../../sim/mechanics/car/struct.Car.html" title="struct sim::mechanics::car::Car">Car</a>>, <br> id: <a class="enum" href="../../../map_model/traversable/enum.Traversable.html" title="enum map_model::traversable::Traversable">Traversable</a>, <br> now: <a class="struct" href="../../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a><br>)</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "sim";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#275-310' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>sim</a>::<wbr><a href='../index.html'>mechanics</a>::<wbr><a href='index.html'>queue</a>::<wbr><a class="fn" href=''>dump_cars</a></span></h1><pre class='rust fn'>fn dump_cars(<br> dists: &<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../../sim/struct.CarID.html" title="struct sim::CarID">CarID</a>, <a class="struct" href="../../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>>, <br> cars: &<a class="struct" href="../../../abstutil/collections/struct.FixedMap.html" title="struct abstutil::collections::FixedMap">FixedMap</a><<a class="struct" href="../../../sim/struct.CarID.html" title="struct sim::CarID">CarID</a>, <a class="struct" href="../../../sim/mechanics/car/struct.Car.html" title="struct sim::mechanics::car::Car">Car</a>>, <br> id: <a class="enum" href="../../../map_model/traversable/enum.Traversable.html" title="enum map_model::traversable::Traversable">Traversable</a>, <br> now: <a class="struct" href="../../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a><br>)</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "sim";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
@ -1,2 +1,2 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `validate_positions` fn in crate `sim`."><meta name="keywords" content="rust, rustlang, rust-lang, validate_positions"><title>sim::mechanics::queue::validate_positions - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../../sim/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'>sim</a>::<wbr><a href='../index.html'>mechanics</a>::<wbr><a href='index.html'>queue</a></p><script>window.sidebarCurrent = {name: 'validate_positions', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#256-272' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>sim</a>::<wbr><a href='../index.html'>mechanics</a>::<wbr><a href='index.html'>queue</a>::<wbr><a class="fn" href=''>validate_positions</a></span></h1><pre class='rust fn'>fn validate_positions(<br> dists: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../../sim/struct.CarID.html" title="struct sim::CarID">CarID</a>, <a class="struct" href="../../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>>, <br> cars: &<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="struct" href="../../../sim/struct.CarID.html" title="struct sim::CarID">CarID</a>, <a class="struct" href="../../../sim/mechanics/car/struct.Car.html" title="struct sim::mechanics::car::Car">Car</a>>, <br> now: <a class="struct" href="../../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a>, <br> id: <a class="enum" href="../../../map_model/traversable/enum.Traversable.html" title="enum map_model::traversable::Traversable">Traversable</a><br>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../../sim/struct.CarID.html" title="struct sim::CarID">CarID</a>, <a class="struct" href="../../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "sim";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#257-273' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>sim</a>::<wbr><a href='../index.html'>mechanics</a>::<wbr><a href='index.html'>queue</a>::<wbr><a class="fn" href=''>validate_positions</a></span></h1><pre class='rust fn'>fn validate_positions(<br> dists: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../../sim/struct.CarID.html" title="struct sim::CarID">CarID</a>, <a class="struct" href="../../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>>, <br> cars: &<a class="struct" href="../../../abstutil/collections/struct.FixedMap.html" title="struct abstutil::collections::FixedMap">FixedMap</a><<a class="struct" href="../../../sim/struct.CarID.html" title="struct sim::CarID">CarID</a>, <a class="struct" href="../../../sim/mechanics/car/struct.Car.html" title="struct sim::mechanics::car::Car">Car</a>>, <br> now: <a class="struct" href="../../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a>, <br> id: <a class="enum" href="../../../map_model/traversable/enum.Traversable.html" title="enum map_model::traversable::Traversable">Traversable</a><br>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../../sim/struct.CarID.html" title="struct sim::CarID">CarID</a>, <a class="struct" href="../../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "sim";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `queue` mod in crate `sim`."><meta name="keywords" content="rust, rustlang, rust-lang, queue"><title>sim::mechanics::queue - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><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='../../../sim/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class='location'>Module queue</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div><p class='location'><a href='../../index.html'>sim</a>::<wbr><a href='../index.html'>mechanics</a></p><script>window.sidebarCurrent = {name: 'queue', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#1-309' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../../index.html'>sim</a>::<wbr><a href='../index.html'>mechanics</a>::<wbr><a class="mod" href=''>queue</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#1-310' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../../index.html'>sim</a>::<wbr><a href='../index.html'>mechanics</a>::<wbr><a class="mod" href=''>queue</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.Queue.html" title='sim::mechanics::queue::Queue struct'>Queue</a></td><td class='docblock-short'><p>A Queue of vehicles on a single lane or turn. No over-taking or lane-changing. This is where
|
||||
https://dabreegster.github.io/abstreet/trafficsim/discrete_event.html#exact-positions is
|
||||
implemented.</p>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `Queue` struct in crate `sim`."><meta name="keywords" content="rust, rustlang, rust-lang, Queue"><title>sim::mechanics::queue::Queue - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../../sim/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class='location'>Struct Queue</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.cars">cars</a><a href="#structfield.geom_len">geom_len</a><a href="#structfield.id">id</a><a href="#structfield.laggy_head">laggy_head</a><a href="#structfield.reserved_length">reserved_length</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.free_reserved_space">free_reserved_space</a><a href="#method.get_car_positions">get_car_positions</a><a href="#method.get_idx_to_insert_car">get_idx_to_insert_car</a><a href="#method.inner_get_car_positions">inner_get_car_positions</a><a href="#method.new">new</a><a href="#method.room_for_car">room_for_car</a><a href="#method.target_lane_penalty">target_lane_penalty</a><a href="#method.try_to_reserve_entry">try_to_reserve_entry</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Deserialize%3C%27de%3E">Deserialize<'de></a><a href="#impl-Serialize">Serialize</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class='location'><a href='../../index.html'>sim</a>::<wbr><a href='../index.html'>mechanics</a>::<wbr><a href='index.html'>queue</a></p><script>window.sidebarCurrent = {name: 'Queue', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#15-28' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='../../index.html'>sim</a>::<wbr><a href='../index.html'>mechanics</a>::<wbr><a href='index.html'>queue</a>::<wbr><a class="struct" href=''>Queue</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct Queue {
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#16-29' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='../../index.html'>sim</a>::<wbr><a href='../index.html'>mechanics</a>::<wbr><a href='index.html'>queue</a>::<wbr><a class="struct" href=''>Queue</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct Queue {
|
||||
pub id: <a class="enum" href="../../../map_model/traversable/enum.Traversable.html" title="enum map_model::traversable::Traversable">Traversable</a>,
|
||||
pub cars: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/vec_deque/struct.VecDeque.html" title="struct alloc::collections::vec_deque::VecDeque">VecDeque</a><<a class="struct" href="../../../sim/struct.CarID.html" title="struct sim::CarID">CarID</a>>,
|
||||
pub laggy_head: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../sim/struct.CarID.html" title="struct sim::CarID">CarID</a>>,
|
||||
@ -15,13 +15,13 @@ target lane. When the car completely leaves (stops being the laggy_head), free u
|
||||
space. To prevent blocking the box for possibly scary amounts of time, allocate some of
|
||||
this length first. This is unused for turns themselves. This value can exceed geom_len
|
||||
(for the edge case of ONE long car on a short queue).</p>
|
||||
</div><h2 id='implementations' class='small-section-header'>Implementations<a href='#implementations' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="struct" href="../../../sim/mechanics/queue/struct.Queue.html" title="struct sim::mechanics::queue::Queue">Queue</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#30-254' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code>pub fn <a href='#method.new' class='fnname'>new</a>(id: <a class="enum" href="../../../map_model/traversable/enum.Traversable.html" title="enum map_model::traversable::Traversable">Traversable</a>, map: &<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -> <a class="struct" href="../../../sim/mechanics/queue/struct.Queue.html" title="struct sim::mechanics::queue::Queue">Queue</a></code><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#31-39' title='goto source code'>[src]</a></h4><h4 id='method.get_car_positions' class="method"><code>pub fn <a href='#method.get_car_positions' class='fnname'>get_car_positions</a>(<br> &self, <br> now: <a class="struct" href="../../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a>, <br> cars: &<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="struct" href="../../../sim/struct.CarID.html" title="struct sim::CarID">CarID</a>, <a class="struct" href="../../../sim/mechanics/car/struct.Car.html" title="struct sim::mechanics::car::Car">Car</a>>, <br> queues: &<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="enum" href="../../../map_model/traversable/enum.Traversable.html" title="enum map_model::traversable::Traversable">Traversable</a>, <a class="struct" href="../../../sim/mechanics/queue/struct.Queue.html" title="struct sim::mechanics::queue::Queue">Queue</a>><br>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../../sim/struct.CarID.html" title="struct sim::CarID">CarID</a>, <a class="struct" href="../../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>></code><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#42-49' title='goto source code'>[src]</a></h4><div class='docblock'><p>Farthest along (greatest distance) is first.</p>
|
||||
</div><h4 id='method.inner_get_car_positions' class="method"><code>fn <a href='#method.inner_get_car_positions' class='fnname'>inner_get_car_positions</a>(<br> &self, <br> now: <a class="struct" href="../../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a>, <br> cars: &<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="struct" href="../../../sim/struct.CarID.html" title="struct sim::CarID">CarID</a>, <a class="struct" href="../../../sim/mechanics/car/struct.Car.html" title="struct sim::mechanics::car::Car">Car</a>>, <br> queues: &<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="enum" href="../../../map_model/traversable/enum.Traversable.html" title="enum map_model::traversable::Traversable">Traversable</a>, <a class="struct" href="../../../sim/mechanics/queue/struct.Queue.html" title="struct sim::mechanics::queue::Queue">Queue</a>>, <br> recursed_queues: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a><<a class="enum" href="../../../map_model/traversable/enum.Traversable.html" title="enum map_model::traversable::Traversable">Traversable</a>><br>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../../sim/struct.CarID.html" title="struct sim::CarID">CarID</a>, <a class="struct" href="../../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>></code><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#51-165' title='goto source code'>[src]</a></h4><h4 id='method.get_idx_to_insert_car' class="method"><code>pub fn <a href='#method.get_idx_to_insert_car' class='fnname'>get_idx_to_insert_car</a>(<br> &self, <br> start_dist: <a class="struct" href="../../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a>, <br> vehicle_len: <a class="struct" href="../../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a>, <br> now: <a class="struct" href="../../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a>, <br> cars: &<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="struct" href="../../../sim/struct.CarID.html" title="struct sim::CarID">CarID</a>, <a class="struct" href="../../../sim/mechanics/car/struct.Car.html" title="struct sim::mechanics::car::Car">Car</a>>, <br> queues: &<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="enum" href="../../../map_model/traversable/enum.Traversable.html" title="enum map_model::traversable::Traversable">Traversable</a>, <a class="struct" href="../../../sim/mechanics/queue/struct.Queue.html" title="struct sim::mechanics::queue::Queue">Queue</a>><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>></code><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#167-204' title='goto source code'>[src]</a></h4><h4 id='method.try_to_reserve_entry' class="method"><code>pub fn <a href='#method.try_to_reserve_entry' class='fnname'>try_to_reserve_entry</a>(&mut self, car: &<a class="struct" href="../../../sim/mechanics/car/struct.Car.html" title="struct sim::mechanics::car::Car">Car</a>, force_entry: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#208-222' title='goto source code'>[src]</a></h4><div class='docblock'><p>If true, there's room and the car must actually start the turn (because the space is
|
||||
</div><h2 id='implementations' class='small-section-header'>Implementations<a href='#implementations' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="struct" href="../../../sim/mechanics/queue/struct.Queue.html" title="struct sim::mechanics::queue::Queue">Queue</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#31-255' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code>pub fn <a href='#method.new' class='fnname'>new</a>(id: <a class="enum" href="../../../map_model/traversable/enum.Traversable.html" title="enum map_model::traversable::Traversable">Traversable</a>, map: &<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -> <a class="struct" href="../../../sim/mechanics/queue/struct.Queue.html" title="struct sim::mechanics::queue::Queue">Queue</a></code><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#32-40' title='goto source code'>[src]</a></h4><h4 id='method.get_car_positions' class="method"><code>pub fn <a href='#method.get_car_positions' class='fnname'>get_car_positions</a>(<br> &self, <br> now: <a class="struct" href="../../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a>, <br> cars: &<a class="struct" href="../../../abstutil/collections/struct.FixedMap.html" title="struct abstutil::collections::FixedMap">FixedMap</a><<a class="struct" href="../../../sim/struct.CarID.html" title="struct sim::CarID">CarID</a>, <a class="struct" href="../../../sim/mechanics/car/struct.Car.html" title="struct sim::mechanics::car::Car">Car</a>>, <br> queues: &<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="enum" href="../../../map_model/traversable/enum.Traversable.html" title="enum map_model::traversable::Traversable">Traversable</a>, <a class="struct" href="../../../sim/mechanics/queue/struct.Queue.html" title="struct sim::mechanics::queue::Queue">Queue</a>><br>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../../sim/struct.CarID.html" title="struct sim::CarID">CarID</a>, <a class="struct" href="../../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>></code><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#43-50' title='goto source code'>[src]</a></h4><div class='docblock'><p>Farthest along (greatest distance) is first.</p>
|
||||
</div><h4 id='method.inner_get_car_positions' class="method"><code>fn <a href='#method.inner_get_car_positions' class='fnname'>inner_get_car_positions</a>(<br> &self, <br> now: <a class="struct" href="../../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a>, <br> cars: &<a class="struct" href="../../../abstutil/collections/struct.FixedMap.html" title="struct abstutil::collections::FixedMap">FixedMap</a><<a class="struct" href="../../../sim/struct.CarID.html" title="struct sim::CarID">CarID</a>, <a class="struct" href="../../../sim/mechanics/car/struct.Car.html" title="struct sim::mechanics::car::Car">Car</a>>, <br> queues: &<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="enum" href="../../../map_model/traversable/enum.Traversable.html" title="enum map_model::traversable::Traversable">Traversable</a>, <a class="struct" href="../../../sim/mechanics/queue/struct.Queue.html" title="struct sim::mechanics::queue::Queue">Queue</a>>, <br> recursed_queues: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a><<a class="enum" href="../../../map_model/traversable/enum.Traversable.html" title="enum map_model::traversable::Traversable">Traversable</a>><br>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../../sim/struct.CarID.html" title="struct sim::CarID">CarID</a>, <a class="struct" href="../../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>></code><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#52-166' title='goto source code'>[src]</a></h4><h4 id='method.get_idx_to_insert_car' class="method"><code>pub fn <a href='#method.get_idx_to_insert_car' class='fnname'>get_idx_to_insert_car</a>(<br> &self, <br> start_dist: <a class="struct" href="../../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a>, <br> vehicle_len: <a class="struct" href="../../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a>, <br> now: <a class="struct" href="../../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a>, <br> cars: &<a class="struct" href="../../../abstutil/collections/struct.FixedMap.html" title="struct abstutil::collections::FixedMap">FixedMap</a><<a class="struct" href="../../../sim/struct.CarID.html" title="struct sim::CarID">CarID</a>, <a class="struct" href="../../../sim/mechanics/car/struct.Car.html" title="struct sim::mechanics::car::Car">Car</a>>, <br> queues: &<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="enum" href="../../../map_model/traversable/enum.Traversable.html" title="enum map_model::traversable::Traversable">Traversable</a>, <a class="struct" href="../../../sim/mechanics/queue/struct.Queue.html" title="struct sim::mechanics::queue::Queue">Queue</a>><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>></code><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#168-205' title='goto source code'>[src]</a></h4><h4 id='method.try_to_reserve_entry' class="method"><code>pub fn <a href='#method.try_to_reserve_entry' class='fnname'>try_to_reserve_entry</a>(&mut self, car: &<a class="struct" href="../../../sim/mechanics/car/struct.Car.html" title="struct sim::mechanics::car::Car">Car</a>, force_entry: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#209-223' title='goto source code'>[src]</a></h4><div class='docblock'><p>If true, there's room and the car must actually start the turn (because the space is
|
||||
reserved).</p>
|
||||
</div><h4 id='method.room_for_car' class="method"><code>pub fn <a href='#method.room_for_car' class='fnname'>room_for_car</a>(&self, car: &<a class="struct" href="../../../sim/mechanics/car/struct.Car.html" title="struct sim::mechanics::car::Car">Car</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#225-228' title='goto source code'>[src]</a></h4><h4 id='method.free_reserved_space' class="method"><code>pub fn <a href='#method.free_reserved_space' class='fnname'>free_reserved_space</a>(&mut self, car: &<a class="struct" href="../../../sim/mechanics/car/struct.Car.html" title="struct sim::mechanics::car::Car">Car</a>)</code><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#230-233' title='goto source code'>[src]</a></h4><h4 id='method.target_lane_penalty' class="method"><code>pub fn <a href='#method.target_lane_penalty' class='fnname'>target_lane_penalty</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.tuple.html">)</a></code><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#235-253' title='goto source code'>[src]</a></h4></div><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../../sim/mechanics/queue/struct.Queue.html" title="struct sim::mechanics::queue::Queue">Queue</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#14' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class="struct" href="../../../sim/mechanics/queue/struct.Queue.html" title="struct sim::mechanics::queue::Queue">Queue</a></code><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#14' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id='method.room_for_car' class="method"><code>pub fn <a href='#method.room_for_car' class='fnname'>room_for_car</a>(&self, car: &<a class="struct" href="../../../sim/mechanics/car/struct.Car.html" title="struct sim::mechanics::car::Car">Car</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#226-229' title='goto source code'>[src]</a></h4><h4 id='method.free_reserved_space' class="method"><code>pub fn <a href='#method.free_reserved_space' class='fnname'>free_reserved_space</a>(&mut self, car: &<a class="struct" href="../../../sim/mechanics/car/struct.Car.html" title="struct sim::mechanics::car::Car">Car</a>)</code><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#231-234' title='goto source code'>[src]</a></h4><h4 id='method.target_lane_penalty' class="method"><code>pub fn <a href='#method.target_lane_penalty' class='fnname'>target_lane_penalty</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.tuple.html">)</a></code><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#236-254' title='goto source code'>[src]</a></h4></div><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../../sim/mechanics/queue/struct.Queue.html" title="struct sim::mechanics::queue::Queue">Queue</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#15' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class="struct" href="../../../sim/mechanics/queue/struct.Queue.html" title="struct sim::mechanics::queue::Queue">Queue</a></code><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#15' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id='method.clone_from' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#131-133' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></div><h3 id='impl-Deserialize%3C%27de%3E' class='impl'><code class='in-band'>impl<'de> <a class="trait" href="https://docs.rs/serde/1.0.116/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a><'de> for <a class="struct" href="../../../sim/mechanics/queue/struct.Queue.html" title="struct sim::mechanics::queue::Queue">Queue</a></code><a href='#impl-Deserialize%3C%27de%3E' class='anchor'></a><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#14' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.deserialize' class="method hidden"><code>fn <a href='https://docs.rs/serde/1.0.116/serde/de/trait.Deserialize.html#tymethod.deserialize' class='fnname'>deserialize</a><__D>(__deserializer: __D) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, __D::<a class="type" href="https://docs.rs/serde/1.0.116/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>> <span class="where fmt-newline">where<br> __D: <a class="trait" href="https://docs.rs/serde/1.0.116/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a><'de>, </span></code><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#14' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.116/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
|
||||
</div></div><h3 id='impl-Serialize' class='impl'><code class='in-band'>impl <a class="trait" href="https://docs.rs/serde/1.0.116/serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a> for <a class="struct" href="../../../sim/mechanics/queue/struct.Queue.html" title="struct sim::mechanics::queue::Queue">Queue</a></code><a href='#impl-Serialize' class='anchor'></a><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#14' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.serialize' class="method hidden"><code>fn <a href='https://docs.rs/serde/1.0.116/serde/ser/trait.Serialize.html#tymethod.serialize' class='fnname'>serialize</a><__S>(&self, __serializer: __S) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><__S::<a class="type" href="https://docs.rs/serde/1.0.116/serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, __S::<a class="type" href="https://docs.rs/serde/1.0.116/serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>> <span class="where fmt-newline">where<br> __S: <a class="trait" href="https://docs.rs/serde/1.0.116/serde/ser/trait.Serializer.html" title="trait serde::ser::Serializer">Serializer</a>, </span></code><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#14' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Serialize this value into the given Serde serializer. <a href="https://docs.rs/serde/1.0.116/serde/ser/trait.Serialize.html#tymethod.serialize">Read more</a></p>
|
||||
</div></div><h3 id='impl-Deserialize%3C%27de%3E' class='impl'><code class='in-band'>impl<'de> <a class="trait" href="https://docs.rs/serde/1.0.116/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a><'de> for <a class="struct" href="../../../sim/mechanics/queue/struct.Queue.html" title="struct sim::mechanics::queue::Queue">Queue</a></code><a href='#impl-Deserialize%3C%27de%3E' class='anchor'></a><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#15' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.deserialize' class="method hidden"><code>fn <a href='https://docs.rs/serde/1.0.116/serde/de/trait.Deserialize.html#tymethod.deserialize' class='fnname'>deserialize</a><__D>(__deserializer: __D) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, __D::<a class="type" href="https://docs.rs/serde/1.0.116/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>> <span class="where fmt-newline">where<br> __D: <a class="trait" href="https://docs.rs/serde/1.0.116/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a><'de>, </span></code><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#15' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.116/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
|
||||
</div></div><h3 id='impl-Serialize' class='impl'><code class='in-band'>impl <a class="trait" href="https://docs.rs/serde/1.0.116/serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a> for <a class="struct" href="../../../sim/mechanics/queue/struct.Queue.html" title="struct sim::mechanics::queue::Queue">Queue</a></code><a href='#impl-Serialize' class='anchor'></a><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#15' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.serialize' class="method hidden"><code>fn <a href='https://docs.rs/serde/1.0.116/serde/ser/trait.Serialize.html#tymethod.serialize' class='fnname'>serialize</a><__S>(&self, __serializer: __S) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><__S::<a class="type" href="https://docs.rs/serde/1.0.116/serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, __S::<a class="type" href="https://docs.rs/serde/1.0.116/serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>> <span class="where fmt-newline">where<br> __S: <a class="trait" href="https://docs.rs/serde/1.0.116/serde/ser/trait.Serializer.html" title="trait serde::ser::Serializer">Serializer</a>, </span></code><a class='srclink' href='../../../src/sim/mechanics/queue.rs.html#15' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Serialize this value into the given Serde serializer. <a href="https://docs.rs/serde/1.0.116/serde/ser/trait.Serialize.html#tymethod.serialize">Read more</a></p>
|
||||
</div></div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../../sim/mechanics/queue/struct.Queue.html" title="struct sim::mechanics::queue::Queue">Queue</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Send' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../../sim/mechanics/queue/struct.Queue.html" title="struct sim::mechanics::queue::Queue">Queue</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../../sim/mechanics/queue/struct.Queue.html" title="struct sim::mechanics::queue::Queue">Queue</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../../sim/mechanics/queue/struct.Queue.html" title="struct sim::mechanics::queue::Queue">Queue</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../../sim/mechanics/queue/struct.Queue.html" title="struct sim::mechanics::queue::Queue">Queue</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-Any' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></div><h3 id='impl-BorrowMut%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-BorrowMut%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,2 +1,2 @@
|
||||
<!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 `find_crowds` fn in crate `sim`."><meta name="keywords" content="rust, rustlang, rust-lang, find_crowds"><title>sim::mechanics::walking::find_crowds - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../../sim/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'>sim</a>::<wbr><a href='../index.html'>mechanics</a>::<wbr><a href='index.html'>walking</a></p><script>window.sidebarCurrent = {name: 'find_crowds', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/sim/mechanics/walking.rs.html#762-804' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>sim</a>::<wbr><a href='../index.html'>mechanics</a>::<wbr><a href='index.html'>walking</a>::<wbr><a class="fn" href=''>find_crowds</a></span></h1><pre class='rust fn'>fn find_crowds(<br> input: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../../sim/struct.PedestrianID.html" title="struct sim::PedestrianID">PedestrianID</a>, <a class="struct" href="../../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>>, <br> location: <a class="enum" href="../../../sim/enum.PedCrowdLocation.html" title="enum sim::PedCrowdLocation">PedCrowdLocation</a><br>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="../../../sim/struct.PedestrianID.html" title="struct sim::PedestrianID">PedestrianID</a>>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="../../../sim/struct.DrawPedCrowdInput.html" title="struct sim::DrawPedCrowdInput">DrawPedCrowdInput</a>><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "sim";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/sim/mechanics/walking.rs.html#761-803' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>sim</a>::<wbr><a href='../index.html'>mechanics</a>::<wbr><a href='index.html'>walking</a>::<wbr><a class="fn" href=''>find_crowds</a></span></h1><pre class='rust fn'>fn find_crowds(<br> input: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../../sim/struct.PedestrianID.html" title="struct sim::PedestrianID">PedestrianID</a>, <a class="struct" href="../../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>>, <br> location: <a class="enum" href="../../../sim/enum.PedCrowdLocation.html" title="enum sim::PedCrowdLocation">PedCrowdLocation</a><br>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="../../../sim/struct.PedestrianID.html" title="struct sim::PedestrianID">PedestrianID</a>>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="../../../sim/struct.DrawPedCrowdInput.html" title="struct sim::DrawPedCrowdInput">DrawPedCrowdInput</a>><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "sim";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `walking` mod in crate `sim`."><meta name="keywords" content="rust, rustlang, rust-lang, walking"><title>sim::mechanics::walking - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><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='../../../sim/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class='location'>Module walking</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#constants">Constants</a></li><li><a href="#functions">Functions</a></li></ul></div><p class='location'><a href='../../index.html'>sim</a>::<wbr><a href='../index.html'>mechanics</a></p><script>window.sidebarCurrent = {name: 'walking', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/sim/mechanics/walking.rs.html#1-804' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../../index.html'>sim</a>::<wbr><a href='../index.html'>mechanics</a>::<wbr><a class="mod" href=''>walking</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/sim/mechanics/walking.rs.html#1-809' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../../index.html'>sim</a>::<wbr><a href='../index.html'>mechanics</a>::<wbr><a class="mod" href=''>walking</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.Pedestrian.html" title='sim::mechanics::walking::Pedestrian struct'>Pedestrian</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.WalkingSimState.html" title='sim::mechanics::walking::WalkingSimState struct'>WalkingSimState</a></td><td class='docblock-short'><p>Simulates pedestrians. Unlike vehicles, pedestrians can move bidirectionally on sidewalks and
|
||||
just "ghost" through each other. There's no queueing or slowdown when many people are
|
||||
overlapping. They're simply grouped together into a DrawPedCrowdInput for rendering.</p>
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `CarID` struct in crate `sim`."><meta name="keywords" content="rust, rustlang, rust-lang, CarID"><title>sim::CarID - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../sim/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Struct CarID</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Copy">Copy</a><a href="#impl-Debug">Debug</a><a href="#impl-Deserialize%3C%27de%3E">Deserialize<'de></a><a href="#impl-Display">Display</a><a href="#impl-Eq">Eq</a><a href="#impl-Hash">Hash</a><a href="#impl-Ord">Ord</a><a href="#impl-PartialEq%3CCarID%3E">PartialEq<CarID></a><a href="#impl-PartialOrd%3CCarID%3E">PartialOrd<CarID></a><a href="#impl-Serialize">Serialize</a><a href="#impl-StructuralEq">StructuralEq</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-Equivalent%3CK%3E">Equivalent<K></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-NodeTrait">NodeTrait</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-ToString">ToString</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class='location'><a href='index.html'>sim</a></p><script>window.sidebarCurrent = {name: 'CarID', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<!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 `CarID` struct in crate `sim`."><meta name="keywords" content="rust, rustlang, rust-lang, CarID"><title>sim::CarID - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../sim/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Struct CarID</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Copy">Copy</a><a href="#impl-Debug">Debug</a><a href="#impl-Deserialize%3C%27de%3E">Deserialize<'de></a><a href="#impl-Display">Display</a><a href="#impl-Eq">Eq</a><a href="#impl-Hash">Hash</a><a href="#impl-IndexableKey">IndexableKey</a><a href="#impl-Ord">Ord</a><a href="#impl-PartialEq%3CCarID%3E">PartialEq<CarID></a><a href="#impl-PartialOrd%3CCarID%3E">PartialOrd<CarID></a><a href="#impl-Serialize">Serialize</a><a href="#impl-StructuralEq">StructuralEq</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-Equivalent%3CK%3E">Equivalent<K></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-NodeTrait">NodeTrait</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-ToString">ToString</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class='location'><a href='index.html'>sim</a></p><script>window.sidebarCurrent = {name: 'CarID', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/sim/lib.rs.html#82-89' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='index.html'>sim</a>::<wbr><a class="struct" href=''>CarID</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct CarID(pub <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, pub <a class="enum" href="../sim/enum.VehicleType.html" title="enum sim::VehicleType">VehicleType</a>);</pre></div><div class='docblock'><p>The numeric ID must be globally unique, without considering VehicleType. VehicleType is bundled
|
||||
for convenient debugging.</p>
|
||||
</div><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../sim/struct.CarID.html" title="struct sim::CarID">CarID</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../src/sim/lib.rs.html#81' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class="struct" href="../sim/struct.CarID.html" title="struct sim::CarID">CarID</a></code><a class='srclink' href='../src/sim/lib.rs.html#81' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
@ -8,7 +8,7 @@ for convenient debugging.</p>
|
||||
</div></div><h3 id='impl-Display' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="struct" href="../sim/struct.CarID.html" title="struct sim::CarID">CarID</a></code><a href='#impl-Display' class='anchor'></a><a class='srclink' href='../src/sim/lib.rs.html#91-100' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt-1' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../src/sim/lib.rs.html#92-99' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id='impl-Eq' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="../sim/struct.CarID.html" title="struct sim::CarID">CarID</a></code><a href='#impl-Eq' class='anchor'></a><a class='srclink' href='../src/sim/lib.rs.html#81' title='goto source code'>[src]</a></h3><div class='impl-items'></div><h3 id='impl-Hash' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> for <a class="struct" href="../sim/struct.CarID.html" title="struct sim::CarID">CarID</a></code><a href='#impl-Hash' class='anchor'></a><a class='srclink' href='../src/sim/lib.rs.html#81' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.hash' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#tymethod.hash' class='fnname'>hash</a><__H: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>>(&self, state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>__H)</code><a class='srclink' href='../src/sim/lib.rs.html#81' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Feeds this value into the given [<code>Hasher</code>]. <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#tymethod.hash">Read more</a></p>
|
||||
</div><h4 id='method.hash_slice' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice' class='fnname'>hash_slice</a><H>(data: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[Self]</a>, state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>H) <span class="where fmt-newline">where<br> H: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>, </span></code><span class='since' title='Stable since Rust version 1.3.0'>1.3.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/hash/mod.rs.html#192-199' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Feeds a slice of this type into the given [<code>Hasher</code>]. <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice">Read more</a></p>
|
||||
</div></div><h3 id='impl-Ord' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="struct" href="../sim/struct.CarID.html" title="struct sim::CarID">CarID</a></code><a href='#impl-Ord' class='anchor'></a><a class='srclink' href='../src/sim/lib.rs.html#81' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.cmp' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp' class='fnname'>cmp</a>(&self, other: &<a class="struct" href="../sim/struct.CarID.html" title="struct sim::CarID">CarID</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></code><a class='srclink' href='../src/sim/lib.rs.html#81' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method returns an [<code>Ordering</code>] between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></p>
|
||||
</div></div><h3 id='impl-IndexableKey' class='impl'><code class='in-band'>impl <a class="trait" href="../abstutil/collections/trait.IndexableKey.html" title="trait abstutil::collections::IndexableKey">IndexableKey</a> for <a class="struct" href="../sim/struct.CarID.html" title="struct sim::CarID">CarID</a></code><a href='#impl-IndexableKey' class='anchor'></a><a class='srclink' href='../src/sim/mechanics/driving.rs.html#1083-1087' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.index' class="method hidden"><code>fn <a href='../abstutil/collections/trait.IndexableKey.html#tymethod.index' class='fnname'>index</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class='srclink' href='../src/sim/mechanics/driving.rs.html#1084-1086' title='goto source code'>[src]</a></h4></div><h3 id='impl-Ord' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="struct" href="../sim/struct.CarID.html" title="struct sim::CarID">CarID</a></code><a href='#impl-Ord' class='anchor'></a><a class='srclink' href='../src/sim/lib.rs.html#81' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.cmp' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp' class='fnname'>cmp</a>(&self, other: &<a class="struct" href="../sim/struct.CarID.html" title="struct sim::CarID">CarID</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></code><a class='srclink' href='../src/sim/lib.rs.html#81' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method returns an [<code>Ordering</code>] between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></p>
|
||||
</div><h4 id='method.max' class="method hidden"><code><span class="docblock attributes">#[must_use]</span>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max' class='fnname'>max</a>(self, other: Self) -> Self</code><span class='since' title='Stable since Rust version 1.21.0'>1.21.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#593-598' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Compares and returns the maximum of two values. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max">Read more</a></p>
|
||||
</div><h4 id='method.min' class="method hidden"><code><span class="docblock attributes">#[must_use]</span>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min' class='fnname'>min</a>(self, other: Self) -> Self</code><span class='since' title='Stable since Rust version 1.21.0'>1.21.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#613-618' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Compares and returns the minimum of two values. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min">Read more</a></p>
|
||||
</div><h4 id='method.clamp' class="method hidden"><code><span class="docblock attributes">#[must_use]</span>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.clamp' class='fnname'>clamp</a>(self, min: Self, max: Self) -> Self</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#640-652' title='goto source code'>[src]</a></h4><div class='stability hidden'><div class='stab unstable'><span class='emoji'>🔬</span> This is a nightly-only experimental API. (<code>clamp</code>)</div></div><div class='docblock hidden'><p>Restrict a value to a certain interval. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.clamp">Read more</a></p>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `PedestrianID` struct in crate `sim`."><meta name="keywords" content="rust, rustlang, rust-lang, PedestrianID"><title>sim::PedestrianID - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../sim/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Struct PedestrianID</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Copy">Copy</a><a href="#impl-Debug">Debug</a><a href="#impl-Deserialize%3C%27de%3E">Deserialize<'de></a><a href="#impl-Display">Display</a><a href="#impl-Eq">Eq</a><a href="#impl-Hash">Hash</a><a href="#impl-Ord">Ord</a><a href="#impl-PartialEq%3CPedestrianID%3E">PartialEq<PedestrianID></a><a href="#impl-PartialOrd%3CPedestrianID%3E">PartialOrd<PedestrianID></a><a href="#impl-Serialize">Serialize</a><a href="#impl-StructuralEq">StructuralEq</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-Equivalent%3CK%3E">Equivalent<K></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-NodeTrait">NodeTrait</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-ToString">ToString</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class='location'><a href='index.html'>sim</a></p><script>window.sidebarCurrent = {name: 'PedestrianID', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<!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 `PedestrianID` struct in crate `sim`."><meta name="keywords" content="rust, rustlang, rust-lang, PedestrianID"><title>sim::PedestrianID - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../sim/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Struct PedestrianID</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Copy">Copy</a><a href="#impl-Debug">Debug</a><a href="#impl-Deserialize%3C%27de%3E">Deserialize<'de></a><a href="#impl-Display">Display</a><a href="#impl-Eq">Eq</a><a href="#impl-Hash">Hash</a><a href="#impl-IndexableKey">IndexableKey</a><a href="#impl-Ord">Ord</a><a href="#impl-PartialEq%3CPedestrianID%3E">PartialEq<PedestrianID></a><a href="#impl-PartialOrd%3CPedestrianID%3E">PartialOrd<PedestrianID></a><a href="#impl-Serialize">Serialize</a><a href="#impl-StructuralEq">StructuralEq</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-Equivalent%3CK%3E">Equivalent<K></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-NodeTrait">NodeTrait</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-ToString">ToString</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class='location'><a href='index.html'>sim</a></p><script>window.sidebarCurrent = {name: 'PedestrianID', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/sim/lib.rs.html#103-109' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='index.html'>sim</a>::<wbr><a class="struct" href=''>PedestrianID</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct PedestrianID(pub <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>);</pre></div><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../sim/struct.PedestrianID.html" title="struct sim::PedestrianID">PedestrianID</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../src/sim/lib.rs.html#102' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class="struct" href="../sim/struct.PedestrianID.html" title="struct sim::PedestrianID">PedestrianID</a></code><a class='srclink' href='../src/sim/lib.rs.html#102' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id='method.clone_from' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#131-133' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></div><h3 id='impl-Copy' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="../sim/struct.PedestrianID.html" title="struct sim::PedestrianID">PedestrianID</a></code><a href='#impl-Copy' class='anchor'></a><a class='srclink' href='../src/sim/lib.rs.html#102' title='goto source code'>[src]</a></h3><div class='impl-items'></div><h3 id='impl-Debug' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../sim/struct.PedestrianID.html" title="struct sim::PedestrianID">PedestrianID</a></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../src/sim/lib.rs.html#102' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../src/sim/lib.rs.html#102' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
@ -6,7 +6,7 @@
|
||||
</div></div><h3 id='impl-Display' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="struct" href="../sim/struct.PedestrianID.html" title="struct sim::PedestrianID">PedestrianID</a></code><a href='#impl-Display' class='anchor'></a><a class='srclink' href='../src/sim/lib.rs.html#111-115' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt-1' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../src/sim/lib.rs.html#112-114' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id='impl-Eq' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="../sim/struct.PedestrianID.html" title="struct sim::PedestrianID">PedestrianID</a></code><a href='#impl-Eq' class='anchor'></a><a class='srclink' href='../src/sim/lib.rs.html#102' title='goto source code'>[src]</a></h3><div class='impl-items'></div><h3 id='impl-Hash' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> for <a class="struct" href="../sim/struct.PedestrianID.html" title="struct sim::PedestrianID">PedestrianID</a></code><a href='#impl-Hash' class='anchor'></a><a class='srclink' href='../src/sim/lib.rs.html#102' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.hash' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#tymethod.hash' class='fnname'>hash</a><__H: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>>(&self, state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>__H)</code><a class='srclink' href='../src/sim/lib.rs.html#102' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Feeds this value into the given [<code>Hasher</code>]. <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#tymethod.hash">Read more</a></p>
|
||||
</div><h4 id='method.hash_slice' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice' class='fnname'>hash_slice</a><H>(data: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[Self]</a>, state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>H) <span class="where fmt-newline">where<br> H: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>, </span></code><span class='since' title='Stable since Rust version 1.3.0'>1.3.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/hash/mod.rs.html#192-199' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Feeds a slice of this type into the given [<code>Hasher</code>]. <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice">Read more</a></p>
|
||||
</div></div><h3 id='impl-Ord' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="struct" href="../sim/struct.PedestrianID.html" title="struct sim::PedestrianID">PedestrianID</a></code><a href='#impl-Ord' class='anchor'></a><a class='srclink' href='../src/sim/lib.rs.html#102' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.cmp' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp' class='fnname'>cmp</a>(&self, other: &<a class="struct" href="../sim/struct.PedestrianID.html" title="struct sim::PedestrianID">PedestrianID</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></code><a class='srclink' href='../src/sim/lib.rs.html#102' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method returns an [<code>Ordering</code>] between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></p>
|
||||
</div></div><h3 id='impl-IndexableKey' class='impl'><code class='in-band'>impl <a class="trait" href="../abstutil/collections/trait.IndexableKey.html" title="trait abstutil::collections::IndexableKey">IndexableKey</a> for <a class="struct" href="../sim/struct.PedestrianID.html" title="struct sim::PedestrianID">PedestrianID</a></code><a href='#impl-IndexableKey' class='anchor'></a><a class='srclink' href='../src/sim/mechanics/walking.rs.html#805-809' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.index' class="method hidden"><code>fn <a href='../abstutil/collections/trait.IndexableKey.html#tymethod.index' class='fnname'>index</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class='srclink' href='../src/sim/mechanics/walking.rs.html#806-808' title='goto source code'>[src]</a></h4></div><h3 id='impl-Ord' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="struct" href="../sim/struct.PedestrianID.html" title="struct sim::PedestrianID">PedestrianID</a></code><a href='#impl-Ord' class='anchor'></a><a class='srclink' href='../src/sim/lib.rs.html#102' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.cmp' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp' class='fnname'>cmp</a>(&self, other: &<a class="struct" href="../sim/struct.PedestrianID.html" title="struct sim::PedestrianID">PedestrianID</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></code><a class='srclink' href='../src/sim/lib.rs.html#102' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method returns an [<code>Ordering</code>] between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></p>
|
||||
</div><h4 id='method.max' class="method hidden"><code><span class="docblock attributes">#[must_use]</span>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max' class='fnname'>max</a>(self, other: Self) -> Self</code><span class='since' title='Stable since Rust version 1.21.0'>1.21.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#593-598' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Compares and returns the maximum of two values. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max">Read more</a></p>
|
||||
</div><h4 id='method.min' class="method hidden"><code><span class="docblock attributes">#[must_use]</span>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min' class='fnname'>min</a>(self, other: Self) -> Self</code><span class='since' title='Stable since Rust version 1.21.0'>1.21.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#613-618' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Compares and returns the minimum of two values. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min">Read more</a></p>
|
||||
</div><h4 id='method.clamp' class="method hidden"><code><span class="docblock attributes">#[must_use]</span>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.clamp' class='fnname'>clamp</a>(self, min: Self, max: Self) -> Self</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#640-652' title='goto source code'>[src]</a></h4><div class='stability hidden'><div class='stab unstable'><span class='emoji'>🔬</span> This is a nightly-only experimental API. (<code>clamp</code>)</div></div><div class='docblock hidden'><p>Restrict a value to a certain interval. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.clamp">Read more</a></p>
|
||||
|
@ -245,9 +245,75 @@
|
||||
<span id="244">244</span>
|
||||
<span id="245">245</span>
|
||||
<span id="246">246</span>
|
||||
<span id="247">247</span>
|
||||
<span id="248">248</span>
|
||||
<span id="249">249</span>
|
||||
<span id="250">250</span>
|
||||
<span id="251">251</span>
|
||||
<span id="252">252</span>
|
||||
<span id="253">253</span>
|
||||
<span id="254">254</span>
|
||||
<span id="255">255</span>
|
||||
<span id="256">256</span>
|
||||
<span id="257">257</span>
|
||||
<span id="258">258</span>
|
||||
<span id="259">259</span>
|
||||
<span id="260">260</span>
|
||||
<span id="261">261</span>
|
||||
<span id="262">262</span>
|
||||
<span id="263">263</span>
|
||||
<span id="264">264</span>
|
||||
<span id="265">265</span>
|
||||
<span id="266">266</span>
|
||||
<span id="267">267</span>
|
||||
<span id="268">268</span>
|
||||
<span id="269">269</span>
|
||||
<span id="270">270</span>
|
||||
<span id="271">271</span>
|
||||
<span id="272">272</span>
|
||||
<span id="273">273</span>
|
||||
<span id="274">274</span>
|
||||
<span id="275">275</span>
|
||||
<span id="276">276</span>
|
||||
<span id="277">277</span>
|
||||
<span id="278">278</span>
|
||||
<span id="279">279</span>
|
||||
<span id="280">280</span>
|
||||
<span id="281">281</span>
|
||||
<span id="282">282</span>
|
||||
<span id="283">283</span>
|
||||
<span id="284">284</span>
|
||||
<span id="285">285</span>
|
||||
<span id="286">286</span>
|
||||
<span id="287">287</span>
|
||||
<span id="288">288</span>
|
||||
<span id="289">289</span>
|
||||
<span id="290">290</span>
|
||||
<span id="291">291</span>
|
||||
<span id="292">292</span>
|
||||
<span id="293">293</span>
|
||||
<span id="294">294</span>
|
||||
<span id="295">295</span>
|
||||
<span id="296">296</span>
|
||||
<span id="297">297</span>
|
||||
<span id="298">298</span>
|
||||
<span id="299">299</span>
|
||||
<span id="300">300</span>
|
||||
<span id="301">301</span>
|
||||
<span id="302">302</span>
|
||||
<span id="303">303</span>
|
||||
<span id="304">304</span>
|
||||
<span id="305">305</span>
|
||||
<span id="306">306</span>
|
||||
<span id="307">307</span>
|
||||
<span id="308">308</span>
|
||||
<span id="309">309</span>
|
||||
<span id="310">310</span>
|
||||
<span id="311">311</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">cmp</span>::<span class="ident">Ord</span>;
|
||||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">collections</span>::{<span class="ident">BTreeMap</span>, <span class="ident">BTreeSet</span>};
|
||||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">marker</span>::<span class="ident">PhantomData</span>;
|
||||
|
||||
<span class="kw">use</span> <span class="ident">itertools</span>::<span class="ident">Itertools</span>;
|
||||
<span class="kw">use</span> <span class="ident">serde</span>::{<span class="ident">Deserialize</span>, <span class="ident">Serialize</span>};
|
||||
@ -492,5 +558,69 @@
|
||||
<span class="kw-2">&</span><span class="self">self</span>.<span class="number">0</span>
|
||||
}
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Use with `FixedMap`. From a particular key, extract a `usize`. These values should be</span>
|
||||
<span class="doccomment">/// roughly contiguous; the space used by the `FixedMap` will be `O(n)` with respect to the largest</span>
|
||||
<span class="doccomment">/// value returned here.</span>
|
||||
<span class="kw">pub</span> <span class="kw">trait</span> <span class="ident">IndexableKey</span> {
|
||||
<span class="kw">fn</span> <span class="ident">index</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-></span> <span class="ident">usize</span>;
|
||||
}
|
||||
|
||||
<span class="doccomment">/// A drop-in replacement for `BTreeMap`, where the keys have the property of being array indices.</span>
|
||||
<span class="doccomment">/// Some values may be missing. Much more efficient at operations on individual objects, because</span>
|
||||
<span class="doccomment">/// it just becomes a simple array lookup.</span>
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Serialize</span>, <span class="ident">Deserialize</span>, <span class="ident">Clone</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">FixedMap</span><span class="op"><</span><span class="ident">K</span>: <span class="ident">IndexableKey</span>, <span class="ident">V</span><span class="op">></span> {
|
||||
<span class="ident">inner</span>: <span class="ident">Vec</span><span class="op"><</span><span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">V</span><span class="op">>></span>,
|
||||
<span class="ident">key_type</span>: <span class="ident">PhantomData</span><span class="op"><</span><span class="ident">K</span><span class="op">></span>,
|
||||
}
|
||||
|
||||
<span class="kw">impl</span><span class="op"><</span><span class="ident">K</span>: <span class="ident">IndexableKey</span>, <span class="ident">V</span><span class="op">></span> <span class="ident">FixedMap</span><span class="op"><</span><span class="ident">K</span>, <span class="ident">V</span><span class="op">></span> {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>() <span class="op">-></span> <span class="ident">FixedMap</span><span class="op"><</span><span class="ident">K</span>, <span class="ident">V</span><span class="op">></span> {
|
||||
<span class="ident">FixedMap</span> {
|
||||
<span class="ident">inner</span>: <span class="ident">Vec</span>::<span class="ident">new</span>(),
|
||||
<span class="ident">key_type</span>: <span class="ident">PhantomData</span>,
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">insert</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">key</span>: <span class="ident">K</span>, <span class="ident">value</span>: <span class="ident">V</span>) {
|
||||
<span class="kw">let</span> <span class="ident">idx</span> <span class="op">=</span> <span class="ident">key</span>.<span class="ident">index</span>();
|
||||
<span class="comment">// Depending on the order of calls, this could wind up pushing one value at a time. It may</span>
|
||||
<span class="comment">// be more efficient to resize less times and allocate more, but it'll require the caller</span>
|
||||
<span class="comment">// to know about how many values it'll need.</span>
|
||||
<span class="kw">if</span> <span class="ident">idx</span> <span class="op">>=</span> <span class="self">self</span>.<span class="ident">inner</span>.<span class="ident">len</span>() {
|
||||
<span class="self">self</span>.<span class="ident">inner</span>.<span class="ident">resize_with</span>(<span class="ident">idx</span> <span class="op">+</span> <span class="number">1</span>, <span class="op">||</span> <span class="prelude-val">None</span>);
|
||||
}
|
||||
<span class="self">self</span>.<span class="ident">inner</span>[<span class="ident">idx</span>] <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">value</span>);
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">get</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">key</span>: <span class="kw-2">&</span><span class="ident">K</span>) <span class="op">-></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="kw-2">&</span><span class="ident">V</span><span class="op">></span> {
|
||||
<span class="self">self</span>.<span class="ident">inner</span>[<span class="ident">key</span>.<span class="ident">index</span>()].<span class="ident">as_ref</span>()
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">get_mut</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">key</span>: <span class="kw-2">&</span><span class="ident">K</span>) <span class="op">-></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">V</span><span class="op">></span> {
|
||||
<span class="self">self</span>.<span class="ident">inner</span>[<span class="ident">key</span>.<span class="ident">index</span>()].<span class="ident">as_mut</span>()
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">contains_key</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">key</span>: <span class="kw-2">&</span><span class="ident">K</span>) <span class="op">-></span> <span class="ident">bool</span> {
|
||||
<span class="self">self</span>.<span class="ident">inner</span>[<span class="ident">key</span>.<span class="ident">index</span>()].<span class="ident">is_some</span>()
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">remove</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">key</span>: <span class="kw-2">&</span><span class="ident">K</span>) <span class="op">-></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">V</span><span class="op">></span> {
|
||||
<span class="self">self</span>.<span class="ident">inner</span>[<span class="ident">key</span>.<span class="ident">index</span>()].<span class="ident">take</span>()
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">values</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-></span> <span class="ident">std</span>::<span class="ident">iter</span>::<span class="ident">Flatten</span><span class="op"><</span><span class="ident">std</span>::<span class="ident">slice</span>::<span class="ident">Iter</span><span class="op"><</span><span class="lifetime">'_</span>, <span class="ident">std</span>::<span class="ident">option</span>::<span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">V</span><span class="op">>></span><span class="op">></span> {
|
||||
<span class="self">self</span>.<span class="ident">inner</span>.<span class="ident">iter</span>().<span class="ident">flatten</span>()
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">impl</span><span class="op"><</span><span class="ident">K</span>: <span class="ident">IndexableKey</span>, <span class="ident">V</span><span class="op">></span> <span class="ident">std</span>::<span class="ident">ops</span>::<span class="ident">Index</span><span class="op"><</span><span class="kw-2">&</span><span class="ident">K</span><span class="op">></span> <span class="kw">for</span> <span class="ident">FixedMap</span><span class="op"><</span><span class="ident">K</span>, <span class="ident">V</span><span class="op">></span> {
|
||||
<span class="kw">type</span> <span class="ident">Output</span> <span class="op">=</span> <span class="ident">V</span>;
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">index</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">key</span>: <span class="kw-2">&</span><span class="ident">K</span>) <span class="op">-></span> <span class="kw-2">&</span><span class="self">Self</span>::<span class="ident">Output</span> {
|
||||
<span class="self">self</span>.<span class="ident">inner</span>[<span class="ident">key</span>.<span class="ident">index</span>()].<span class="ident">as_ref</span>().<span class="ident">unwrap</span>()
|
||||
}
|
||||
}
|
||||
</pre></div>
|
||||
</section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "abstutil";</script><script src="../../main.js"></script><script src="../../source-script.js"></script><script src="../../source-files.js"></script><script defer src="../../search-index.js"></script></body></html>
|
@ -112,7 +112,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.47.0 (18bf6b4f0 2020-10-07)"</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">"Thu, 15 Oct 2020 22:28:20 +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">"Fri, 16 Oct 2020 17:30:49 +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>
|
||||
|
@ -1080,12 +1080,18 @@
|
||||
<span id="1079">1079</span>
|
||||
<span id="1080">1080</span>
|
||||
<span id="1081">1081</span>
|
||||
<span id="1082">1082</span>
|
||||
<span id="1083">1083</span>
|
||||
<span id="1084">1084</span>
|
||||
<span id="1085">1085</span>
|
||||
<span id="1086">1086</span>
|
||||
<span id="1087">1087</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">BTreeMap</span>, <span class="ident">BTreeSet</span>, <span class="ident">HashSet</span>, <span class="ident">VecDeque</span>};
|
||||
|
||||
<span class="kw">use</span> <span class="ident">serde</span>::{<span class="ident">Deserialize</span>, <span class="ident">Serialize</span>};
|
||||
|
||||
<span class="kw">use</span> <span class="ident">abstutil</span>::{<span class="ident">deserialize_btreemap</span>, <span class="ident">serialize_btreemap</span>};
|
||||
<span class="kw">use</span> <span class="ident">abstutil</span>::{<span class="ident">deserialize_btreemap</span>, <span class="ident">serialize_btreemap</span>, <span class="ident">FixedMap</span>, <span class="ident">IndexableKey</span>};
|
||||
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Distance</span>, <span class="ident">Duration</span>, <span class="ident">PolyLine</span>, <span class="ident">Speed</span>, <span class="ident">Time</span>};
|
||||
<span class="kw">use</span> <span class="ident">map_model</span>::{<span class="ident">LaneID</span>, <span class="ident">Map</span>, <span class="ident">Path</span>, <span class="ident">PathStep</span>, <span class="ident">Traversable</span>};
|
||||
|
||||
@ -1108,11 +1114,11 @@
|
||||
<span class="doccomment">/// Simulates vehicles!</span>
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Serialize</span>, <span class="ident">Deserialize</span>, <span class="ident">Clone</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">DrivingSimState</span> {
|
||||
<span class="attribute">#[<span class="ident">serde</span>(
|
||||
<span class="ident">serialize_with</span> <span class="op">=</span> <span class="string">"serialize_btreemap"</span>,
|
||||
<span class="ident">deserialize_with</span> <span class="op">=</span> <span class="string">"deserialize_btreemap"</span>
|
||||
)]</span>
|
||||
<span class="ident">cars</span>: <span class="ident">BTreeMap</span><span class="op"><</span><span class="ident">CarID</span>, <span class="ident">Car</span><span class="op">></span>,
|
||||
<span class="comment">// This spends some space to save time. If a simulation contains 1 million cars over the course</span>
|
||||
<span class="comment">// of a day, but only 100,000 are ever active simultaneously, we store 900,000 `None`s. But we</span>
|
||||
<span class="comment">// gain much faster lookup, which has shown dramatic speedups in the scenarios being run so</span>
|
||||
<span class="comment">// far.</span>
|
||||
<span class="ident">cars</span>: <span class="ident">FixedMap</span><span class="op"><</span><span class="ident">CarID</span>, <span class="ident">Car</span><span class="op">></span>,
|
||||
<span class="attribute">#[<span class="ident">serde</span>(
|
||||
<span class="ident">serialize_with</span> <span class="op">=</span> <span class="string">"serialize_btreemap"</span>,
|
||||
<span class="ident">deserialize_with</span> <span class="op">=</span> <span class="string">"deserialize_btreemap"</span>
|
||||
@ -1132,7 +1138,7 @@
|
||||
<span class="kw">impl</span> <span class="ident">DrivingSimState</span> {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>, <span class="ident">opts</span>: <span class="kw-2">&</span><span class="ident">SimOptions</span>) <span class="op">-></span> <span class="ident">DrivingSimState</span> {
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">sim</span> <span class="op">=</span> <span class="ident">DrivingSimState</span> {
|
||||
<span class="ident">cars</span>: <span class="ident">BTreeMap</span>::<span class="ident">new</span>(),
|
||||
<span class="ident">cars</span>: <span class="ident">FixedMap</span>::<span class="ident">new</span>(),
|
||||
<span class="ident">queues</span>: <span class="ident">BTreeMap</span>::<span class="ident">new</span>(),
|
||||
<span class="ident">events</span>: <span class="ident">Vec</span>::<span class="ident">new</span>(),
|
||||
<span class="ident">recalc_lanechanging</span>: <span class="ident">opts</span>.<span class="ident">recalc_lanechanging</span>,
|
||||
@ -2162,5 +2168,11 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">IndexableKey</span> <span class="kw">for</span> <span class="ident">CarID</span> {
|
||||
<span class="kw">fn</span> <span class="ident">index</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-></span> <span class="ident">usize</span> {
|
||||
<span class="self">self</span>.<span class="number">0</span>
|
||||
}
|
||||
}
|
||||
</pre></div>
|
||||
</section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "sim";</script><script src="../../../main.js"></script><script src="../../../source-script.js"></script><script src="../../../source-files.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
@ -805,7 +805,7 @@
|
||||
|
||||
<span class="kw">use</span> <span class="ident">serde</span>::{<span class="ident">Deserialize</span>, <span class="ident">Serialize</span>};
|
||||
|
||||
<span class="kw">use</span> <span class="ident">abstutil</span>::{<span class="ident">deserialize_btreemap</span>, <span class="ident">retain_btreeset</span>, <span class="ident">serialize_btreemap</span>};
|
||||
<span class="kw">use</span> <span class="ident">abstutil</span>::{<span class="ident">deserialize_btreemap</span>, <span class="ident">retain_btreeset</span>, <span class="ident">serialize_btreemap</span>, <span class="ident">FixedMap</span>};
|
||||
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Duration</span>, <span class="ident">Time</span>};
|
||||
<span class="kw">use</span> <span class="ident">map_model</span>::{
|
||||
<span class="ident">ControlStopSign</span>, <span class="ident">ControlTrafficSignal</span>, <span class="ident">IntersectionID</span>, <span class="ident">LaneID</span>, <span class="ident">Map</span>, <span class="ident">PhaseType</span>, <span class="ident">Traversable</span>,
|
||||
@ -1091,7 +1091,7 @@
|
||||
<span class="ident">scheduler</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">Scheduler</span>,
|
||||
<span class="ident">maybe_cars_and_queues</span>: <span class="prelude-ty">Option</span><span class="op"><</span>(
|
||||
<span class="kw-2">&</span><span class="ident">Car</span>,
|
||||
<span class="kw-2">&</span><span class="ident">BTreeMap</span><span class="op"><</span><span class="ident">CarID</span>, <span class="ident">Car</span><span class="op">></span>,
|
||||
<span class="kw-2">&</span><span class="ident">FixedMap</span><span class="op"><</span><span class="ident">CarID</span>, <span class="ident">Car</span><span class="op">></span>,
|
||||
<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">BTreeMap</span><span class="op"><</span><span class="ident">Traversable</span>, <span class="ident">Queue</span><span class="op">></span>,
|
||||
)<span class="op">></span>,
|
||||
) <span class="op">-></span> <span class="ident">bool</span> {
|
||||
@ -1463,7 +1463,7 @@
|
||||
<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>,
|
||||
<span class="ident">req</span>: <span class="kw-2">&</span><span class="ident">Request</span>,
|
||||
<span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>,
|
||||
<span class="ident">maybe_cars_and_queues</span>: <span class="prelude-ty">Option</span><span class="op"><</span>(<span class="kw-2">&</span><span class="ident">BTreeMap</span><span class="op"><</span><span class="ident">CarID</span>, <span class="ident">Car</span><span class="op">></span>, <span class="kw-2">&</span><span class="ident">BTreeMap</span><span class="op"><</span><span class="ident">Traversable</span>, <span class="ident">Queue</span><span class="op">></span>)<span class="op">></span>,
|
||||
<span class="ident">maybe_cars_and_queues</span>: <span class="prelude-ty">Option</span><span class="op"><</span>(<span class="kw-2">&</span><span class="ident">FixedMap</span><span class="op"><</span><span class="ident">CarID</span>, <span class="ident">Car</span><span class="op">></span>, <span class="kw-2">&</span><span class="ident">BTreeMap</span><span class="op"><</span><span class="ident">Traversable</span>, <span class="ident">Queue</span><span class="op">></span>)<span class="op">></span>,
|
||||
) <span class="op">-></span> <span class="ident">bool</span> {
|
||||
<span class="kw">let</span> <span class="ident">turn</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_t</span>(<span class="ident">req</span>.<span class="ident">turn</span>);
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">cycle_detected</span> <span class="op">=</span> <span class="bool-val">false</span>;
|
||||
@ -1516,7 +1516,7 @@
|
||||
<span class="kw">fn</span> <span class="ident">detect_conflict_cycle</span>(
|
||||
<span class="kw-2">&</span><span class="self">self</span>,
|
||||
<span class="ident">car</span>: <span class="ident">CarID</span>,
|
||||
<span class="ident">pair</span>: (<span class="kw-2">&</span><span class="ident">BTreeMap</span><span class="op"><</span><span class="ident">CarID</span>, <span class="ident">Car</span><span class="op">></span>, <span class="kw-2">&</span><span class="ident">BTreeMap</span><span class="op"><</span><span class="ident">Traversable</span>, <span class="ident">Queue</span><span class="op">></span>),
|
||||
<span class="ident">pair</span>: (<span class="kw-2">&</span><span class="ident">FixedMap</span><span class="op"><</span><span class="ident">CarID</span>, <span class="ident">Car</span><span class="op">></span>, <span class="kw-2">&</span><span class="ident">BTreeMap</span><span class="op"><</span><span class="ident">Traversable</span>, <span class="ident">Queue</span><span class="op">></span>),
|
||||
) <span class="op">-></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">HashSet</span><span class="op"><</span><span class="ident">CarID</span><span class="op">>></span> {
|
||||
<span class="kw">let</span> (<span class="ident">cars</span>, <span class="ident">queues</span>) <span class="op">=</span> <span class="ident">pair</span>;
|
||||
|
||||
|
@ -308,11 +308,13 @@
|
||||
<span id="307">307</span>
|
||||
<span id="308">308</span>
|
||||
<span id="309">309</span>
|
||||
<span id="310">310</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">BTreeMap</span>, <span class="ident">BTreeSet</span>, <span class="ident">VecDeque</span>};
|
||||
|
||||
<span class="kw">use</span> <span class="ident">serde</span>::{<span class="ident">Deserialize</span>, <span class="ident">Serialize</span>};
|
||||
|
||||
<span class="kw">use</span> <span class="ident">abstutil</span>::<span class="ident">FixedMap</span>;
|
||||
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Distance</span>, <span class="ident">Time</span>};
|
||||
<span class="kw">use</span> <span class="ident">map_model</span>::{<span class="ident">Map</span>, <span class="ident">Traversable</span>};
|
||||
|
||||
@ -353,7 +355,7 @@
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">get_car_positions</span>(
|
||||
<span class="kw-2">&</span><span class="self">self</span>,
|
||||
<span class="ident">now</span>: <span class="ident">Time</span>,
|
||||
<span class="ident">cars</span>: <span class="kw-2">&</span><span class="ident">BTreeMap</span><span class="op"><</span><span class="ident">CarID</span>, <span class="ident">Car</span><span class="op">></span>,
|
||||
<span class="ident">cars</span>: <span class="kw-2">&</span><span class="ident">FixedMap</span><span class="op"><</span><span class="ident">CarID</span>, <span class="ident">Car</span><span class="op">></span>,
|
||||
<span class="ident">queues</span>: <span class="kw-2">&</span><span class="ident">BTreeMap</span><span class="op"><</span><span class="ident">Traversable</span>, <span class="ident">Queue</span><span class="op">></span>,
|
||||
) <span class="op">-></span> <span class="ident">Vec</span><span class="op"><</span>(<span class="ident">CarID</span>, <span class="ident">Distance</span>)<span class="op">></span> {
|
||||
<span class="self">self</span>.<span class="ident">inner_get_car_positions</span>(<span class="ident">now</span>, <span class="ident">cars</span>, <span class="ident">queues</span>, <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">BTreeSet</span>::<span class="ident">new</span>())
|
||||
@ -362,7 +364,7 @@
|
||||
<span class="kw">fn</span> <span class="ident">inner_get_car_positions</span>(
|
||||
<span class="kw-2">&</span><span class="self">self</span>,
|
||||
<span class="ident">now</span>: <span class="ident">Time</span>,
|
||||
<span class="ident">cars</span>: <span class="kw-2">&</span><span class="ident">BTreeMap</span><span class="op"><</span><span class="ident">CarID</span>, <span class="ident">Car</span><span class="op">></span>,
|
||||
<span class="ident">cars</span>: <span class="kw-2">&</span><span class="ident">FixedMap</span><span class="op"><</span><span class="ident">CarID</span>, <span class="ident">Car</span><span class="op">></span>,
|
||||
<span class="ident">queues</span>: <span class="kw-2">&</span><span class="ident">BTreeMap</span><span class="op"><</span><span class="ident">Traversable</span>, <span class="ident">Queue</span><span class="op">></span>,
|
||||
<span class="ident">recursed_queues</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">BTreeSet</span><span class="op"><</span><span class="ident">Traversable</span><span class="op">></span>,
|
||||
) <span class="op">-></span> <span class="ident">Vec</span><span class="op"><</span>(<span class="ident">CarID</span>, <span class="ident">Distance</span>)<span class="op">></span> {
|
||||
@ -480,7 +482,7 @@
|
||||
<span class="ident">start_dist</span>: <span class="ident">Distance</span>,
|
||||
<span class="ident">vehicle_len</span>: <span class="ident">Distance</span>,
|
||||
<span class="ident">now</span>: <span class="ident">Time</span>,
|
||||
<span class="ident">cars</span>: <span class="kw-2">&</span><span class="ident">BTreeMap</span><span class="op"><</span><span class="ident">CarID</span>, <span class="ident">Car</span><span class="op">></span>,
|
||||
<span class="ident">cars</span>: <span class="kw-2">&</span><span class="ident">FixedMap</span><span class="op"><</span><span class="ident">CarID</span>, <span class="ident">Car</span><span class="op">></span>,
|
||||
<span class="ident">queues</span>: <span class="kw-2">&</span><span class="ident">BTreeMap</span><span class="op"><</span><span class="ident">Traversable</span>, <span class="ident">Queue</span><span class="op">></span>,
|
||||
) <span class="op">-></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">usize</span><span class="op">></span> {
|
||||
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">laggy_head</span>.<span class="ident">is_none</span>() <span class="op">&&</span> <span class="self">self</span>.<span class="ident">cars</span>.<span class="ident">is_empty</span>() {
|
||||
@ -566,7 +568,7 @@
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">validate_positions</span>(
|
||||
<span class="ident">dists</span>: <span class="ident">Vec</span><span class="op"><</span>(<span class="ident">CarID</span>, <span class="ident">Distance</span>)<span class="op">></span>,
|
||||
<span class="ident">cars</span>: <span class="kw-2">&</span><span class="ident">BTreeMap</span><span class="op"><</span><span class="ident">CarID</span>, <span class="ident">Car</span><span class="op">></span>,
|
||||
<span class="ident">cars</span>: <span class="kw-2">&</span><span class="ident">FixedMap</span><span class="op"><</span><span class="ident">CarID</span>, <span class="ident">Car</span><span class="op">></span>,
|
||||
<span class="ident">now</span>: <span class="ident">Time</span>,
|
||||
<span class="ident">id</span>: <span class="ident">Traversable</span>,
|
||||
) <span class="op">-></span> <span class="ident">Vec</span><span class="op"><</span>(<span class="ident">CarID</span>, <span class="ident">Distance</span>)<span class="op">></span> {
|
||||
@ -584,7 +586,7 @@
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">dump_cars</span>(
|
||||
<span class="ident">dists</span>: <span class="kw-2">&</span><span class="ident">Vec</span><span class="op"><</span>(<span class="ident">CarID</span>, <span class="ident">Distance</span>)<span class="op">></span>,
|
||||
<span class="ident">cars</span>: <span class="kw-2">&</span><span class="ident">BTreeMap</span><span class="op"><</span><span class="ident">CarID</span>, <span class="ident">Car</span><span class="op">></span>,
|
||||
<span class="ident">cars</span>: <span class="kw-2">&</span><span class="ident">FixedMap</span><span class="op"><</span><span class="ident">CarID</span>, <span class="ident">Car</span><span class="op">></span>,
|
||||
<span class="ident">id</span>: <span class="ident">Traversable</span>,
|
||||
<span class="ident">now</span>: <span class="ident">Time</span>,
|
||||
) {
|
||||
|
@ -803,12 +803,17 @@
|
||||
<span id="802">802</span>
|
||||
<span id="803">803</span>
|
||||
<span id="804">804</span>
|
||||
<span id="805">805</span>
|
||||
<span id="806">806</span>
|
||||
<span id="807">807</span>
|
||||
<span id="808">808</span>
|
||||
<span id="809">809</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">BTreeMap</span>, <span class="ident">BTreeSet</span>};
|
||||
|
||||
<span class="kw">use</span> <span class="ident">serde</span>::{<span class="ident">Deserialize</span>, <span class="ident">Serialize</span>};
|
||||
|
||||
<span class="kw">use</span> <span class="ident">abstutil</span>::{<span class="ident">deserialize_multimap</span>, <span class="ident">serialize_multimap</span>, <span class="ident">MultiMap</span>};
|
||||
<span class="kw">use</span> <span class="ident">abstutil</span>::{<span class="ident">deserialize_multimap</span>, <span class="ident">serialize_multimap</span>, <span class="ident">FixedMap</span>, <span class="ident">IndexableKey</span>, <span class="ident">MultiMap</span>};
|
||||
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Distance</span>, <span class="ident">Duration</span>, <span class="ident">Line</span>, <span class="ident">PolyLine</span>, <span class="ident">Speed</span>, <span class="ident">Time</span>};
|
||||
<span class="kw">use</span> <span class="ident">map_model</span>::{
|
||||
<span class="ident">BuildingID</span>, <span class="ident">BusRouteID</span>, <span class="ident">DrivingSide</span>, <span class="ident">Map</span>, <span class="ident">ParkingLotID</span>, <span class="ident">Path</span>, <span class="ident">PathStep</span>, <span class="ident">Traversable</span>,
|
||||
@ -831,8 +836,7 @@
|
||||
<span class="doccomment">/// overlapping. They're simply grouped together into a DrawPedCrowdInput for rendering.</span>
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Serialize</span>, <span class="ident">Deserialize</span>, <span class="ident">Clone</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">WalkingSimState</span> {
|
||||
<span class="comment">// BTreeMap not for deterministic simulation, but to make serialized things easier to compare.</span>
|
||||
<span class="ident">peds</span>: <span class="ident">BTreeMap</span><span class="op"><</span><span class="ident">PedestrianID</span>, <span class="ident">Pedestrian</span><span class="op">></span>,
|
||||
<span class="ident">peds</span>: <span class="ident">FixedMap</span><span class="op"><</span><span class="ident">PedestrianID</span>, <span class="ident">Pedestrian</span><span class="op">></span>,
|
||||
<span class="attribute">#[<span class="ident">serde</span>(
|
||||
<span class="ident">serialize_with</span> <span class="op">=</span> <span class="string">"serialize_multimap"</span>,
|
||||
<span class="ident">deserialize_with</span> <span class="op">=</span> <span class="string">"deserialize_multimap"</span>
|
||||
@ -844,7 +848,7 @@
|
||||
<span class="kw">impl</span> <span class="ident">WalkingSimState</span> {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>() <span class="op">-></span> <span class="ident">WalkingSimState</span> {
|
||||
<span class="ident">WalkingSimState</span> {
|
||||
<span class="ident">peds</span>: <span class="ident">BTreeMap</span>::<span class="ident">new</span>(),
|
||||
<span class="ident">peds</span>: <span class="ident">FixedMap</span>::<span class="ident">new</span>(),
|
||||
<span class="ident">peds_per_traversable</span>: <span class="ident">MultiMap</span>::<span class="ident">new</span>(),
|
||||
<span class="ident">events</span>: <span class="ident">Vec</span>::<span class="ident">new</span>(),
|
||||
}
|
||||
@ -1608,5 +1612,11 @@
|
||||
|
||||
(<span class="ident">loners</span>, <span class="ident">crowds</span>)
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">IndexableKey</span> <span class="kw">for</span> <span class="ident">PedestrianID</span> {
|
||||
<span class="kw">fn</span> <span class="ident">index</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-></span> <span class="ident">usize</span> {
|
||||
<span class="self">self</span>.<span class="number">0</span>
|
||||
}
|
||||
}
|
||||
</pre></div>
|
||||
</section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "sim";</script><script src="../../../main.js"></script><script src="../../../source-script.js"></script><script src="../../../source-files.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
Loading…
Reference in New Issue
Block a user