mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-25 15:33:44 +03:00
deploy: ec0fd1b94d
This commit is contained in:
parent
a238abad44
commit
5322b056a3
File diff suppressed because one or more lines are too long
@ -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 `impact_widget` fn in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, impact_widget"><title>impact_widget in ltn::browse - 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 id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../ltn/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">ltn</a>::<wbr><a href="index.html">browse</a></h2><div id="sidebar-vars" data-name="impact_widget" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">ltn</a>::<wbr><a href="index.html">browse</a>::<wbr><a class="fn" href="#">impact_widget</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/ltn/browse.rs.html#257-308" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>fn impact_widget(ctx: &EventCtx<'_>, app: &<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../struct.Session.html" title="struct ltn::Session">Session</a>>) -> Widget</code></pre></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="ltn" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../ltn/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">ltn</a>::<wbr><a href="index.html">browse</a></h2><div id="sidebar-vars" data-name="impact_widget" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">ltn</a>::<wbr><a href="index.html">browse</a>::<wbr><a class="fn" href="#">impact_widget</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/ltn/browse.rs.html#257-306" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>fn impact_widget(ctx: &EventCtx<'_>, app: &<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../struct.Session.html" title="struct ltn::Session">Session</a>>) -> Widget</code></pre></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="ltn" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
|
||||
</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 `browse` mod in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, browse"><title>ltn::browse - 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 id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../ltn/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module browse</h2><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="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="browse" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">ltn</a>::<wbr><a class="mod" href="#">browse</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/ltn/browse.rs.html#1-308" title="goto source code">[src]</a></span></h1><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../ltn/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module browse</h2><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="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="browse" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">ltn</a>::<wbr><a class="mod" href="#">browse</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/ltn/browse.rs.html#1-306" title="goto source code">[src]</a></span></h1><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.BrowseNeighborhoods.html" title="ltn::browse::BrowseNeighborhoods struct">BrowseNeighborhoods</a></div><div class="item-right docblock-short"></div></div></div><h2 id="enums" class="small-section-header"><a href="#enums">Enums</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.Style.html" title="ltn::browse::Style enum">Style</a></div><div class="item-right docblock-short"></div></div></div><h2 id="functions" class="small-section-header"><a href="#functions">Functions</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.draw_boundary_roads.html" title="ltn::browse::draw_boundary_roads fn">draw_boundary_roads</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.impact_widget.html" title="ltn::browse::impact_widget fn">impact_widget</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.make_world.html" title="ltn::browse::make_world fn">make_world</a></div><div class="item-right docblock-short"></div></div></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="ltn" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
|
||||
|
File diff suppressed because one or more lines are too long
@ -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 `count_throughput` fn in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, count_throughput"><title>count_throughput in ltn::impact - 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 id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../ltn/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">ltn</a>::<wbr><a href="index.html">impact</a></h2><div id="sidebar-vars" data-name="count_throughput" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">ltn</a>::<wbr><a href="index.html">impact</a>::<wbr><a class="fn" href="#">count_throughput</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/ltn/impact/mod.rs.html#279-325" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>fn count_throughput(<br> requests: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.slice.html">&[</a><a class="struct" href="../../map_model/pathfind/v1/struct.PathRequest.html" title="struct map_model::pathfind::v1::PathRequest">PathRequest</a><a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.slice.html">]</a>, <br> map: &<a class="struct" href="../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br> params: <a class="struct" href="../../map_model/pathfind/struct.RoutingParams.html" title="struct map_model::pathfind::RoutingParams">RoutingParams</a>, <br> cache_custom: <a class="enum" href="../../map_model/pathfind/pathfinder/enum.PathfinderCaching.html" title="enum map_model::pathfind::pathfinder::PathfinderCaching">PathfinderCaching</a>, <br> timer: &mut <a class="struct" href="../../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a><'_><br>) -> <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.tuple.html">(</a><a class="struct" href="../../abstutil/collections/struct.Counter.html" title="struct abstutil::collections::Counter">Counter</a><<a class="struct" href="../../map_model/objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>>, <a class="struct" href="../../abstutil/collections/struct.Counter.html" title="struct abstutil::collections::Counter">Counter</a><<a class="struct" href="../../map_model/objects/intersection/struct.IntersectionID.html" title="struct map_model::objects::intersection::IntersectionID">IntersectionID</a>><a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.tuple.html">)</a></code></pre></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="ltn" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../ltn/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">ltn</a>::<wbr><a href="index.html">impact</a></h2><div id="sidebar-vars" data-name="count_throughput" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">ltn</a>::<wbr><a href="index.html">impact</a>::<wbr><a class="fn" href="#">count_throughput</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/ltn/impact/mod.rs.html#209-255" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>fn count_throughput(<br> requests: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.slice.html">&[</a><a class="struct" href="../../map_model/pathfind/v1/struct.PathRequest.html" title="struct map_model::pathfind::v1::PathRequest">PathRequest</a><a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.slice.html">]</a>, <br> map: &<a class="struct" href="../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br> params: <a class="struct" href="../../map_model/pathfind/struct.RoutingParams.html" title="struct map_model::pathfind::RoutingParams">RoutingParams</a>, <br> cache_custom: <a class="enum" href="../../map_model/pathfind/pathfinder/enum.PathfinderCaching.html" title="enum map_model::pathfind::pathfinder::PathfinderCaching">PathfinderCaching</a>, <br> timer: &mut <a class="struct" href="../../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a><'_><br>) -> <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.tuple.html">(</a><a class="struct" href="../../abstutil/collections/struct.Counter.html" title="struct abstutil::collections::Counter">Counter</a><<a class="struct" href="../../map_model/objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>>, <a class="struct" href="../../abstutil/collections/struct.Counter.html" title="struct abstutil::collections::Counter">Counter</a><<a class="struct" href="../../map_model/objects/intersection/struct.IntersectionID.html" title="struct map_model::objects::intersection::IntersectionID">IntersectionID</a>><a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.tuple.html">)</a></code></pre></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="ltn" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
|
||||
</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 `make_world` fn in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, make_world"><title>make_world in ltn::impact - 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 id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../ltn/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">ltn</a>::<wbr><a href="index.html">impact</a></h2><div id="sidebar-vars" data-name="make_world" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">ltn</a>::<wbr><a href="index.html">impact</a>::<wbr><a class="fn" href="#">make_world</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/ltn/impact/mod.rs.html#220-230" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>fn make_world(ctx: &mut EventCtx<'_>, app: &<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../struct.Session.html" title="struct ltn::Session">Session</a>>) -> World<<a class="enum" href="enum.Obj.html" title="enum ltn::impact::Obj">Obj</a>></code></pre></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="ltn" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../ltn/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">ltn</a>::<wbr><a href="index.html">impact</a></h2><div id="sidebar-vars" data-name="make_world" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">ltn</a>::<wbr><a href="index.html">impact</a>::<wbr><a class="fn" href="#">make_world</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/ltn/impact/mod.rs.html#263-282" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>fn make_world(ctx: &mut EventCtx<'_>, app: &<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../struct.Session.html" title="struct ltn::Session">Session</a>>) -> World<<a class="enum" href="enum.Obj.html" title="enum ltn::impact::Obj">Obj</a>></code></pre></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="ltn" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
|
||||
</body></html>
|
@ -1,3 +0,0 @@
|
||||
<!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 `ranked_intersections` fn in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, ranked_intersections"><title>ranked_intersections in ltn::impact - 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 id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../ltn/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">ltn</a>::<wbr><a href="index.html">impact</a></h2><div id="sidebar-vars" data-name="ranked_intersections" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">ltn</a>::<wbr><a href="index.html">impact</a>::<wbr><a class="fn" href="#">ranked_intersections</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/ltn/impact/mod.rs.html#256-277" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>fn ranked_intersections(<br> ctx: &mut EventCtx<'_>, <br> map: &<a class="struct" href="../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br> world: &mut World<<a class="enum" href="enum.Obj.html" title="enum ltn::impact::Obj">Obj</a>>, <br> counter: &<a class="struct" href="../../abstutil/collections/struct.Counter.html" title="struct abstutil::collections::Counter">Counter</a><<a class="struct" href="../../map_model/objects/intersection/struct.IntersectionID.html" title="struct map_model::objects::intersection::IntersectionID">IntersectionID</a>>, <br> scale: &<a class="struct" href="../../map_gui/tools/colors/struct.ColorScale.html" title="struct map_gui::tools::colors::ColorScale">ColorScale</a><br>)</code></pre></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="ltn" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
|
||||
</body></html>
|
@ -1,3 +0,0 @@
|
||||
<!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 `ranked_roads` fn in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, ranked_roads"><title>ranked_roads in ltn::impact - 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 id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../ltn/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">ltn</a>::<wbr><a href="index.html">impact</a></h2><div id="sidebar-vars" data-name="ranked_roads" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">ltn</a>::<wbr><a href="index.html">impact</a>::<wbr><a class="fn" href="#">ranked_roads</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/ltn/impact/mod.rs.html#233-254" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>fn ranked_roads(<br> ctx: &mut EventCtx<'_>, <br> map: &<a class="struct" href="../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br> world: &mut World<<a class="enum" href="enum.Obj.html" title="enum ltn::impact::Obj">Obj</a>>, <br> counter: &<a class="struct" href="../../abstutil/collections/struct.Counter.html" title="struct abstutil::collections::Counter">Counter</a><<a class="struct" href="../../map_model/objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>>, <br> scale: &<a class="struct" href="../../map_gui/tools/colors/struct.ColorScale.html" title="struct map_gui::tools::colors::ColorScale">ColorScale</a><br>)</code></pre></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="ltn" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
|
||||
</body></html>
|
@ -1,8 +1,8 @@
|
||||
<!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 `impact` mod in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, impact"><title>ltn::impact - 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 id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../ltn/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module impact</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="impact" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">ltn</a>::<wbr><a class="mod" href="#">impact</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/ltn/impact/mod.rs.html#1-325" title="goto source code">[src]</a></span></h1><h2 id="reexports" class="small-section-header"><a href="#reexports">Re-exports</a></h2>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../ltn/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module impact</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="impact" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">ltn</a>::<wbr><a class="mod" href="#">impact</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/ltn/impact/mod.rs.html#1-282" title="goto source code">[src]</a></span></h1><h2 id="reexports" class="small-section-header"><a href="#reexports">Re-exports</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left import-item"><code>pub use self::ui::<a class="struct" href="ui/struct.ShowResults.html" title="struct ltn::impact::ui::ShowResults">ShowResults</a>;</code></div><div class="item-right docblock-short"></div></div></div><h2 id="modules" class="small-section-header"><a href="#modules">Modules</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="mod" href="ui/index.html" title="ltn::impact::ui mod">ui</a></div><div class="item-right docblock-short"></div></div></div><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Results.html" title="ltn::impact::Results struct">Results</a></div><div class="item-right docblock-short"></div></div></div><h2 id="enums" class="small-section-header"><a href="#enums">Enums</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.Obj.html" title="ltn::impact::Obj enum">Obj</a></div><div class="item-right docblock-short"></div></div></div><h2 id="functions" class="small-section-header"><a href="#functions">Functions</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.count_throughput.html" title="ltn::impact::count_throughput fn">count_throughput</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.make_world.html" title="ltn::impact::make_world fn">make_world</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ranked_intersections.html" title="ltn::impact::ranked_intersections fn">ranked_intersections</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ranked_roads.html" title="ltn::impact::ranked_roads fn">ranked_roads</a></div><div class="item-right docblock-short"></div></div></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="ltn" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.count_throughput.html" title="ltn::impact::count_throughput fn">count_throughput</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.make_world.html" title="ltn::impact::make_world fn">make_world</a></div><div class="item-right docblock-short"></div></div></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="ltn" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
|
||||
</body></html>
|
@ -1 +1 @@
|
||||
initSidebarItems({"enum":[["Obj",""]],"fn":[["count_throughput",""],["make_world",""],["ranked_intersections",""],["ranked_roads",""]],"mod":[["ui",""]],"struct":[["Results",""]]});
|
||||
initSidebarItems({"enum":[["Obj",""]],"fn":[["count_throughput",""],["make_world",""]],"mod":[["ui",""]],"struct":[["Results",""]]});
|
File diff suppressed because one or more lines are too long
@ -1,15 +1,15 @@
|
||||
<!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 `Layer` enum in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, Layer"><title>Layer in ltn::impact::ui - 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 id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><script defer src="../../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../ltn/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Enum Layer</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#variants">Variants</a></h3><div class="sidebar-links"><a href="#variant.After">After</a><a href="#variant.Before">Before</a><a href="#variant.Relative">Relative</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><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-PartialEq%3CLayer%3E">PartialEq<Layer></a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><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><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><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-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></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><h2 class="location">Other items in<br><a href="../../index.html">ltn</a>::<wbr><a href="../index.html">impact</a>::<wbr><a href="index.html">ui</a></h2><div id="sidebar-vars" data-name="Layer" data-ty="enum" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Enum <a href="../../index.html">ltn</a>::<wbr><a href="../index.html">impact</a>::<wbr><a href="index.html">ui</a>::<wbr><a class="enum" href="#">Layer</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/ltn/impact/ui.rs.html#21-25" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust enum"><code>enum Layer {
|
||||
<noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../ltn/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Enum Layer</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#variants">Variants</a></h3><div class="sidebar-links"><a href="#variant.After">After</a><a href="#variant.Before">Before</a><a href="#variant.Relative">Relative</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><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-PartialEq%3CLayer%3E">PartialEq<Layer></a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><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><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><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-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></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><h2 class="location">Other items in<br><a href="../../index.html">ltn</a>::<wbr><a href="../index.html">impact</a>::<wbr><a href="index.html">ui</a></h2><div id="sidebar-vars" data-name="Layer" data-ty="enum" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Enum <a href="../../index.html">ltn</a>::<wbr><a href="../index.html">impact</a>::<wbr><a href="index.html">ui</a>::<wbr><a class="enum" href="#">Layer</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/ltn/impact/ui.rs.html#23-27" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust enum"><code>enum Layer {
|
||||
Before,
|
||||
After,
|
||||
Relative,
|
||||
}</code></pre></div><h2 id="variants" class="variants small-section-header">Variants<a href="#variants" class="anchor"></a></h2><h3 id="variant.Before" class="variant small-section-header"><a href="#variant.Before" class="anchor field"></a><code>Before</code></h3><h3 id="variant.After" class="variant small-section-header"><a href="#variant.After" class="anchor field"></a><code>After</code></h3><h3 id="variant.Relative" class="variant small-section-header"><a href="#variant.Relative" class="anchor field"></a><code>Relative</code></h3><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Clone" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/ltn/impact/ui.rs.html#20" title="goto source code">[src]</a></div><a href="#impl-Clone" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="enum.Layer.html" title="enum ltn::impact::ui::Layer">Layer</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/ltn/impact/ui.rs.html#20" title="goto source code">[src]</a></div><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="enum" href="enum.Layer.html" title="enum ltn::impact::ui::Layer">Layer</a></h4></div></summary><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
}</code></pre></div><h2 id="variants" class="variants small-section-header">Variants<a href="#variants" class="anchor"></a></h2><h3 id="variant.Before" class="variant small-section-header"><a href="#variant.Before" class="anchor field"></a><code>Before</code></h3><h3 id="variant.After" class="variant small-section-header"><a href="#variant.After" class="anchor field"></a><code>After</code></h3><h3 id="variant.Relative" class="variant small-section-header"><a href="#variant.Relative" class="anchor field"></a><code>Relative</code></h3><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Clone" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/ltn/impact/ui.rs.html#22" title="goto source code">[src]</a></div><a href="#impl-Clone" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="enum.Layer.html" title="enum ltn::impact::ui::Layer">Layer</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/ltn/impact/ui.rs.html#22" title="goto source code">[src]</a></div><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="enum" href="enum.Layer.html" title="enum ltn::impact::ui::Layer">Layer</a></h4></div></summary><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone_from" class="method trait-impl has-srclink"><div class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/clone.rs.html#130" title="goto source code">[src]</a></div><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/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/1.58.1/std/primitive.reference.html">&</a>Self)</h4></div></summary><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Debug" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/ltn/impact/ui.rs.html#20" title="goto source code">[src]</a></div><a href="#impl-Debug" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="enum.Layer.html" title="enum ltn::impact::ui::Layer">Layer</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/ltn/impact/ui.rs.html#20" title="goto source code">[src]</a></div><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.58.1/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.58.1/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.58.1/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-PartialEq%3CLayer%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/ltn/impact/ui.rs.html#20" title="goto source code">[src]</a></div><a href="#impl-PartialEq%3CLayer%3E" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="enum" href="enum.Layer.html" title="enum ltn::impact::ui::Layer">Layer</a>> for <a class="enum" href="enum.Layer.html" title="enum ltn::impact::ui::Layer">Layer</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.eq" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/ltn/impact/ui.rs.html#20" title="goto source code">[src]</a></div><a href="#method.eq" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="enum" href="enum.Layer.html" title="enum ltn::impact::ui::Layer">Layer</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a></h4></div></summary><div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Debug" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/ltn/impact/ui.rs.html#22" title="goto source code">[src]</a></div><a href="#impl-Debug" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="enum.Layer.html" title="enum ltn::impact::ui::Layer">Layer</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/ltn/impact/ui.rs.html#22" title="goto source code">[src]</a></div><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.58.1/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.58.1/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.58.1/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-PartialEq%3CLayer%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/ltn/impact/ui.rs.html#22" title="goto source code">[src]</a></div><a href="#impl-PartialEq%3CLayer%3E" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="enum" href="enum.Layer.html" title="enum ltn::impact::ui::Layer">Layer</a>> for <a class="enum" href="enum.Layer.html" title="enum ltn::impact::ui::Layer">Layer</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.eq" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/ltn/impact/ui.rs.html#22" title="goto source code">[src]</a></div><a href="#method.eq" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="enum" href="enum.Layer.html" title="enum ltn::impact::ui::Layer">Layer</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a></h4></div></summary><div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
|
||||
by <code>==</code>. <a href="https://doc.rust-lang.org/1.58.1/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.ne" class="method trait-impl has-srclink"><div class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/cmp.rs.html#218" title="goto source code">[src]</a></div><a href="#method.ne" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a></h4></div></summary><div class='docblock'><p>This method tests for <code>!=</code>.</p>
|
||||
</div></details></div></details><div id="impl-Copy" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/ltn/impact/ui.rs.html#20" title="goto source code">[src]</a></div><a href="#impl-Copy" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="enum" href="enum.Layer.html" title="enum ltn::impact::ui::Layer">Layer</a></h3></div><div id="impl-StructuralPartialEq" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/ltn/impact/ui.rs.html#20" title="goto source code">[src]</a></div><a href="#impl-StructuralPartialEq" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="enum" href="enum.Layer.html" title="enum ltn::impact::ui::Layer">Layer</a></h3></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"><div id="impl-RefUnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-RefUnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="enum.Layer.html" title="enum ltn::impact::ui::Layer">Layer</a></h3></div><div id="impl-Send" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Send" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="enum.Layer.html" title="enum ltn::impact::ui::Layer">Layer</a></h3></div><div id="impl-Sync" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Sync" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="enum.Layer.html" title="enum ltn::impact::ui::Layer">Layer</a></h3></div><div id="impl-Unpin" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Unpin" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="enum.Layer.html" title="enum ltn::impact::ui::Layer">Layer</a></h3></div><div id="impl-UnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-UnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="enum" href="enum.Layer.html" title="enum ltn::impact::ui::Layer">Layer</a></h3></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"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Any" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/any.rs.html#132-136" title="goto source code">[src]</a></div><a href="#impl-Any" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.58.1/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/1.58.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/any.rs.html#133" title="goto source code">[src]</a></div><a href="#method.type_id" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.58.1/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.58.1/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.58.1/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></details></div></details><div id="impl-Copy" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/ltn/impact/ui.rs.html#22" title="goto source code">[src]</a></div><a href="#impl-Copy" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="enum" href="enum.Layer.html" title="enum ltn::impact::ui::Layer">Layer</a></h3></div><div id="impl-StructuralPartialEq" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/ltn/impact/ui.rs.html#22" title="goto source code">[src]</a></div><a href="#impl-StructuralPartialEq" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="enum" href="enum.Layer.html" title="enum ltn::impact::ui::Layer">Layer</a></h3></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"><div id="impl-RefUnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-RefUnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="enum.Layer.html" title="enum ltn::impact::ui::Layer">Layer</a></h3></div><div id="impl-Send" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Send" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="enum.Layer.html" title="enum ltn::impact::ui::Layer">Layer</a></h3></div><div id="impl-Sync" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Sync" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="enum.Layer.html" title="enum ltn::impact::ui::Layer">Layer</a></h3></div><div id="impl-Unpin" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Unpin" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="enum.Layer.html" title="enum ltn::impact::ui::Layer">Layer</a></h3></div><div id="impl-UnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-UnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="enum" href="enum.Layer.html" title="enum ltn::impact::ui::Layer">Layer</a></h3></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"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Any" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/any.rs.html#132-136" title="goto source code">[src]</a></div><a href="#impl-Any" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.58.1/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/1.58.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/any.rs.html#133" title="goto source code">[src]</a></div><a href="#method.type_id" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.58.1/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.58.1/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.58.1/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Borrow%3CT%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></div><a href="#impl-Borrow%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.58.1/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/1.58.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/borrow.rs.html#210" title="goto source code">[src]</a></div><a href="#method.borrow" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.58.1/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.reference.html">&</a>T</h4></div></summary><div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.58.1/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-BorrowMut%3CT%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></div><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.58.1/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/1.58.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow_mut" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/borrow.rs.html#217" title="goto source code">[src]</a></div><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.58.1/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.reference.html">&mut </a>T</h4></div></summary><div class='docblock'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.58.1/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Downcast" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Downcast" class="anchor"></a><h3 class="code-header in-band">impl<T> Downcast for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/any/trait.Any.html" title="trait core::any::Any">Any</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into_any" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.into_any" class="anchor"></a><h4 class="code-header">pub fn <a class="fnname">into_any</a>(self: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><T, <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>>) -> <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static, <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>></h4></div></summary><div class='docblock'><p>Convert <code>Box<dyn Trait></code> (where <code>Trait: Downcast</code>) to <code>Box<dyn Any></code>. <code>Box<dyn Any></code> can
|
||||
|
@ -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 `ui` mod in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, ui"><title>ltn::impact::ui - 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 id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><script defer src="../../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../ltn/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module ui</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li></ul></div><div id="sidebar-vars" data-name="ui" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">ltn</a>::<wbr><a href="../index.html">impact</a>::<wbr><a class="mod" href="#">ui</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/ltn/impact/ui.rs.html#1-142" title="goto source code">[src]</a></span></h1><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2>
|
||||
<noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../ltn/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module ui</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li></ul></div><div id="sidebar-vars" data-name="ui" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">ltn</a>::<wbr><a href="../index.html">impact</a>::<wbr><a class="mod" href="#">ui</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/ltn/impact/ui.rs.html#1-176" title="goto source code">[src]</a></span></h1><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.ShowResults.html" title="ltn::impact::ui::ShowResults struct">ShowResults</a></div><div class="item-right docblock-short"></div></div></div><h2 id="enums" class="small-section-header"><a href="#enums">Enums</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.Layer.html" title="ltn::impact::ui::Layer enum">Layer</a></div><div class="item-right docblock-short"></div></div></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="ltn" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
|
||||
</body></html>
|
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="The build time in RFC2822, UTC."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>BUILT_TIME_UTC in map_gui::tools::title_screen::built_info - 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 id="default-settings" ></script><script src="../../../../storage.js"></script><script src="../../../../crates.js"></script><script defer src="../../../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../../map_gui/index.html'><div class='logo-container rust-logo'><img src='../../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../../index.html">map_gui</a>::<wbr><a href="../../index.html">tools</a>::<wbr><a href="../index.html">title_screen</a>::<wbr><a href="index.html">built_info</a></h2><div id="sidebar-vars" data-name="BUILT_TIME_UTC" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="../../../index.html">map_gui</a>::<wbr><a href="../../index.html">tools</a>::<wbr><a href="../index.html">title_screen</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="#">BUILT_TIME_UTC</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/map_gui/home/runner/work/abstreet/abstreet/target/debug/build/map_gui-c32b77646ab1d63c/out/built.rs.html#78" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust const"><code>pub const BUILT_TIME_UTC: &<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.str.html">str</a> = r"Wed, 26 Jan 2022 10:43:17 +0000";</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The build time in RFC2822, UTC.</p>
|
||||
<noscript><link rel="stylesheet" href="../../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../../map_gui/index.html'><div class='logo-container rust-logo'><img src='../../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../../index.html">map_gui</a>::<wbr><a href="../../index.html">tools</a>::<wbr><a href="../index.html">title_screen</a>::<wbr><a href="index.html">built_info</a></h2><div id="sidebar-vars" data-name="BUILT_TIME_UTC" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="../../../index.html">map_gui</a>::<wbr><a href="../../index.html">tools</a>::<wbr><a href="../index.html">title_screen</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="#">BUILT_TIME_UTC</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/map_gui/home/runner/work/abstreet/abstreet/target/debug/build/map_gui-c32b77646ab1d63c/out/built.rs.html#78" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust const"><code>pub const BUILT_TIME_UTC: &<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.str.html">str</a> = r"Wed, 26 Jan 2022 11:35:24 +0000";</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The build time in RFC2822, UTC.</p>
|
||||
</div></details></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="map_gui" data-search-index-js="../../../../search-index.js" data-search-js="../../../../search.js"></div>
|
||||
</body></html>
|
File diff suppressed because one or more lines are too long
@ -305,8 +305,6 @@
|
||||
<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>
|
||||
</pre><pre class="rust"><code><span class="kw">use</span> <span class="ident">std::collections::HashSet</span>;
|
||||
|
||||
<span class="kw">use</span> <span class="ident">abstutil::Timer</span>;
|
||||
@ -610,8 +608,6 @@
|
||||
<span class="ident">ctx</span>.<span class="ident">style</span>()
|
||||
.<span class="ident">btn_solid_primary</span>
|
||||
.<span class="ident">text</span>(<span class="string">"Calculate"</span>)
|
||||
.<span class="ident">disabled</span>(<span class="bool-val">true</span>)
|
||||
.<span class="ident">disabled_tooltip</span>(<span class="ident">Text::from</span>(<span class="ident">Line</span>(<span class="string">"This prediction isn't working yet"</span>)))
|
||||
.<span class="ident">build_def</span>(<span class="ident">ctx</span>),
|
||||
])
|
||||
}
|
||||
|
@ -281,64 +281,21 @@
|
||||
<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>
|
||||
<span id="312">312</span>
|
||||
<span id="313">313</span>
|
||||
<span id="314">314</span>
|
||||
<span id="315">315</span>
|
||||
<span id="316">316</span>
|
||||
<span id="317">317</span>
|
||||
<span id="318">318</span>
|
||||
<span id="319">319</span>
|
||||
<span id="320">320</span>
|
||||
<span id="321">321</span>
|
||||
<span id="322">322</span>
|
||||
<span id="323">323</span>
|
||||
<span id="324">324</span>
|
||||
<span id="325">325</span>
|
||||
</pre><pre class="rust"><code><span class="kw">mod</span> <span class="ident">ui</span>;
|
||||
|
||||
<span class="kw">use</span> <span class="ident">abstio::MapName</span>;
|
||||
<span class="kw">use</span> <span class="ident">abstutil</span>::{<span class="ident">prettyprint_usize</span>, <span class="ident">Counter</span>, <span class="ident">Timer</span>};
|
||||
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Distance</span>, <span class="ident">Histogram</span>, <span class="ident">Statistic</span>};
|
||||
<span class="kw">use</span> <span class="ident">map_gui::tools</span>::{<span class="ident">cmp_count</span>, <span class="ident">ColorScale</span>, <span class="ident">DivergingScale</span>};
|
||||
<span class="kw">use</span> <span class="ident">map_gui::tools</span>::{<span class="ident">cmp_count</span>, <span class="ident">ColorNetwork</span>, <span class="ident">DivergingScale</span>};
|
||||
<span class="kw">use</span> <span class="ident">map_model</span>::{
|
||||
<span class="ident">IntersectionID</span>, <span class="ident">Map</span>, <span class="ident">PathRequest</span>, <span class="ident">PathStepV2</span>, <span class="ident">PathfinderCaching</span>, <span class="ident">RoadID</span>, <span class="ident">RoutingParams</span>,
|
||||
};
|
||||
<span class="kw">use</span> <span class="ident">sim</span>::{<span class="ident">Scenario</span>, <span class="ident">TripEndpoint</span>, <span class="ident">TripMode</span>};
|
||||
<span class="kw">use</span> <span class="ident">widgetry::mapspace</span>::{<span class="ident">ObjectID</span>, <span class="ident">World</span>};
|
||||
<span class="kw">use</span> <span class="ident">widgetry</span>::{<span class="ident">Color</span>, <span class="ident">EventCtx</span>, <span class="ident">Line</span>, <span class="ident">Text</span>};
|
||||
<span class="kw">use</span> <span class="ident">widgetry</span>::{<span class="ident">Color</span>, <span class="ident">EventCtx</span>, <span class="ident">GeomBatch</span>, <span class="ident">Line</span>, <span class="ident">Text</span>};
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">use</span> <span class="ident"><span class="self">self</span>::ui::ShowResults</span>;
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::{<span class="ident">App</span>, <span class="ident">NeighborhoodID</span>};
|
||||
<span class="kw">use</span> <span class="ident"><span class="kw">crate</span>::App</span>;
|
||||
|
||||
<span class="comment">// TODO Configurable main road penalty, like in the pathfinding tool</span>
|
||||
<span class="comment">// TODO Don't allow crossing filters at all -- don't just disincentivize</span>
|
||||
@ -350,14 +307,14 @@
|
||||
<span class="comment">// This changes per map</span>
|
||||
<span class="ident">all_driving_trips</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">PathRequest</span><span class="op">></span>,
|
||||
<span class="ident">before_world</span>: <span class="ident">World</span><span class="op"><</span><span class="ident">Obj</span><span class="op">></span>,
|
||||
<span class="ident">before_road_counts</span>: <span class="ident">Counter</span><span class="op"><</span><span class="ident">RoadID</span><span class="op">></span>,
|
||||
<span class="ident">before_intersection_counts</span>: <span class="ident">Counter</span><span class="op"><</span><span class="ident">IntersectionID</span><span class="op">></span>,
|
||||
<span class="kw">pub</span> <span class="ident">before_road_counts</span>: <span class="ident">Counter</span><span class="op"><</span><span class="ident">RoadID</span><span class="op">></span>,
|
||||
<span class="kw">pub</span> <span class="ident">before_intersection_counts</span>: <span class="ident">Counter</span><span class="op"><</span><span class="ident">IntersectionID</span><span class="op">></span>,
|
||||
|
||||
<span class="comment">// The rest need updating when this changes</span>
|
||||
<span class="kw">pub</span> <span class="ident">change_key</span>: <span class="ident">usize</span>,
|
||||
<span class="ident">after_world</span>: <span class="ident">World</span><span class="op"><</span><span class="ident">Obj</span><span class="op">></span>,
|
||||
<span class="ident">after_road_counts</span>: <span class="ident">Counter</span><span class="op"><</span><span class="ident">RoadID</span><span class="op">></span>,
|
||||
<span class="ident">after_intersection_counts</span>: <span class="ident">Counter</span><span class="op"><</span><span class="ident">IntersectionID</span><span class="op">></span>,
|
||||
<span class="kw">pub</span> <span class="ident">after_road_counts</span>: <span class="ident">Counter</span><span class="op"><</span><span class="ident">RoadID</span><span class="op">></span>,
|
||||
<span class="kw">pub</span> <span class="ident">after_intersection_counts</span>: <span class="ident">Counter</span><span class="op"><</span><span class="ident">IntersectionID</span><span class="op">></span>,
|
||||
<span class="ident">relative_world</span>: <span class="ident">World</span><span class="op"><</span><span class="ident">Obj</span><span class="op">></span>,
|
||||
}
|
||||
|
||||
@ -365,7 +322,6 @@
|
||||
<span class="kw">enum</span> <span class="ident">Obj</span> {
|
||||
<span class="ident">Road</span>(<span class="ident">RoadID</span>),
|
||||
<span class="ident">Intersection</span>(<span class="ident">IntersectionID</span>),
|
||||
<span class="ident">Neighborhood</span>(<span class="ident">NeighborhoodID</span>),
|
||||
}
|
||||
<span class="kw">impl</span> <span class="ident">ObjectID</span> <span class="kw">for</span> <span class="ident">Obj</span> {}
|
||||
|
||||
@ -424,20 +380,14 @@
|
||||
<span class="self">self</span>.<span class="ident">before_intersection_counts</span> <span class="op">=</span> <span class="ident">intersections</span>;
|
||||
|
||||
<span class="self">self</span>.<span class="ident">before_world</span> <span class="op">=</span> <span class="ident">make_world</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
|
||||
<span class="ident">ranked_roads</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="ident">map</span>,
|
||||
<span class="kw-2">&mut</span> <span class="self">self</span>.<span class="ident">before_world</span>,
|
||||
<span class="kw-2">&</span><span class="self">self</span>.<span class="ident">before_road_counts</span>,
|
||||
<span class="kw-2">&</span><span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">good_to_bad_red</span>,
|
||||
);
|
||||
<span class="ident">ranked_intersections</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="ident">map</span>,
|
||||
<span class="kw-2">&mut</span> <span class="self">self</span>.<span class="ident">before_world</span>,
|
||||
<span class="kw-2">&</span><span class="self">self</span>.<span class="ident">before_intersection_counts</span>,
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">colorer</span> <span class="op">=</span> <span class="ident">ColorNetwork::no_fading</span>(<span class="ident">app</span>);
|
||||
<span class="ident">colorer</span>.<span class="ident">ranked_roads</span>(<span class="self">self</span>.<span class="ident">before_road_counts</span>.<span class="ident">clone</span>(), <span class="kw-2">&</span><span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">good_to_bad_red</span>);
|
||||
<span class="ident">colorer</span>.<span class="ident">ranked_intersections</span>(
|
||||
<span class="self">self</span>.<span class="ident">before_intersection_counts</span>.<span class="ident">clone</span>(),
|
||||
<span class="kw-2">&</span><span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">good_to_bad_red</span>,
|
||||
);
|
||||
<span class="self">self</span>.<span class="ident">before_world</span>
|
||||
.<span class="ident">draw_master_batch_built</span>(<span class="ident">colorer</span>.<span class="ident">build</span>(<span class="ident">ctx</span>));
|
||||
}
|
||||
|
||||
<span class="comment">// After the filters</span>
|
||||
@ -457,20 +407,13 @@
|
||||
<span class="self">self</span>.<span class="ident">after_intersection_counts</span> <span class="op">=</span> <span class="ident">intersections</span>;
|
||||
|
||||
<span class="self">self</span>.<span class="ident">after_world</span> <span class="op">=</span> <span class="ident">make_world</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
|
||||
<span class="ident">ranked_roads</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="ident">map</span>,
|
||||
<span class="kw-2">&mut</span> <span class="self">self</span>.<span class="ident">after_world</span>,
|
||||
<span class="kw-2">&</span><span class="self">self</span>.<span class="ident">after_road_counts</span>,
|
||||
<span class="kw-2">&</span><span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">good_to_bad_red</span>,
|
||||
);
|
||||
<span class="ident">ranked_intersections</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="ident">map</span>,
|
||||
<span class="kw-2">&mut</span> <span class="self">self</span>.<span class="ident">after_world</span>,
|
||||
<span class="kw-2">&</span><span class="self">self</span>.<span class="ident">after_intersection_counts</span>,
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">colorer</span> <span class="op">=</span> <span class="ident">ColorNetwork::no_fading</span>(<span class="ident">app</span>);
|
||||
<span class="ident">colorer</span>.<span class="ident">ranked_roads</span>(<span class="self">self</span>.<span class="ident">after_road_counts</span>.<span class="ident">clone</span>(), <span class="kw-2">&</span><span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">good_to_bad_red</span>);
|
||||
<span class="ident">colorer</span>.<span class="ident">ranked_intersections</span>(
|
||||
<span class="self">self</span>.<span class="ident">after_intersection_counts</span>.<span class="ident">clone</span>(),
|
||||
<span class="kw-2">&</span><span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">good_to_bad_red</span>,
|
||||
);
|
||||
<span class="self">self</span>.<span class="ident">after_world</span>.<span class="ident">draw_master_batch_built</span>(<span class="ident">colorer</span>.<span class="ident">build</span>(<span class="ident">ctx</span>));
|
||||
}
|
||||
|
||||
<span class="self">self</span>.<span class="ident">recalculate_relative_diff</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
|
||||
@ -478,7 +421,6 @@
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">recalculate_relative_diff</span>(<span class="kw-2">&mut</span> <span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&</span><span class="ident">App</span>) {
|
||||
<span class="kw">let</span> <span class="ident">map</span> <span class="op">=</span> <span class="kw-2">&</span><span class="ident">app</span>.<span class="ident">map</span>;
|
||||
<span class="self">self</span>.<span class="ident">relative_world</span> <span class="op">=</span> <span class="ident">make_world</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
|
||||
|
||||
<span class="comment">// First just understand the counts...</span>
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">hgram_before</span> <span class="op">=</span> <span class="ident">Histogram::new</span>();
|
||||
@ -508,6 +450,7 @@
|
||||
<span class="kw">let</span> <span class="ident">min_count</span> <span class="op">=</span> <span class="ident">hgram_before</span>.<span class="ident">select</span>(<span class="ident">Statistic::Min</span>).<span class="ident">unwrap</span>();
|
||||
<span class="kw">let</span> <span class="ident">max_count</span> <span class="op">=</span> <span class="ident">hgram_before</span>.<span class="ident">select</span>(<span class="ident">Statistic::Max</span>).<span class="ident">unwrap</span>();
|
||||
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">draw_roads</span> <span class="op">=</span> <span class="ident">GeomBatch::new</span>();
|
||||
<span class="kw">for</span> (<span class="ident">r</span>, <span class="ident">before</span>, <span class="ident">after</span>) <span class="kw">in</span> <span class="self">self</span>
|
||||
.<span class="ident">before_road_counts</span>
|
||||
.<span class="ident">clone</span>()
|
||||
@ -520,85 +463,29 @@
|
||||
<span class="kw">continue</span>;
|
||||
};
|
||||
|
||||
<span class="comment">// TODO Refactor histogram helpers</span>
|
||||
<span class="kw">let</span> <span class="ident">pct_count</span> <span class="op">=</span> (<span class="ident">before</span> <span class="op">-</span> <span class="ident">min_count</span>) <span class="kw">as</span> <span class="ident">f64</span> <span class="op">/</span> (<span class="ident">max_count</span> <span class="op">-</span> <span class="ident">min_count</span>) <span class="kw">as</span> <span class="ident">f64</span>;
|
||||
<span class="comment">// TODO Pretty arbitrary. Ideally we'd hide roads and intersections underneath...</span>
|
||||
<span class="kw">let</span> <span class="ident">width</span> <span class="op">=</span> <span class="ident">Distance::meters</span>(<span class="number">2.0</span>) <span class="op">+</span> <span class="ident">pct_count</span> <span class="op">*</span> <span class="ident">Distance::meters</span>(<span class="number">10.0</span>);
|
||||
|
||||
<span class="ident">draw_roads</span>.<span class="ident">push</span>(<span class="ident">color</span>, <span class="ident">map</span>.<span class="ident">get_r</span>(<span class="ident">r</span>).<span class="ident">center_pts</span>.<span class="ident">make_polygons</span>(<span class="ident">width</span>));
|
||||
}
|
||||
<span class="self">self</span>.<span class="ident">relative_world</span> <span class="op">=</span> <span class="ident">make_world</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
|
||||
<span class="self">self</span>.<span class="ident">relative_world</span>.<span class="ident">draw_master_batch</span>(<span class="ident">ctx</span>, <span class="ident">draw_roads</span>);
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">relative_road_tooltip</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">r</span>: <span class="ident">RoadID</span>) -> <span class="ident">Text</span> {
|
||||
<span class="kw">let</span> <span class="ident">before</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">before_road_counts</span>.<span class="ident">get</span>(<span class="ident">r</span>);
|
||||
<span class="kw">let</span> <span class="ident">after</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">after_road_counts</span>.<span class="ident">get</span>(<span class="ident">r</span>);
|
||||
<span class="kw">let</span> <span class="ident">ratio</span> <span class="op">=</span> (<span class="ident">after</span> <span class="kw">as</span> <span class="ident">f64</span>) <span class="op">/</span> (<span class="ident">before</span> <span class="kw">as</span> <span class="ident">f64</span>);
|
||||
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">txt</span> <span class="op">=</span> <span class="ident">Text::from_multiline</span>(<span class="macro">vec!</span>[
|
||||
<span class="ident">Line</span>(<span class="macro">format!</span>(<span class="string">"Before: {}"</span>, <span class="ident">prettyprint_usize</span>(<span class="ident">before</span>))),
|
||||
<span class="ident">Line</span>(<span class="macro">format!</span>(<span class="string">"After: {}"</span>, <span class="ident">prettyprint_usize</span>(<span class="ident">after</span>))),
|
||||
]);
|
||||
<span class="ident">cmp_count</span>(<span class="kw-2">&mut</span> <span class="ident">txt</span>, <span class="ident">before</span>, <span class="ident">after</span>);
|
||||
<span class="ident">txt</span>.<span class="ident">add_line</span>(<span class="ident">Line</span>(<span class="macro">format!</span>(<span class="string">"After/before: {:.2}"</span>, <span class="ident">ratio</span>)));
|
||||
|
||||
<span class="comment">// TODO Refactor histogram helpers</span>
|
||||
<span class="kw">let</span> <span class="ident">pct_count</span> <span class="op">=</span> (<span class="ident">before</span> <span class="op">-</span> <span class="ident">min_count</span>) <span class="kw">as</span> <span class="ident">f64</span> <span class="op">/</span> (<span class="ident">max_count</span> <span class="op">-</span> <span class="ident">min_count</span>) <span class="kw">as</span> <span class="ident">f64</span>;
|
||||
<span class="comment">// TODO Pretty arbitrary. Ideally we'd hide roads and intersections underneath...</span>
|
||||
<span class="kw">let</span> <span class="ident">width</span> <span class="op">=</span> <span class="ident">Distance::meters</span>(<span class="number">2.0</span>) <span class="op">+</span> <span class="ident">pct_count</span> <span class="op">*</span> <span class="ident">Distance::meters</span>(<span class="number">10.0</span>);
|
||||
<span class="self">self</span>.<span class="ident">relative_world</span>
|
||||
.<span class="ident">add</span>(<span class="ident">Obj::Road</span>(<span class="ident">r</span>))
|
||||
.<span class="ident">hitbox</span>(<span class="ident">map</span>.<span class="ident">get_r</span>(<span class="ident">r</span>).<span class="ident">center_pts</span>.<span class="ident">make_polygons</span>(<span class="ident">width</span>))
|
||||
.<span class="ident">draw_color</span>(<span class="ident">color</span>)
|
||||
.<span class="ident">hover_alpha</span>(<span class="number">0.9</span>)
|
||||
.<span class="ident">tooltip</span>(<span class="ident">txt</span>)
|
||||
.<span class="ident">build</span>(<span class="ident">ctx</span>);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<span class="comment">// Just add the base layer of non-clickable neighborhoods</span>
|
||||
<span class="kw">fn</span> <span class="ident">make_world</span>(<span class="ident">ctx</span>: <span class="kw-2">&mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&</span><span class="ident">App</span>) -> <span class="ident">World</span><span class="op"><</span><span class="ident">Obj</span><span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">world</span> <span class="op">=</span> <span class="ident">World::bounded</span>(<span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_bounds</span>());
|
||||
<span class="kw">for</span> (<span class="ident">id</span>, (<span class="ident">block</span>, <span class="ident">color</span>)) <span class="kw">in</span> <span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">partitioning</span>.<span class="ident">all_neighborhoods</span>() {
|
||||
<span class="ident">world</span>
|
||||
.<span class="ident">add</span>(<span class="ident">Obj::Neighborhood</span>(<span class="kw-2">*</span><span class="ident">id</span>))
|
||||
.<span class="ident">hitbox</span>(<span class="ident">block</span>.<span class="ident">polygon</span>.<span class="ident">clone</span>())
|
||||
.<span class="ident">draw_color</span>(<span class="ident">color</span>.<span class="ident">alpha</span>(<span class="number">0.2</span>))
|
||||
.<span class="ident">build</span>(<span class="ident">ctx</span>);
|
||||
}
|
||||
<span class="ident">world</span>
|
||||
}
|
||||
|
||||
<span class="comment">// TODO Duplicates some logic from ColorNetwork</span>
|
||||
<span class="kw">fn</span> <span class="ident">ranked_roads</span>(
|
||||
<span class="ident">ctx</span>: <span class="kw-2">&mut</span> <span class="ident">EventCtx</span>,
|
||||
<span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>,
|
||||
<span class="ident">world</span>: <span class="kw-2">&mut</span> <span class="ident">World</span><span class="op"><</span><span class="ident">Obj</span><span class="op">></span>,
|
||||
<span class="ident">counter</span>: <span class="kw-2">&</span><span class="ident">Counter</span><span class="op"><</span><span class="ident">RoadID</span><span class="op">></span>,
|
||||
<span class="ident">scale</span>: <span class="kw-2">&</span><span class="ident">ColorScale</span>,
|
||||
) {
|
||||
<span class="kw">let</span> <span class="ident">roads</span> <span class="op">=</span> <span class="ident">counter</span>.<span class="ident">sorted_asc</span>();
|
||||
<span class="kw">let</span> <span class="ident">len</span> <span class="op">=</span> <span class="ident">roads</span>.<span class="ident">len</span>() <span class="kw">as</span> <span class="ident">f64</span>;
|
||||
<span class="kw">for</span> (<span class="ident">idx</span>, <span class="ident">list</span>) <span class="kw">in</span> <span class="ident">roads</span>.<span class="ident">into_iter</span>().<span class="ident">enumerate</span>() {
|
||||
<span class="kw">let</span> <span class="ident">color</span> <span class="op">=</span> <span class="ident">scale</span>.<span class="ident">eval</span>((<span class="ident">idx</span> <span class="kw">as</span> <span class="ident">f64</span>) <span class="op">/</span> <span class="ident">len</span>);
|
||||
<span class="kw">for</span> <span class="ident">r</span> <span class="kw">in</span> <span class="ident">list</span> {
|
||||
<span class="ident">world</span>
|
||||
.<span class="ident">add</span>(<span class="ident">Obj::Road</span>(<span class="ident">r</span>))
|
||||
.<span class="ident">hitbox</span>(<span class="ident">map</span>.<span class="ident">get_r</span>(<span class="ident">r</span>).<span class="ident">get_thick_polygon</span>())
|
||||
.<span class="ident">draw_color</span>(<span class="ident">color</span>)
|
||||
.<span class="ident">hover_alpha</span>(<span class="number">0.9</span>)
|
||||
.<span class="ident">tooltip</span>(<span class="ident">Text::from</span>(<span class="ident">Line</span>(<span class="ident">prettyprint_usize</span>(<span class="ident">counter</span>.<span class="ident">get</span>(<span class="ident">r</span>)))))
|
||||
.<span class="ident">build</span>(<span class="ident">ctx</span>);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">ranked_intersections</span>(
|
||||
<span class="ident">ctx</span>: <span class="kw-2">&mut</span> <span class="ident">EventCtx</span>,
|
||||
<span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>,
|
||||
<span class="ident">world</span>: <span class="kw-2">&mut</span> <span class="ident">World</span><span class="op"><</span><span class="ident">Obj</span><span class="op">></span>,
|
||||
<span class="ident">counter</span>: <span class="kw-2">&</span><span class="ident">Counter</span><span class="op"><</span><span class="ident">IntersectionID</span><span class="op">></span>,
|
||||
<span class="ident">scale</span>: <span class="kw-2">&</span><span class="ident">ColorScale</span>,
|
||||
) {
|
||||
<span class="kw">let</span> <span class="ident">intersections</span> <span class="op">=</span> <span class="ident">counter</span>.<span class="ident">sorted_asc</span>();
|
||||
<span class="kw">let</span> <span class="ident">len</span> <span class="op">=</span> <span class="ident">intersections</span>.<span class="ident">len</span>() <span class="kw">as</span> <span class="ident">f64</span>;
|
||||
<span class="kw">for</span> (<span class="ident">idx</span>, <span class="ident">list</span>) <span class="kw">in</span> <span class="ident">intersections</span>.<span class="ident">into_iter</span>().<span class="ident">enumerate</span>() {
|
||||
<span class="kw">let</span> <span class="ident">color</span> <span class="op">=</span> <span class="ident">scale</span>.<span class="ident">eval</span>((<span class="ident">idx</span> <span class="kw">as</span> <span class="ident">f64</span>) <span class="op">/</span> <span class="ident">len</span>);
|
||||
<span class="kw">for</span> <span class="ident">i</span> <span class="kw">in</span> <span class="ident">list</span> {
|
||||
<span class="ident">world</span>
|
||||
.<span class="ident">add</span>(<span class="ident">Obj::Intersection</span>(<span class="ident">i</span>))
|
||||
.<span class="ident">hitbox</span>(<span class="ident">map</span>.<span class="ident">get_i</span>(<span class="ident">i</span>).<span class="ident">polygon</span>.<span class="ident">clone</span>())
|
||||
.<span class="ident">draw_color</span>(<span class="ident">color</span>)
|
||||
.<span class="ident">hover_alpha</span>(<span class="number">0.9</span>)
|
||||
.<span class="ident">tooltip</span>(<span class="ident">Text::from</span>(<span class="ident">Line</span>(<span class="ident">prettyprint_usize</span>(<span class="ident">counter</span>.<span class="ident">get</span>(<span class="ident">i</span>)))))
|
||||
.<span class="ident">build</span>(<span class="ident">ctx</span>);
|
||||
}
|
||||
<span class="ident">txt</span>
|
||||
}
|
||||
}
|
||||
|
||||
@ -649,6 +536,33 @@
|
||||
|
||||
(<span class="ident">road_counts</span>, <span class="ident">intersection_counts</span>)
|
||||
}
|
||||
|
||||
<span class="comment">// Creates a world that just has placeholders for hovering on roads and intersections. The caller</span>
|
||||
<span class="comment">// manually handles drawing and tooltips.</span>
|
||||
<span class="comment">//</span>
|
||||
<span class="comment">// TODO This is necessary to avoid running out of video memory. World should be able to lazily</span>
|
||||
<span class="comment">// create tooltips and more easily merge drawn objects together in a master batch.</span>
|
||||
<span class="comment">// https://github.com/a-b-street/abstreet/issues/763</span>
|
||||
<span class="kw">fn</span> <span class="ident">make_world</span>(<span class="ident">ctx</span>: <span class="kw-2">&mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&</span><span class="ident">App</span>) -> <span class="ident">World</span><span class="op"><</span><span class="ident">Obj</span><span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">world</span> <span class="op">=</span> <span class="ident">World::bounded</span>(<span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_bounds</span>());
|
||||
<span class="kw">for</span> <span class="ident">r</span> <span class="kw">in</span> <span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">all_roads</span>() {
|
||||
<span class="ident">world</span>
|
||||
.<span class="ident">add</span>(<span class="ident">Obj::Road</span>(<span class="ident">r</span>.<span class="ident">id</span>))
|
||||
.<span class="ident">hitbox</span>(<span class="ident">r</span>.<span class="ident">get_thick_polygon</span>())
|
||||
.<span class="ident">drawn_in_master_batch</span>()
|
||||
.<span class="ident">invisibly_hoverable</span>()
|
||||
.<span class="ident">build</span>(<span class="ident">ctx</span>);
|
||||
}
|
||||
<span class="kw">for</span> <span class="ident">i</span> <span class="kw">in</span> <span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">all_intersections</span>() {
|
||||
<span class="ident">world</span>
|
||||
.<span class="ident">add</span>(<span class="ident">Obj::Intersection</span>(<span class="ident">i</span>.<span class="ident">id</span>))
|
||||
.<span class="ident">hitbox</span>(<span class="ident">i</span>.<span class="ident">polygon</span>.<span class="ident">clone</span>())
|
||||
.<span class="ident">drawn_in_master_batch</span>()
|
||||
.<span class="ident">invisibly_hoverable</span>()
|
||||
.<span class="ident">build</span>(<span class="ident">ctx</span>);
|
||||
}
|
||||
<span class="ident">world</span>
|
||||
}
|
||||
</code></pre></div>
|
||||
</section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="ltn" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
|
||||
</body></html>
|
@ -141,12 +141,47 @@
|
||||
<span id="140">140</span>
|
||||
<span id="141">141</span>
|
||||
<span id="142">142</span>
|
||||
</pre><pre class="rust"><code><span class="kw">use</span> <span class="ident">map_gui::load::FileLoader</span>;
|
||||
<span id="143">143</span>
|
||||
<span id="144">144</span>
|
||||
<span id="145">145</span>
|
||||
<span id="146">146</span>
|
||||
<span id="147">147</span>
|
||||
<span id="148">148</span>
|
||||
<span id="149">149</span>
|
||||
<span id="150">150</span>
|
||||
<span id="151">151</span>
|
||||
<span id="152">152</span>
|
||||
<span id="153">153</span>
|
||||
<span id="154">154</span>
|
||||
<span id="155">155</span>
|
||||
<span id="156">156</span>
|
||||
<span id="157">157</span>
|
||||
<span id="158">158</span>
|
||||
<span id="159">159</span>
|
||||
<span id="160">160</span>
|
||||
<span id="161">161</span>
|
||||
<span id="162">162</span>
|
||||
<span id="163">163</span>
|
||||
<span id="164">164</span>
|
||||
<span id="165">165</span>
|
||||
<span id="166">166</span>
|
||||
<span id="167">167</span>
|
||||
<span id="168">168</span>
|
||||
<span id="169">169</span>
|
||||
<span id="170">170</span>
|
||||
<span id="171">171</span>
|
||||
<span id="172">172</span>
|
||||
<span id="173">173</span>
|
||||
<span id="174">174</span>
|
||||
<span id="175">175</span>
|
||||
<span id="176">176</span>
|
||||
</pre><pre class="rust"><code><span class="kw">use</span> <span class="ident">abstutil::prettyprint_usize</span>;
|
||||
<span class="kw">use</span> <span class="ident">map_gui::load::FileLoader</span>;
|
||||
<span class="kw">use</span> <span class="ident">sim::Scenario</span>;
|
||||
<span class="kw">use</span> <span class="ident">widgetry::mapspace</span>::{<span class="ident">ToggleZoomed</span>, <span class="ident">World</span>};
|
||||
<span class="kw">use</span> <span class="ident">widgetry</span>::{
|
||||
<span class="ident">Choice</span>, <span class="ident">EventCtx</span>, <span class="ident">GfxCtx</span>, <span class="ident">HorizontalAlignment</span>, <span class="ident">Panel</span>, <span class="ident">SimpleState</span>, <span class="ident">State</span>, <span class="ident">TextExt</span>,
|
||||
<span class="ident">VerticalAlignment</span>, <span class="ident">Widget</span>,
|
||||
<span class="ident">Choice</span>, <span class="ident">Drawable</span>, <span class="ident">EventCtx</span>, <span class="ident">GeomBatch</span>, <span class="ident">GfxCtx</span>, <span class="ident">HorizontalAlignment</span>, <span class="ident">Line</span>, <span class="ident">Panel</span>, <span class="ident">SimpleState</span>,
|
||||
<span class="ident">State</span>, <span class="ident">Text</span>, <span class="ident">TextExt</span>, <span class="ident">VerticalAlignment</span>, <span class="ident">Widget</span>,
|
||||
};
|
||||
|
||||
<span class="kw">use</span> <span class="kw">super</span>::{<span class="ident">Obj</span>, <span class="ident">Results</span>};
|
||||
@ -157,6 +192,7 @@
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">ShowResults</span> {
|
||||
<span class="ident">layer</span>: <span class="ident">Layer</span>,
|
||||
<span class="ident">draw_all_neighborhoods</span>: <span class="ident">Drawable</span>,
|
||||
<span class="ident">draw_all_filters</span>: <span class="ident">ToggleZoomed</span>,
|
||||
}
|
||||
|
||||
@ -223,11 +259,18 @@
|
||||
]))
|
||||
.<span class="ident">aligned</span>(<span class="ident">HorizontalAlignment::Left</span>, <span class="ident">VerticalAlignment::Top</span>)
|
||||
.<span class="ident">build</span>(<span class="ident">ctx</span>);
|
||||
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">batch</span> <span class="op">=</span> <span class="ident">GeomBatch::new</span>();
|
||||
<span class="kw">for</span> (<span class="kw">_</span>, (<span class="ident">block</span>, <span class="ident">color</span>)) <span class="kw">in</span> <span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">partitioning</span>.<span class="ident">all_neighborhoods</span>() {
|
||||
<span class="ident">batch</span>.<span class="ident">push</span>(<span class="ident">color</span>.<span class="ident">alpha</span>(<span class="number">0.2</span>), <span class="ident">block</span>.<span class="ident">polygon</span>.<span class="ident">clone</span>());
|
||||
}
|
||||
<span class="kw">let</span> <span class="ident">draw_all_neighborhoods</span> <span class="op">=</span> <span class="ident">batch</span>.<span class="ident">upload</span>(<span class="ident">ctx</span>);
|
||||
<span class="op"><</span><span class="kw">dyn</span> <span class="ident">SimpleState</span><span class="op"><</span><span class="kw">_</span><span class="op">></span><span class="op">></span><span class="ident">::new_state</span>(
|
||||
<span class="ident">panel</span>,
|
||||
<span class="ident">Box::new</span>(<span class="ident">ShowResults</span> {
|
||||
<span class="ident">layer</span>,
|
||||
<span class="ident">draw_all_filters</span>: <span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">modal_filters</span>.<span class="ident">draw</span>(<span class="ident">ctx</span>, <span class="kw-2">&</span><span class="ident">app</span>.<span class="ident">map</span>, <span class="prelude-val">None</span>),
|
||||
<span class="ident">draw_all_neighborhoods</span>,
|
||||
}),
|
||||
)
|
||||
}
|
||||
@ -263,7 +306,7 @@
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">other_event</span>(<span class="kw-2">&mut</span> <span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&mut</span> <span class="ident">App</span>) -> <span class="ident">Transition</span> {
|
||||
<span class="comment">// Just trigger tooltips</span>
|
||||
<span class="comment">// Just trigger hovering</span>
|
||||
<span class="kw">let</span> <span class="kw">_</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">world_mut</span>(<span class="ident">app</span>).<span class="ident">event</span>(<span class="ident">ctx</span>);
|
||||
<span class="ident">Transition::Keep</span>
|
||||
}
|
||||
@ -280,7 +323,32 @@
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">draw</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">g</span>: <span class="kw-2">&mut</span> <span class="ident">GfxCtx</span>, <span class="ident">app</span>: <span class="kw-2">&</span><span class="ident">App</span>) {
|
||||
<span class="self">self</span>.<span class="ident">world</span>(<span class="ident">app</span>).<span class="ident">draw</span>(<span class="ident">g</span>);
|
||||
<span class="ident">g</span>.<span class="ident">redraw</span>(<span class="kw-2">&</span><span class="self">self</span>.<span class="ident">draw_all_neighborhoods</span>);
|
||||
<span class="self">self</span>.<span class="ident">draw_all_filters</span>.<span class="ident">draw</span>(<span class="ident">g</span>);
|
||||
|
||||
<span class="comment">// TODO Manually generate tooltips last-minute. It'd be quite worth making the World be</span>
|
||||
<span class="comment">// able to handle this.</span>
|
||||
<span class="kw">let</span> <span class="ident">results</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">impact</span>.<span class="ident">as_ref</span>().<span class="ident">unwrap</span>();
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">id</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">world</span>(<span class="ident">app</span>).<span class="ident">get_hovering</span>() {
|
||||
<span class="kw">let</span> <span class="ident">count</span> <span class="op">=</span> <span class="kw">match</span> <span class="ident">id</span> {
|
||||
<span class="ident">Obj::Road</span>(<span class="ident">r</span>) => <span class="kw">match</span> <span class="self">self</span>.<span class="ident">layer</span> {
|
||||
<span class="ident">Layer::Before</span> => <span class="ident">results</span>.<span class="ident">before_road_counts</span>.<span class="ident">get</span>(<span class="ident">r</span>),
|
||||
<span class="ident">Layer::After</span> => <span class="ident">results</span>.<span class="ident">after_road_counts</span>.<span class="ident">get</span>(<span class="ident">r</span>),
|
||||
<span class="ident">Layer::Relative</span> => {
|
||||
<span class="ident">g</span>.<span class="ident">draw_mouse_tooltip</span>(<span class="ident">results</span>.<span class="ident">relative_road_tooltip</span>(<span class="ident">r</span>));
|
||||
<span class="kw">return</span>;
|
||||
}
|
||||
},
|
||||
<span class="ident">Obj::Intersection</span>(<span class="ident">i</span>) => <span class="kw">match</span> <span class="self">self</span>.<span class="ident">layer</span> {
|
||||
<span class="ident">Layer::Before</span> => <span class="ident">results</span>.<span class="ident">before_intersection_counts</span>.<span class="ident">get</span>(<span class="ident">i</span>),
|
||||
<span class="ident">Layer::After</span> => <span class="ident">results</span>.<span class="ident">after_intersection_counts</span>.<span class="ident">get</span>(<span class="ident">i</span>),
|
||||
<span class="ident">Layer::Relative</span> => {
|
||||
<span class="kw">return</span>;
|
||||
}
|
||||
},
|
||||
};
|
||||
<span class="ident">g</span>.<span class="ident">draw_mouse_tooltip</span>(<span class="ident">Text::from</span>(<span class="ident">Line</span>(<span class="ident">prettyprint_usize</span>(<span class="ident">count</span>))));
|
||||
}
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
|
@ -175,7 +175,7 @@
|
||||
<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">r"rustdoc 1.58.1 (db9d1b20b 2022-01-20)"</span>;
|
||||
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#"The build time in RFC2822, UTC."#</span>]</span>
|
||||
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</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">r"Wed, 26 Jan 2022 10:43:17 +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">r"Wed, 26 Jan 2022 11:35:24 +0000"</span>;
|
||||
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#"The target architecture, given by `CARGO_CFG_TARGET_ARCH`."#</span>]</span>
|
||||
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</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">r"x86_64"</span>;
|
||||
|
@ -562,6 +562,16 @@
|
||||
<span id="561">561</span>
|
||||
<span id="562">562</span>
|
||||
<span id="563">563</span>
|
||||
<span id="564">564</span>
|
||||
<span id="565">565</span>
|
||||
<span id="566">566</span>
|
||||
<span id="567">567</span>
|
||||
<span id="568">568</span>
|
||||
<span id="569">569</span>
|
||||
<span id="570">570</span>
|
||||
<span id="571">571</span>
|
||||
<span id="572">572</span>
|
||||
<span id="573">573</span>
|
||||
</pre><pre class="rust"><code><span class="kw">use</span> <span class="ident">std::collections::HashMap</span>;
|
||||
<span class="kw">use</span> <span class="ident">std::fmt::Debug</span>;
|
||||
<span class="kw">use</span> <span class="ident">std::hash::Hash</span>;
|
||||
@ -759,6 +769,11 @@
|
||||
<span class="self">self</span>.<span class="ident">draw_hovered</span>(<span class="ident">draw</span>)
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Mark that an object is hoverable, but don't actually draw anything while hovering on it</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">invisibly_hoverable</span>(<span class="self">self</span>) -> <span class="self">Self</span> {
|
||||
<span class="self">self</span>.<span class="ident">draw_hovered</span>(<span class="ident">GeomBatch::new</span>())
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Draw a tooltip while hovering over this object.</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">tooltip</span>(<span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">txt</span>: <span class="ident">Text</span>) -> <span class="self">Self</span> {
|
||||
<span class="macro">assert!</span>(<span class="self">self</span>.<span class="ident">tooltip</span>.<span class="ident">is_none</span>(), <span class="string">"already specified tooltip"</span>);
|
||||
@ -949,6 +964,11 @@
|
||||
<span class="self">self</span>.<span class="ident">draw_master_batches</span>.<span class="ident">push</span>(<span class="ident">draw</span>.<span class="ident">into</span>().<span class="ident">build</span>(<span class="ident">ctx</span>));
|
||||
}
|
||||
|
||||
<span class="comment">// TODO Refactor ColorNetwork, then delete this variation</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">draw_master_batch_built</span>(<span class="kw-2">&mut</span> <span class="self">self</span>, <span class="ident">draw</span>: <span class="ident">ToggleZoomed</span>) {
|
||||
<span class="self">self</span>.<span class="ident">draw_master_batches</span>.<span class="ident">push</span>(<span class="ident">draw</span>);
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Let objects in the world respond to something happening.</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">event</span>(<span class="kw-2">&mut</span> <span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&mut</span> <span class="ident">EventCtx</span>) -> <span class="ident">WorldOutcome</span><span class="op"><</span><span class="ident">ID</span><span class="op">></span> {
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>((<span class="ident">drag_from</span>, <span class="ident">moved</span>)) <span class="op">=</span> <span class="self">self</span>.<span class="ident">dragging_from</span> {
|
||||
|
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="A `World` manages objects that exist in “map-space”, the zoomable and pannable canvas. These objects can be drawn, hovered on, clicked, dragged, etc."><meta name="keywords" content="rust, rustlang, rust-lang, World"><title>World in widgetry::mapspace - 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 id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct World</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield.dragging_from">dragging_from</a><a href="#structfield.draw_master_batches">draw_master_batches</a><a href="#structfield.hovering">hovering</a><a href="#structfield.objects">objects</a><a href="#structfield.quadtree">quadtree</a></div><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.add">add</a><a href="#method.add_unnamed">add_unnamed</a><a href="#method.bounded">bounded</a><a href="#method.calculate_hover">calculate_hover</a><a href="#method.delete">delete</a><a href="#method.delete_before_replacement">delete_before_replacement</a><a href="#method.draw">draw</a><a href="#method.draw_master_batch">draw_master_batch</a><a href="#method.event">event</a><a href="#method.get_hovering">get_hovering</a><a href="#method.initialize_hover">initialize_hover</a><a href="#method.override_tooltip">override_tooltip</a><a href="#method.rebuilt_during_drag">rebuilt_during_drag</a><a href="#method.unbounded">unbounded</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><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><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><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-Downcast">Downcast</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><h2 class="location">Other items in<br><a href="../index.html">widgetry</a>::<wbr><a href="index.html">mapspace</a></h2><div id="sidebar-vars" data-name="World" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">widgetry</a>::<wbr><a href="index.html">mapspace</a>::<wbr><a class="struct" href="#">World</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/widgetry/mapspace/world.rs.html#20-31" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust struct"><code>pub struct World<ID: <a class="trait" href="world/trait.ObjectID.html" title="trait widgetry::mapspace::world::ObjectID">ObjectID</a>> {
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct World</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield.dragging_from">dragging_from</a><a href="#structfield.draw_master_batches">draw_master_batches</a><a href="#structfield.hovering">hovering</a><a href="#structfield.objects">objects</a><a href="#structfield.quadtree">quadtree</a></div><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.add">add</a><a href="#method.add_unnamed">add_unnamed</a><a href="#method.bounded">bounded</a><a href="#method.calculate_hover">calculate_hover</a><a href="#method.delete">delete</a><a href="#method.delete_before_replacement">delete_before_replacement</a><a href="#method.draw">draw</a><a href="#method.draw_master_batch">draw_master_batch</a><a href="#method.draw_master_batch_built">draw_master_batch_built</a><a href="#method.event">event</a><a href="#method.get_hovering">get_hovering</a><a href="#method.initialize_hover">initialize_hover</a><a href="#method.override_tooltip">override_tooltip</a><a href="#method.rebuilt_during_drag">rebuilt_during_drag</a><a href="#method.unbounded">unbounded</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><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><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><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-Downcast">Downcast</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><h2 class="location">Other items in<br><a href="../index.html">widgetry</a>::<wbr><a href="index.html">mapspace</a></h2><div id="sidebar-vars" data-name="World" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">widgetry</a>::<wbr><a href="index.html">mapspace</a>::<wbr><a class="struct" href="#">World</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/widgetry/mapspace/world.rs.html#20-31" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust struct"><code>pub struct World<ID: <a class="trait" href="world/trait.ObjectID.html" title="trait widgetry::mapspace::world::ObjectID">ObjectID</a>> {
|
||||
objects: <a class="struct" href="https://doc.rust-lang.org/1.58.1/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a><ID, <a class="struct" href="world/struct.Object.html" title="struct widgetry::mapspace::world::Object">Object</a><ID>>,
|
||||
quadtree: QuadTree<ID>,
|
||||
draw_master_batches: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="struct.ToggleZoomed.html" title="struct widgetry::mapspace::ToggleZoomed">ToggleZoomed</a>>,
|
||||
@ -7,28 +7,28 @@
|
||||
dragging_from: <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.tuple.html">(</a><a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>, <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a><a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.tuple.html">)</a>>,
|
||||
}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A <code>World</code> manages objects that exist in “map-space”, the zoomable and pannable canvas. These
|
||||
objects can be drawn, hovered on, clicked, dragged, etc.</p>
|
||||
</div></details><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.objects" class="structfield small-section-header"><a href="#structfield.objects" class="anchor field"></a><code>objects: <a class="struct" href="https://doc.rust-lang.org/1.58.1/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a><ID, <a class="struct" href="world/struct.Object.html" title="struct widgetry::mapspace::world::Object">Object</a><ID>></code></span><span id="structfield.quadtree" class="structfield small-section-header"><a href="#structfield.quadtree" class="anchor field"></a><code>quadtree: QuadTree<ID></code></span><span id="structfield.draw_master_batches" class="structfield small-section-header"><a href="#structfield.draw_master_batches" class="anchor field"></a><code>draw_master_batches: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="struct.ToggleZoomed.html" title="struct widgetry::mapspace::ToggleZoomed">ToggleZoomed</a>></code></span><span id="structfield.hovering" class="structfield small-section-header"><a href="#structfield.hovering" class="anchor field"></a><code>hovering: <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><ID></code></span><span id="structfield.dragging_from" class="structfield small-section-header"><a href="#structfield.dragging_from" class="anchor field"></a><code>dragging_from: <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.tuple.html">(</a><a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>, <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a><a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.tuple.html">)</a>></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#282-546" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl<ID: <a class="trait" href="world/trait.ObjectID.html" title="trait widgetry::mapspace::world::ObjectID">ObjectID</a>> <a class="struct" href="world/struct.World.html" title="struct widgetry::mapspace::world::World">World</a><ID></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.unbounded" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#284-297" title="goto source code">[src]</a></div><a href="#method.unbounded" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.unbounded" class="fnname">unbounded</a>() -> <a class="struct" href="world/struct.World.html" title="struct widgetry::mapspace::world::World">World</a><ID></h4></div></summary><div class="docblock"><p>Creates an empty <code>World</code>, whose objects can exist anywhere from (0, 0) to the max f64.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.bounded" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#300-310" title="goto source code">[src]</a></div><a href="#method.bounded" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.bounded" class="fnname">bounded</a>(bounds: &<a class="struct" href="../../geom/bounds/struct.Bounds.html" title="struct geom::bounds::Bounds">Bounds</a>) -> <a class="struct" href="world/struct.World.html" title="struct widgetry::mapspace::world::World">World</a><ID></h4></div></summary><div class="docblock"><p>Creates an empty <code>World</code>, whose objects can exist in the provided rectangular boundary.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.add" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#314-329" title="goto source code">[src]</a></div><a href="#method.add" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.add" class="fnname">add</a>(&mut self, id: ID) -> <a class="struct" href="world/struct.ObjectBuilder.html" title="struct widgetry::mapspace::world::ObjectBuilder">ObjectBuilder</a><'_, ID></h4></div></summary><div class="docblock"><p>Start adding an object to the <code>World</code>. The caller should specify the object with methods on
|
||||
</div></details><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.objects" class="structfield small-section-header"><a href="#structfield.objects" class="anchor field"></a><code>objects: <a class="struct" href="https://doc.rust-lang.org/1.58.1/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a><ID, <a class="struct" href="world/struct.Object.html" title="struct widgetry::mapspace::world::Object">Object</a><ID>></code></span><span id="structfield.quadtree" class="structfield small-section-header"><a href="#structfield.quadtree" class="anchor field"></a><code>quadtree: QuadTree<ID></code></span><span id="structfield.draw_master_batches" class="structfield small-section-header"><a href="#structfield.draw_master_batches" class="anchor field"></a><code>draw_master_batches: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="struct.ToggleZoomed.html" title="struct widgetry::mapspace::ToggleZoomed">ToggleZoomed</a>></code></span><span id="structfield.hovering" class="structfield small-section-header"><a href="#structfield.hovering" class="anchor field"></a><code>hovering: <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><ID></code></span><span id="structfield.dragging_from" class="structfield small-section-header"><a href="#structfield.dragging_from" class="anchor field"></a><code>dragging_from: <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.tuple.html">(</a><a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>, <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a><a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.tuple.html">)</a>></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#287-556" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl<ID: <a class="trait" href="world/trait.ObjectID.html" title="trait widgetry::mapspace::world::ObjectID">ObjectID</a>> <a class="struct" href="world/struct.World.html" title="struct widgetry::mapspace::world::World">World</a><ID></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.unbounded" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#289-302" title="goto source code">[src]</a></div><a href="#method.unbounded" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.unbounded" class="fnname">unbounded</a>() -> <a class="struct" href="world/struct.World.html" title="struct widgetry::mapspace::world::World">World</a><ID></h4></div></summary><div class="docblock"><p>Creates an empty <code>World</code>, whose objects can exist anywhere from (0, 0) to the max f64.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.bounded" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#305-315" title="goto source code">[src]</a></div><a href="#method.bounded" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.bounded" class="fnname">bounded</a>(bounds: &<a class="struct" href="../../geom/bounds/struct.Bounds.html" title="struct geom::bounds::Bounds">Bounds</a>) -> <a class="struct" href="world/struct.World.html" title="struct widgetry::mapspace::world::World">World</a><ID></h4></div></summary><div class="docblock"><p>Creates an empty <code>World</code>, whose objects can exist in the provided rectangular boundary.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.add" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#319-334" title="goto source code">[src]</a></div><a href="#method.add" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.add" class="fnname">add</a>(&mut self, id: ID) -> <a class="struct" href="world/struct.ObjectBuilder.html" title="struct widgetry::mapspace::world::ObjectBuilder">ObjectBuilder</a><'_, ID></h4></div></summary><div class="docblock"><p>Start adding an object to the <code>World</code>. The caller should specify the object with methods on
|
||||
<code>ObjectBuilder</code>, then call <code>build</code>.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.delete" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#333-342" title="goto source code">[src]</a></div><a href="#method.delete" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.delete" class="fnname">delete</a>(&mut self, id: ID)</h4></div></summary><div class="docblock"><p>Delete an object. Not idempotent – this will panic if the object doesn’t exist. Will panic
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.delete" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#338-347" title="goto source code">[src]</a></div><a href="#method.delete" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.delete" class="fnname">delete</a>(&mut self, id: ID)</h4></div></summary><div class="docblock"><p>Delete an object. Not idempotent – this will panic if the object doesn’t exist. Will panic
|
||||
if the object is deleted in the middle of being dragged.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.delete_before_replacement" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#346-356" title="goto source code">[src]</a></div><a href="#method.delete_before_replacement" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.delete_before_replacement" class="fnname">delete_before_replacement</a>(&mut self, id: ID)</h4></div></summary><div class="docblock"><p>Delete an object, with the promise to recreate it with the same ID before the next call to
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.delete_before_replacement" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#351-361" title="goto source code">[src]</a></div><a href="#method.delete_before_replacement" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.delete_before_replacement" class="fnname">delete_before_replacement</a>(&mut self, id: ID)</h4></div></summary><div class="docblock"><p>Delete an object, with the promise to recreate it with the same ID before the next call to
|
||||
<code>event</code>. This may be called while the object is being hovered on or dragged.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.initialize_hover" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#360-365" title="goto source code">[src]</a></div><a href="#method.initialize_hover" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.initialize_hover" class="fnname">initialize_hover</a>(&mut self, ctx: &<a class="struct" href="../event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a><'_>)</h4></div></summary><div class="docblock"><p>After adding all objects to a <code>World</code>, call this to initially detect if the cursor is
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.initialize_hover" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#365-370" title="goto source code">[src]</a></div><a href="#method.initialize_hover" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.initialize_hover" class="fnname">initialize_hover</a>(&mut self, ctx: &<a class="struct" href="../event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a><'_>)</h4></div></summary><div class="docblock"><p>After adding all objects to a <code>World</code>, call this to initially detect if the cursor is
|
||||
hovering on an object.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.rebuilt_during_drag" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#374-380" title="goto source code">[src]</a></div><a href="#method.rebuilt_during_drag" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.rebuilt_during_drag" class="fnname">rebuilt_during_drag</a>(&mut self, prev_world: &<a class="struct" href="world/struct.World.html" title="struct widgetry::mapspace::world::World">World</a><ID>)</h4></div></summary><div class="docblock"><p>If a drag event causes the world to be totally rebuilt, call this with the previous world
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.rebuilt_during_drag" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#379-385" title="goto source code">[src]</a></div><a href="#method.rebuilt_during_drag" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.rebuilt_during_drag" class="fnname">rebuilt_during_drag</a>(&mut self, prev_world: &<a class="struct" href="world/struct.World.html" title="struct widgetry::mapspace::world::World">World</a><ID>)</h4></div></summary><div class="docblock"><p>If a drag event causes the world to be totally rebuilt, call this with the previous world
|
||||
to preserve the ongoing drag.</p>
|
||||
<p>This should be called after <code>initialize_hover</code>.</p>
|
||||
<p>Important: the rebuilt world must include the same object ID that’s currently being dragged
|
||||
from the previous world.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw_master_batch" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#384-386" title="goto source code">[src]</a></div><a href="#method.draw_master_batch" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.draw_master_batch" class="fnname">draw_master_batch</a><I: <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="struct.ToggleZoomedBuilder.html" title="struct widgetry::mapspace::ToggleZoomedBuilder">ToggleZoomedBuilder</a>>>(<br> &mut self, <br> ctx: &<a class="struct" href="../event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a><'_>, <br> draw: I<br>)</h4></div></summary><div class="docblock"><p>Draw something underneath all objects. This is useful for performance, when a large number
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw_master_batch" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#389-391" title="goto source code">[src]</a></div><a href="#method.draw_master_batch" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.draw_master_batch" class="fnname">draw_master_batch</a><I: <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="struct.ToggleZoomedBuilder.html" title="struct widgetry::mapspace::ToggleZoomedBuilder">ToggleZoomedBuilder</a>>>(<br> &mut self, <br> ctx: &<a class="struct" href="../event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a><'_>, <br> draw: I<br>)</h4></div></summary><div class="docblock"><p>Draw something underneath all objects. This is useful for performance, when a large number
|
||||
of objects never change appearance.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#389-476" title="goto source code">[src]</a></div><a href="#method.event" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.event" class="fnname">event</a>(&mut self, ctx: &mut <a class="struct" href="../event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a><'_>) -> <a class="enum" href="world/enum.WorldOutcome.html" title="enum widgetry::mapspace::world::WorldOutcome">WorldOutcome</a><ID></h4></div></summary><div class="docblock"><p>Let objects in the world respond to something happening.</p>
|
||||
</div></details><div id="method.calculate_hover" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#478-499" title="goto source code">[src]</a></div><a href="#method.calculate_hover" class="anchor"></a><h4 class="code-header">fn <a href="#method.calculate_hover" class="fnname">calculate_hover</a>(&self, cursor: <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><ID></h4></div><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#502-530" title="goto source code">[src]</a></div><a href="#method.draw" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.draw" class="fnname">draw</a>(&self, g: &mut <a class="struct" href="../drawing/struct.GfxCtx.html" title="struct widgetry::drawing::GfxCtx">GfxCtx</a><'_>)</h4></div></summary><div class="docblock"><p>Draw objects in the world that’re currently visible.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_hovering" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#533-535" title="goto source code">[src]</a></div><a href="#method.get_hovering" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_hovering" class="fnname">get_hovering</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><ID></h4></div></summary><div class="docblock"><p>Returns the object currently hovered on.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.override_tooltip" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#538-545" title="goto source code">[src]</a></div><a href="#method.override_tooltip" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.override_tooltip" class="fnname">override_tooltip</a>(&mut self, id: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.reference.html">&</a>ID, tooltip: <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../text/struct.Text.html" title="struct widgetry::text::Text">Text</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Change an object’s tooltip. Returns true for success, false if the object didn’t exist.</p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-1" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#553-563" title="goto source code">[src]</a></div><a href="#impl-1" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="world/struct.World.html" title="struct widgetry::mapspace::world::World">World</a><<a class="struct" href="world/struct.DummyID.html" title="struct widgetry::mapspace::world::DummyID">DummyID</a>></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.add_unnamed" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#560-562" title="goto source code">[src]</a></div><a href="#method.add_unnamed" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.add_unnamed" class="fnname">add_unnamed</a>(&mut self) -> <a class="struct" href="world/struct.ObjectBuilder.html" title="struct widgetry::mapspace::world::ObjectBuilder">ObjectBuilder</a><'_, <a class="struct" href="world/struct.DummyID.html" title="struct widgetry::mapspace::world::DummyID">DummyID</a>></h4></div></summary><div class="docblock"><p>Begin adding an unnamed object to the <code>World</code>.</p>
|
||||
</div></details><div id="method.draw_master_batch_built" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#394-396" title="goto source code">[src]</a></div><a href="#method.draw_master_batch_built" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.draw_master_batch_built" class="fnname">draw_master_batch_built</a>(&mut self, draw: <a class="struct" href="struct.ToggleZoomed.html" title="struct widgetry::mapspace::ToggleZoomed">ToggleZoomed</a>)</h4></div><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#399-486" title="goto source code">[src]</a></div><a href="#method.event" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.event" class="fnname">event</a>(&mut self, ctx: &mut <a class="struct" href="../event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a><'_>) -> <a class="enum" href="world/enum.WorldOutcome.html" title="enum widgetry::mapspace::world::WorldOutcome">WorldOutcome</a><ID></h4></div></summary><div class="docblock"><p>Let objects in the world respond to something happening.</p>
|
||||
</div></details><div id="method.calculate_hover" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#488-509" title="goto source code">[src]</a></div><a href="#method.calculate_hover" class="anchor"></a><h4 class="code-header">fn <a href="#method.calculate_hover" class="fnname">calculate_hover</a>(&self, cursor: <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><ID></h4></div><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#512-540" title="goto source code">[src]</a></div><a href="#method.draw" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.draw" class="fnname">draw</a>(&self, g: &mut <a class="struct" href="../drawing/struct.GfxCtx.html" title="struct widgetry::drawing::GfxCtx">GfxCtx</a><'_>)</h4></div></summary><div class="docblock"><p>Draw objects in the world that’re currently visible.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_hovering" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#543-545" title="goto source code">[src]</a></div><a href="#method.get_hovering" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_hovering" class="fnname">get_hovering</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><ID></h4></div></summary><div class="docblock"><p>Returns the object currently hovered on.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.override_tooltip" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#548-555" title="goto source code">[src]</a></div><a href="#method.override_tooltip" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.override_tooltip" class="fnname">override_tooltip</a>(&mut self, id: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.reference.html">&</a>ID, tooltip: <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../text/struct.Text.html" title="struct widgetry::text::Text">Text</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Change an object’s tooltip. Returns true for success, false if the object didn’t exist.</p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-1" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#563-573" title="goto source code">[src]</a></div><a href="#impl-1" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="world/struct.World.html" title="struct widgetry::mapspace::world::World">World</a><<a class="struct" href="world/struct.DummyID.html" title="struct widgetry::mapspace::world::DummyID">DummyID</a>></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.add_unnamed" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#570-572" title="goto source code">[src]</a></div><a href="#method.add_unnamed" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.add_unnamed" class="fnname">add_unnamed</a>(&mut self) -> <a class="struct" href="world/struct.ObjectBuilder.html" title="struct widgetry::mapspace::world::ObjectBuilder">ObjectBuilder</a><'_, <a class="struct" href="world/struct.DummyID.html" title="struct widgetry::mapspace::world::DummyID">DummyID</a>></h4></div></summary><div class="docblock"><p>Begin adding an unnamed object to the <code>World</code>.</p>
|
||||
<p>Note: You must call <code>build</code> on this object before calling <code>add_unnamed</code> again. Otherwise,
|
||||
the object IDs will collide.</p>
|
||||
<p>TODO This will break when objects are deleted!</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="Objects in a `World` are uniquely identified by this caller-specified type"><meta name="keywords" content="rust, rustlang, rust-lang, ObjectID"><title>ObjectID in widgetry::mapspace - 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 id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Trait ObjectID</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#implementors">Implementors</a></h3></div><h2 class="location">Other items in<br><a href="../index.html">widgetry</a>::<wbr><a href="index.html">mapspace</a></h2><div id="sidebar-vars" data-name="ObjectID" data-ty="trait" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Trait <a href="../index.html">widgetry</a>::<wbr><a href="index.html">mapspace</a>::<wbr><a class="trait" href="#">ObjectID</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/widgetry/mapspace/world.rs.html#85" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust trait"><code>pub trait ObjectID: <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> + <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> + <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> { }</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Objects in a <code>World</code> are uniquely identified by this caller-specified type</p>
|
||||
</div></details><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><div id="impl-ObjectID" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#551" title="goto source code">[src]</a></div><a href="#impl-ObjectID" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="world/trait.ObjectID.html" title="trait widgetry::mapspace::world::ObjectID">ObjectID</a> for <a class="struct" href="world/struct.DummyID.html" title="struct widgetry::mapspace::world::DummyID">DummyID</a></h3></div></div><script type="text/javascript" src="../../implementors/widgetry/mapspace/trait.ObjectID.js" async></script></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="widgetry" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
|
||||
</div></details><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><div id="impl-ObjectID" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#561" title="goto source code">[src]</a></div><a href="#impl-ObjectID" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="world/trait.ObjectID.html" title="trait widgetry::mapspace::world::ObjectID">ObjectID</a> for <a class="struct" href="world/struct.DummyID.html" title="struct widgetry::mapspace::world::DummyID">DummyID</a></h3></div></div><script type="text/javascript" src="../../implementors/widgetry/mapspace/trait.ObjectID.js" async></script></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="widgetry" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
|
||||
</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 `world` mod in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, world"><title>widgetry::mapspace::world - 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 id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><script defer src="../../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module world</h2><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="#traits">Traits</a></li></ul></div><div id="sidebar-vars" data-name="world" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">mapspace</a>::<wbr><a class="mod" href="#">world</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/widgetry/mapspace/world.rs.html#1-563" title="goto source code">[src]</a></span></h1><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2>
|
||||
<noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module world</h2><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="#traits">Traits</a></li></ul></div><div id="sidebar-vars" data-name="world" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">mapspace</a>::<wbr><a class="mod" href="#">world</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/widgetry/mapspace/world.rs.html#1-573" title="goto source code">[src]</a></span></h1><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.DummyID.html" title="widgetry::mapspace::world::DummyID struct">DummyID</a></div><div class="item-right docblock-short"><p>If you don’t ever need to refer to objects in a <code>World</code>, you can auto-assign dummy IDs.</p>
|
||||
</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Object.html" title="widgetry::mapspace::world::Object struct">Object</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.ObjectBuilder.html" title="widgetry::mapspace::world::ObjectBuilder struct">ObjectBuilder</a></div><div class="item-right docblock-short"><p>This provides a builder API for adding objects to a <code>World</code>.</p>
|
||||
</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.World.html" title="widgetry::mapspace::world::World struct">World</a></div><div class="item-right docblock-short"><p>A <code>World</code> manages objects that exist in “map-space”, the zoomable and pannable canvas. These
|
||||
|
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 `Object` struct in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, Object"><title>Object in widgetry::mapspace::world - 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 id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><script defer src="../../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct Object</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield._id">_id</a><a href="#structfield.clickable">clickable</a><a href="#structfield.draggable">draggable</a><a href="#structfield.draw_hover">draw_hover</a><a href="#structfield.draw_normal">draw_normal</a><a href="#structfield.hitbox">hitbox</a><a href="#structfield.keybindings">keybindings</a><a href="#structfield.quadtree_id">quadtree_id</a><a href="#structfield.tooltip">tooltip</a><a href="#structfield.zorder">zorder</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><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><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><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-Downcast">Downcast</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><h2 class="location">Other items in<br><a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">mapspace</a>::<wbr><a href="index.html">world</a></h2><div id="sidebar-vars" data-name="Object" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">mapspace</a>::<wbr><a href="index.html">world</a>::<wbr><a class="struct" href="#">Object</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/widgetry/mapspace/world.rs.html#267-280" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust struct"><code>struct Object<ID: <a class="trait" href="trait.ObjectID.html" title="trait widgetry::mapspace::world::ObjectID">ObjectID</a>> {
|
||||
<noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct Object</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield._id">_id</a><a href="#structfield.clickable">clickable</a><a href="#structfield.draggable">draggable</a><a href="#structfield.draw_hover">draw_hover</a><a href="#structfield.draw_normal">draw_normal</a><a href="#structfield.hitbox">hitbox</a><a href="#structfield.keybindings">keybindings</a><a href="#structfield.quadtree_id">quadtree_id</a><a href="#structfield.tooltip">tooltip</a><a href="#structfield.zorder">zorder</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><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><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><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-Downcast">Downcast</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><h2 class="location">Other items in<br><a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">mapspace</a>::<wbr><a href="index.html">world</a></h2><div id="sidebar-vars" data-name="Object" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">mapspace</a>::<wbr><a href="index.html">world</a>::<wbr><a class="struct" href="#">Object</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/widgetry/mapspace/world.rs.html#272-285" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust struct"><code>struct Object<ID: <a class="trait" href="trait.ObjectID.html" title="trait widgetry::mapspace::world::ObjectID">ObjectID</a>> {
|
||||
_id: ID,
|
||||
quadtree_id: ItemId,
|
||||
hitbox: <a class="struct" href="../../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>,
|
||||
|
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="A `World` manages objects that exist in “map-space”, the zoomable and pannable canvas. These objects can be drawn, hovered on, clicked, dragged, etc."><meta name="keywords" content="rust, rustlang, rust-lang, World"><title>World in widgetry::mapspace::world - 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 id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><script defer src="../../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct World</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield.dragging_from">dragging_from</a><a href="#structfield.draw_master_batches">draw_master_batches</a><a href="#structfield.hovering">hovering</a><a href="#structfield.objects">objects</a><a href="#structfield.quadtree">quadtree</a></div><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.add">add</a><a href="#method.add_unnamed">add_unnamed</a><a href="#method.bounded">bounded</a><a href="#method.calculate_hover">calculate_hover</a><a href="#method.delete">delete</a><a href="#method.delete_before_replacement">delete_before_replacement</a><a href="#method.draw">draw</a><a href="#method.draw_master_batch">draw_master_batch</a><a href="#method.event">event</a><a href="#method.get_hovering">get_hovering</a><a href="#method.initialize_hover">initialize_hover</a><a href="#method.override_tooltip">override_tooltip</a><a href="#method.rebuilt_during_drag">rebuilt_during_drag</a><a href="#method.unbounded">unbounded</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><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><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><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-Downcast">Downcast</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><h2 class="location">Other items in<br><a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">mapspace</a>::<wbr><a href="index.html">world</a></h2><div id="sidebar-vars" data-name="World" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">mapspace</a>::<wbr><a href="index.html">world</a>::<wbr><a class="struct" href="#">World</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/widgetry/mapspace/world.rs.html#20-31" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust struct"><code>pub struct World<ID: <a class="trait" href="trait.ObjectID.html" title="trait widgetry::mapspace::world::ObjectID">ObjectID</a>> {
|
||||
<noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct World</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield.dragging_from">dragging_from</a><a href="#structfield.draw_master_batches">draw_master_batches</a><a href="#structfield.hovering">hovering</a><a href="#structfield.objects">objects</a><a href="#structfield.quadtree">quadtree</a></div><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.add">add</a><a href="#method.add_unnamed">add_unnamed</a><a href="#method.bounded">bounded</a><a href="#method.calculate_hover">calculate_hover</a><a href="#method.delete">delete</a><a href="#method.delete_before_replacement">delete_before_replacement</a><a href="#method.draw">draw</a><a href="#method.draw_master_batch">draw_master_batch</a><a href="#method.draw_master_batch_built">draw_master_batch_built</a><a href="#method.event">event</a><a href="#method.get_hovering">get_hovering</a><a href="#method.initialize_hover">initialize_hover</a><a href="#method.override_tooltip">override_tooltip</a><a href="#method.rebuilt_during_drag">rebuilt_during_drag</a><a href="#method.unbounded">unbounded</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><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><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><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-Downcast">Downcast</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><h2 class="location">Other items in<br><a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">mapspace</a>::<wbr><a href="index.html">world</a></h2><div id="sidebar-vars" data-name="World" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">mapspace</a>::<wbr><a href="index.html">world</a>::<wbr><a class="struct" href="#">World</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/widgetry/mapspace/world.rs.html#20-31" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust struct"><code>pub struct World<ID: <a class="trait" href="trait.ObjectID.html" title="trait widgetry::mapspace::world::ObjectID">ObjectID</a>> {
|
||||
objects: <a class="struct" href="https://doc.rust-lang.org/1.58.1/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a><ID, <a class="struct" href="struct.Object.html" title="struct widgetry::mapspace::world::Object">Object</a><ID>>,
|
||||
quadtree: QuadTree<ID>,
|
||||
draw_master_batches: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="../struct.ToggleZoomed.html" title="struct widgetry::mapspace::ToggleZoomed">ToggleZoomed</a>>,
|
||||
@ -7,28 +7,28 @@
|
||||
dragging_from: <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.tuple.html">(</a><a class="struct" href="../../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>, <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a><a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.tuple.html">)</a>>,
|
||||
}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A <code>World</code> manages objects that exist in “map-space”, the zoomable and pannable canvas. These
|
||||
objects can be drawn, hovered on, clicked, dragged, etc.</p>
|
||||
</div></details><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.objects" class="structfield small-section-header"><a href="#structfield.objects" class="anchor field"></a><code>objects: <a class="struct" href="https://doc.rust-lang.org/1.58.1/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a><ID, <a class="struct" href="struct.Object.html" title="struct widgetry::mapspace::world::Object">Object</a><ID>></code></span><span id="structfield.quadtree" class="structfield small-section-header"><a href="#structfield.quadtree" class="anchor field"></a><code>quadtree: QuadTree<ID></code></span><span id="structfield.draw_master_batches" class="structfield small-section-header"><a href="#structfield.draw_master_batches" class="anchor field"></a><code>draw_master_batches: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="../struct.ToggleZoomed.html" title="struct widgetry::mapspace::ToggleZoomed">ToggleZoomed</a>></code></span><span id="structfield.hovering" class="structfield small-section-header"><a href="#structfield.hovering" class="anchor field"></a><code>hovering: <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><ID></code></span><span id="structfield.dragging_from" class="structfield small-section-header"><a href="#structfield.dragging_from" class="anchor field"></a><code>dragging_from: <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.tuple.html">(</a><a class="struct" href="../../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>, <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a><a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.tuple.html">)</a>></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#282-546" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl<ID: <a class="trait" href="trait.ObjectID.html" title="trait widgetry::mapspace::world::ObjectID">ObjectID</a>> <a class="struct" href="struct.World.html" title="struct widgetry::mapspace::world::World">World</a><ID></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.unbounded" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#284-297" title="goto source code">[src]</a></div><a href="#method.unbounded" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.unbounded" class="fnname">unbounded</a>() -> <a class="struct" href="struct.World.html" title="struct widgetry::mapspace::world::World">World</a><ID></h4></div></summary><div class="docblock"><p>Creates an empty <code>World</code>, whose objects can exist anywhere from (0, 0) to the max f64.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.bounded" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#300-310" title="goto source code">[src]</a></div><a href="#method.bounded" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.bounded" class="fnname">bounded</a>(bounds: &<a class="struct" href="../../../geom/bounds/struct.Bounds.html" title="struct geom::bounds::Bounds">Bounds</a>) -> <a class="struct" href="struct.World.html" title="struct widgetry::mapspace::world::World">World</a><ID></h4></div></summary><div class="docblock"><p>Creates an empty <code>World</code>, whose objects can exist in the provided rectangular boundary.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.add" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#314-329" title="goto source code">[src]</a></div><a href="#method.add" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.add" class="fnname">add</a>(&mut self, id: ID) -> <a class="struct" href="struct.ObjectBuilder.html" title="struct widgetry::mapspace::world::ObjectBuilder">ObjectBuilder</a><'_, ID></h4></div></summary><div class="docblock"><p>Start adding an object to the <code>World</code>. The caller should specify the object with methods on
|
||||
</div></details><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.objects" class="structfield small-section-header"><a href="#structfield.objects" class="anchor field"></a><code>objects: <a class="struct" href="https://doc.rust-lang.org/1.58.1/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a><ID, <a class="struct" href="struct.Object.html" title="struct widgetry::mapspace::world::Object">Object</a><ID>></code></span><span id="structfield.quadtree" class="structfield small-section-header"><a href="#structfield.quadtree" class="anchor field"></a><code>quadtree: QuadTree<ID></code></span><span id="structfield.draw_master_batches" class="structfield small-section-header"><a href="#structfield.draw_master_batches" class="anchor field"></a><code>draw_master_batches: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="../struct.ToggleZoomed.html" title="struct widgetry::mapspace::ToggleZoomed">ToggleZoomed</a>></code></span><span id="structfield.hovering" class="structfield small-section-header"><a href="#structfield.hovering" class="anchor field"></a><code>hovering: <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><ID></code></span><span id="structfield.dragging_from" class="structfield small-section-header"><a href="#structfield.dragging_from" class="anchor field"></a><code>dragging_from: <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.tuple.html">(</a><a class="struct" href="../../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>, <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a><a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.tuple.html">)</a>></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#287-556" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl<ID: <a class="trait" href="trait.ObjectID.html" title="trait widgetry::mapspace::world::ObjectID">ObjectID</a>> <a class="struct" href="struct.World.html" title="struct widgetry::mapspace::world::World">World</a><ID></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.unbounded" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#289-302" title="goto source code">[src]</a></div><a href="#method.unbounded" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.unbounded" class="fnname">unbounded</a>() -> <a class="struct" href="struct.World.html" title="struct widgetry::mapspace::world::World">World</a><ID></h4></div></summary><div class="docblock"><p>Creates an empty <code>World</code>, whose objects can exist anywhere from (0, 0) to the max f64.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.bounded" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#305-315" title="goto source code">[src]</a></div><a href="#method.bounded" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.bounded" class="fnname">bounded</a>(bounds: &<a class="struct" href="../../../geom/bounds/struct.Bounds.html" title="struct geom::bounds::Bounds">Bounds</a>) -> <a class="struct" href="struct.World.html" title="struct widgetry::mapspace::world::World">World</a><ID></h4></div></summary><div class="docblock"><p>Creates an empty <code>World</code>, whose objects can exist in the provided rectangular boundary.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.add" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#319-334" title="goto source code">[src]</a></div><a href="#method.add" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.add" class="fnname">add</a>(&mut self, id: ID) -> <a class="struct" href="struct.ObjectBuilder.html" title="struct widgetry::mapspace::world::ObjectBuilder">ObjectBuilder</a><'_, ID></h4></div></summary><div class="docblock"><p>Start adding an object to the <code>World</code>. The caller should specify the object with methods on
|
||||
<code>ObjectBuilder</code>, then call <code>build</code>.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.delete" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#333-342" title="goto source code">[src]</a></div><a href="#method.delete" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.delete" class="fnname">delete</a>(&mut self, id: ID)</h4></div></summary><div class="docblock"><p>Delete an object. Not idempotent – this will panic if the object doesn’t exist. Will panic
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.delete" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#338-347" title="goto source code">[src]</a></div><a href="#method.delete" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.delete" class="fnname">delete</a>(&mut self, id: ID)</h4></div></summary><div class="docblock"><p>Delete an object. Not idempotent – this will panic if the object doesn’t exist. Will panic
|
||||
if the object is deleted in the middle of being dragged.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.delete_before_replacement" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#346-356" title="goto source code">[src]</a></div><a href="#method.delete_before_replacement" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.delete_before_replacement" class="fnname">delete_before_replacement</a>(&mut self, id: ID)</h4></div></summary><div class="docblock"><p>Delete an object, with the promise to recreate it with the same ID before the next call to
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.delete_before_replacement" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#351-361" title="goto source code">[src]</a></div><a href="#method.delete_before_replacement" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.delete_before_replacement" class="fnname">delete_before_replacement</a>(&mut self, id: ID)</h4></div></summary><div class="docblock"><p>Delete an object, with the promise to recreate it with the same ID before the next call to
|
||||
<code>event</code>. This may be called while the object is being hovered on or dragged.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.initialize_hover" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#360-365" title="goto source code">[src]</a></div><a href="#method.initialize_hover" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.initialize_hover" class="fnname">initialize_hover</a>(&mut self, ctx: &<a class="struct" href="../../event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a><'_>)</h4></div></summary><div class="docblock"><p>After adding all objects to a <code>World</code>, call this to initially detect if the cursor is
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.initialize_hover" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#365-370" title="goto source code">[src]</a></div><a href="#method.initialize_hover" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.initialize_hover" class="fnname">initialize_hover</a>(&mut self, ctx: &<a class="struct" href="../../event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a><'_>)</h4></div></summary><div class="docblock"><p>After adding all objects to a <code>World</code>, call this to initially detect if the cursor is
|
||||
hovering on an object.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.rebuilt_during_drag" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#374-380" title="goto source code">[src]</a></div><a href="#method.rebuilt_during_drag" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.rebuilt_during_drag" class="fnname">rebuilt_during_drag</a>(&mut self, prev_world: &<a class="struct" href="struct.World.html" title="struct widgetry::mapspace::world::World">World</a><ID>)</h4></div></summary><div class="docblock"><p>If a drag event causes the world to be totally rebuilt, call this with the previous world
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.rebuilt_during_drag" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#379-385" title="goto source code">[src]</a></div><a href="#method.rebuilt_during_drag" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.rebuilt_during_drag" class="fnname">rebuilt_during_drag</a>(&mut self, prev_world: &<a class="struct" href="struct.World.html" title="struct widgetry::mapspace::world::World">World</a><ID>)</h4></div></summary><div class="docblock"><p>If a drag event causes the world to be totally rebuilt, call this with the previous world
|
||||
to preserve the ongoing drag.</p>
|
||||
<p>This should be called after <code>initialize_hover</code>.</p>
|
||||
<p>Important: the rebuilt world must include the same object ID that’s currently being dragged
|
||||
from the previous world.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw_master_batch" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#384-386" title="goto source code">[src]</a></div><a href="#method.draw_master_batch" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.draw_master_batch" class="fnname">draw_master_batch</a><I: <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="../struct.ToggleZoomedBuilder.html" title="struct widgetry::mapspace::ToggleZoomedBuilder">ToggleZoomedBuilder</a>>>(<br> &mut self, <br> ctx: &<a class="struct" href="../../event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a><'_>, <br> draw: I<br>)</h4></div></summary><div class="docblock"><p>Draw something underneath all objects. This is useful for performance, when a large number
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw_master_batch" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#389-391" title="goto source code">[src]</a></div><a href="#method.draw_master_batch" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.draw_master_batch" class="fnname">draw_master_batch</a><I: <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="../struct.ToggleZoomedBuilder.html" title="struct widgetry::mapspace::ToggleZoomedBuilder">ToggleZoomedBuilder</a>>>(<br> &mut self, <br> ctx: &<a class="struct" href="../../event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a><'_>, <br> draw: I<br>)</h4></div></summary><div class="docblock"><p>Draw something underneath all objects. This is useful for performance, when a large number
|
||||
of objects never change appearance.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#389-476" title="goto source code">[src]</a></div><a href="#method.event" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.event" class="fnname">event</a>(&mut self, ctx: &mut <a class="struct" href="../../event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a><'_>) -> <a class="enum" href="enum.WorldOutcome.html" title="enum widgetry::mapspace::world::WorldOutcome">WorldOutcome</a><ID></h4></div></summary><div class="docblock"><p>Let objects in the world respond to something happening.</p>
|
||||
</div></details><div id="method.calculate_hover" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#478-499" title="goto source code">[src]</a></div><a href="#method.calculate_hover" class="anchor"></a><h4 class="code-header">fn <a href="#method.calculate_hover" class="fnname">calculate_hover</a>(&self, cursor: <a class="struct" href="../../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><ID></h4></div><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#502-530" title="goto source code">[src]</a></div><a href="#method.draw" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.draw" class="fnname">draw</a>(&self, g: &mut <a class="struct" href="../../drawing/struct.GfxCtx.html" title="struct widgetry::drawing::GfxCtx">GfxCtx</a><'_>)</h4></div></summary><div class="docblock"><p>Draw objects in the world that’re currently visible.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_hovering" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#533-535" title="goto source code">[src]</a></div><a href="#method.get_hovering" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_hovering" class="fnname">get_hovering</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><ID></h4></div></summary><div class="docblock"><p>Returns the object currently hovered on.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.override_tooltip" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#538-545" title="goto source code">[src]</a></div><a href="#method.override_tooltip" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.override_tooltip" class="fnname">override_tooltip</a>(&mut self, id: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.reference.html">&</a>ID, tooltip: <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../text/struct.Text.html" title="struct widgetry::text::Text">Text</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Change an object’s tooltip. Returns true for success, false if the object didn’t exist.</p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-1" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#553-563" title="goto source code">[src]</a></div><a href="#impl-1" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.World.html" title="struct widgetry::mapspace::world::World">World</a><<a class="struct" href="struct.DummyID.html" title="struct widgetry::mapspace::world::DummyID">DummyID</a>></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.add_unnamed" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#560-562" title="goto source code">[src]</a></div><a href="#method.add_unnamed" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.add_unnamed" class="fnname">add_unnamed</a>(&mut self) -> <a class="struct" href="struct.ObjectBuilder.html" title="struct widgetry::mapspace::world::ObjectBuilder">ObjectBuilder</a><'_, <a class="struct" href="struct.DummyID.html" title="struct widgetry::mapspace::world::DummyID">DummyID</a>></h4></div></summary><div class="docblock"><p>Begin adding an unnamed object to the <code>World</code>.</p>
|
||||
</div></details><div id="method.draw_master_batch_built" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#394-396" title="goto source code">[src]</a></div><a href="#method.draw_master_batch_built" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.draw_master_batch_built" class="fnname">draw_master_batch_built</a>(&mut self, draw: <a class="struct" href="../struct.ToggleZoomed.html" title="struct widgetry::mapspace::ToggleZoomed">ToggleZoomed</a>)</h4></div><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#399-486" title="goto source code">[src]</a></div><a href="#method.event" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.event" class="fnname">event</a>(&mut self, ctx: &mut <a class="struct" href="../../event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a><'_>) -> <a class="enum" href="enum.WorldOutcome.html" title="enum widgetry::mapspace::world::WorldOutcome">WorldOutcome</a><ID></h4></div></summary><div class="docblock"><p>Let objects in the world respond to something happening.</p>
|
||||
</div></details><div id="method.calculate_hover" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#488-509" title="goto source code">[src]</a></div><a href="#method.calculate_hover" class="anchor"></a><h4 class="code-header">fn <a href="#method.calculate_hover" class="fnname">calculate_hover</a>(&self, cursor: <a class="struct" href="../../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><ID></h4></div><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#512-540" title="goto source code">[src]</a></div><a href="#method.draw" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.draw" class="fnname">draw</a>(&self, g: &mut <a class="struct" href="../../drawing/struct.GfxCtx.html" title="struct widgetry::drawing::GfxCtx">GfxCtx</a><'_>)</h4></div></summary><div class="docblock"><p>Draw objects in the world that’re currently visible.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_hovering" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#543-545" title="goto source code">[src]</a></div><a href="#method.get_hovering" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_hovering" class="fnname">get_hovering</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><ID></h4></div></summary><div class="docblock"><p>Returns the object currently hovered on.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.override_tooltip" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#548-555" title="goto source code">[src]</a></div><a href="#method.override_tooltip" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.override_tooltip" class="fnname">override_tooltip</a>(&mut self, id: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.reference.html">&</a>ID, tooltip: <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../text/struct.Text.html" title="struct widgetry::text::Text">Text</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Change an object’s tooltip. Returns true for success, false if the object didn’t exist.</p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-1" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#563-573" title="goto source code">[src]</a></div><a href="#impl-1" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.World.html" title="struct widgetry::mapspace::world::World">World</a><<a class="struct" href="struct.DummyID.html" title="struct widgetry::mapspace::world::DummyID">DummyID</a>></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.add_unnamed" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#570-572" title="goto source code">[src]</a></div><a href="#method.add_unnamed" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.add_unnamed" class="fnname">add_unnamed</a>(&mut self) -> <a class="struct" href="struct.ObjectBuilder.html" title="struct widgetry::mapspace::world::ObjectBuilder">ObjectBuilder</a><'_, <a class="struct" href="struct.DummyID.html" title="struct widgetry::mapspace::world::DummyID">DummyID</a>></h4></div></summary><div class="docblock"><p>Begin adding an unnamed object to the <code>World</code>.</p>
|
||||
<p>Note: You must call <code>build</code> on this object before calling <code>add_unnamed</code> again. Otherwise,
|
||||
the object IDs will collide.</p>
|
||||
<p>TODO This will break when objects are deleted!</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="Objects in a `World` are uniquely identified by this caller-specified type"><meta name="keywords" content="rust, rustlang, rust-lang, ObjectID"><title>ObjectID in widgetry::mapspace::world - 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 id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><script defer src="../../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Trait ObjectID</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#implementors">Implementors</a></h3></div><h2 class="location">Other items in<br><a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">mapspace</a>::<wbr><a href="index.html">world</a></h2><div id="sidebar-vars" data-name="ObjectID" data-ty="trait" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Trait <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">mapspace</a>::<wbr><a href="index.html">world</a>::<wbr><a class="trait" href="#">ObjectID</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/widgetry/mapspace/world.rs.html#85" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust trait"><code>pub trait ObjectID: <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> + <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> + <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> { }</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Objects in a <code>World</code> are uniquely identified by this caller-specified type</p>
|
||||
</div></details><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><div id="impl-ObjectID" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#551" title="goto source code">[src]</a></div><a href="#impl-ObjectID" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.ObjectID.html" title="trait widgetry::mapspace::world::ObjectID">ObjectID</a> for <a class="struct" href="struct.DummyID.html" title="struct widgetry::mapspace::world::DummyID">DummyID</a></h3></div></div><script type="text/javascript" src="../../../implementors/widgetry/mapspace/world/trait.ObjectID.js" async></script></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="widgetry" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
|
||||
</div></details><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><div id="impl-ObjectID" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#561" title="goto source code">[src]</a></div><a href="#impl-ObjectID" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.ObjectID.html" title="trait widgetry::mapspace::world::ObjectID">ObjectID</a> for <a class="struct" href="struct.DummyID.html" title="struct widgetry::mapspace::world::DummyID">DummyID</a></h3></div></div><script type="text/javascript" src="../../../implementors/widgetry/mapspace/world/trait.ObjectID.js" async></script></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="widgetry" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
|
||||
</body></html>
|
Loading…
Reference in New Issue
Block a user