<!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="stylesheet"type="text/css"href="../normalize.css"><linkrel="stylesheet"type="text/css"href="../rustdoc.css"id="mainThemeStyle"><linkrel="stylesheet"type="text/css"href="../light.css"id="themeStyle"><linkrel="stylesheet"type="text/css"href="../dark.css"disabled><linkrel="stylesheet"type="text/css"href="../ayu.css"disabled><scriptid="default-settings"></script><scriptsrc="../storage.js"></script><scriptsrc="../crates.js"></script><noscript><linkrel="stylesheet"href="../noscript.css"></noscript><linkrel="icon"type="image/svg+xml"href="../favicon.svg"><linkrel="alternate icon"type="image/png"href="../favicon-16x16.png"><linkrel="alternate icon"type="image/png"href="../favicon-32x32.png"><styletype="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></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="sidebar"><divclass="sidebar-menu"role="button">☰</div><ahref='../abstio/index.html'><divclass='logo-container rust-logo'><imgsrc='../rust-logo.png'alt='logo'></div></a><h2class="location">Crate abstio</h2><divclass="block version"><divclass="narrow-helper"></div><p>Version 0.1.0</p></div><divclass="sidebar-elems"><aid="all-types"href="all.html"><p>See all abstio's items</p></a><divclass="block items"><ul><li><ahref="#modules">Modules</a></li><li><ahref="#structs">Structs</a></li><li><ahref="#functions">Functions</a></li></ul></div><divid="sidebar-vars"data-name="abstio"data-ty="mod"data-relpath=""></div><scriptdefersrc="sidebar-items.js"></script></div></nav><divclass="theme-picker"><buttonid="theme-picker"aria-label="Pick another theme!"aria-haspopup="menu"title="themes"><imgwidth="18"height="18"alt="Pick another theme!"src="../brush.svg"></button><divid="theme-choices"role="menu"></div></div><navclass="sub"><formclass="search-form"><divclass="search-container"><div><selectid="crate-search"><optionvalue="All crates">All crates</option></select><inputclass="search-input"name="search"disabledautocomplete="off"spellcheck="false"placeholder="Click or press ‘S’ to search, ‘?’ for more options…"type="search"></div><buttontype="button"id="help-button"title="help">?</button><aid="settings-menu"href="../settings.html"title="settings"><imgwidth="18"height="18"alt="Change settings"src="../wheel.svg"></a></div></form></nav><sectionid="main"class="content"><h1class="fqn"><spanclass="in-band">Crate <aclass="mod"href="#">abstio</a><buttonid="copy-path"onclick="copy_path(this)"title="copy path"><imgsrc="../clipboard.svg"width="19"height="18"alt="Copy item import"title="Copy item import to clipboard"></button></span><spanclass="out-of-band"><spanid="render-detail"><aid="toggle-all-docs"href="javascript:void(0)"title="collapse all docs">[<spanclass="inner">−</span>]</a></span><aclass="srclink"href="../src/abstio/lib.rs.html#1-40"title="goto source code">[src]</a></span></h1><detailsclass="rustdoc-toggle top-doc"open><summaryclass="hideme"><span>Expand description</span></summary><divclass="docblock"><p>A/B Street organizes data files <ahref="https://a-b-street.github.io/docs/tech/dev/data.html">in a particular
<divclass="item-table"><divclass="item-left module-item"><aclass="mod"href="abst_data/index.html"title="abstio::abst_data mod">abst_data</a></div><divclass="item-right docblock-short"></div><divclass="item-left module-item"><aclass="mod"href="abst_paths/index.html"title="abstio::abst_paths mod">abst_paths</a></div><divclass="item-right docblock-short"><p>Generate paths for different A/B Street files</p>
</div><divclass="item-left module-item"><aclass="mod"href="download/index.html"title="abstio::download mod">download</a></div><divclass="item-right docblock-short"></div><divclass="item-left module-item"><aclass="mod"href="http/index.html"title="abstio::http mod">http</a></div><divclass="item-right docblock-short"></div><divclass="item-left module-item"><aclass="mod"href="io/index.html"title="abstio::io mod">io</a></div><divclass="item-right docblock-short"></div><divclass="item-left module-item"><aclass="mod"href="io_native/index.html"title="abstio::io_native mod">io_native</a></div><divclass="item-right docblock-short"><p>Normal file IO using the filesystem</p>
<divclass="item-table"><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><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><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><divclass="item-left module-item"><aclass="struct"href="struct.FileWithProgress.html"title="abstio::FileWithProgress struct">FileWithProgress</a></div><divclass="item-right docblock-short"></div><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><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><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><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><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><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><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><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><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><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><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><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><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><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><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><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><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