<!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-32x32.png"><styletype="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><bodyclass="rustdoc mod"><!--[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><pclass="location">Crate abstio</p><divclass="block version"><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><pclass="location"></p><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"><imgsrc="../brush.svg"width="18"height="18"alt="Pick another theme!"></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"class="help-button">?</button>
<aid="settings-menu"href="../settings.html"><imgsrc="../wheel.svg"width="18"height="18"alt="Change settings"></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)">⎘</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-38"title="goto source code">[src]</a></span></h1><divclass="docblock"><p>A/B Street organizes data files <ahref="https://a-b-street.github.io/docs/tech/dev/data.html">in a particular
<table><trclass="module-item"><td><aclass="mod"href="abst_data/index.html"title="abstio::abst_data mod">abst_data</a></td><tdclass="docblock-short"></td></tr><trclass="module-item"><td><aclass="mod"href="abst_paths/index.html"title="abstio::abst_paths mod">abst_paths</a></td><tdclass="docblock-short"><p>Generate paths for different A/B Street files</p>
</td></tr><trclass="module-item"><td><aclass="mod"href="download/index.html"title="abstio::download mod">download</a></td><tdclass="docblock-short"></td></tr><trclass="module-item"><td><aclass="mod"href="io/index.html"title="abstio::io mod">io</a></td><tdclass="docblock-short"></td></tr><trclass="module-item"><td><aclass="mod"href="io_native/index.html"title="abstio::io_native mod">io_native</a></td><tdclass="docblock-short"><p>Normal file IO using the filesystem</p>
<table><trclass="module-item"><td><aclass="struct"href="struct.CityName.html"title="abstio::CityName struct">CityName</a></td><tdclass="docblock-short"><p>A single city is identified using this.</p>
</td></tr><trclass="module-item"><td><aclass="struct"href="struct.DataPacks.html"title="abstio::DataPacks struct">DataPacks</a></td><tdclass="docblock-short"><p>Player-chosen groups of files to opt into downloading</p>
</td></tr><trclass="module-item"><td><aclass="struct"href="struct.Entry.html"title="abstio::Entry struct">Entry</a></td><tdclass="docblock-short"><p>A single file</p>
</td></tr><trclass="module-item"><td><aclass="struct"href="struct.FileWithProgress.html"title="abstio::FileWithProgress struct">FileWithProgress</a></td><tdclass="docblock-short"></td></tr><trclass="module-item"><td><aclass="struct"href="struct.Manifest.html"title="abstio::Manifest struct">Manifest</a></td><tdclass="docblock-short"><p>A list of all canonical data files for A/B Street that’re uploaded somewhere. The file formats
</td></tr><trclass="module-item"><td><aclass="struct"href="struct.MapName.html"title="abstio::MapName struct">MapName</a></td><tdclass="docblock-short"><p>A single map is identified using this.</p>
</td></tr><trclass="module-item"><td><aclass="fn"href="fn.download_bytes.html"title="abstio::download_bytes fn">download_bytes</a></td><tdclass="docblock-short"><p>Downloads bytes from a URL. This must be called with a tokio runtime somewhere. The caller
creates an mpsc channel pair and provides the sender. Progress will be described through it.</p>
</td></tr><trclass="module-item"><td><aclass="fn"href="fn.download_to_file.html"title="abstio::download_to_file fn">download_to_file</a></td><tdclass="docblock-short"><p>Download a file from a URL. This must be called with a tokio runtime somewhere. Progress will
</td></tr><trclass="module-item"><td><aclass="fn"href="fn.list_all_objects.html"title="abstio::list_all_objects fn">list_all_objects</a></td><tdclass="docblock-short"><p>Just list all things from a directory, return sorted by name, with file extension removed.</p>
</td></tr><trclass="module-item"><td><aclass="fn"href="fn.list_dir.html"title="abstio::list_dir fn">list_dir</a></td><tdclass="docblock-short"><p>Returns full paths</p>
</td></tr><trclass="module-item"><td><aclass="fn"href="fn.load_all_objects.html"title="abstio::load_all_objects fn">load_all_objects</a></td><tdclass="docblock-short"><p>Load all serialized things from a directory, return sorted by name, with file extension removed.
Detects JSON or binary. Filters out broken files.</p>
</td></tr><trclass="module-item"><td><aclass="fn"href="fn.maybe_read_binary.html"title="abstio::maybe_read_binary fn">maybe_read_binary</a></td><tdclass="docblock-short"></td></tr><trclass="module-item"><td><aclass="fn"href="fn.maybe_read_json.html"title="abstio::maybe_read_json fn">maybe_read_json</a></td><tdclass="docblock-short"></td></tr><trclass="module-item"><td><aclass="fn"href="fn.must_read_object.html"title="abstio::must_read_object fn">must_read_object</a></td><tdclass="docblock-short"><p>May be a JSON or binary file. Panics on failure.</p>
</td></tr><trclass="module-item"><td><aclass="fn"href="fn.parse_scenario_path.html"title="abstio::parse_scenario_path fn">parse_scenario_path</a></td><tdclass="docblock-short"><p>Extract the map and scenario name from a path. Crashes if the input is strange.</p>
</td></tr><trclass="module-item"><td><aclass="fn"href="fn.path.html"title="abstio::path fn">path</a></td><tdclass="docblock-short"></td></tr><trclass="module-item"><td><aclass="fn"href="fn.path_all_edits.html"title="abstio::path_all_edits fn">path_all_edits</a></td><tdclass="docblock-short"></td></tr><trclass="module-item"><td><aclass="fn"href="fn.path_all_saves.html"title="abstio::path_all_saves fn">path_all_saves</a></td><tdclass="docblock-short"></td></tr><trclass="module-item"><td><aclass="fn"href="fn.path_all_scenarios.html"title="abstio::path_all_scenarios fn">path_all_scenarios</a></td><tdclass="docblock-short"></td></tr><trclass="module-item"><td><aclass="fn"href="fn.path_camera_state.html"title="abstio::path_camera_state fn">path_camera_state</a></td><tdclass="docblock-short"></td></tr><trclass="module-item"><td><aclass="fn"href="fn.path_edits.html"title="abstio::path_edits fn">path_edits</a></td><tdclass="docblock-short"></td></tr><trclass="module-item"><td><aclass="fn"href="fn.path_player.html"title="abstio::path_player fn">path_player</a></td><tdclass="docblock-short"></td></tr><trclass="module-item"><td><aclass="fn"href="fn.path_popdat.html"title="abstio::path_popdat fn">path_popdat</a></td><tdclass="docblock-short"></td></tr><trclass="module-item"><td><aclass="fn"href="fn.path_prebaked_results.html"title="abstio::path_prebaked_results fn">path_prebaked_results</a></td><tdclass="docblock-short"></td></tr><trclass="module-item"><td><aclass="fn"href="fn.path_raw_map.html"title="abstio::path_raw_map fn">path_raw_map</a></td><tdclass="docblock-short"></td></tr><trclass="module-item"><td><aclass="fn"href="fn.path_save.html"title="abstio::path_save fn">path_save</a></td><tdclass="docblock-short"></td></tr><trclass="module-item"><td><aclass="fn"href="fn.path_scenario.html"title="abstio::path_scenario fn">path_scenario</a></td><tdclass="docblock-short"></td></tr><trclass="module-item"><td><aclass="fn"href="fn.path_shared_input.html"title="abstio::path_shared_input fn">path_shared_input</a></td><tdclass="docblock-short"></td></tr><trclass="module-item"><td><aclass="fn"href="fn.print_download_progress.html"title="abstio::print_download_progress fn">print_download_progress</a></td><tdclass="docblock-short"><p>Print download progress to STDOUT. Pass this the receiver, then call download_to_file or
download_bytes with the sender.</p>
</td></tr><trclass="module-item"><td><aclass="fn"href="fn.read_binary.html"title="abstio::read_binary fn">read_binary</a></td><tdclass="docblock-short"></td></tr><trclass="module-item"><td><aclass="fn"href="fn.read_json.html"title="abstio::read_json fn">read_json</a></td><tdclass="docblock-short"></td></tr><trclass="module-item"><td><aclass="fn"href="fn.read_object.html"title="abstio::read_object fn">read_object</a></td><tdclass="docblock-short"><p>May be a JSON or binary file</p>
</td></tr><trclass="module-item"><td><aclass="fn"href="fn.slurp_bytes.html"title="abstio::slurp_bytes fn">slurp_bytes</a></td><tdclass="docblock-short"><p>An adapter for widgetry::Settings::read_svg to read SVGs using this crate’s methods for finding