<!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="A/B Street organizes data files in a particular way. This crate implements methods to find files and (mostly) treat them the same way on native and web."><metaname="keywords"content="rust, rustlang, rust-lang, abstio"><title>abstio - 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><scriptdefersrc="../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="../abstio/index.html"><divclass="logo-container"><imgclass="rust-logo"src="../rust-logo.svg"alt="logo"></div></a><h2class="location"></h2></nav><navclass="sidebar"><aclass="sidebar-logo"href="../abstio/index.html"><divclass="logo-container"><imgclass="rust-logo"src="../rust-logo.svg"alt="logo"></div></a><h2class="location"><ahref="#">Crate abstio</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></ul></div><section><divclass="block"><ul><li><ahref="#modules">Modules</a></li><li><ahref="#structs">Structs</a></li><li><ahref="#functions">Functions</a></li></ul></div></section></div></nav><main><divclass="width-limiter"><divclass="sub-container"><aclass="sub-logo-container"href="../abstio/index.html"><imgclass="rust-logo"src="../rust-logo.svg"alt="logo"></a><navclass="sub"><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"><divid="help-button"title="help"tabindex="-1"><buttontype="button">?</button></div><divid="settings-menu"tabindex="-1"><ahref="../settings.html"title="settings"><imgwidth="22"height="22"alt="Change settings"src="../wheel.svg"></a></div></div></form></nav></div><sectionid="main-content"class="content"><divclass="main-heading"><h1class="fqn"><spanclass="in-band">Crate <aclass="mod"href="#">abstio</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/abstio/lib.rs.html#1-40">source</a> · <aid="toggle-all-docs"href="javascript:void(0)"title="collapse all docs">[<spanclass="inner">−</span>]</a></span></div><detailsclass="rust
</div></details><h2id="modules"class="small-section-header"><ahref="#modules">Modules</a></h2><divclass="item-table"><divclass="item-row"><divclass="item-left module-item"><aclass="mod"href="abst_data/index.html"title="abstio::abst_data mod">abst_data</a><spantitle="Restricted Visibility"> 🔒</span></div><divclass="item-right docblock-short"></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="mod"href="abst_paths/index.html"title="abstio::abst_paths mod">abst_paths</a><spantitle="Restricted Visibility"> 🔒</span></div><divclass="item-right docblock-short"><p>Generate paths for different A/B Street files</p>
</div></div></div><h2id="structs"class="small-section-header"><ahref="#structs">Structs</a></h2><divclass="item-table"><divclass="item-row"><divclass="item-left module-item"><aclass="struct"href="struct.CityName.html"title="abstio::CityName struct">CityName</a></div><divclass="item-right docblock-short"><p>A single city is identified using this.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="struct"href="struct.DataPacks.html"title="abstio::DataPacks struct">DataPacks</a></div><divclass="item-right docblock-short"><p>Player-chosen groups of files to opt into downloading</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="struct"href="struct.Entry.html"title="abstio::Entry struct">Entry</a></div><divclass="item-right docblock-short"><p>A single file</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="struct"href="struct.FileWithProgress.html"title="abstio::FileWithProgress struct">FileWithProgress</a></div><divclass="item-right docblock-short"></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="struct"href="struct.Manifest.html"title="abstio::Manifest struct">Manifest</a></div><divclass="item-right docblock-short"><p>A list of all canonical data files for A/B Street that’re uploaded somewhere. The file formats
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="struct"href="struct.MapName.html"title="abstio::MapName struct">MapName</a></div><divclass="item-right docblock-short"><p>A single map is identified using this.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.download_bytes.html"title="abstio::download_bytes fn">download_bytes</a></div><divclass="item-right docblock-short"><p>Downloads bytes from a URL. This must be called with a tokio runtime somewhere. The caller
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.download_to_file.html"title="abstio::download_to_file fn">download_to_file</a></div><divclass="item-right docblock-short"><p>Download a file from a URL. This must be called with a tokio runtime somewhere. Progress will
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.http_get.html"title="abstio::http_get fn">http_get</a></div><divclass="item-right docblock-short"><p>Performs an HTTP GET request and returns the raw response. Unlike the variations in
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.http_post.html"title="abstio::http_post fn">http_post</a></div><divclass="item-right docblock-short"><p>Performs an HTTP POST request and returns the response.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.list_all_objects.html"title="abstio::list_all_objects fn">list_all_objects</a></div><divclass="item-right docblock-short"><p>Just list all things from a directory, return sorted by name, with file extension removed.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.list_dir.html"title="abstio::list_dir fn">list_dir</a></div><divclass="item-right docblock-short"><p>Returns full paths</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.load_all_objects.html"title="abstio::load_all_objects fn">load_all_objects</a></div><divclass="item-right docblock-short"><p>Load all serialized things from a directory, return sorted by name, with file extension removed.
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.maybe_read_binary.html"title="abstio::maybe_read_binary fn">maybe_read_binary</a></div><divclass="item-right docblock-short"></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.maybe_read_json.html"title="abstio::maybe_read_json fn">maybe_read_json</a></div><divclass="item-right docblock-short"></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.must_read_object.html"title="abstio::must_read_object fn">must_read_object</a></div><divclass="item-right docblock-short"><p>May be a JSON or binary file. Panics on failure.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.parse_scenario_path.html"title="abstio::parse_scenario_path fn">parse_scenario_path</a></div><divclass="item-right docblock-short"><p>Extract the map and scenario name from a path. Crashes if the input is strange.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.read_binary.html"title="abstio::read_binary fn">read_binary</a></div><divclass="item-right docblock-short"></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.read_json.html"title="abstio::read_json fn">read_json</a></div><divclass="item-right docblock-short"></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.read_object.html"title="abstio::read_object fn">read_object</a></div><divclass="item-right docblock-short"><p>May be a JSON or binary file</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.slurp_bytes.html"title="abstio::slurp_bytes fn">slurp_bytes</a></div><divclass="item-right docblock-short"><p>An adapter for widgetry::Settings::read_svg to read SVGs using this crate’s methods for finding