<!DOCTYPE html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1.0"><metaname="generator"content="rustdoc"><metaname="description"content="The contents of this crate need to be organized better:"><metaname="keywords"content="rust, rustlang, rust-lang, abstutil"><title>abstutil - Rust</title><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../SourceSerif4-Regular.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../FiraSans-Regular.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../FiraSans-Medium.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../SourceCodePro-Regular.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../SourceSerif4-Bold.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../SourceCodePro-Semibold.ttf.woff2"><linkrel="stylesheet"type="text/css"href="../normalize.css"><linkrel="stylesheet"type="text/css"href="../rustdoc.css"id="mainThemeStyle"><linkrel="stylesheet"type="text/css"href="../ayu.css"disabled><linkrel="stylesheet"type="text/css"href="../dark.css"disabled><linkrel="stylesheet"type="text/css"href="../light.css"id="themeStyle"><scriptid="default-settings"></script><scriptsrc="../storage.js"></script><scriptsrc="../crates.js"></script><scriptdefersrc="../main.js"></script>
<noscript><linkrel="stylesheet"href="../noscript.css"></noscript><linkrel="alternate icon"type="image/png"href="../favicon-16x16.png"><linkrel="alternate icon"type="image/png"href="../favicon-32x32.png"><linkrel="icon"type="image/svg+xml"href="../favicon.svg"></head><bodyclass="rustdoc mod crate"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><navclass="mobile-topbar"><buttonclass="sidebar-menu-toggle">☰</button><aclass="sidebar-logo"href="../abstutil/index.html"><divclass="logo-container"><imgclass="rust-logo"src="../rust-logo.svg"alt="logo"></div>
</a><h2class="location"><ahref="#">Crate abstutil</a></h2><divclass="sidebar-elems"><divclass="block"><ul><liclass="version">Version 0.1.0</li><li><aid="all-types"href="all.html">All Items</a></li></div></ul><section><divclass="block"><ul><li><ahref="#modules">Modules</a></li><li><ahref="#structs">Structs</a></li><li><ahref="#constants">Constants</a></li><li><ahref="#traits">Traits</a></li><li><ahref="#functions">Functions</a></li></ul></div></section><divid="sidebar-vars"data-name="abstutil"data-ty="mod"data-relpath=""></div><scriptdefersrc="sidebar-items.js"></script></div></nav><main><divclass="width-limiter"><divclass="sub-container"><aclass="sub-logo-container"href="../abstutil/index.html"><imgclass="rust-logo"src="../rust-logo.svg"alt="logo"></a><navclass="sub"><divclass="theme-picker hidden"><buttonid="theme-picker"aria-label="Pick another theme!"aria-haspopup="menu"title="themes"><imgwidth="22"height="22"alt="Pick another theme!"src="../brush.svg"></button><divid="theme-choices"role="menu"></div></div><formclass="search-form"><divclass="search-container"><span></span><inputclass="search-input"name="search"autocomplete="off"spellcheck="false"placeholder="Click or press ‘S’ to search, ‘?’ for more options…"type="search"><buttontype="button"id="help-button"title="help">?</button><aid="settings-menu"href="../settings.html"title="settings"><imgwidth="22"height="22"alt="Change settings"src="../wheel.svg"></a></div></form></nav></div><sectionid="main-content"class="content"><divclass="main-heading">
<h1class="fqn"><spanclass="in-band">Crate <aclass="mod"href="#">abstutil</a><buttonid="copy-path"onclick="copy_path(this)"title="Copy item path to clipboard"><imgsrc="../clipboard.svg"width="19"height="18"alt="Copy item path"></button></span></h1><spanclass="out-of-band"><aclass="srclink"href="../src/abstutil/lib.rs.html#1-32">source</a> · <aid="toggle-all-docs"href="javascript:void(0)"title="collapse all docs">[<spanclass="inner">−</span>]</a></span></div><detailsclass="rustdoc-toggle top-doc"open><summaryclass="hideme"><span>Expand description</span></summary><divclass="docblock"><p>The contents of this crate need to be organized better:</p>
<divclass="item-table"><divclass="item-row"><divclass="item-left module-item"><aclass="struct"href="struct.Counter.html"title="abstutil::Counter struct">Counter</a></div><divclass="item-right docblock-short"><p>A counter per key</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="struct"href="struct.FixedMap.html"title="abstutil::FixedMap struct">FixedMap</a></div><divclass="item-right docblock-short"><p>A drop-in replacement for <code>BTreeMap</code>, where the keys have the property of being array indices.
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="struct"href="struct.MultiMap.html"title="abstutil::MultiMap struct">MultiMap</a></div><divclass="item-right docblock-short"></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="struct"href="struct.Tags.html"title="abstutil::Tags struct">Tags</a></div><divclass="item-right docblock-short"><p>Convenience functions around a string->string map</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="struct"href="struct.VecMap.html"title="abstutil::VecMap struct">VecMap</a></div><divclass="item-right docblock-short"><p>Use when your key is just PartialEq, not Ord or Hash.</p>
<divclass="item-table"><divclass="item-row"><divclass="item-left module-item"><aclass="trait"href="trait.CloneableAny.html"title="abstutil::CloneableAny trait">CloneableAny</a></div><divclass="item-right docblock-short"><p>Trick to make a cloneable Any from
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="trait"href="trait.CloneableImpl.html"title="abstutil::CloneableImpl trait">CloneableImpl</a></div><divclass="item-right docblock-short"></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="trait"href="trait.IndexableKey.html"title="abstutil::IndexableKey trait">IndexableKey</a></div><divclass="item-right docblock-short"><p>Use with <code>FixedMap</code>. From a particular key, extract a <code>usize</code>. These values should be
<divclass="item-table"><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.abbreviated_format.html"title="abstutil::abbreviated_format fn">abbreviated_format</a></div><divclass="item-right docblock-short"></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.args_to_query_string.html"title="abstutil::args_to_query_string fn">args_to_query_string</a></div><divclass="item-right docblock-short"><p>Transforms some command-line arguments into URL query parameters, using <code>&</code> as the separator
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.basename.html"title="abstutil::basename fn">basename</a></div><divclass="item-right docblock-short"></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.cli_args.html"title="abstutil::cli_args fn">cli_args</a></div><divclass="item-right docblock-short"><p>Returns arguments passed in from the command-line, starting with the program name.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.contains_duplicates.html"title="abstutil::contains_duplicates fn">contains_duplicates</a></div><divclass="item-right docblock-short"></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.deserialize_btreemap.html"title="abstutil::deserialize_btreemap fn">deserialize_btreemap</a></div><divclass="item-right docblock-short"><p>Deserializes a BTreeMap from a list of tuples. Necessary when the keys are structs; see
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.deserialize_hashmap.html"title="abstutil::deserialize_hashmap fn">deserialize_hashmap</a></div><divclass="item-right docblock-short"><p>Deserializes a HashMap from a list of tuples.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.deserialize_multimap.html"title="abstutil::deserialize_multimap fn">deserialize_multimap</a></div><divclass="item-right docblock-short"><p>Deserializes a MultiMap.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.deserialize_usize.html"title="abstutil::deserialize_usize fn">deserialize_usize</a></div><divclass="item-right docblock-short"><p>Deserializes a <code>usize</code> from a <code>u32</code>.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.from_binary.html"title="abstutil::from_binary fn">from_binary</a></div><divclass="item-right docblock-short"><p>Deserializes an object from the bincode format.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.from_binary_reader.html"title="abstutil::from_binary_reader fn">from_binary_reader</a></div><divclass="item-right docblock-short"><p>Deserializes an object from the bincode format, from a reader.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.from_json.html"title="abstutil::from_json fn">from_json</a></div><divclass="item-right docblock-short"><p>Deserializes an object from a JSON string.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.from_json_reader.html"title="abstutil::from_json_reader fn">from_json_reader</a></div><divclass="item-right docblock-short"><p>Deserializes an object from JSON, from a reader.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.must_run_cmd.html"title="abstutil::must_run_cmd fn">must_run_cmd</a></div><divclass="item-right docblock-short"><p>Runs a command, asserts success. STDOUT and STDERR aren’t touched.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.parent_path.html"title="abstutil::parent_path fn">parent_path</a></div><divclass="item-right docblock-short"></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.plain_list_names.html"title="abstutil::plain_list_names fn">plain_list_names</a></div><divclass="item-right docblock-short"></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.prettyprint_bytes.html"title="abstutil::prettyprint_bytes fn">prettyprint_bytes</a></div><divclass="item-right docblock-short"></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.prettyprint_usize.html"title="abstutil::prettyprint_usize fn">prettyprint_usize</a></div><divclass="item-right docblock-short"></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.serialize_btreemap.html"title="abstutil::serialize_btreemap fn">serialize_btreemap</a></div><divclass="item-right docblock-short"><p>Serializes a BTreeMap as a list of tuples. Necessary when the keys are structs; see
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.serialize_hashmap.html"title="abstutil::serialize_hashmap fn">serialize_hashmap</a></div><divclass="item-right docblock-short"><p>Serializes a HashMap as a list of tuples, first sorting by the keys. This ensures the
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.serialize_multimap.html"title="abstutil::serialize_multimap fn">serialize_multimap</a></div><divclass="item-right docblock-short"><p>Serializes a MultiMap.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.serialize_usize.html"title="abstutil::serialize_usize fn">serialize_usize</a></div><divclass="item-right docblock-short"><p>Serializes a <code>usize</code> as a <code>u32</code> to save space. Useful when you need <code>usize</code> for indexing, but
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.serialized_size_bytes.html"title="abstutil::serialized_size_bytes fn">serialized_size_bytes</a></div><divclass="item-right docblock-short"><p>The number of bytes for an object serialized to bincode.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.to_binary.html"title="abstutil::to_binary fn">to_binary</a></div><divclass="item-right docblock-short"><p>Transforms an object to bincoded bytes.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.to_json.html"title="abstutil::to_json fn">to_json</a></div><divclass="item-right docblock-short"><p>Stringifies an object to nicely formatted JSON.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.to_json_terse.html"title="abstutil::to_json_terse fn">to_json_terse</a></div><divclass="item-right docblock-short"><p>Stringifies an object to terse JSON.</p>