mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-24 15:02:59 +03:00
deploy: 4418c94fd6
This commit is contained in:
parent
f09daf25ee
commit
a93a4507bd
File diff suppressed because one or more lines are too long
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 `BUILT_TIME_UTC` constant in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>game::pregame::built_info::BUILT_TIME_UTC - 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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a></p><script>window.sidebarCurrent = {name: "BUILT_TIME_UTC", ty: "constant", relpath: ""};</script><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"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/game/home/runner/work/abstreet/abstreet/target/debug/build/game-a95c4551e63dceca/out/built.rs.html#53" title="goto source code">[src]</a></span><span class="in-band">Constant <a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="">BUILT_TIME_UTC</a></span></h1><pre class="rust const">pub const BUILT_TIME_UTC: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = "Wed, 17 Mar 2021 01:17:41 +0000";</pre><div class="docblock"><p>The built-time in RFC2822, UTC</p>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/game/home/runner/work/abstreet/abstreet/target/debug/build/game-a95c4551e63dceca/out/built.rs.html#53" title="goto source code">[src]</a></span><span class="in-band">Constant <a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="">BUILT_TIME_UTC</a></span></h1><pre class="rust const">pub const BUILT_TIME_UTC: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = "Wed, 17 Mar 2021 01:37:34 +0000";</pre><div class="docblock"><p>The built-time in RFC2822, UTC</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
@ -1,4 +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 `agent_counters` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, agent_counters"><title>game::sandbox::minimap::agent_counters - 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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">game</a>::<wbr><a href="../index.html">sandbox</a>::<wbr><a href="index.html">minimap</a></p><script>window.sidebarCurrent = {name: "agent_counters", ty: "fn", relpath: ""};</script><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"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/game/sandbox/minimap.rs.html#104-192" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">sandbox</a>::<wbr><a href="index.html">minimap</a>::<wbr><a class="fn" href="">agent_counters</a></span></h1><pre class="rust fn">fn agent_counters(<br> ctx: &EventCtx<'_>, <br> app: &<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a><br>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Widget, Widget, Widget, Widget<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
6
rustdoc/game/sandbox/minimap/fn.make_agent_toggles.html
Normal file
6
rustdoc/game/sandbox/minimap/fn.make_agent_toggles.html
Normal file
@ -0,0 +1,6 @@
|
||||
<!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_agent_toggles` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, make_agent_toggles"><title>game::sandbox::minimap::make_agent_toggles - 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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">game</a>::<wbr><a href="../index.html">sandbox</a>::<wbr><a href="index.html">minimap</a></p><script>window.sidebarCurrent = {name: "make_agent_toggles", ty: "fn", relpath: ""};</script><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"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/game/sandbox/minimap.rs.html#116-292" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">sandbox</a>::<wbr><a href="index.html">minimap</a>::<wbr><a class="fn" href="">make_agent_toggles</a></span></h1><pre class="rust fn">fn make_agent_toggles(<br> ctx: &mut EventCtx<'_>, <br> app: &<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br> is_enabled: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">; 4]</a><br>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><Widget></pre><div class="docblock"><p><code>is_enabled</code>: are (car, bike, bus, pedestrian) toggles enabled
|
||||
returns Widgets for (car, bike, bus, pedestrian)</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
@ -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="API documentation for the Rust `make_tool_panel` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, make_tool_panel"><title>game::sandbox::minimap::make_tool_panel - 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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">game</a>::<wbr><a href="../index.html">sandbox</a>::<wbr><a href="index.html">minimap</a></p><script>window.sidebarCurrent = {name: "make_tool_panel", ty: "fn", relpath: ""};</script><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"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/game/sandbox/minimap.rs.html#194-232" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">sandbox</a>::<wbr><a href="index.html">minimap</a>::<wbr><a class="fn" href="">make_tool_panel</a></span></h1><pre class="rust fn">fn make_tool_panel(ctx: &mut EventCtx<'_>, app: &<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>) -> Widget</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/game/sandbox/minimap.rs.html#294-332" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">sandbox</a>::<wbr><a href="index.html">minimap</a>::<wbr><a class="fn" href="">make_tool_panel</a></span></h1><pre class="rust fn">fn make_tool_panel(ctx: &mut EventCtx<'_>, app: &<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>) -> Widget</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
@ -1,6 +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 `minimap` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, minimap"><title>game::sandbox::minimap - 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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Module minimap</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div><p class="location"><a href="../../index.html">game</a>::<wbr><a href="../index.html">sandbox</a></p><script>window.sidebarCurrent = {name: "minimap", ty: "mod", relpath: "../"};</script><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"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/game/sandbox/minimap.rs.html#1-232" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../../index.html">game</a>::<wbr><a href="../index.html">sandbox</a>::<wbr><a class="mod" href="">minimap</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/game/sandbox/minimap.rs.html#1-332" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../../index.html">game</a>::<wbr><a href="../index.html">sandbox</a>::<wbr><a class="mod" href="">minimap</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
||||
<table><tr class="module-item"><td><a class="struct" href="struct.MinimapController.html" title="game::sandbox::minimap::MinimapController struct">MinimapController</a></td><td class="docblock-short"></td></tr></table><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>
|
||||
<table><tr class="module-item"><td><a class="fn" href="fn.agent_counters.html" title="game::sandbox::minimap::agent_counters fn">agent_counters</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.make_tool_panel.html" title="game::sandbox::minimap::make_tool_panel fn">make_tool_panel</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
||||
<table><tr class="module-item"><td><a class="fn" href="fn.make_agent_toggles.html" title="game::sandbox::minimap::make_agent_toggles fn">make_agent_toggles</a></td><td class="docblock-short"><p><code>is_enabled</code>: are (car, bike, bus, pedestrian) toggles enabled
|
||||
returns Widgets for (car, bike, bus, pedestrian)</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.make_tool_panel.html" title="game::sandbox::minimap::make_tool_panel fn">make_tool_panel</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
@ -1 +1 @@
|
||||
initSidebarItems({"fn":[["agent_counters",""],["make_tool_panel",""]],"struct":[["MinimapController",""]]});
|
||||
initSidebarItems({"fn":[["make_agent_toggles","`is_enabled`: are (car, bike, bus, pedestrian) toggles enabled returns Widgets for (car, bike, bus, pedestrian)"],["make_tool_panel",""]],"struct":[["MinimapController",""]]});
|
@ -1,17 +1,17 @@
|
||||
<!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 `MinimapController` struct in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, MinimapController"><title>game::sandbox::minimap::MinimapController - 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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Struct MinimapController</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-MinimapControls%3CApp%3E">MinimapControls<App></a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><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><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><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-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><p class="location"><a href="../../index.html">game</a>::<wbr><a href="../index.html">sandbox</a>::<wbr><a href="index.html">minimap</a></p><script>window.sidebarCurrent = {name: "MinimapController", ty: "struct", relpath: ""};</script><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"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/game/sandbox/minimap.rs.html#14" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="../../index.html">game</a>::<wbr><a href="../index.html">sandbox</a>::<wbr><a href="index.html">minimap</a>::<wbr><a class="struct" href="">MinimapController</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct MinimapController;</pre></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-MinimapControls%3CApp%3E" class="impl"><code class="in-band">impl <a class="trait" href="../../../map_gui/tools/minimap/trait.MinimapControls.html" title="trait map_gui::tools::minimap::MinimapControls">MinimapControls</a><<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>> for <a class="struct" href="../../../game/sandbox/minimap/struct.MinimapController.html" title="struct game::sandbox::minimap::MinimapController">MinimapController</a></code><a href="#impl-MinimapControls%3CApp%3E" class="anchor"></a><a class="srclink" href="../../../src/game/sandbox/minimap.rs.html#16-102" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.has_zorder" class="method hidden"><code>fn <a href="../../../map_gui/tools/minimap/trait.MinimapControls.html#tymethod.has_zorder" class="fnname">has_zorder</a>(&self, app: &<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../../src/game/sandbox/minimap.rs.html#17-19" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Should the user be able to control the z-order visible? The control is only present when
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/game/sandbox/minimap.rs.html#14" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="../../index.html">game</a>::<wbr><a href="../index.html">sandbox</a>::<wbr><a href="index.html">minimap</a>::<wbr><a class="struct" href="">MinimapController</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct MinimapController;</pre></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-MinimapControls%3CApp%3E" class="impl"><code class="in-band">impl <a class="trait" href="../../../map_gui/tools/minimap/trait.MinimapControls.html" title="trait map_gui::tools::minimap::MinimapControls">MinimapControls</a><<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>> for <a class="struct" href="../../../game/sandbox/minimap/struct.MinimapController.html" title="struct game::sandbox::minimap::MinimapController">MinimapController</a></code><a href="#impl-MinimapControls%3CApp%3E" class="anchor"></a><a class="srclink" href="../../../src/game/sandbox/minimap.rs.html#16-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.has_zorder" class="method hidden"><code>fn <a href="../../../map_gui/tools/minimap/trait.MinimapControls.html#tymethod.has_zorder" class="fnname">has_zorder</a>(&self, app: &<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../../src/game/sandbox/minimap.rs.html#17-19" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Should the user be able to control the z-order visible? The control is only present when
|
||||
zoomed in, placed beneath the zoom column. <a href="../../../map_gui/tools/minimap/trait.MinimapControls.html#tymethod.has_zorder">Read more</a></p>
|
||||
</div><h4 id="method.has_layer" class="method hidden"><code>fn <a href="../../../map_gui/tools/minimap/trait.MinimapControls.html#method.has_layer" class="fnname">has_layer</a>(&self, app: &<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../../src/game/sandbox/minimap.rs.html#20-22" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Is there some additional layer displayed on the minimap? If this changes, the panel gets
|
||||
recalculated. <a href="../../../map_gui/tools/minimap/trait.MinimapControls.html#method.has_layer">Read more</a></p>
|
||||
</div><h4 id="method.draw_extra" class="method hidden"><code>fn <a href="../../../map_gui/tools/minimap/trait.MinimapControls.html#method.draw_extra" class="fnname">draw_extra</a>(&self, g: &mut GfxCtx<'_>, app: &<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>)</code><a class="srclink" href="../../../src/game/sandbox/minimap.rs.html#24-31" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Draw extra stuff on the minimap, just pulling from the app.</p>
|
||||
</div><h4 id="method.make_unzoomed_panel" class="method hidden"><code>fn <a href="../../../map_gui/tools/minimap/trait.MinimapControls.html#method.make_unzoomed_panel" class="fnname">make_unzoomed_panel</a>(&self, ctx: &mut EventCtx<'_>, app: &<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>) -> Panel</code><a class="srclink" href="../../../src/game/sandbox/minimap.rs.html#33-49" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>When unzoomed, display this panel. By default, no controls when unzoomed.</p>
|
||||
</div><h4 id="method.make_legend" class="method hidden"><code>fn <a href="../../../map_gui/tools/minimap/trait.MinimapControls.html#method.make_legend" class="fnname">make_legend</a>(&self, ctx: &mut EventCtx<'_>, app: &<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>) -> Widget</code><a class="srclink" href="../../../src/game/sandbox/minimap.rs.html#50-56" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>A row beneath the minimap in the zoomed view, usually used as a legend for things on the
|
||||
</div><h4 id="method.make_unzoomed_panel" class="method hidden"><code>fn <a href="../../../map_gui/tools/minimap/trait.MinimapControls.html#method.make_unzoomed_panel" class="fnname">make_unzoomed_panel</a>(&self, ctx: &mut EventCtx<'_>, app: &<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>) -> Panel</code><a class="srclink" href="../../../src/game/sandbox/minimap.rs.html#33-52" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>When unzoomed, display this panel. By default, no controls when unzoomed.</p>
|
||||
</div><h4 id="method.make_legend" class="method hidden"><code>fn <a href="../../../map_gui/tools/minimap/trait.MinimapControls.html#method.make_legend" class="fnname">make_legend</a>(&self, ctx: &mut EventCtx<'_>, app: &<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>) -> Widget</code><a class="srclink" href="../../../src/game/sandbox/minimap.rs.html#53-65" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>A row beneath the minimap in the zoomed view, usually used as a legend for things on the
|
||||
minimap. <a href="../../../map_gui/tools/minimap/trait.MinimapControls.html#method.make_legend">Read more</a></p>
|
||||
</div><h4 id="method.make_zoomed_side_panel" class="method hidden"><code>fn <a href="../../../map_gui/tools/minimap/trait.MinimapControls.html#method.make_zoomed_side_panel" class="fnname">make_zoomed_side_panel</a>(&self, ctx: &mut EventCtx<'_>, app: &<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>) -> Widget</code><a class="srclink" href="../../../src/game/sandbox/minimap.rs.html#57-59" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Controls to be placed to the left to the zoomed-in panel</p>
|
||||
</div><h4 id="method.panel_clicked" class="method hidden"><code>fn <a href="../../../map_gui/tools/minimap/trait.MinimapControls.html#method.panel_clicked" class="fnname">panel_clicked</a>(<br> &self, <br> ctx: &mut EventCtx<'_>, <br> app: &mut <a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br> action: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Transition<<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>>></code><a class="srclink" href="../../../src/game/sandbox/minimap.rs.html#61-92" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>If a button is clicked that was produced by some method in this trait, respond to it here.</p>
|
||||
</div><h4 id="method.panel_changed" class="method hidden"><code>fn <a href="../../../map_gui/tools/minimap/trait.MinimapControls.html#method.panel_changed" class="fnname">panel_changed</a>(&self, _: &mut EventCtx<'_>, app: &mut <a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>, panel: &Panel)</code><a class="srclink" href="../../../src/game/sandbox/minimap.rs.html#93-101" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Called for <code>Outcome::Changed</code> on the panel.</p>
|
||||
</div><h4 id="method.make_zoomed_side_panel" class="method hidden"><code>fn <a href="../../../map_gui/tools/minimap/trait.MinimapControls.html#method.make_zoomed_side_panel" class="fnname">make_zoomed_side_panel</a>(&self, ctx: &mut EventCtx<'_>, app: &<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>) -> Widget</code><a class="srclink" href="../../../src/game/sandbox/minimap.rs.html#67-69" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Controls to be placed to the left to the zoomed-in panel</p>
|
||||
</div><h4 id="method.panel_clicked" class="method hidden"><code>fn <a href="../../../map_gui/tools/minimap/trait.MinimapControls.html#method.panel_clicked" class="fnname">panel_clicked</a>(<br> &self, <br> ctx: &mut EventCtx<'_>, <br> app: &mut <a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br> action: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Transition<<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>>></code><a class="srclink" href="../../../src/game/sandbox/minimap.rs.html#71-102" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>If a button is clicked that was produced by some method in this trait, respond to it here.</p>
|
||||
</div><h4 id="method.panel_changed" class="method hidden"><code>fn <a href="../../../map_gui/tools/minimap/trait.MinimapControls.html#method.panel_changed" class="fnname">panel_changed</a>(&self, _: &mut EventCtx<'_>, app: &mut <a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>, panel: &Panel)</code><a class="srclink" href="../../../src/game/sandbox/minimap.rs.html#103-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Called for <code>Outcome::Changed</code> on the panel.</p>
|
||||
</div></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"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../../game/sandbox/minimap/struct.MinimapController.html" title="struct game::sandbox::minimap::MinimapController">MinimapController</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../../../src/game/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../../game/sandbox/minimap/struct.MinimapController.html" title="struct game::sandbox::minimap::MinimapController">MinimapController</a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../../../src/game/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../../game/sandbox/minimap/struct.MinimapController.html" title="struct game::sandbox::minimap::MinimapController">MinimapController</a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../../../src/game/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../../game/sandbox/minimap/struct.MinimapController.html" title="struct game::sandbox::minimap::MinimapController">MinimapController</a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../../../src/game/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../../game/sandbox/minimap/struct.MinimapController.html" title="struct game::sandbox::minimap::MinimapController">MinimapController</a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../../../src/game/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></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"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||
|
File diff suppressed because one or more lines are too long
@ -13,5 +13,5 @@ implementors["santa"] = [{"text":"impl PartialEq<Level> for Level","synthe
|
||||
implementors["sim"] = [{"text":"impl PartialEq<Event> for Event","synthetic":false,"types":[]},{"text":"impl PartialEq<AlertLocation> for AlertLocation","synthetic":false,"types":[]},{"text":"impl PartialEq<TripPhaseType> for TripPhaseType","synthetic":false,"types":[]},{"text":"impl PartialEq<ScenarioModifier> for ScenarioModifier","synthetic":false,"types":[]},{"text":"impl PartialEq<StartTripArgs> for StartTripArgs","synthetic":false,"types":[]},{"text":"impl PartialEq<TripSpec> for TripSpec","synthetic":false,"types":[]},{"text":"impl PartialEq<TripEndpoint> for TripEndpoint","synthetic":false,"types":[]},{"text":"impl PartialEq<Request> for Request","synthetic":false,"types":[]},{"text":"impl PartialEq<Cmd> for Cmd","synthetic":false,"types":[]},{"text":"impl PartialEq<AnyTime> for AnyTime","synthetic":false,"types":[]},{"text":"impl PartialEq<CarStatus> for CarStatus","synthetic":false,"types":[]},{"text":"impl PartialEq<Router> for Router","synthetic":false,"types":[]},{"text":"impl PartialEq<Goal> for Goal","synthetic":false,"types":[]},{"text":"impl PartialEq<Command> for Command","synthetic":false,"types":[]},{"text":"impl PartialEq<CommandType> for CommandType","synthetic":false,"types":[]},{"text":"impl PartialEq<SimpleCommandType> for SimpleCommandType","synthetic":false,"types":[]},{"text":"impl PartialEq<Item> for Item","synthetic":false,"types":[]},{"text":"impl PartialEq<DelayCause> for DelayCause","synthetic":false,"types":[]},{"text":"impl PartialEq<TripLeg> for TripLeg","synthetic":false,"types":[]},{"text":"impl PartialEq<TripMode> for TripMode","synthetic":false,"types":[]},{"text":"impl PartialEq<PersonState> for PersonState","synthetic":false,"types":[]},{"text":"impl PartialEq<CarID> for CarID","synthetic":false,"types":[]},{"text":"impl PartialEq<PedestrianID> for PedestrianID","synthetic":false,"types":[]},{"text":"impl PartialEq<AgentID> for AgentID","synthetic":false,"types":[]},{"text":"impl PartialEq<AgentType> for AgentType","synthetic":false,"types":[]},{"text":"impl PartialEq<TripID> for TripID","synthetic":false,"types":[]},{"text":"impl PartialEq<PersonID> for PersonID","synthetic":false,"types":[]},{"text":"impl PartialEq<OrigPersonID> for OrigPersonID","synthetic":false,"types":[]},{"text":"impl PartialEq<VehicleType> for VehicleType","synthetic":false,"types":[]},{"text":"impl PartialEq<Vehicle> for Vehicle","synthetic":false,"types":[]},{"text":"impl PartialEq<VehicleSpec> for VehicleSpec","synthetic":false,"types":[]},{"text":"impl PartialEq<ParkingSpot> for ParkingSpot","synthetic":false,"types":[]},{"text":"impl PartialEq<ParkedCar> for ParkedCar","synthetic":false,"types":[]},{"text":"impl PartialEq<DrivingGoal> for DrivingGoal","synthetic":false,"types":[]},{"text":"impl PartialEq<SidewalkSpot> for SidewalkSpot","synthetic":false,"types":[]},{"text":"impl PartialEq<SidewalkPOI> for SidewalkPOI","synthetic":false,"types":[]},{"text":"impl PartialEq<TimeInterval> for TimeInterval","synthetic":false,"types":[]},{"text":"impl PartialEq<DistanceInterval> for DistanceInterval","synthetic":false,"types":[]},{"text":"impl PartialEq<CreatePedestrian> for CreatePedestrian","synthetic":false,"types":[]},{"text":"impl PartialEq<CreateCar> for CreateCar","synthetic":false,"types":[]}];
|
||||
implementors["sumo"] = [{"text":"impl PartialEq<EdgeID> for EdgeID","synthetic":false,"types":[]},{"text":"impl PartialEq<NodeID> for NodeID","synthetic":false,"types":[]},{"text":"impl PartialEq<LaneID> for LaneID","synthetic":false,"types":[]},{"text":"impl PartialEq<InternalLaneID> for InternalLaneID","synthetic":false,"types":[]},{"text":"impl PartialEq<Function> for Function","synthetic":false,"types":[]},{"text":"impl PartialEq<VehicleClass> for VehicleClass","synthetic":false,"types":[]}];
|
||||
implementors["traffic_signal_data"] = [{"text":"impl PartialEq<TrafficSignal> for TrafficSignal","synthetic":false,"types":[]},{"text":"impl PartialEq<Plan> for Plan","synthetic":false,"types":[]},{"text":"impl PartialEq<Stage> for Stage","synthetic":false,"types":[]},{"text":"impl PartialEq<StageType> for StageType","synthetic":false,"types":[]},{"text":"impl PartialEq<Turn> for Turn","synthetic":false,"types":[]},{"text":"impl PartialEq<DirectedRoad> for DirectedRoad","synthetic":false,"types":[]}];
|
||||
implementors["widgetry"] = [{"text":"impl PartialEq<HorizontalAlignment> for HorizontalAlignment","synthetic":false,"types":[]},{"text":"impl PartialEq<VerticalAlignment> for VerticalAlignment","synthetic":false,"types":[]},{"text":"impl PartialEq<Color> for Color","synthetic":false,"types":[]},{"text":"impl PartialEq<Fill> for Fill","synthetic":false,"types":[]},{"text":"impl PartialEq<Texture> for Texture","synthetic":false,"types":[]},{"text":"impl PartialEq<LinearGradient> for LinearGradient","synthetic":false,"types":[]},{"text":"impl PartialEq<Event> for Event","synthetic":false,"types":[]},{"text":"impl PartialEq<Key> for Key","synthetic":false,"types":[]},{"text":"impl PartialEq<MultiKey> for MultiKey","synthetic":false,"types":[]},{"text":"impl PartialEq<UpdateType> for UpdateType","synthetic":false,"types":[]},{"text":"impl PartialEq<RewriteColor> for RewriteColor","synthetic":false,"types":[]},{"text":"impl PartialEq<ScreenPt> for ScreenPt","synthetic":false,"types":[]},{"text":"impl PartialEq<ScreenDims> for ScreenDims","synthetic":false,"types":[]},{"text":"impl PartialEq<Font> for Font","synthetic":false,"types":[]},{"text":"impl PartialEq<Axis> for Axis","synthetic":false,"types":[]},{"text":"impl PartialEq<Outcome> for Outcome","synthetic":false,"types":[]},{"text":"impl PartialEq<EdgeInsets> for EdgeInsets","synthetic":false,"types":[]}];
|
||||
implementors["widgetry"] = [{"text":"impl PartialEq<HorizontalAlignment> for HorizontalAlignment","synthetic":false,"types":[]},{"text":"impl PartialEq<VerticalAlignment> for VerticalAlignment","synthetic":false,"types":[]},{"text":"impl PartialEq<Color> for Color","synthetic":false,"types":[]},{"text":"impl PartialEq<Fill> for Fill","synthetic":false,"types":[]},{"text":"impl PartialEq<Texture> for Texture","synthetic":false,"types":[]},{"text":"impl PartialEq<LinearGradient> for LinearGradient","synthetic":false,"types":[]},{"text":"impl PartialEq<Event> for Event","synthetic":false,"types":[]},{"text":"impl PartialEq<Key> for Key","synthetic":false,"types":[]},{"text":"impl PartialEq<MultiKey> for MultiKey","synthetic":false,"types":[]},{"text":"impl PartialEq<UpdateType> for UpdateType","synthetic":false,"types":[]},{"text":"impl PartialEq<Axis> for Axis","synthetic":false,"types":[]},{"text":"impl PartialEq<RewriteColor> for RewriteColor","synthetic":false,"types":[]},{"text":"impl PartialEq<ScreenPt> for ScreenPt","synthetic":false,"types":[]},{"text":"impl PartialEq<ScreenDims> for ScreenDims","synthetic":false,"types":[]},{"text":"impl PartialEq<Font> for Font","synthetic":false,"types":[]},{"text":"impl PartialEq<Outcome> for Outcome","synthetic":false,"types":[]},{"text":"impl PartialEq<EdgeInsets> for EdgeInsets","synthetic":false,"types":[]}];
|
||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
@ -6,5 +6,5 @@ implementors["map_model"] = [{"text":"impl Default for MapEdits","synthetic":fal
|
||||
implementors["santa"] = [{"text":"impl Default for Music","synthetic":false,"types":[]}];
|
||||
implementors["sim"] = [{"text":"impl Default for Analytics","synthetic":false,"types":[]},{"text":"impl Default for SimOptions","synthetic":false,"types":[]},{"text":"impl Default for AlertHandler","synthetic":false,"types":[]}];
|
||||
implementors["sumo"] = [{"text":"impl Default for Function","synthetic":false,"types":[]},{"text":"impl Default for SpreadType","synthetic":false,"types":[]}];
|
||||
implementors["widgetry"] = [{"text":"impl<'a> Default for ButtonBuilder<'a>","synthetic":false,"types":[]},{"text":"impl<'a> Default for ButtonStateStyle<'a>","synthetic":false,"types":[]},{"text":"impl<'a> Default for Image<'a>","synthetic":false,"types":[]},{"text":"impl Default for Label","synthetic":false,"types":[]},{"text":"impl Default for Stack","synthetic":false,"types":[]},{"text":"impl Default for CornerRounding","synthetic":false,"types":[]},{"text":"impl Default for EdgeInsets","synthetic":false,"types":[]},{"text":"impl Default for ContentMode","synthetic":false,"types":[]}];
|
||||
implementors["widgetry"] = [{"text":"impl Default for GeomBatchStack","synthetic":false,"types":[]},{"text":"impl<'a> Default for ButtonBuilder<'a>","synthetic":false,"types":[]},{"text":"impl<'a> Default for ButtonStateStyle<'a>","synthetic":false,"types":[]},{"text":"impl<'a> Default for Image<'a>","synthetic":false,"types":[]},{"text":"impl Default for Label","synthetic":false,"types":[]},{"text":"impl Default for CornerRounding","synthetic":false,"types":[]},{"text":"impl Default for EdgeInsets","synthetic":false,"types":[]},{"text":"impl Default for ContentMode","synthetic":false,"types":[]}];
|
||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
@ -13,5 +13,5 @@ implementors["parking_mapper"] = [{"text":"impl Debug for Show","synthetic":fals
|
||||
implementors["popdat"] = [{"text":"impl Debug for DesireLine","synthetic":false,"types":[]},{"text":"impl Debug for CensusArea","synthetic":false,"types":[]},{"text":"impl Debug for Activity","synthetic":false,"types":[]}];
|
||||
implementors["sim"] = [{"text":"impl Debug for TripPhase","synthetic":false,"types":[]},{"text":"impl Debug for Event","synthetic":false,"types":[]},{"text":"impl Debug for AlertLocation","synthetic":false,"types":[]},{"text":"impl Debug for TripPhaseType","synthetic":false,"types":[]},{"text":"impl Debug for ScenarioGenerator","synthetic":false,"types":[]},{"text":"impl Debug for SpawnOverTime","synthetic":false,"types":[]},{"text":"impl Debug for BorderSpawnOverTime","synthetic":false,"types":[]},{"text":"impl Debug for Scenario","synthetic":false,"types":[]},{"text":"impl Debug for PersonSpec","synthetic":false,"types":[]},{"text":"impl Debug for IndividTrip","synthetic":false,"types":[]},{"text":"impl Debug for TripPurpose","synthetic":false,"types":[]},{"text":"impl Debug for StartTripArgs","synthetic":false,"types":[]},{"text":"impl Debug for TripSpec","synthetic":false,"types":[]},{"text":"impl Debug for TripEndpoint","synthetic":false,"types":[]},{"text":"impl Debug for Car","synthetic":false,"types":[]},{"text":"impl Debug for CarState","synthetic":false,"types":[]},{"text":"impl Debug for State","synthetic":false,"types":[]},{"text":"impl Debug for SignalState","synthetic":false,"types":[]},{"text":"impl Debug for Request","synthetic":false,"types":[]},{"text":"impl Debug for Queue","synthetic":false,"types":[]},{"text":"impl Debug for PedState","synthetic":false,"types":[]},{"text":"impl Debug for Cmd","synthetic":false,"types":[]},{"text":"impl Debug for AnyTime","synthetic":false,"types":[]},{"text":"impl Debug for StateEvent","synthetic":false,"types":[]},{"text":"impl Debug for Event","synthetic":false,"types":[]},{"text":"impl Debug for State","synthetic":false,"types":[]},{"text":"impl Debug for Router","synthetic":false,"types":[]},{"text":"impl Debug for ActionAtEnd","synthetic":false,"types":[]},{"text":"impl Debug for Goal","synthetic":false,"types":[]},{"text":"impl Debug for Command","synthetic":false,"types":[]},{"text":"impl Debug for CommandType","synthetic":false,"types":[]},{"text":"impl Debug for SimpleCommandType","synthetic":false,"types":[]},{"text":"impl Debug for DelayCause","synthetic":false,"types":[]},{"text":"impl Debug for TripManager","synthetic":false,"types":[]},{"text":"impl Debug for Trip","synthetic":false,"types":[]},{"text":"impl Debug for TripInfo","synthetic":false,"types":[]},{"text":"impl Debug for TripLeg","synthetic":false,"types":[]},{"text":"impl Debug for TripMode","synthetic":false,"types":[]},{"text":"impl Debug for Person","synthetic":false,"types":[]},{"text":"impl Debug for PersonState","synthetic":false,"types":[]},{"text":"impl Debug for CarID","synthetic":false,"types":[]},{"text":"impl Debug for PedestrianID","synthetic":false,"types":[]},{"text":"impl Debug for AgentID","synthetic":false,"types":[]},{"text":"impl Debug for AgentType","synthetic":false,"types":[]},{"text":"impl Debug for TripID","synthetic":false,"types":[]},{"text":"impl Debug for PersonID","synthetic":false,"types":[]},{"text":"impl Debug for OrigPersonID","synthetic":false,"types":[]},{"text":"impl Debug for VehicleType","synthetic":false,"types":[]},{"text":"impl Debug for Vehicle","synthetic":false,"types":[]},{"text":"impl Debug for VehicleSpec","synthetic":false,"types":[]},{"text":"impl Debug for ParkingSpot","synthetic":false,"types":[]},{"text":"impl Debug for ParkedCar","synthetic":false,"types":[]},{"text":"impl Debug for DrivingGoal","synthetic":false,"types":[]},{"text":"impl Debug for SidewalkSpot","synthetic":false,"types":[]},{"text":"impl Debug for SidewalkPOI","synthetic":false,"types":[]},{"text":"impl Debug for TimeInterval","synthetic":false,"types":[]},{"text":"impl Debug for DistanceInterval","synthetic":false,"types":[]},{"text":"impl Debug for CreatePedestrian","synthetic":false,"types":[]},{"text":"impl Debug for CreateCar","synthetic":false,"types":[]}];
|
||||
implementors["traffic_signal_data"] = [{"text":"impl Debug for TrafficSignal","synthetic":false,"types":[]},{"text":"impl Debug for Plan","synthetic":false,"types":[]},{"text":"impl Debug for Stage","synthetic":false,"types":[]},{"text":"impl Debug for StageType","synthetic":false,"types":[]},{"text":"impl Debug for Turn","synthetic":false,"types":[]},{"text":"impl Debug for DirectedRoad","synthetic":false,"types":[]}];
|
||||
implementors["widgetry"] = [{"text":"impl Debug for HorizontalAlignment","synthetic":false,"types":[]},{"text":"impl Debug for VerticalAlignment","synthetic":false,"types":[]},{"text":"impl Debug for Color","synthetic":false,"types":[]},{"text":"impl Debug for Fill","synthetic":false,"types":[]},{"text":"impl Debug for Texture","synthetic":false,"types":[]},{"text":"impl Debug for LinearGradient","synthetic":false,"types":[]},{"text":"impl Debug for Uniforms","synthetic":false,"types":[]},{"text":"impl Debug for Event","synthetic":false,"types":[]},{"text":"impl Debug for Key","synthetic":false,"types":[]},{"text":"impl Debug for MultiKey","synthetic":false,"types":[]},{"text":"impl Debug for UpdateType","synthetic":false,"types":[]},{"text":"impl Debug for GeomBatch","synthetic":false,"types":[]},{"text":"impl Debug for RewriteColor","synthetic":false,"types":[]},{"text":"impl Debug for ScreenPt","synthetic":false,"types":[]},{"text":"impl Debug for ScreenRectangle","synthetic":false,"types":[]},{"text":"impl Debug for ScreenDims","synthetic":false,"types":[]},{"text":"impl Debug for Font","synthetic":false,"types":[]},{"text":"impl Debug for TextSpan","synthetic":false,"types":[]},{"text":"impl Debug for Text","synthetic":false,"types":[]},{"text":"impl<'a> Debug for ButtonBuilder<'a>","synthetic":false,"types":[]},{"text":"impl<'a> Debug for ButtonStateStyle<'a>","synthetic":false,"types":[]},{"text":"impl<'a> Debug for ImageSource<'a>","synthetic":false,"types":[]},{"text":"impl<'a> Debug for Image<'a>","synthetic":false,"types":[]},{"text":"impl Debug for Label","synthetic":false,"types":[]},{"text":"impl Debug for Axis","synthetic":false,"types":[]},{"text":"impl Debug for Stack","synthetic":false,"types":[]},{"text":"impl Debug for Outcome","synthetic":false,"types":[]},{"text":"impl Debug for CornerRounding","synthetic":false,"types":[]},{"text":"impl Debug for EdgeInsets","synthetic":false,"types":[]},{"text":"impl Debug for ControlState","synthetic":false,"types":[]},{"text":"impl Debug for ContentMode","synthetic":false,"types":[]}];
|
||||
implementors["widgetry"] = [{"text":"impl Debug for HorizontalAlignment","synthetic":false,"types":[]},{"text":"impl Debug for VerticalAlignment","synthetic":false,"types":[]},{"text":"impl Debug for Color","synthetic":false,"types":[]},{"text":"impl Debug for Fill","synthetic":false,"types":[]},{"text":"impl Debug for Texture","synthetic":false,"types":[]},{"text":"impl Debug for LinearGradient","synthetic":false,"types":[]},{"text":"impl Debug for Uniforms","synthetic":false,"types":[]},{"text":"impl Debug for Event","synthetic":false,"types":[]},{"text":"impl Debug for Key","synthetic":false,"types":[]},{"text":"impl Debug for MultiKey","synthetic":false,"types":[]},{"text":"impl Debug for UpdateType","synthetic":false,"types":[]},{"text":"impl Debug for Axis","synthetic":false,"types":[]},{"text":"impl Debug for GeomBatchStack","synthetic":false,"types":[]},{"text":"impl Debug for GeomBatch","synthetic":false,"types":[]},{"text":"impl Debug for RewriteColor","synthetic":false,"types":[]},{"text":"impl Debug for ScreenPt","synthetic":false,"types":[]},{"text":"impl Debug for ScreenRectangle","synthetic":false,"types":[]},{"text":"impl Debug for ScreenDims","synthetic":false,"types":[]},{"text":"impl Debug for Font","synthetic":false,"types":[]},{"text":"impl Debug for TextSpan","synthetic":false,"types":[]},{"text":"impl Debug for Text","synthetic":false,"types":[]},{"text":"impl<'a> Debug for ButtonBuilder<'a>","synthetic":false,"types":[]},{"text":"impl<'a> Debug for ButtonStateStyle<'a>","synthetic":false,"types":[]},{"text":"impl<'a> Debug for Image<'a>","synthetic":false,"types":[]},{"text":"impl Debug for Label","synthetic":false,"types":[]},{"text":"impl<'a> Debug for Image<'a>","synthetic":false,"types":[]},{"text":"impl<'a> Debug for ImageSource<'a>","synthetic":false,"types":[]},{"text":"impl Debug for Outcome","synthetic":false,"types":[]},{"text":"impl Debug for CornerRounding","synthetic":false,"types":[]},{"text":"impl Debug for EdgeInsets","synthetic":false,"types":[]},{"text":"impl Debug for ControlState","synthetic":false,"types":[]},{"text":"impl Debug for ContentMode","synthetic":false,"types":[]}];
|
||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
@ -8,5 +8,5 @@ implementors["map_model"] = [{"text":"impl Copy for DrivingSide","synthetic":fal
|
||||
implementors["parking_mapper"] = [{"text":"impl Copy for Show","synthetic":false,"types":[]}];
|
||||
implementors["popdat"] = [{"text":"impl Copy for Activity","synthetic":false,"types":[]}];
|
||||
implementors["sim"] = [{"text":"impl Copy for TripPhaseType","synthetic":false,"types":[]},{"text":"impl Copy for TripPurpose","synthetic":false,"types":[]},{"text":"impl Copy for TripEndpoint","synthetic":false,"types":[]},{"text":"impl Copy for AnyTime","synthetic":false,"types":[]},{"text":"impl Copy for CarStatus","synthetic":false,"types":[]},{"text":"impl Copy for TripMode","synthetic":false,"types":[]},{"text":"impl Copy for CarID","synthetic":false,"types":[]},{"text":"impl Copy for PedestrianID","synthetic":false,"types":[]},{"text":"impl Copy for AgentID","synthetic":false,"types":[]},{"text":"impl Copy for AgentType","synthetic":false,"types":[]},{"text":"impl Copy for TripID","synthetic":false,"types":[]},{"text":"impl Copy for PersonID","synthetic":false,"types":[]},{"text":"impl Copy for OrigPersonID","synthetic":false,"types":[]},{"text":"impl Copy for VehicleType","synthetic":false,"types":[]},{"text":"impl Copy for ParkingSpot","synthetic":false,"types":[]},{"text":"impl Copy for TimeInterval","synthetic":false,"types":[]},{"text":"impl Copy for DistanceInterval","synthetic":false,"types":[]}];
|
||||
implementors["widgetry"] = [{"text":"impl Copy for HorizontalAlignment","synthetic":false,"types":[]},{"text":"impl Copy for VerticalAlignment","synthetic":false,"types":[]},{"text":"impl Copy for Color","synthetic":false,"types":[]},{"text":"impl Copy for Texture","synthetic":false,"types":[]},{"text":"impl Copy for Event","synthetic":false,"types":[]},{"text":"impl Copy for Key","synthetic":false,"types":[]},{"text":"impl Copy for RewriteColor","synthetic":false,"types":[]},{"text":"impl Copy for ScreenPt","synthetic":false,"types":[]},{"text":"impl Copy for ScreenDims","synthetic":false,"types":[]},{"text":"impl Copy for Font","synthetic":false,"types":[]},{"text":"impl Copy for Axis","synthetic":false,"types":[]},{"text":"impl Copy for CornerRounding","synthetic":false,"types":[]},{"text":"impl Copy for EdgeInsets","synthetic":false,"types":[]},{"text":"impl Copy for ControlState","synthetic":false,"types":[]}];
|
||||
implementors["widgetry"] = [{"text":"impl Copy for HorizontalAlignment","synthetic":false,"types":[]},{"text":"impl Copy for VerticalAlignment","synthetic":false,"types":[]},{"text":"impl Copy for Color","synthetic":false,"types":[]},{"text":"impl Copy for Texture","synthetic":false,"types":[]},{"text":"impl Copy for Event","synthetic":false,"types":[]},{"text":"impl Copy for Key","synthetic":false,"types":[]},{"text":"impl Copy for Axis","synthetic":false,"types":[]},{"text":"impl Copy for RewriteColor","synthetic":false,"types":[]},{"text":"impl Copy for ScreenPt","synthetic":false,"types":[]},{"text":"impl Copy for ScreenDims","synthetic":false,"types":[]},{"text":"impl Copy for Font","synthetic":false,"types":[]},{"text":"impl Copy for CornerRounding","synthetic":false,"types":[]},{"text":"impl Copy for EdgeInsets","synthetic":false,"types":[]},{"text":"impl Copy for ControlState","synthetic":false,"types":[]}];
|
||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -13,5 +13,5 @@ implementors["santa"] = [{"text":"impl StructuralPartialEq for Level","synthetic
|
||||
implementors["sim"] = [{"text":"impl StructuralPartialEq for Event","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for AlertLocation","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for TripPhaseType","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for ScenarioModifier","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for StartTripArgs","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for TripSpec","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for TripEndpoint","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for Request","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for Cmd","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for AnyTime","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for CarStatus","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for Router","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for Goal","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for Command","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for CommandType","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for SimpleCommandType","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for Item","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for DelayCause","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for TripLeg","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for TripMode","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for PersonState","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for CarID","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for PedestrianID","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for AgentID","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for AgentType","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for TripID","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for PersonID","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for OrigPersonID","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for VehicleType","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for Vehicle","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for VehicleSpec","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for ParkingSpot","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for ParkedCar","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for DrivingGoal","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for SidewalkSpot","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for SidewalkPOI","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for TimeInterval","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for DistanceInterval","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for CreatePedestrian","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for CreateCar","synthetic":false,"types":[]}];
|
||||
implementors["sumo"] = [{"text":"impl StructuralPartialEq for EdgeID","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for NodeID","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for LaneID","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for InternalLaneID","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for Function","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for VehicleClass","synthetic":false,"types":[]}];
|
||||
implementors["traffic_signal_data"] = [{"text":"impl StructuralPartialEq for TrafficSignal","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for Plan","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for Stage","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for StageType","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for Turn","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for DirectedRoad","synthetic":false,"types":[]}];
|
||||
implementors["widgetry"] = [{"text":"impl StructuralPartialEq for HorizontalAlignment","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for VerticalAlignment","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for Color","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for Fill","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for Texture","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for LinearGradient","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for Event","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for Key","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for MultiKey","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for UpdateType","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for RewriteColor","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for ScreenPt","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for ScreenDims","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for Font","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for Axis","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for Outcome","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for EdgeInsets","synthetic":false,"types":[]}];
|
||||
implementors["widgetry"] = [{"text":"impl StructuralPartialEq for HorizontalAlignment","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for VerticalAlignment","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for Color","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for Fill","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for Texture","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for LinearGradient","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for Event","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for Key","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for MultiKey","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for UpdateType","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for Axis","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for RewriteColor","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for ScreenPt","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for ScreenDims","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for Font","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for Outcome","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for EdgeInsets","synthetic":false,"types":[]}];
|
||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
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 `agents` mod in crate `map_gui`."><meta name="keywords" content="rust, rustlang, rust-lang, agents"><title>map_gui::render::agents - 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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../../map_gui/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Module agents</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><p class="location"><a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">render</a></p><script>window.sidebarCurrent = {name: "agents", ty: "mod", relpath: "../"};</script><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"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/render/agents.rs.html#4-289" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">render</a>::<wbr><a class="mod" href="">agents</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/render/agents.rs.html#4-234" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">render</a>::<wbr><a class="mod" href="">agents</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
||||
<table><tr class="module-item"><td><a class="struct" href="struct.AgentCache.html" title="map_gui::render::agents::AgentCache struct">AgentCache</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.UnzoomedAgents.html" title="map_gui::render::agents::UnzoomedAgents struct">UnzoomedAgents</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_gui";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -34,6 +34,6 @@ sourcesIndex["tests"] = {"name":"","files":["main.rs"]};
|
||||
sourcesIndex["traffic_seitan"] = {"name":"","files":["main.rs"]};
|
||||
sourcesIndex["traffic_signal_data"] = {"name":"","files":["lib.rs"]};
|
||||
sourcesIndex["updater"] = {"name":"","files":["main.rs"]};
|
||||
sourcesIndex["widgetry"] = {"name":"","dirs":[{"name":"style","files":["button_style.rs","mod.rs"]},{"name":"tools","files":["mod.rs","screenshot.rs","warper.rs"]},{"name":"widgets","files":["autocomplete.rs","button.rs","compare_times.rs","containers.rs","dropdown.rs","fan_chart.rs","filler.rs","image.rs","just_draw.rs","line_plot.rs","menu.rs","mod.rs","panel.rs","persistent_split.rs","scatter_plot.rs","slider.rs","spinner.rs","table.rs","text_box.rs","toggle.rs"]}],"files":["app_state.rs","assets.rs","backend_glow.rs","backend_glow_native.rs","canvas.rs","color.rs","drawing.rs","event.rs","event_ctx.rs","geom.rs","input.rs","lib.rs","runner.rs","screen_geom.rs","svg.rs","text.rs"]};
|
||||
sourcesIndex["widgetry"] = {"name":"","dirs":[{"name":"geom","files":["geom_batch_stack.rs","mod.rs"]},{"name":"style","files":["button_style.rs","mod.rs"]},{"name":"tools","files":["mod.rs","screenshot.rs","warper.rs"]},{"name":"widgets","files":["autocomplete.rs","button.rs","compare_times.rs","containers.rs","dropdown.rs","fan_chart.rs","filler.rs","image.rs","just_draw.rs","line_plot.rs","menu.rs","mod.rs","panel.rs","persistent_split.rs","scatter_plot.rs","slider.rs","spinner.rs","table.rs","text_box.rs","toggle.rs"]}],"files":["app_state.rs","assets.rs","backend_glow.rs","backend_glow_native.rs","canvas.rs","color.rs","drawing.rs","event.rs","event_ctx.rs","input.rs","lib.rs","runner.rs","screen_geom.rs","svg.rs","text.rs"]};
|
||||
sourcesIndex["widgetry_demo"] = {"name":"","files":["lib.rs"]};
|
||||
createSourceSidebar();
|
||||
|
@ -1580,7 +1580,7 @@
|
||||
<span class="ident">map</span>,
|
||||
<span class="ident">draw_map</span>,
|
||||
<span class="ident">sim</span>,
|
||||
<span class="ident">agents</span>: <span class="ident">RefCell</span>::<span class="ident">new</span>(<span class="ident">AgentCache</span>::<span class="ident">new</span>(<span class="ident">cs</span>)),
|
||||
<span class="ident">agents</span>: <span class="ident">RefCell</span>::<span class="ident">new</span>(<span class="ident">AgentCache</span>::<span class="ident">new</span>()),
|
||||
<span class="ident">current_selection</span>: <span class="prelude-val">None</span>,
|
||||
<span class="ident">current_flags</span>: <span class="ident">flags</span>,
|
||||
<span class="ident">last_warped_from</span>: <span class="prelude-val">None</span>,
|
||||
|
@ -122,7 +122,7 @@
|
||||
<span class="doccomment">/// The output of `rustdoc -V`</span>
|
||||
<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">"rustdoc 1.50.0 (cb75ad5db 2021-02-10)"</span>;
|
||||
<span class="doccomment">/// The built-time in RFC2822, UTC</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">"Wed, 17 Mar 2021 01:17:41 +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">"Wed, 17 Mar 2021 01:37:34 +0000"</span>;
|
||||
<span class="doccomment">/// The target architecture, given by `cfg!(target_arch)`.</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">"x86_64"</span>;
|
||||
<span class="doccomment">/// The endianness, given by `cfg!(target_endian)`.</span>
|
||||
|
@ -233,12 +233,112 @@
|
||||
<span id="230">230</span>
|
||||
<span id="231">231</span>
|
||||
<span id="232">232</span>
|
||||
<span id="233">233</span>
|
||||
<span id="234">234</span>
|
||||
<span id="235">235</span>
|
||||
<span id="236">236</span>
|
||||
<span id="237">237</span>
|
||||
<span id="238">238</span>
|
||||
<span id="239">239</span>
|
||||
<span id="240">240</span>
|
||||
<span id="241">241</span>
|
||||
<span id="242">242</span>
|
||||
<span id="243">243</span>
|
||||
<span id="244">244</span>
|
||||
<span id="245">245</span>
|
||||
<span id="246">246</span>
|
||||
<span id="247">247</span>
|
||||
<span id="248">248</span>
|
||||
<span id="249">249</span>
|
||||
<span id="250">250</span>
|
||||
<span id="251">251</span>
|
||||
<span id="252">252</span>
|
||||
<span id="253">253</span>
|
||||
<span id="254">254</span>
|
||||
<span id="255">255</span>
|
||||
<span id="256">256</span>
|
||||
<span id="257">257</span>
|
||||
<span id="258">258</span>
|
||||
<span id="259">259</span>
|
||||
<span id="260">260</span>
|
||||
<span id="261">261</span>
|
||||
<span id="262">262</span>
|
||||
<span id="263">263</span>
|
||||
<span id="264">264</span>
|
||||
<span id="265">265</span>
|
||||
<span id="266">266</span>
|
||||
<span id="267">267</span>
|
||||
<span id="268">268</span>
|
||||
<span id="269">269</span>
|
||||
<span id="270">270</span>
|
||||
<span id="271">271</span>
|
||||
<span id="272">272</span>
|
||||
<span id="273">273</span>
|
||||
<span id="274">274</span>
|
||||
<span id="275">275</span>
|
||||
<span id="276">276</span>
|
||||
<span id="277">277</span>
|
||||
<span id="278">278</span>
|
||||
<span id="279">279</span>
|
||||
<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>
|
||||
<span id="326">326</span>
|
||||
<span id="327">327</span>
|
||||
<span id="328">328</span>
|
||||
<span id="329">329</span>
|
||||
<span id="330">330</span>
|
||||
<span id="331">331</span>
|
||||
<span id="332">332</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="kw">use</span> <span class="ident">abstutil</span>::<span class="ident">prettyprint_usize</span>;
|
||||
<span class="kw">use</span> <span class="ident">map_gui</span>::<span class="ident">tools</span>::{<span class="ident">MinimapControls</span>, <span class="ident">Navigator</span>};
|
||||
<span class="kw">use</span> <span class="ident">widgetry</span>::{
|
||||
<span class="ident">ControlState</span>, <span class="ident">EventCtx</span>, <span class="ident">GfxCtx</span>, <span class="ident">HorizontalAlignment</span>, <span class="ident">Image</span>, <span class="ident">Key</span>, <span class="ident">Line</span>, <span class="ident">Panel</span>, <span class="ident">ScreenDims</span>, <span class="ident">Text</span>,
|
||||
<span class="ident">TextExt</span>, <span class="ident">VerticalAlignment</span>, <span class="ident">Widget</span>,
|
||||
<span class="ident">VerticalAlignment</span>, <span class="ident">Widget</span>,
|
||||
};
|
||||
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">app</span>::<span class="ident">App</span>;
|
||||
@ -267,13 +367,16 @@
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">make_unzoomed_panel</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&</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="op">-</span><span class="op">></span> <span class="ident">Panel</span> {
|
||||
<span class="kw">let</span> <span class="ident">unzoomed_agents</span> <span class="op">=</span> <span class="kw-2">&</span><span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">agents</span>.<span class="ident">borrow</span>().<span class="ident">unzoomed_agents</span>;
|
||||
<span class="kw">let</span> <span class="ident">is_enabled</span> <span class="op">=</span> [
|
||||
<span class="ident">unzoomed_agents</span>.<span class="ident">cars</span>(),
|
||||
<span class="ident">unzoomed_agents</span>.<span class="ident">bikes</span>(),
|
||||
<span class="ident">unzoomed_agents</span>.<span class="ident">buses_and_trains</span>(),
|
||||
<span class="ident">unzoomed_agents</span>.<span class="ident">peds</span>(),
|
||||
];
|
||||
<span class="ident">Panel</span>::<span class="ident">new</span>(<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">make_tool_panel</span>(<span class="ident">ctx</span>, <span class="ident">app</span>).<span class="ident">align_right</span>(),
|
||||
<span class="ident">app</span>.<span class="ident">primary</span>
|
||||
.<span class="ident">agents</span>
|
||||
.<span class="ident">borrow</span>()
|
||||
.<span class="ident">unzoomed_agents</span>
|
||||
.<span class="ident">make_vert_viz_panel</span>(<span class="ident">ctx</span>, <span class="ident">agent_counters</span>(<span class="ident">ctx</span>, <span class="ident">app</span>))
|
||||
<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="ident">make_agent_toggles</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">is_enabled</span>))
|
||||
.<span class="ident">bg</span>(<span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">panel_bg</span>)
|
||||
.<span class="ident">padding</span>(<span class="number">16</span>),
|
||||
]))
|
||||
@ -284,12 +387,19 @@
|
||||
.<span class="ident">build_custom</span>(<span class="ident">ctx</span>)
|
||||
}
|
||||
<span class="kw">fn</span> <span class="ident">make_legend</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&</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="op">-</span><span class="op">></span> <span class="ident">Widget</span> {
|
||||
<span class="ident">app</span>.<span class="ident">primary</span>
|
||||
.<span class="ident">agents</span>
|
||||
.<span class="ident">borrow</span>()
|
||||
.<span class="ident">unzoomed_agents</span>
|
||||
.<span class="ident">make_horiz_viz_panel</span>(<span class="ident">ctx</span>, <span class="ident">agent_counters</span>(<span class="ident">ctx</span>, <span class="ident">app</span>))
|
||||
<span class="kw">let</span> <span class="ident">unzoomed_agents</span> <span class="op">=</span> <span class="kw-2">&</span><span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">agents</span>.<span class="ident">borrow</span>().<span class="ident">unzoomed_agents</span>;
|
||||
<span class="kw">let</span> <span class="ident">is_enabled</span> <span class="op">=</span> [
|
||||
<span class="ident">unzoomed_agents</span>.<span class="ident">cars</span>(),
|
||||
<span class="ident">unzoomed_agents</span>.<span class="ident">bikes</span>(),
|
||||
<span class="ident">unzoomed_agents</span>.<span class="ident">buses_and_trains</span>(),
|
||||
<span class="ident">unzoomed_agents</span>.<span class="ident">peds</span>(),
|
||||
];
|
||||
|
||||
<span class="ident">Widget</span>::<span class="ident">custom_row</span>(<span class="ident">make_agent_toggles</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">is_enabled</span>))
|
||||
<span class="comment">// nudge to left-align with the map edge</span>
|
||||
.<span class="ident">margin_left</span>(<span class="number">26</span>)
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">make_zoomed_side_panel</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&</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="op">-</span><span class="op">></span> <span class="ident">Widget</span> {
|
||||
<span class="ident">make_tool_panel</span>(<span class="ident">ctx</span>, <span class="ident">app</span>)
|
||||
}
|
||||
@ -337,94 +447,184 @@
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">agent_counters</span>(<span class="ident">ctx</span>: <span class="kw-2">&</span><span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&</span><span class="ident">App</span>) <span class="op">-</span><span class="op">></span> (<span class="ident">Widget</span>, <span class="ident">Widget</span>, <span class="ident">Widget</span>, <span class="ident">Widget</span>) {
|
||||
<span class="doccomment">/// `is_enabled`: are (car, bike, bus, pedestrian) toggles enabled</span>
|
||||
<span class="doccomment">/// returns Widgets for (car, bike, bus, pedestrian)</span>
|
||||
<span class="kw">fn</span> <span class="ident">make_agent_toggles</span>(<span class="ident">ctx</span>: <span class="kw-2">&</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">is_enabled</span>: [<span class="ident">bool</span>; <span class="number">4</span>]) <span class="op">-</span><span class="op">></span> <span class="ident">Vec</span><span class="op"><</span><span class="ident">Widget</span><span class="op">></span> {
|
||||
<span class="kw">use</span> <span class="ident">widgetry</span>::{<span class="ident">include_labeled_bytes</span>, <span class="ident">Color</span>, <span class="ident">GeomBatchStack</span>, <span class="ident">RewriteColor</span>, <span class="ident">Toggle</span>};
|
||||
<span class="kw">let</span> [<span class="ident">is_car_enabled</span>, <span class="ident">is_bike_enabled</span>, <span class="ident">is_bus_enabled</span>, <span class="ident">is_pedestrian_enabled</span>] <span class="op">=</span> <span class="ident">is_enabled</span>;
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">colored_checkbox</span>(
|
||||
<span class="ident">ctx</span>: <span class="kw-2">&</span><span class="ident">EventCtx</span>,
|
||||
<span class="ident">action</span>: <span class="kw-2">&</span><span class="ident">str</span>,
|
||||
<span class="ident">is_enabled</span>: <span class="ident">bool</span>,
|
||||
<span class="ident">color</span>: <span class="ident">Color</span>,
|
||||
<span class="ident">icon</span>: <span class="kw-2">&</span><span class="ident">str</span>,
|
||||
<span class="ident">label</span>: <span class="kw-2">&</span><span class="ident">str</span>,
|
||||
<span class="ident">tooltip</span>: <span class="ident">Text</span>,
|
||||
) <span class="op">-</span><span class="op">></span> <span class="ident">Widget</span> {
|
||||
<span class="kw">let</span> <span class="ident">buttons</span> <span class="op">=</span> <span class="ident">ctx</span>
|
||||
.<span class="ident">style</span>()
|
||||
.<span class="ident">btn_plain</span>
|
||||
.<span class="ident">btn</span>()
|
||||
.<span class="ident">label_text</span>(<span class="ident">label</span>)
|
||||
.<span class="ident">padding</span>(<span class="number">4.0</span>)
|
||||
.<span class="ident">tooltip</span>(<span class="ident">tooltip</span>)
|
||||
.<span class="ident">image_color</span>(<span class="ident">RewriteColor</span>::<span class="ident">NoOp</span>, <span class="ident">ControlState</span>::<span class="ident">Default</span>);
|
||||
|
||||
<span class="kw">let</span> <span class="ident">icon_batch</span> <span class="op">=</span> <span class="ident">Image</span>::<span class="ident">icon</span>(<span class="ident">icon</span>).<span class="ident">batch</span>(<span class="ident">ctx</span>).<span class="number">0</span>;
|
||||
<span class="kw">let</span> <span class="ident">false_btn</span> <span class="op">=</span> {
|
||||
<span class="kw">let</span> <span class="ident">checkbox</span> <span class="op">=</span> <span class="ident">Image</span>::<span class="ident">bytes</span>(<span class="macro">include_labeled_bytes</span><span class="macro">!</span>(
|
||||
<span class="string">"../../../widgetry/icons/checkbox_no_border_unchecked.svg"</span>
|
||||
))
|
||||
.<span class="ident">color</span>(<span class="ident">RewriteColor</span>::<span class="ident">Change</span>(<span class="ident">Color</span>::<span class="ident">BLACK</span>, <span class="ident">color</span>.<span class="ident">alpha</span>(<span class="number">0.3</span>)));
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">row</span> <span class="op">=</span>
|
||||
<span class="ident">GeomBatchStack</span>::<span class="ident">horizontal</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="ident">checkbox</span>.<span class="ident">batch</span>(<span class="ident">ctx</span>).<span class="number">0</span>, <span class="ident">icon_batch</span>.<span class="ident">clone</span>()]);
|
||||
<span class="ident">row</span>.<span class="ident">spacing</span>(<span class="number">8.0</span>);
|
||||
|
||||
<span class="kw">let</span> <span class="ident">row_batch</span> <span class="op">=</span> <span class="ident">row</span>.<span class="ident">batch</span>();
|
||||
<span class="kw">let</span> <span class="ident">bounds</span> <span class="op">=</span> <span class="ident">row_batch</span>.<span class="ident">get_bounds</span>();
|
||||
<span class="ident">buttons</span>.<span class="ident">clone</span>().<span class="ident">image_batch</span>(<span class="ident">row_batch</span>, <span class="ident">bounds</span>)
|
||||
};
|
||||
|
||||
<span class="comment">// For typical checkboxes buttons, the checkbox *is* the image, but for the agent toggles</span>
|
||||
<span class="comment">// we need both a checkbox *and* an additional icon. To do that, we combine the checkbox</span>
|
||||
<span class="comment">// and icon into a single batch, and use that combined batch as the button's image.</span>
|
||||
<span class="kw">let</span> <span class="ident">true_btn</span> <span class="op">=</span> {
|
||||
<span class="kw">let</span> <span class="ident">checkbox</span> <span class="op">=</span> <span class="ident">Image</span>::<span class="ident">bytes</span>(<span class="macro">include_labeled_bytes</span><span class="macro">!</span>(
|
||||
<span class="string">"../../../widgetry/icons/checkbox_no_border_checked.svg"</span>
|
||||
))
|
||||
.<span class="ident">color</span>(<span class="ident">RewriteColor</span>::<span class="ident">Change</span>(<span class="ident">Color</span>::<span class="ident">BLACK</span>, <span class="ident">color</span>));
|
||||
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">row</span> <span class="op">=</span> <span class="ident">GeomBatchStack</span>::<span class="ident">horizontal</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="ident">checkbox</span>.<span class="ident">batch</span>(<span class="ident">ctx</span>).<span class="number">0</span>, <span class="ident">icon_batch</span>]);
|
||||
<span class="ident">row</span>.<span class="ident">spacing</span>(<span class="number">8.0</span>);
|
||||
|
||||
<span class="kw">let</span> <span class="ident">row_batch</span> <span class="op">=</span> <span class="ident">row</span>.<span class="ident">batch</span>();
|
||||
<span class="kw">let</span> <span class="ident">bounds</span> <span class="op">=</span> <span class="ident">row_batch</span>.<span class="ident">get_bounds</span>();
|
||||
<span class="ident">buttons</span>.<span class="ident">image_batch</span>(<span class="ident">row_batch</span>, <span class="ident">bounds</span>)
|
||||
};
|
||||
|
||||
<span class="ident">Toggle</span>::<span class="ident">new</span>(
|
||||
<span class="ident">is_enabled</span>,
|
||||
<span class="ident">false_btn</span>.<span class="ident">build</span>(<span class="ident">ctx</span>, <span class="ident">action</span>),
|
||||
<span class="ident">true_btn</span>.<span class="ident">build</span>(<span class="ident">ctx</span>, <span class="ident">action</span>),
|
||||
)
|
||||
.<span class="ident">named</span>(<span class="ident">action</span>)
|
||||
.<span class="ident">container</span>()
|
||||
<span class="comment">// avoid horizontal resize jitter as numbers fluctuate</span>
|
||||
.<span class="ident">force_width</span>(<span class="number">137.0</span>)
|
||||
}
|
||||
|
||||
<span class="kw">let</span> <span class="ident">counts</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">sim</span>.<span class="ident">num_commuters_vehicles</span>();
|
||||
|
||||
<span class="kw">let</span> <span class="ident">pedestrian_details</span> <span class="op">=</span> <span class="ident">Widget</span>::<span class="ident">custom_row</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Image</span>::<span class="ident">icon</span>(<span class="string">"system/assets/meters/pedestrian.svg"</span>)
|
||||
.<span class="ident">tooltip</span>(<span class="ident">Text</span>::<span class="ident">from_multiline</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Line</span>(<span class="string">"Pedestrians"</span>),
|
||||
<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(
|
||||
<span class="string">"Walking commuters: {}"</span>,
|
||||
<span class="ident">prettyprint_usize</span>(<span class="ident">counts</span>.<span class="ident">walking_commuters</span>)
|
||||
))
|
||||
.<span class="ident">secondary</span>(),
|
||||
<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(
|
||||
<span class="string">"To/from public transit: {}"</span>,
|
||||
<span class="ident">prettyprint_usize</span>(<span class="ident">counts</span>.<span class="ident">walking_to_from_transit</span>)
|
||||
))
|
||||
.<span class="ident">secondary</span>(),
|
||||
<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(
|
||||
<span class="string">"To/from a car: {}"</span>,
|
||||
<span class="ident">prettyprint_usize</span>(<span class="ident">counts</span>.<span class="ident">walking_to_from_car</span>)
|
||||
))
|
||||
.<span class="ident">secondary</span>(),
|
||||
<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(
|
||||
<span class="string">"To/from a bike: {}"</span>,
|
||||
<span class="ident">prettyprint_usize</span>(<span class="ident">counts</span>.<span class="ident">walking_to_from_bike</span>)
|
||||
))
|
||||
.<span class="ident">secondary</span>(),
|
||||
]))
|
||||
.<span class="ident">into_widget</span>(<span class="ident">ctx</span>)
|
||||
.<span class="ident">margin_right</span>(<span class="number">5</span>),
|
||||
<span class="ident">prettyprint_usize</span>(
|
||||
<span class="kw">let</span> <span class="ident">pedestrian_details</span> <span class="op">=</span> {
|
||||
<span class="kw">let</span> <span class="ident">tooltip</span> <span class="op">=</span> <span class="ident">Text</span>::<span class="ident">from_multiline</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Line</span>(<span class="string">"Pedestrians"</span>),
|
||||
<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(
|
||||
<span class="string">"Walking commuters: {}"</span>,
|
||||
<span class="ident">prettyprint_usize</span>(<span class="ident">counts</span>.<span class="ident">walking_commuters</span>)
|
||||
))
|
||||
.<span class="ident">secondary</span>(),
|
||||
<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(
|
||||
<span class="string">"To/from public transit: {}"</span>,
|
||||
<span class="ident">prettyprint_usize</span>(<span class="ident">counts</span>.<span class="ident">walking_to_from_transit</span>)
|
||||
))
|
||||
.<span class="ident">secondary</span>(),
|
||||
<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(
|
||||
<span class="string">"To/from a car: {}"</span>,
|
||||
<span class="ident">prettyprint_usize</span>(<span class="ident">counts</span>.<span class="ident">walking_to_from_car</span>)
|
||||
))
|
||||
.<span class="ident">secondary</span>(),
|
||||
<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(
|
||||
<span class="string">"To/from a bike: {}"</span>,
|
||||
<span class="ident">prettyprint_usize</span>(<span class="ident">counts</span>.<span class="ident">walking_to_from_bike</span>)
|
||||
))
|
||||
.<span class="ident">secondary</span>(),
|
||||
]);
|
||||
|
||||
<span class="kw">let</span> <span class="ident">count</span> <span class="op">=</span> <span class="ident">prettyprint_usize</span>(
|
||||
<span class="ident">counts</span>.<span class="ident">walking_commuters</span>
|
||||
<span class="op">+</span> <span class="ident">counts</span>.<span class="ident">walking_to_from_transit</span>
|
||||
<span class="op">+</span> <span class="ident">counts</span>.<span class="ident">walking_to_from_car</span>
|
||||
<span class="op">+</span> <span class="ident">counts</span>.<span class="ident">walking_to_from_bike</span>,
|
||||
);
|
||||
|
||||
<span class="ident">colored_checkbox</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="string">"Walk"</span>,
|
||||
<span class="ident">is_pedestrian_enabled</span>,
|
||||
<span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">unzoomed_pedestrian</span>,
|
||||
<span class="string">"system/assets/meters/pedestrian.svg"</span>,
|
||||
<span class="kw-2">&</span><span class="ident">count</span>,
|
||||
<span class="ident">tooltip</span>,
|
||||
)
|
||||
.<span class="ident">text_widget</span>(<span class="ident">ctx</span>),
|
||||
]);
|
||||
};
|
||||
|
||||
<span class="kw">let</span> <span class="ident">bike_details</span> <span class="op">=</span> <span class="ident">Widget</span>::<span class="ident">custom_row</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Image</span>::<span class="ident">icon</span>(<span class="string">"system/assets/meters/bike.svg"</span>)
|
||||
.<span class="ident">tooltip</span>(<span class="ident">Text</span>::<span class="ident">from_multiline</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Line</span>(<span class="string">"Cyclists"</span>),
|
||||
<span class="ident">Line</span>(<span class="ident">prettyprint_usize</span>(<span class="ident">counts</span>.<span class="ident">cyclists</span>)).<span class="ident">secondary</span>(),
|
||||
]))
|
||||
.<span class="ident">into_widget</span>(<span class="ident">ctx</span>)
|
||||
.<span class="ident">margin_right</span>(<span class="number">5</span>),
|
||||
<span class="ident">prettyprint_usize</span>(<span class="ident">counts</span>.<span class="ident">cyclists</span>).<span class="ident">text_widget</span>(<span class="ident">ctx</span>),
|
||||
]);
|
||||
<span class="kw">let</span> <span class="ident">bike_details</span> <span class="op">=</span> {
|
||||
<span class="kw">let</span> <span class="ident">tooltip</span> <span class="op">=</span> <span class="ident">Text</span>::<span class="ident">from_multiline</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Line</span>(<span class="string">"Cyclists"</span>),
|
||||
<span class="ident">Line</span>(<span class="ident">prettyprint_usize</span>(<span class="ident">counts</span>.<span class="ident">cyclists</span>)).<span class="ident">secondary</span>(),
|
||||
]);
|
||||
|
||||
<span class="kw">let</span> <span class="ident">car_details</span> <span class="op">=</span> <span class="ident">Widget</span>::<span class="ident">custom_row</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Image</span>::<span class="ident">icon</span>(<span class="string">"system/assets/meters/car.svg"</span>)
|
||||
.<span class="ident">tooltip</span>(<span class="ident">Text</span>::<span class="ident">from_multiline</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Line</span>(<span class="string">"Cars"</span>),
|
||||
<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(
|
||||
<span class="string">"Single-occupancy vehicles: {}"</span>,
|
||||
<span class="ident">prettyprint_usize</span>(<span class="ident">counts</span>.<span class="ident">sov_drivers</span>)
|
||||
))
|
||||
.<span class="ident">secondary</span>(),
|
||||
]))
|
||||
.<span class="ident">into_widget</span>(<span class="ident">ctx</span>)
|
||||
.<span class="ident">margin_right</span>(<span class="number">5</span>),
|
||||
<span class="ident">prettyprint_usize</span>(<span class="ident">counts</span>.<span class="ident">sov_drivers</span>).<span class="ident">text_widget</span>(<span class="ident">ctx</span>),
|
||||
]);
|
||||
<span class="ident">colored_checkbox</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="string">"Bike"</span>,
|
||||
<span class="ident">is_bike_enabled</span>,
|
||||
<span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">unzoomed_bike</span>,
|
||||
<span class="string">"system/assets/meters/bike.svg"</span>,
|
||||
<span class="kw-2">&</span><span class="ident">prettyprint_usize</span>(<span class="ident">counts</span>.<span class="ident">cyclists</span>),
|
||||
<span class="ident">tooltip</span>,
|
||||
)
|
||||
};
|
||||
|
||||
<span class="kw">let</span> <span class="ident">bus_details</span> <span class="op">=</span> <span class="ident">Widget</span>::<span class="ident">custom_row</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Image</span>::<span class="ident">icon</span>(<span class="string">"system/assets/meters/bus.svg"</span>)
|
||||
.<span class="ident">tooltip</span>(<span class="ident">Text</span>::<span class="ident">from_multiline</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Line</span>(<span class="string">"Public transit"</span>),
|
||||
<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(
|
||||
<span class="string">"{} passengers on {} buses"</span>,
|
||||
<span class="ident">prettyprint_usize</span>(<span class="ident">counts</span>.<span class="ident">bus_riders</span>),
|
||||
<span class="ident">prettyprint_usize</span>(<span class="ident">counts</span>.<span class="ident">buses</span>)
|
||||
))
|
||||
.<span class="ident">secondary</span>(),
|
||||
<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(
|
||||
<span class="string">"{} passengers on {} trains"</span>,
|
||||
<span class="ident">prettyprint_usize</span>(<span class="ident">counts</span>.<span class="ident">train_riders</span>),
|
||||
<span class="ident">prettyprint_usize</span>(<span class="ident">counts</span>.<span class="ident">trains</span>)
|
||||
))
|
||||
.<span class="ident">secondary</span>(),
|
||||
]))
|
||||
.<span class="ident">into_widget</span>(<span class="ident">ctx</span>)
|
||||
.<span class="ident">margin_right</span>(<span class="number">5</span>),
|
||||
<span class="ident">prettyprint_usize</span>(<span class="ident">counts</span>.<span class="ident">bus_riders</span> <span class="op">+</span> <span class="ident">counts</span>.<span class="ident">train_riders</span>).<span class="ident">text_widget</span>(<span class="ident">ctx</span>),
|
||||
]);
|
||||
<span class="kw">let</span> <span class="ident">car_details</span> <span class="op">=</span> {
|
||||
<span class="kw">let</span> <span class="ident">tooltip</span> <span class="op">=</span> <span class="ident">Text</span>::<span class="ident">from_multiline</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Line</span>(<span class="string">"Cars"</span>),
|
||||
<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(
|
||||
<span class="string">"Single-occupancy vehicles: {}"</span>,
|
||||
<span class="ident">prettyprint_usize</span>(<span class="ident">counts</span>.<span class="ident">sov_drivers</span>)
|
||||
))
|
||||
.<span class="ident">secondary</span>(),
|
||||
]);
|
||||
<span class="ident">colored_checkbox</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="string">"Car"</span>,
|
||||
<span class="ident">is_car_enabled</span>,
|
||||
<span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">unzoomed_car</span>,
|
||||
<span class="string">"system/assets/meters/car.svg"</span>,
|
||||
<span class="kw-2">&</span><span class="ident">prettyprint_usize</span>(<span class="ident">counts</span>.<span class="ident">sov_drivers</span>),
|
||||
<span class="ident">tooltip</span>,
|
||||
)
|
||||
};
|
||||
|
||||
(<span class="ident">car_details</span>, <span class="ident">bike_details</span>, <span class="ident">bus_details</span>, <span class="ident">pedestrian_details</span>)
|
||||
<span class="kw">let</span> <span class="ident">bus_details</span> <span class="op">=</span> {
|
||||
<span class="kw">let</span> <span class="ident">tooltip</span> <span class="op">=</span> <span class="ident">Text</span>::<span class="ident">from_multiline</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Line</span>(<span class="string">"Public transit"</span>),
|
||||
<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(
|
||||
<span class="string">"{} passengers on {} buses"</span>,
|
||||
<span class="ident">prettyprint_usize</span>(<span class="ident">counts</span>.<span class="ident">bus_riders</span>),
|
||||
<span class="ident">prettyprint_usize</span>(<span class="ident">counts</span>.<span class="ident">buses</span>)
|
||||
))
|
||||
.<span class="ident">secondary</span>(),
|
||||
<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(
|
||||
<span class="string">"{} passengers on {} trains"</span>,
|
||||
<span class="ident">prettyprint_usize</span>(<span class="ident">counts</span>.<span class="ident">train_riders</span>),
|
||||
<span class="ident">prettyprint_usize</span>(<span class="ident">counts</span>.<span class="ident">trains</span>)
|
||||
))
|
||||
.<span class="ident">secondary</span>(),
|
||||
]);
|
||||
|
||||
<span class="ident">colored_checkbox</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="string">"Bus"</span>,
|
||||
<span class="ident">is_bus_enabled</span>,
|
||||
<span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">unzoomed_bus</span>,
|
||||
<span class="string">"system/assets/meters/bus.svg"</span>,
|
||||
<span class="kw-2">&</span><span class="ident">prettyprint_usize</span>(<span class="ident">counts</span>.<span class="ident">bus_riders</span> <span class="op">+</span> <span class="ident">counts</span>.<span class="ident">train_riders</span>),
|
||||
<span class="ident">tooltip</span>,
|
||||
)
|
||||
};
|
||||
|
||||
<span class="macro">vec</span><span class="macro">!</span>[<span class="ident">car_details</span>, <span class="ident">bike_details</span>, <span class="ident">bus_details</span>, <span class="ident">pedestrian_details</span>]
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">make_tool_panel</span>(<span class="ident">ctx</span>: <span class="kw-2">&</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="op">-</span><span class="op">></span> <span class="ident">Widget</span> {
|
||||
|
@ -936,7 +936,7 @@
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">on_destroy</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="kw">_</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">App</span>) {
|
||||
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">layer</span> <span class="op">=</span> <span class="prelude-val">None</span>;
|
||||
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">agents</span>.<span class="ident">borrow_mut</span>().<span class="ident">unzoomed_agents</span> <span class="op">=</span> <span class="ident">UnzoomedAgents</span>::<span class="ident">new</span>(<span class="kw-2">&</span><span class="ident">app</span>.<span class="ident">cs</span>);
|
||||
<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">agents</span>.<span class="ident">borrow_mut</span>().<span class="ident">unzoomed_agents</span> <span class="op">=</span> <span class="ident">UnzoomedAgents</span>::<span class="ident">new</span>();
|
||||
<span class="self">self</span>.<span class="ident">gameplay</span>.<span class="ident">on_destroy</span>(<span class="ident">app</span>);
|
||||
}
|
||||
}
|
||||
|
@ -235,61 +235,6 @@
|
||||
<span id="232">232</span>
|
||||
<span id="233">233</span>
|
||||
<span id="234">234</span>
|
||||
<span id="235">235</span>
|
||||
<span id="236">236</span>
|
||||
<span id="237">237</span>
|
||||
<span id="238">238</span>
|
||||
<span id="239">239</span>
|
||||
<span id="240">240</span>
|
||||
<span id="241">241</span>
|
||||
<span id="242">242</span>
|
||||
<span id="243">243</span>
|
||||
<span id="244">244</span>
|
||||
<span id="245">245</span>
|
||||
<span id="246">246</span>
|
||||
<span id="247">247</span>
|
||||
<span id="248">248</span>
|
||||
<span id="249">249</span>
|
||||
<span id="250">250</span>
|
||||
<span id="251">251</span>
|
||||
<span id="252">252</span>
|
||||
<span id="253">253</span>
|
||||
<span id="254">254</span>
|
||||
<span id="255">255</span>
|
||||
<span id="256">256</span>
|
||||
<span id="257">257</span>
|
||||
<span id="258">258</span>
|
||||
<span id="259">259</span>
|
||||
<span id="260">260</span>
|
||||
<span id="261">261</span>
|
||||
<span id="262">262</span>
|
||||
<span id="263">263</span>
|
||||
<span id="264">264</span>
|
||||
<span id="265">265</span>
|
||||
<span id="266">266</span>
|
||||
<span id="267">267</span>
|
||||
<span id="268">268</span>
|
||||
<span id="269">269</span>
|
||||
<span id="270">270</span>
|
||||
<span id="271">271</span>
|
||||
<span id="272">272</span>
|
||||
<span id="273">273</span>
|
||||
<span id="274">274</span>
|
||||
<span id="275">275</span>
|
||||
<span id="276">276</span>
|
||||
<span id="277">277</span>
|
||||
<span id="278">278</span>
|
||||
<span id="279">279</span>
|
||||
<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>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="comment">// TODO I've considered moving this out of map_gui completely, to remove all dependencies on the</span>
|
||||
<span class="comment">// sim crate. If that's desirable, get_obj in DrawMap is the only dependency.</span>
|
||||
@ -302,7 +247,7 @@
|
||||
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Circle</span>, <span class="ident">Pt2D</span>, <span class="ident">Time</span>};
|
||||
<span class="kw">use</span> <span class="ident">map_model</span>::{<span class="ident">Map</span>, <span class="ident">Traversable</span>};
|
||||
<span class="kw">use</span> <span class="ident">sim</span>::{<span class="ident">AgentID</span>, <span class="ident">Sim</span>, <span class="ident">UnzoomedAgent</span>, <span class="ident">VehicleType</span>};
|
||||
<span class="kw">use</span> <span class="ident">widgetry</span>::{<span class="ident">Color</span>, <span class="ident">Drawable</span>, <span class="ident">EventCtx</span>, <span class="ident">GeomBatch</span>, <span class="ident">GfxCtx</span>, <span class="ident">Panel</span>, <span class="ident">Prerender</span>, <span class="ident">Toggle</span>, <span class="ident">Widget</span>};
|
||||
<span class="kw">use</span> <span class="ident">widgetry</span>::{<span class="ident">Color</span>, <span class="ident">Drawable</span>, <span class="ident">GeomBatch</span>, <span class="ident">GfxCtx</span>, <span class="ident">Panel</span>, <span class="ident">Prerender</span>};
|
||||
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">colors</span>::<span class="ident">ColorScheme</span>;
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">render</span>::{
|
||||
@ -323,9 +268,9 @@
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">AgentCache</span> {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">cs</span>: <span class="kw-2">&</span><span class="ident">ColorScheme</span>) <span class="op">-</span><span class="op">></span> <span class="ident">AgentCache</span> {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>() <span class="op">-</span><span class="op">></span> <span class="ident">AgentCache</span> {
|
||||
<span class="ident">AgentCache</span> {
|
||||
<span class="ident">unzoomed_agents</span>: <span class="ident">UnzoomedAgents</span>::<span class="ident">new</span>(<span class="ident">cs</span>),
|
||||
<span class="ident">unzoomed_agents</span>: <span class="ident">UnzoomedAgents</span>::<span class="ident">new</span>(),
|
||||
<span class="ident">time</span>: <span class="prelude-val">None</span>,
|
||||
<span class="ident">agents_per_on</span>: <span class="ident">HashMap</span>::<span class="ident">new</span>(),
|
||||
<span class="ident">unzoomed</span>: <span class="prelude-val">None</span>,
|
||||
@ -405,7 +350,7 @@
|
||||
<span class="ident">Circle</span>::<span class="ident">new</span>(<span class="ident">Pt2D</span>::<span class="ident">new</span>(<span class="number">0.0</span>, <span class="number">0.0</span>), <span class="ident">unzoomed_agent_radius</span>(<span class="prelude-val">None</span>)).<span class="ident">to_polygon</span>();
|
||||
|
||||
<span class="kw">for</span> <span class="ident">agent</span> <span class="kw">in</span> <span class="ident">app</span>.<span class="ident">sim</span>().<span class="ident">get_unzoomed_agents</span>(<span class="ident">app</span>.<span class="ident">map</span>()) {
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="kw-2">mut</span> <span class="ident">color</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">unzoomed_agents</span>.<span class="ident">color</span>(<span class="kw-2">&</span><span class="ident">agent</span>) {
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="kw-2">mut</span> <span class="ident">color</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">unzoomed_agents</span>.<span class="ident">color</span>(<span class="kw-2">&</span><span class="ident">agent</span>, <span class="ident">app</span>.<span class="ident">cs</span>()) {
|
||||
<span class="comment">// If the sim has highlighted people, then fade all others out.</span>
|
||||
<span class="kw">if</span> <span class="ident">highlighted</span>
|
||||
.<span class="ident">as_ref</span>()
|
||||
@ -460,54 +405,57 @@
|
||||
<span class="ident">bikes</span>: <span class="ident">bool</span>,
|
||||
<span class="ident">buses_and_trains</span>: <span class="ident">bool</span>,
|
||||
<span class="ident">peds</span>: <span class="ident">bool</span>,
|
||||
|
||||
<span class="ident">car_color</span>: <span class="ident">Color</span>,
|
||||
<span class="ident">bike_color</span>: <span class="ident">Color</span>,
|
||||
<span class="ident">bus_color</span>: <span class="ident">Color</span>,
|
||||
<span class="ident">ped_color</span>: <span class="ident">Color</span>,
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">UnzoomedAgents</span> {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">cs</span>: <span class="kw-2">&</span><span class="ident">ColorScheme</span>) <span class="op">-</span><span class="op">></span> <span class="ident">UnzoomedAgents</span> {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>() <span class="op">-</span><span class="op">></span> <span class="ident">UnzoomedAgents</span> {
|
||||
<span class="ident">UnzoomedAgents</span> {
|
||||
<span class="ident">cars</span>: <span class="bool-val">true</span>,
|
||||
<span class="ident">bikes</span>: <span class="bool-val">true</span>,
|
||||
<span class="ident">buses_and_trains</span>: <span class="bool-val">true</span>,
|
||||
<span class="ident">peds</span>: <span class="bool-val">true</span>,
|
||||
|
||||
<span class="ident">car_color</span>: <span class="ident">cs</span>.<span class="ident">unzoomed_car</span>.<span class="ident">alpha</span>(<span class="number">0.8</span>),
|
||||
<span class="ident">bike_color</span>: <span class="ident">cs</span>.<span class="ident">unzoomed_bike</span>.<span class="ident">alpha</span>(<span class="number">0.8</span>),
|
||||
<span class="ident">bus_color</span>: <span class="ident">cs</span>.<span class="ident">unzoomed_bus</span>.<span class="ident">alpha</span>(<span class="number">0.8</span>),
|
||||
<span class="ident">ped_color</span>: <span class="ident">cs</span>.<span class="ident">unzoomed_pedestrian</span>.<span class="ident">alpha</span>(<span class="number">0.8</span>),
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">color</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">agent</span>: <span class="kw-2">&</span><span class="ident">UnzoomedAgent</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Color</span><span class="op">></span> {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">cars</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">bool</span> {
|
||||
<span class="self">self</span>.<span class="ident">cars</span>
|
||||
}
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">bikes</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">bool</span> {
|
||||
<span class="self">self</span>.<span class="ident">bikes</span>
|
||||
}
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">buses_and_trains</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">bool</span> {
|
||||
<span class="self">self</span>.<span class="ident">buses_and_trains</span>
|
||||
}
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">peds</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">bool</span> {
|
||||
<span class="self">self</span>.<span class="ident">peds</span>
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">color</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">agent</span>: <span class="kw-2">&</span><span class="ident">UnzoomedAgent</span>, <span class="ident">color_scheme</span>: <span class="kw-2">&</span><span class="ident">ColorScheme</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Color</span><span class="op">></span> {
|
||||
<span class="kw">match</span> <span class="ident">agent</span>.<span class="ident">id</span>.<span class="ident">to_vehicle_type</span>() {
|
||||
<span class="prelude-val">Some</span>(<span class="ident">VehicleType</span>::<span class="ident">Car</span>) <span class="op">=</span><span class="op">></span> {
|
||||
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">cars</span> {
|
||||
<span class="prelude-val">Some</span>(<span class="self">self</span>.<span class="ident">car_color</span>)
|
||||
<span class="prelude-val">Some</span>(<span class="ident">color_scheme</span>.<span class="ident">unzoomed_car</span>)
|
||||
} <span class="kw">else</span> {
|
||||
<span class="prelude-val">None</span>
|
||||
}
|
||||
}
|
||||
<span class="prelude-val">Some</span>(<span class="ident">VehicleType</span>::<span class="ident">Bike</span>) <span class="op">=</span><span class="op">></span> {
|
||||
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">bikes</span> {
|
||||
<span class="prelude-val">Some</span>(<span class="self">self</span>.<span class="ident">bike_color</span>)
|
||||
<span class="prelude-val">Some</span>(<span class="ident">color_scheme</span>.<span class="ident">unzoomed_bike</span>)
|
||||
} <span class="kw">else</span> {
|
||||
<span class="prelude-val">None</span>
|
||||
}
|
||||
}
|
||||
<span class="prelude-val">Some</span>(<span class="ident">VehicleType</span>::<span class="ident">Bus</span>) <span class="op">|</span> <span class="prelude-val">Some</span>(<span class="ident">VehicleType</span>::<span class="ident">Train</span>) <span class="op">=</span><span class="op">></span> {
|
||||
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">buses_and_trains</span> {
|
||||
<span class="prelude-val">Some</span>(<span class="self">self</span>.<span class="ident">bus_color</span>)
|
||||
<span class="prelude-val">Some</span>(<span class="ident">color_scheme</span>.<span class="ident">unzoomed_bus</span>)
|
||||
} <span class="kw">else</span> {
|
||||
<span class="prelude-val">None</span>
|
||||
}
|
||||
}
|
||||
<span class="prelude-val">None</span> <span class="op">=</span><span class="op">></span> {
|
||||
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">peds</span> {
|
||||
<span class="prelude-val">Some</span>(<span class="self">self</span>.<span class="ident">ped_color</span>)
|
||||
<span class="prelude-val">Some</span>(<span class="ident">color_scheme</span>.<span class="ident">unzoomed_pedestrian</span>)
|
||||
} <span class="kw">else</span> {
|
||||
<span class="prelude-val">None</span>
|
||||
}
|
||||
@ -515,64 +463,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
<span class="doccomment">/// The details are (car, bike, bus, pedestrian)</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">make_horiz_viz_panel</span>(
|
||||
<span class="kw-2">&</span><span class="self">self</span>,
|
||||
<span class="ident">ctx</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>,
|
||||
<span class="ident">details</span>: (<span class="ident">Widget</span>, <span class="ident">Widget</span>, <span class="ident">Widget</span>, <span class="ident">Widget</span>),
|
||||
) <span class="op">-</span><span class="op">></span> <span class="ident">Widget</span> {
|
||||
<span class="kw">let</span> (<span class="ident">car_details</span>, <span class="ident">bike_details</span>, <span class="ident">bus_details</span>, <span class="ident">pedestrian_details</span>) <span class="op">=</span> <span class="ident">details</span>;
|
||||
<span class="ident">Widget</span>::<span class="ident">custom_row</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Toggle</span>::<span class="ident">colored_checkbox</span>(<span class="ident">ctx</span>, <span class="string">"Car"</span>, <span class="self">self</span>.<span class="ident">car_color</span>, <span class="self">self</span>.<span class="ident">cars</span>),
|
||||
<span class="ident">car_details</span>,
|
||||
])
|
||||
.<span class="ident">margin_right</span>(<span class="number">24</span>),
|
||||
<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Toggle</span>::<span class="ident">colored_checkbox</span>(<span class="ident">ctx</span>, <span class="string">"Bike"</span>, <span class="self">self</span>.<span class="ident">bike_color</span>, <span class="self">self</span>.<span class="ident">bikes</span>),
|
||||
<span class="ident">bike_details</span>,
|
||||
])
|
||||
.<span class="ident">margin_right</span>(<span class="number">24</span>),
|
||||
<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Toggle</span>::<span class="ident">colored_checkbox</span>(<span class="ident">ctx</span>, <span class="string">"Bus"</span>, <span class="self">self</span>.<span class="ident">bus_color</span>, <span class="self">self</span>.<span class="ident">buses_and_trains</span>),
|
||||
<span class="ident">bus_details</span>,
|
||||
])
|
||||
.<span class="ident">margin_right</span>(<span class="number">24</span>),
|
||||
<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Toggle</span>::<span class="ident">colored_checkbox</span>(<span class="ident">ctx</span>, <span class="string">"Walk"</span>, <span class="self">self</span>.<span class="ident">ped_color</span>, <span class="self">self</span>.<span class="ident">peds</span>),
|
||||
<span class="ident">pedestrian_details</span>,
|
||||
])
|
||||
.<span class="ident">margin_right</span>(<span class="number">8</span>),
|
||||
])
|
||||
}
|
||||
|
||||
<span class="doccomment">/// The details are (car, bike, bus, pedestrian)</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">make_vert_viz_panel</span>(
|
||||
<span class="kw-2">&</span><span class="self">self</span>,
|
||||
<span class="ident">ctx</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>,
|
||||
<span class="ident">details</span>: (<span class="ident">Widget</span>, <span class="ident">Widget</span>, <span class="ident">Widget</span>, <span class="ident">Widget</span>),
|
||||
) <span class="op">-</span><span class="op">></span> <span class="ident">Widget</span> {
|
||||
<span class="kw">let</span> (<span class="ident">car_details</span>, <span class="ident">bike_details</span>, <span class="ident">bus_details</span>, <span class="ident">pedestrian_details</span>) <span class="op">=</span> <span class="ident">details</span>;
|
||||
<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Toggle</span>::<span class="ident">colored_checkbox</span>(<span class="ident">ctx</span>, <span class="string">"Car"</span>, <span class="self">self</span>.<span class="ident">car_color</span>, <span class="self">self</span>.<span class="ident">cars</span>),
|
||||
<span class="ident">car_details</span>.<span class="ident">align_right</span>(),
|
||||
]),
|
||||
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Toggle</span>::<span class="ident">colored_checkbox</span>(<span class="ident">ctx</span>, <span class="string">"Bike"</span>, <span class="self">self</span>.<span class="ident">bike_color</span>, <span class="self">self</span>.<span class="ident">bikes</span>),
|
||||
<span class="ident">bike_details</span>.<span class="ident">align_right</span>(),
|
||||
]),
|
||||
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Toggle</span>::<span class="ident">colored_checkbox</span>(<span class="ident">ctx</span>, <span class="string">"Bus"</span>, <span class="self">self</span>.<span class="ident">bus_color</span>, <span class="self">self</span>.<span class="ident">buses_and_trains</span>),
|
||||
<span class="ident">bus_details</span>.<span class="ident">align_right</span>(),
|
||||
]),
|
||||
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Toggle</span>::<span class="ident">colored_checkbox</span>(<span class="ident">ctx</span>, <span class="string">"Walk"</span>, <span class="self">self</span>.<span class="ident">ped_color</span>, <span class="self">self</span>.<span class="ident">peds</span>),
|
||||
<span class="ident">pedestrian_details</span>.<span class="ident">align_right</span>(),
|
||||
]),
|
||||
])
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">update</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">panel</span>: <span class="kw-2">&</span><span class="ident">Panel</span>) {
|
||||
<span class="self">self</span>.<span class="ident">cars</span> <span class="op">=</span> <span class="ident">panel</span>.<span class="ident">is_checked</span>(<span class="string">"Car"</span>);
|
||||
<span class="self">self</span>.<span class="ident">bikes</span> <span class="op">=</span> <span class="ident">panel</span>.<span class="ident">is_checked</span>(<span class="string">"Bike"</span>);
|
||||
|
@ -759,7 +759,7 @@
|
||||
<span class="comment">// get_obj must succeed, because we can only click static map elements.</span>
|
||||
<span class="kw">let</span> <span class="ident">outline</span> <span class="op">=</span> <span class="ident">app</span>
|
||||
.<span class="ident">draw_map</span>
|
||||
.<span class="ident">get_obj</span>(<span class="ident">ctx</span>, <span class="ident">id</span>, <span class="ident">app</span>, <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">map_gui</span>::<span class="ident">render</span>::<span class="ident">AgentCache</span>::<span class="ident">new</span>(<span class="kw-2">&</span><span class="ident">app</span>.<span class="ident">cs</span>))
|
||||
.<span class="ident">get_obj</span>(<span class="ident">ctx</span>, <span class="ident">id</span>, <span class="ident">app</span>, <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">map_gui</span>::<span class="ident">render</span>::<span class="ident">AgentCache</span>::<span class="ident">new</span>())
|
||||
.<span class="ident">unwrap</span>()
|
||||
.<span class="ident">get_outline</span>(<span class="kw-2">&</span><span class="ident">app</span>.<span class="ident">map</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</span>::<span class="ident">from</span>(<span class="macro">vec</span><span class="macro">!</span>[(<span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">perma_selected_object</span>, <span class="ident">outline</span>)]);
|
||||
|
222
rustdoc/src/widgetry/geom/geom_batch_stack.rs.html
Normal file
222
rustdoc/src/widgetry/geom/geom_batch_stack.rs.html
Normal file
@ -0,0 +1,222 @@
|
||||
<!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="Source of the Rust file `widgetry/src/geom/geom_batch_stack.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>geom_batch_stack.rs - source</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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc source"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><pre class="line-numbers"><span id="1"> 1</span>
|
||||
<span id="2"> 2</span>
|
||||
<span id="3"> 3</span>
|
||||
<span id="4"> 4</span>
|
||||
<span id="5"> 5</span>
|
||||
<span id="6"> 6</span>
|
||||
<span id="7"> 7</span>
|
||||
<span id="8"> 8</span>
|
||||
<span id="9"> 9</span>
|
||||
<span id="10"> 10</span>
|
||||
<span id="11"> 11</span>
|
||||
<span id="12"> 12</span>
|
||||
<span id="13"> 13</span>
|
||||
<span id="14"> 14</span>
|
||||
<span id="15"> 15</span>
|
||||
<span id="16"> 16</span>
|
||||
<span id="17"> 17</span>
|
||||
<span id="18"> 18</span>
|
||||
<span id="19"> 19</span>
|
||||
<span id="20"> 20</span>
|
||||
<span id="21"> 21</span>
|
||||
<span id="22"> 22</span>
|
||||
<span id="23"> 23</span>
|
||||
<span id="24"> 24</span>
|
||||
<span id="25"> 25</span>
|
||||
<span id="26"> 26</span>
|
||||
<span id="27"> 27</span>
|
||||
<span id="28"> 28</span>
|
||||
<span id="29"> 29</span>
|
||||
<span id="30"> 30</span>
|
||||
<span id="31"> 31</span>
|
||||
<span id="32"> 32</span>
|
||||
<span id="33"> 33</span>
|
||||
<span id="34"> 34</span>
|
||||
<span id="35"> 35</span>
|
||||
<span id="36"> 36</span>
|
||||
<span id="37"> 37</span>
|
||||
<span id="38"> 38</span>
|
||||
<span id="39"> 39</span>
|
||||
<span id="40"> 40</span>
|
||||
<span id="41"> 41</span>
|
||||
<span id="42"> 42</span>
|
||||
<span id="43"> 43</span>
|
||||
<span id="44"> 44</span>
|
||||
<span id="45"> 45</span>
|
||||
<span id="46"> 46</span>
|
||||
<span id="47"> 47</span>
|
||||
<span id="48"> 48</span>
|
||||
<span id="49"> 49</span>
|
||||
<span id="50"> 50</span>
|
||||
<span id="51"> 51</span>
|
||||
<span id="52"> 52</span>
|
||||
<span id="53"> 53</span>
|
||||
<span id="54"> 54</span>
|
||||
<span id="55"> 55</span>
|
||||
<span id="56"> 56</span>
|
||||
<span id="57"> 57</span>
|
||||
<span id="58"> 58</span>
|
||||
<span id="59"> 59</span>
|
||||
<span id="60"> 60</span>
|
||||
<span id="61"> 61</span>
|
||||
<span id="62"> 62</span>
|
||||
<span id="63"> 63</span>
|
||||
<span id="64"> 64</span>
|
||||
<span id="65"> 65</span>
|
||||
<span id="66"> 66</span>
|
||||
<span id="67"> 67</span>
|
||||
<span id="68"> 68</span>
|
||||
<span id="69"> 69</span>
|
||||
<span id="70"> 70</span>
|
||||
<span id="71"> 71</span>
|
||||
<span id="72"> 72</span>
|
||||
<span id="73"> 73</span>
|
||||
<span id="74"> 74</span>
|
||||
<span id="75"> 75</span>
|
||||
<span id="76"> 76</span>
|
||||
<span id="77"> 77</span>
|
||||
<span id="78"> 78</span>
|
||||
<span id="79"> 79</span>
|
||||
<span id="80"> 80</span>
|
||||
<span id="81"> 81</span>
|
||||
<span id="82"> 82</span>
|
||||
<span id="83"> 83</span>
|
||||
<span id="84"> 84</span>
|
||||
<span id="85"> 85</span>
|
||||
<span id="86"> 86</span>
|
||||
<span id="87"> 87</span>
|
||||
<span id="88"> 88</span>
|
||||
<span id="89"> 89</span>
|
||||
<span id="90"> 90</span>
|
||||
<span id="91"> 91</span>
|
||||
<span id="92"> 92</span>
|
||||
<span id="93"> 93</span>
|
||||
<span id="94"> 94</span>
|
||||
<span id="95"> 95</span>
|
||||
<span id="96"> 96</span>
|
||||
<span id="97"> 97</span>
|
||||
<span id="98"> 98</span>
|
||||
<span id="99"> 99</span>
|
||||
<span id="100">100</span>
|
||||
<span id="101">101</span>
|
||||
<span id="102">102</span>
|
||||
<span id="103">103</span>
|
||||
<span id="104">104</span>
|
||||
<span id="105">105</span>
|
||||
<span id="106">106</span>
|
||||
<span id="107">107</span>
|
||||
<span id="108">108</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">GeomBatch</span>;
|
||||
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>, <span class="ident">Copy</span>, <span class="ident">Debug</span>, <span class="ident">PartialEq</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">enum</span> <span class="ident">Axis</span> {
|
||||
<span class="ident">Horizontal</span>,
|
||||
<span class="ident">Vertical</span>,
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Similar to [`Widget::row`]/[`Widget::column`], but for [`GeomBatch`]s instead of [`Widget`]s,</span>
|
||||
<span class="doccomment">/// and follows a builder pattern</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// You can add items incrementally, change `spacing` and `axis`, and call `batch` at the end to</span>
|
||||
<span class="doccomment">/// apply these rules to produce an aggeregate `GeomBatch`.</span>
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">GeomBatchStack</span> {
|
||||
<span class="ident">batches</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">GeomBatch</span><span class="op">></span>,
|
||||
<span class="ident">axis</span>: <span class="ident">Axis</span>,
|
||||
<span class="ident">spacing</span>: <span class="ident">f64</span>,
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">Default</span> <span class="kw">for</span> <span class="ident">GeomBatchStack</span> {
|
||||
<span class="kw">fn</span> <span class="ident">default</span>() <span class="op">-</span><span class="op">></span> <span class="self">Self</span> {
|
||||
<span class="ident">GeomBatchStack</span> {
|
||||
<span class="ident">batches</span>: <span class="macro">vec</span><span class="macro">!</span>[],
|
||||
<span class="comment">// TODO:</span>
|
||||
<span class="comment">// alignment: Alignment::Center,</span>
|
||||
<span class="ident">axis</span>: <span class="ident">Axis</span>::<span class="ident">Horizontal</span>,
|
||||
<span class="ident">spacing</span>: <span class="number">0.0</span>,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">GeomBatchStack</span> {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">horizontal</span>(<span class="ident">batches</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">GeomBatch</span><span class="op">></span>) <span class="op">-</span><span class="op">></span> <span class="self">Self</span> {
|
||||
<span class="ident">GeomBatchStack</span> {
|
||||
<span class="ident">batches</span>,
|
||||
<span class="ident">axis</span>: <span class="ident">Axis</span>::<span class="ident">Horizontal</span>,
|
||||
..<span class="ident">Default</span>::<span class="ident">default</span>()
|
||||
}
|
||||
}
|
||||
|
||||
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">unused</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">vertical</span>(<span class="ident">batches</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">GeomBatch</span><span class="op">></span>) <span class="op">-</span><span class="op">></span> <span class="self">Self</span> {
|
||||
<span class="ident">GeomBatchStack</span> {
|
||||
<span class="ident">batches</span>,
|
||||
<span class="ident">axis</span>: <span class="ident">Axis</span>::<span class="ident">Vertical</span>,
|
||||
..<span class="ident">Default</span>::<span class="ident">default</span>()
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">set_axis</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">new_value</span>: <span class="ident">Axis</span>) {
|
||||
<span class="self">self</span>.<span class="ident">axis</span> <span class="op">=</span> <span class="ident">new_value</span>;
|
||||
}
|
||||
|
||||
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">unused</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">push</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">geom_batch</span>: <span class="ident">GeomBatch</span>) {
|
||||
<span class="self">self</span>.<span class="ident">batches</span>.<span class="ident">push</span>(<span class="ident">geom_batch</span>);
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">append</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">geom_batches</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">Vec</span><span class="op"><</span><span class="ident">GeomBatch</span><span class="op">></span>) {
|
||||
<span class="self">self</span>.<span class="ident">batches</span>.<span class="ident">append</span>(<span class="ident">geom_batches</span>);
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">spacing</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">spacing</span>: <span class="ident">f64</span>) <span class="op">-</span><span class="op">></span> <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">Self</span> {
|
||||
<span class="self">self</span>.<span class="ident">spacing</span> <span class="op">=</span> <span class="ident">spacing</span>;
|
||||
<span class="self">self</span>
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">batch</span>(<span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">GeomBatch</span> {
|
||||
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">batches</span>.<span class="ident">is_empty</span>() {
|
||||
<span class="kw">return</span> <span class="ident">GeomBatch</span>::<span class="ident">new</span>();
|
||||
}
|
||||
|
||||
<span class="kw">let</span> <span class="ident">max_bound_for_axis</span> <span class="op">=</span> <span class="self">self</span>
|
||||
.<span class="ident">batches</span>
|
||||
.<span class="ident">iter</span>()
|
||||
.<span class="ident">map</span>(<span class="ident">GeomBatch</span>::<span class="ident">get_bounds</span>)
|
||||
.<span class="ident">max_by</span>(<span class="op">|</span><span class="ident">b1</span>, <span class="ident">b2</span><span class="op">|</span> <span class="kw">match</span> <span class="self">self</span>.<span class="ident">axis</span> {
|
||||
<span class="ident">Axis</span>::<span class="ident">Vertical</span> <span class="op">=</span><span class="op">></span> <span class="ident">b1</span>.<span class="ident">width</span>().<span class="ident">partial_cmp</span>(<span class="kw-2">&</span><span class="ident">b2</span>.<span class="ident">width</span>()).<span class="ident">unwrap</span>(),
|
||||
<span class="ident">Axis</span>::<span class="ident">Horizontal</span> <span class="op">=</span><span class="op">></span> <span class="ident">b1</span>.<span class="ident">height</span>().<span class="ident">partial_cmp</span>(<span class="kw-2">&</span><span class="ident">b2</span>.<span class="ident">height</span>()).<span class="ident">unwrap</span>(),
|
||||
})
|
||||
.<span class="ident">unwrap</span>();
|
||||
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">stack_batch</span> <span class="op">=</span> <span class="ident">GeomBatch</span>::<span class="ident">new</span>();
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">stack_offset</span> <span class="op">=</span> <span class="number">0.0</span>;
|
||||
<span class="kw">for</span> <span class="kw-2">mut</span> <span class="ident">batch</span> <span class="kw">in</span> <span class="self">self</span>.<span class="ident">batches</span> {
|
||||
<span class="kw">let</span> <span class="ident">bounds</span> <span class="op">=</span> <span class="ident">batch</span>.<span class="ident">get_bounds</span>();
|
||||
<span class="kw">let</span> <span class="ident">alignment_inset</span> <span class="op">=</span> <span class="kw">match</span> <span class="self">self</span>.<span class="ident">axis</span> {
|
||||
<span class="ident">Axis</span>::<span class="ident">Vertical</span> <span class="op">=</span><span class="op">></span> (<span class="ident">max_bound_for_axis</span>.<span class="ident">width</span>() <span class="op">-</span> <span class="ident">bounds</span>.<span class="ident">width</span>()) <span class="op">/</span> <span class="number">2.0</span>,
|
||||
<span class="ident">Axis</span>::<span class="ident">Horizontal</span> <span class="op">=</span><span class="op">></span> (<span class="ident">max_bound_for_axis</span>.<span class="ident">height</span>() <span class="op">-</span> <span class="ident">bounds</span>.<span class="ident">height</span>()) <span class="op">/</span> <span class="number">2.0</span>,
|
||||
};
|
||||
|
||||
<span class="kw">let</span> (<span class="ident">dx</span>, <span class="ident">dy</span>) <span class="op">=</span> <span class="kw">match</span> <span class="self">self</span>.<span class="ident">axis</span> {
|
||||
<span class="ident">Axis</span>::<span class="ident">Vertical</span> <span class="op">=</span><span class="op">></span> (<span class="ident">alignment_inset</span>, <span class="ident">stack_offset</span>),
|
||||
<span class="ident">Axis</span>::<span class="ident">Horizontal</span> <span class="op">=</span><span class="op">></span> (<span class="ident">stack_offset</span>, <span class="ident">alignment_inset</span>),
|
||||
};
|
||||
<span class="ident">batch</span> <span class="op">=</span> <span class="ident">batch</span>.<span class="ident">translate</span>(<span class="ident">dx</span>, <span class="ident">dy</span>);
|
||||
<span class="ident">stack_batch</span>.<span class="ident">append</span>(<span class="ident">batch</span>);
|
||||
|
||||
<span class="ident">stack_offset</span> <span class="op">+</span><span class="op">=</span> <span class="self">self</span>.<span class="ident">spacing</span>;
|
||||
<span class="kw">match</span> <span class="self">self</span>.<span class="ident">axis</span> {
|
||||
<span class="ident">Axis</span>::<span class="ident">Vertical</span> <span class="op">=</span><span class="op">></span> <span class="ident">stack_offset</span> <span class="op">+</span><span class="op">=</span> <span class="ident">bounds</span>.<span class="ident">height</span>(),
|
||||
<span class="ident">Axis</span>::<span class="ident">Horizontal</span> <span class="op">=</span><span class="op">></span> <span class="ident">stack_offset</span> <span class="op">+</span><span class="op">=</span> <span class="ident">bounds</span>.<span class="ident">width</span>(),
|
||||
}
|
||||
}
|
||||
<span class="ident">stack_batch</span>
|
||||
}
|
||||
}
|
||||
</pre></div>
|
||||
</section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "widgetry";</script><script src="../../../main.js"></script><script src="../../../source-script.js"></script><script src="../../../source-files.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
@ -1,7 +1,7 @@
|
||||
<!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="Source of the Rust file `widgetry/src/geom.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>geom.rs - source</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><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc source"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><pre class="line-numbers"><span id="1"> 1</span>
|
||||
<!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="Source of the Rust file `widgetry/src/geom/mod.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>mod.rs - source</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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc source"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><pre class="line-numbers"><span id="1"> 1</span>
|
||||
<span id="2"> 2</span>
|
||||
<span id="3"> 3</span>
|
||||
<span id="4"> 4</span>
|
||||
@ -315,6 +315,8 @@
|
||||
<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>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Angle</span>, <span class="ident">Bounds</span>, <span class="ident">GPSBounds</span>, <span class="ident">Polygon</span>, <span class="ident">Pt2D</span>};
|
||||
|
||||
@ -323,6 +325,8 @@
|
||||
<span class="ident">Widget</span>,
|
||||
};
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">geom_batch_stack</span>;
|
||||
|
||||
<span class="doccomment">/// A mutable builder for a group of colored polygons.</span>
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">GeomBatch</span> {
|
||||
@ -631,4 +635,4 @@
|
||||
}
|
||||
}
|
||||
</pre></div>
|
||||
</section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "widgetry";</script><script src="../../main.js"></script><script src="../../source-script.js"></script><script src="../../source-files.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
</section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "widgetry";</script><script src="../../../main.js"></script><script src="../../../source-script.js"></script><script src="../../../source-files.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
@ -223,6 +223,7 @@
|
||||
<span id="220">220</span>
|
||||
<span id="221">221</span>
|
||||
<span id="222">222</span>
|
||||
<span id="223">223</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="doccomment">//! # Widgets</span>
|
||||
<span class="doccomment">//!</span>
|
||||
@ -263,6 +264,7 @@
|
||||
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">drawing</span>::{<span class="ident">GfxCtx</span>, <span class="ident">Prerender</span>};
|
||||
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">event</span>::{<span class="ident">hotkeys</span>, <span class="ident">lctrl</span>, <span class="ident">Event</span>, <span class="ident">Key</span>, <span class="ident">MultiKey</span>};
|
||||
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">event_ctx</span>::{<span class="ident">EventCtx</span>, <span class="ident">UpdateType</span>};
|
||||
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">geom</span>::<span class="ident">geom_batch_stack</span>::{<span class="ident">Axis</span>, <span class="ident">GeomBatchStack</span>};
|
||||
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">geom</span>::{<span class="ident">GeomBatch</span>, <span class="ident">RewriteColor</span>};
|
||||
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">input</span>::<span class="ident">UserInput</span>;
|
||||
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">runner</span>::{<span class="ident">run</span>, <span class="ident">Settings</span>};
|
||||
@ -278,7 +280,7 @@
|
||||
<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">widgets</span>::<span class="ident">dropdown</span>::<span class="ident">Dropdown</span>;
|
||||
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">widgets</span>::<span class="ident">fan_chart</span>::<span class="ident">FanChart</span>;
|
||||
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">widgets</span>::<span class="ident">filler</span>::<span class="ident">Filler</span>;
|
||||
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">widgets</span>::<span class="ident">image</span>::<span class="ident">Image</span>;
|
||||
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">widgets</span>::<span class="ident">image</span>::{<span class="ident">Image</span>, <span class="ident">ImageSource</span>};
|
||||
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">widgets</span>::<span class="ident">just_draw</span>::<span class="ident">DrawWithTooltips</span>;
|
||||
<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">widgets</span>::<span class="ident">just_draw</span>::{<span class="ident">DeferDraw</span>, <span class="ident">JustDraw</span>};
|
||||
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">widgets</span>::<span class="ident">line_plot</span>::{<span class="ident">LinePlot</span>, <span class="ident">PlotOptions</span>, <span class="ident">Series</span>};
|
||||
|
@ -840,146 +840,17 @@
|
||||
<span id="837">837</span>
|
||||
<span id="838">838</span>
|
||||
<span id="839">839</span>
|
||||
<span id="840">840</span>
|
||||
<span id="841">841</span>
|
||||
<span id="842">842</span>
|
||||
<span id="843">843</span>
|
||||
<span id="844">844</span>
|
||||
<span id="845">845</span>
|
||||
<span id="846">846</span>
|
||||
<span id="847">847</span>
|
||||
<span id="848">848</span>
|
||||
<span id="849">849</span>
|
||||
<span id="850">850</span>
|
||||
<span id="851">851</span>
|
||||
<span id="852">852</span>
|
||||
<span id="853">853</span>
|
||||
<span id="854">854</span>
|
||||
<span id="855">855</span>
|
||||
<span id="856">856</span>
|
||||
<span id="857">857</span>
|
||||
<span id="858">858</span>
|
||||
<span id="859">859</span>
|
||||
<span id="860">860</span>
|
||||
<span id="861">861</span>
|
||||
<span id="862">862</span>
|
||||
<span id="863">863</span>
|
||||
<span id="864">864</span>
|
||||
<span id="865">865</span>
|
||||
<span id="866">866</span>
|
||||
<span id="867">867</span>
|
||||
<span id="868">868</span>
|
||||
<span id="869">869</span>
|
||||
<span id="870">870</span>
|
||||
<span id="871">871</span>
|
||||
<span id="872">872</span>
|
||||
<span id="873">873</span>
|
||||
<span id="874">874</span>
|
||||
<span id="875">875</span>
|
||||
<span id="876">876</span>
|
||||
<span id="877">877</span>
|
||||
<span id="878">878</span>
|
||||
<span id="879">879</span>
|
||||
<span id="880">880</span>
|
||||
<span id="881">881</span>
|
||||
<span id="882">882</span>
|
||||
<span id="883">883</span>
|
||||
<span id="884">884</span>
|
||||
<span id="885">885</span>
|
||||
<span id="886">886</span>
|
||||
<span id="887">887</span>
|
||||
<span id="888">888</span>
|
||||
<span id="889">889</span>
|
||||
<span id="890">890</span>
|
||||
<span id="891">891</span>
|
||||
<span id="892">892</span>
|
||||
<span id="893">893</span>
|
||||
<span id="894">894</span>
|
||||
<span id="895">895</span>
|
||||
<span id="896">896</span>
|
||||
<span id="897">897</span>
|
||||
<span id="898">898</span>
|
||||
<span id="899">899</span>
|
||||
<span id="900">900</span>
|
||||
<span id="901">901</span>
|
||||
<span id="902">902</span>
|
||||
<span id="903">903</span>
|
||||
<span id="904">904</span>
|
||||
<span id="905">905</span>
|
||||
<span id="906">906</span>
|
||||
<span id="907">907</span>
|
||||
<span id="908">908</span>
|
||||
<span id="909">909</span>
|
||||
<span id="910">910</span>
|
||||
<span id="911">911</span>
|
||||
<span id="912">912</span>
|
||||
<span id="913">913</span>
|
||||
<span id="914">914</span>
|
||||
<span id="915">915</span>
|
||||
<span id="916">916</span>
|
||||
<span id="917">917</span>
|
||||
<span id="918">918</span>
|
||||
<span id="919">919</span>
|
||||
<span id="920">920</span>
|
||||
<span id="921">921</span>
|
||||
<span id="922">922</span>
|
||||
<span id="923">923</span>
|
||||
<span id="924">924</span>
|
||||
<span id="925">925</span>
|
||||
<span id="926">926</span>
|
||||
<span id="927">927</span>
|
||||
<span id="928">928</span>
|
||||
<span id="929">929</span>
|
||||
<span id="930">930</span>
|
||||
<span id="931">931</span>
|
||||
<span id="932">932</span>
|
||||
<span id="933">933</span>
|
||||
<span id="934">934</span>
|
||||
<span id="935">935</span>
|
||||
<span id="936">936</span>
|
||||
<span id="937">937</span>
|
||||
<span id="938">938</span>
|
||||
<span id="939">939</span>
|
||||
<span id="940">940</span>
|
||||
<span id="941">941</span>
|
||||
<span id="942">942</span>
|
||||
<span id="943">943</span>
|
||||
<span id="944">944</span>
|
||||
<span id="945">945</span>
|
||||
<span id="946">946</span>
|
||||
<span id="947">947</span>
|
||||
<span id="948">948</span>
|
||||
<span id="949">949</span>
|
||||
<span id="950">950</span>
|
||||
<span id="951">951</span>
|
||||
<span id="952">952</span>
|
||||
<span id="953">953</span>
|
||||
<span id="954">954</span>
|
||||
<span id="955">955</span>
|
||||
<span id="956">956</span>
|
||||
<span id="957">957</span>
|
||||
<span id="958">958</span>
|
||||
<span id="959">959</span>
|
||||
<span id="960">960</span>
|
||||
<span id="961">961</span>
|
||||
<span id="962">962</span>
|
||||
<span id="963">963</span>
|
||||
<span id="964">964</span>
|
||||
<span id="965">965</span>
|
||||
<span id="966">966</span>
|
||||
<span id="967">967</span>
|
||||
<span id="968">968</span>
|
||||
<span id="969">969</span>
|
||||
<span id="970">970</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Distance</span>, <span class="ident">Polygon</span>, <span class="ident">Pt2D</span>};
|
||||
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::{
|
||||
<span class="ident">svg</span>, <span class="ident">text</span>::<span class="ident">Font</span>, <span class="ident">Color</span>, <span class="ident">ContentMode</span>, <span class="ident">ControlState</span>, <span class="ident">CornerRounding</span>, <span class="ident">Drawable</span>, <span class="ident">EdgeInsets</span>,
|
||||
<span class="ident">EventCtx</span>, <span class="ident">GeomBatch</span>, <span class="ident">GfxCtx</span>, <span class="ident">Line</span>, <span class="ident">MultiKey</span>, <span class="ident">Outcome</span>, <span class="ident">OutlineStyle</span>, <span class="ident">RewriteColor</span>, <span class="ident">ScreenDims</span>,
|
||||
<span class="ident">ScreenPt</span>, <span class="ident">ScreenRectangle</span>, <span class="ident">Text</span>, <span class="ident">Widget</span>, <span class="ident">WidgetImpl</span>, <span class="ident">WidgetOutput</span>,
|
||||
<span class="ident">text</span>::<span class="ident">Font</span>, <span class="ident">Color</span>, <span class="ident">ContentMode</span>, <span class="ident">ControlState</span>, <span class="ident">CornerRounding</span>, <span class="ident">Drawable</span>, <span class="ident">EdgeInsets</span>, <span class="ident">EventCtx</span>,
|
||||
<span class="ident">GeomBatch</span>, <span class="ident">GfxCtx</span>, <span class="ident">ImageSource</span>, <span class="ident">Line</span>, <span class="ident">MultiKey</span>, <span class="ident">Outcome</span>, <span class="ident">OutlineStyle</span>, <span class="ident">RewriteColor</span>,
|
||||
<span class="ident">ScreenDims</span>, <span class="ident">ScreenPt</span>, <span class="ident">ScreenRectangle</span>, <span class="ident">Text</span>, <span class="ident">Widget</span>, <span class="ident">WidgetImpl</span>, <span class="ident">WidgetOutput</span>,
|
||||
};
|
||||
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">geom</span>::<span class="ident">geom_batch_stack</span>::{<span class="ident">Axis</span>, <span class="ident">GeomBatchStack</span>};
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Button</span> {
|
||||
<span class="doccomment">/// When a button is clicked, `Outcome::Clicked` with this string is produced.</span>
|
||||
<span class="kw">pub</span> <span class="ident">action</span>: <span class="ident">String</span>,
|
||||
@ -1106,7 +977,7 @@
|
||||
<span class="ident">stack_spacing</span>: <span class="ident">f64</span>,
|
||||
<span class="ident">hotkey</span>: <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">MultiKey</span><span class="op">></span>,
|
||||
<span class="ident">tooltip</span>: <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Text</span><span class="op">></span>,
|
||||
<span class="ident">stack_axis</span>: <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">geom_batch_stack</span>::<span class="ident">Axis</span><span class="op">></span>,
|
||||
<span class="ident">stack_axis</span>: <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Axis</span><span class="op">></span>,
|
||||
<span class="ident">is_label_before_image</span>: <span class="ident">bool</span>,
|
||||
<span class="ident">corner_rounding</span>: <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">CornerRounding</span><span class="op">></span>,
|
||||
<span class="ident">is_disabled</span>: <span class="ident">bool</span>,
|
||||
@ -1412,7 +1283,7 @@
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// If the button doesn't have both an image and label, this has no effect.</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">vertical</span>(<span class="kw-2">mut</span> <span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="self">Self</span> {
|
||||
<span class="self">self</span>.<span class="ident">stack_axis</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">geom_batch_stack</span>::<span class="ident">Axis</span>::<span class="ident">Vertical</span>);
|
||||
<span class="self">self</span>.<span class="ident">stack_axis</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Axis</span>::<span class="ident">Vertical</span>);
|
||||
<span class="self">self</span>
|
||||
}
|
||||
|
||||
@ -1420,7 +1291,7 @@
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// If the button doesn't have both an image and label, this has no effect.</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">horizontal</span>(<span class="kw-2">mut</span> <span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="self">Self</span> {
|
||||
<span class="self">self</span>.<span class="ident">stack_axis</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">geom_batch_stack</span>::<span class="ident">Axis</span>::<span class="ident">Horizontal</span>);
|
||||
<span class="self">self</span>.<span class="ident">stack_axis</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">Axis</span>::<span class="ident">Horizontal</span>);
|
||||
<span class="self">self</span>
|
||||
}
|
||||
|
||||
@ -1678,8 +1549,7 @@
|
||||
)
|
||||
});
|
||||
|
||||
<span class="kw">use</span> <span class="ident">geom_batch_stack</span>::<span class="ident">Stack</span>;
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">stack</span> <span class="op">=</span> <span class="ident">Stack</span>::<span class="ident">horizontal</span>();
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">stack</span> <span class="op">=</span> <span class="ident">GeomBatchStack</span>::<span class="ident">horizontal</span>(<span class="macro">vec</span><span class="macro">!</span>[]);
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">stack_axis</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">stack_axis</span> {
|
||||
<span class="ident">stack</span>.<span class="ident">set_axis</span>(<span class="ident">stack_axis</span>);
|
||||
}
|
||||
@ -1723,28 +1593,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>, <span class="ident">Debug</span>)]</span>
|
||||
<span class="kw">enum</span> <span class="ident">ImageSource</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span> {
|
||||
<span class="ident">Path</span>(<span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>),
|
||||
<span class="ident">Bytes</span> { <span class="ident">bytes</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> [<span class="ident">u8</span>], <span class="ident">cache_key</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span> },
|
||||
<span class="ident">GeomBatch</span>(<span class="ident">GeomBatch</span>, <span class="ident">geom</span>::<span class="ident">Bounds</span>),
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">ImageSource</span><span class="op"><</span><span class="lifetime">'_</span><span class="op">></span> {
|
||||
<span class="kw">fn</span> <span class="ident">load</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">prerender</span>: <span class="kw-2">&</span><span class="kw">crate</span>::<span class="ident">Prerender</span>) <span class="op">-</span><span class="op">></span> (<span class="ident">GeomBatch</span>, <span class="ident">geom</span>::<span class="ident">Bounds</span>) {
|
||||
<span class="kw">match</span> <span class="self">self</span> {
|
||||
<span class="ident">ImageSource</span>::<span class="ident">Path</span>(<span class="ident">image_path</span>) <span class="op">=</span><span class="op">></span> <span class="ident">svg</span>::<span class="ident">load_svg</span>(<span class="ident">prerender</span>, <span class="ident">image_path</span>),
|
||||
<span class="ident">ImageSource</span>::<span class="ident">Bytes</span> { <span class="ident">bytes</span>, <span class="ident">cache_key</span> } <span class="op">=</span><span class="op">></span> {
|
||||
<span class="ident">svg</span>::<span class="ident">load_svg_bytes</span>(<span class="ident">prerender</span>, <span class="ident">cache_key</span>, <span class="ident">bytes</span>).<span class="ident">expect</span>(<span class="kw-2">&</span><span class="macro">format</span><span class="macro">!</span>(
|
||||
<span class="string">"Failed to load svg from bytes. cache_key: {}"</span>,
|
||||
<span class="ident">cache_key</span>
|
||||
))
|
||||
}
|
||||
<span class="ident">ImageSource</span>::<span class="ident">GeomBatch</span>(<span class="ident">geom_batch</span>, <span class="ident">bounds</span>) <span class="op">=</span><span class="op">></span> (<span class="ident">geom_batch</span>.<span class="ident">clone</span>(), <span class="kw-2">*</span><span class="ident">bounds</span>),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>, <span class="ident">Debug</span>, <span class="ident">Default</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Image</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span> {
|
||||
<span class="ident">source</span>: <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">ImageSource</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span><span class="op">></span>,
|
||||
@ -1832,115 +1680,5 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<span class="comment">// Currently only the ButtonBuilder uses the Stack module below, but this might be useful in other</span>
|
||||
<span class="comment">// places.</span>
|
||||
<span class="comment">//</span>
|
||||
<span class="comment">// It's similar to Widget::row/column, but more of a builder pattern - you can add items</span>
|
||||
<span class="comment">// individually, change `spacing` and `axis`, and call `batch` at the end to apply this</span>
|
||||
<span class="comment">// configuration things to compute the layout.</span>
|
||||
<span class="kw">mod</span> <span class="ident">geom_batch_stack</span> {
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">GeomBatch</span>;
|
||||
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>, <span class="ident">Copy</span>, <span class="ident">Debug</span>, <span class="ident">PartialEq</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">enum</span> <span class="ident">Axis</span> {
|
||||
<span class="ident">Horizontal</span>,
|
||||
<span class="ident">Vertical</span>,
|
||||
}
|
||||
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>)]</span>
|
||||
<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">struct</span> <span class="ident">Stack</span> {
|
||||
<span class="ident">batches</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">GeomBatch</span><span class="op">></span>,
|
||||
<span class="ident">axis</span>: <span class="ident">Axis</span>,
|
||||
<span class="ident">spacing</span>: <span class="ident">f64</span>,
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">Default</span> <span class="kw">for</span> <span class="ident">Stack</span> {
|
||||
<span class="kw">fn</span> <span class="ident">default</span>() <span class="op">-</span><span class="op">></span> <span class="self">Self</span> {
|
||||
<span class="ident">Stack</span> {
|
||||
<span class="ident">batches</span>: <span class="macro">vec</span><span class="macro">!</span>[],
|
||||
<span class="comment">// TODO:</span>
|
||||
<span class="comment">// alignment: Alignment::Center,</span>
|
||||
<span class="ident">axis</span>: <span class="ident">Axis</span>::<span class="ident">Horizontal</span>,
|
||||
<span class="ident">spacing</span>: <span class="number">0.0</span>,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">Stack</span> {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">horizontal</span>() <span class="op">-</span><span class="op">></span> <span class="self">Self</span> {
|
||||
<span class="ident">Stack</span> {
|
||||
<span class="ident">axis</span>: <span class="ident">Axis</span>::<span class="ident">Horizontal</span>,
|
||||
..<span class="ident">Default</span>::<span class="ident">default</span>()
|
||||
}
|
||||
}
|
||||
|
||||
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">unused</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">vertical</span>() <span class="op">-</span><span class="op">></span> <span class="self">Self</span> {
|
||||
<span class="ident">Stack</span> {
|
||||
<span class="ident">axis</span>: <span class="ident">Axis</span>::<span class="ident">Vertical</span>,
|
||||
..<span class="ident">Default</span>::<span class="ident">default</span>()
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">set_axis</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">new_value</span>: <span class="ident">Axis</span>) {
|
||||
<span class="self">self</span>.<span class="ident">axis</span> <span class="op">=</span> <span class="ident">new_value</span>;
|
||||
}
|
||||
|
||||
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">unused</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">push</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">geom_batch</span>: <span class="ident">GeomBatch</span>) {
|
||||
<span class="self">self</span>.<span class="ident">batches</span>.<span class="ident">push</span>(<span class="ident">geom_batch</span>);
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">append</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">geom_batches</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">Vec</span><span class="op"><</span><span class="ident">GeomBatch</span><span class="op">></span>) {
|
||||
<span class="self">self</span>.<span class="ident">batches</span>.<span class="ident">append</span>(<span class="ident">geom_batches</span>);
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">spacing</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">spacing</span>: <span class="ident">f64</span>) <span class="op">-</span><span class="op">></span> <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">Self</span> {
|
||||
<span class="self">self</span>.<span class="ident">spacing</span> <span class="op">=</span> <span class="ident">spacing</span>;
|
||||
<span class="self">self</span>
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">batch</span>(<span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">GeomBatch</span> {
|
||||
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">batches</span>.<span class="ident">is_empty</span>() {
|
||||
<span class="kw">return</span> <span class="ident">GeomBatch</span>::<span class="ident">new</span>();
|
||||
}
|
||||
|
||||
<span class="kw">let</span> <span class="ident">max_bound_for_axis</span> <span class="op">=</span> <span class="self">self</span>
|
||||
.<span class="ident">batches</span>
|
||||
.<span class="ident">iter</span>()
|
||||
.<span class="ident">map</span>(<span class="ident">GeomBatch</span>::<span class="ident">get_bounds</span>)
|
||||
.<span class="ident">max_by</span>(<span class="op">|</span><span class="ident">b1</span>, <span class="ident">b2</span><span class="op">|</span> <span class="kw">match</span> <span class="self">self</span>.<span class="ident">axis</span> {
|
||||
<span class="ident">Axis</span>::<span class="ident">Vertical</span> <span class="op">=</span><span class="op">></span> <span class="ident">b1</span>.<span class="ident">width</span>().<span class="ident">partial_cmp</span>(<span class="kw-2">&</span><span class="ident">b2</span>.<span class="ident">width</span>()).<span class="ident">unwrap</span>(),
|
||||
<span class="ident">Axis</span>::<span class="ident">Horizontal</span> <span class="op">=</span><span class="op">></span> <span class="ident">b1</span>.<span class="ident">height</span>().<span class="ident">partial_cmp</span>(<span class="kw-2">&</span><span class="ident">b2</span>.<span class="ident">height</span>()).<span class="ident">unwrap</span>(),
|
||||
})
|
||||
.<span class="ident">unwrap</span>();
|
||||
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">stack_batch</span> <span class="op">=</span> <span class="ident">GeomBatch</span>::<span class="ident">new</span>();
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">stack_offset</span> <span class="op">=</span> <span class="number">0.0</span>;
|
||||
<span class="kw">for</span> <span class="kw-2">mut</span> <span class="ident">batch</span> <span class="kw">in</span> <span class="self">self</span>.<span class="ident">batches</span> {
|
||||
<span class="kw">let</span> <span class="ident">bounds</span> <span class="op">=</span> <span class="ident">batch</span>.<span class="ident">get_bounds</span>();
|
||||
<span class="kw">let</span> <span class="ident">alignment_inset</span> <span class="op">=</span> <span class="kw">match</span> <span class="self">self</span>.<span class="ident">axis</span> {
|
||||
<span class="ident">Axis</span>::<span class="ident">Vertical</span> <span class="op">=</span><span class="op">></span> (<span class="ident">max_bound_for_axis</span>.<span class="ident">width</span>() <span class="op">-</span> <span class="ident">bounds</span>.<span class="ident">width</span>()) <span class="op">/</span> <span class="number">2.0</span>,
|
||||
<span class="ident">Axis</span>::<span class="ident">Horizontal</span> <span class="op">=</span><span class="op">></span> (<span class="ident">max_bound_for_axis</span>.<span class="ident">height</span>() <span class="op">-</span> <span class="ident">bounds</span>.<span class="ident">height</span>()) <span class="op">/</span> <span class="number">2.0</span>,
|
||||
};
|
||||
|
||||
<span class="kw">let</span> (<span class="ident">dx</span>, <span class="ident">dy</span>) <span class="op">=</span> <span class="kw">match</span> <span class="self">self</span>.<span class="ident">axis</span> {
|
||||
<span class="ident">Axis</span>::<span class="ident">Vertical</span> <span class="op">=</span><span class="op">></span> (<span class="ident">alignment_inset</span>, <span class="ident">stack_offset</span>),
|
||||
<span class="ident">Axis</span>::<span class="ident">Horizontal</span> <span class="op">=</span><span class="op">></span> (<span class="ident">stack_offset</span>, <span class="ident">alignment_inset</span>),
|
||||
};
|
||||
<span class="ident">batch</span> <span class="op">=</span> <span class="ident">batch</span>.<span class="ident">translate</span>(<span class="ident">dx</span>, <span class="ident">dy</span>);
|
||||
<span class="ident">stack_batch</span>.<span class="ident">append</span>(<span class="ident">batch</span>);
|
||||
|
||||
<span class="ident">stack_offset</span> <span class="op">+</span><span class="op">=</span> <span class="self">self</span>.<span class="ident">spacing</span>;
|
||||
<span class="kw">match</span> <span class="self">self</span>.<span class="ident">axis</span> {
|
||||
<span class="ident">Axis</span>::<span class="ident">Vertical</span> <span class="op">=</span><span class="op">></span> <span class="ident">stack_offset</span> <span class="op">+</span><span class="op">=</span> <span class="ident">bounds</span>.<span class="ident">height</span>(),
|
||||
<span class="ident">Axis</span>::<span class="ident">Horizontal</span> <span class="op">=</span><span class="op">></span> <span class="ident">stack_offset</span> <span class="op">+</span><span class="op">=</span> <span class="ident">bounds</span>.<span class="ident">width</span>(),
|
||||
}
|
||||
}
|
||||
<span class="ident">stack_batch</span>
|
||||
}
|
||||
}
|
||||
}
|
||||
</pre></div>
|
||||
</section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "widgetry";</script><script src="../../../main.js"></script><script src="../../../source-script.js"></script><script src="../../../source-files.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
@ -1,95 +1,159 @@
|
||||
<!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="Source of the Rust file `widgetry/src/widgets/image.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>image.rs - source</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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc source"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><pre class="line-numbers"><span id="1"> 1</span>
|
||||
<span id="2"> 2</span>
|
||||
<span id="3"> 3</span>
|
||||
<span id="4"> 4</span>
|
||||
<span id="5"> 5</span>
|
||||
<span id="6"> 6</span>
|
||||
<span id="7"> 7</span>
|
||||
<span id="8"> 8</span>
|
||||
<span id="9"> 9</span>
|
||||
<span id="10">10</span>
|
||||
<span id="11">11</span>
|
||||
<span id="12">12</span>
|
||||
<span id="13">13</span>
|
||||
<span id="14">14</span>
|
||||
<span id="15">15</span>
|
||||
<span id="16">16</span>
|
||||
<span id="17">17</span>
|
||||
<span id="18">18</span>
|
||||
<span id="19">19</span>
|
||||
<span id="20">20</span>
|
||||
<span id="21">21</span>
|
||||
<span id="22">22</span>
|
||||
<span id="23">23</span>
|
||||
<span id="24">24</span>
|
||||
<span id="25">25</span>
|
||||
<span id="26">26</span>
|
||||
<span id="27">27</span>
|
||||
<span id="28">28</span>
|
||||
<span id="29">29</span>
|
||||
<span id="30">30</span>
|
||||
<span id="31">31</span>
|
||||
<span id="32">32</span>
|
||||
<span id="33">33</span>
|
||||
<span id="34">34</span>
|
||||
<span id="35">35</span>
|
||||
<span id="36">36</span>
|
||||
<span id="37">37</span>
|
||||
<span id="38">38</span>
|
||||
<span id="39">39</span>
|
||||
<span id="40">40</span>
|
||||
<span id="41">41</span>
|
||||
<span id="42">42</span>
|
||||
<span id="43">43</span>
|
||||
<span id="44">44</span>
|
||||
<span id="45">45</span>
|
||||
<span id="46">46</span>
|
||||
<span id="47">47</span>
|
||||
<span id="48">48</span>
|
||||
<span id="49">49</span>
|
||||
<span id="50">50</span>
|
||||
<span id="51">51</span>
|
||||
<span id="52">52</span>
|
||||
<span id="53">53</span>
|
||||
<span id="54">54</span>
|
||||
<span id="55">55</span>
|
||||
<span id="56">56</span>
|
||||
<span id="57">57</span>
|
||||
<span id="58">58</span>
|
||||
<span id="59">59</span>
|
||||
<span id="60">60</span>
|
||||
<span id="61">61</span>
|
||||
<span id="62">62</span>
|
||||
<span id="63">63</span>
|
||||
<span id="64">64</span>
|
||||
<span id="65">65</span>
|
||||
<span id="66">66</span>
|
||||
<span id="67">67</span>
|
||||
<span id="68">68</span>
|
||||
<span id="69">69</span>
|
||||
<span id="70">70</span>
|
||||
<span id="71">71</span>
|
||||
<span id="72">72</span>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><pre class="line-numbers"><span id="1"> 1</span>
|
||||
<span id="2"> 2</span>
|
||||
<span id="3"> 3</span>
|
||||
<span id="4"> 4</span>
|
||||
<span id="5"> 5</span>
|
||||
<span id="6"> 6</span>
|
||||
<span id="7"> 7</span>
|
||||
<span id="8"> 8</span>
|
||||
<span id="9"> 9</span>
|
||||
<span id="10"> 10</span>
|
||||
<span id="11"> 11</span>
|
||||
<span id="12"> 12</span>
|
||||
<span id="13"> 13</span>
|
||||
<span id="14"> 14</span>
|
||||
<span id="15"> 15</span>
|
||||
<span id="16"> 16</span>
|
||||
<span id="17"> 17</span>
|
||||
<span id="18"> 18</span>
|
||||
<span id="19"> 19</span>
|
||||
<span id="20"> 20</span>
|
||||
<span id="21"> 21</span>
|
||||
<span id="22"> 22</span>
|
||||
<span id="23"> 23</span>
|
||||
<span id="24"> 24</span>
|
||||
<span id="25"> 25</span>
|
||||
<span id="26"> 26</span>
|
||||
<span id="27"> 27</span>
|
||||
<span id="28"> 28</span>
|
||||
<span id="29"> 29</span>
|
||||
<span id="30"> 30</span>
|
||||
<span id="31"> 31</span>
|
||||
<span id="32"> 32</span>
|
||||
<span id="33"> 33</span>
|
||||
<span id="34"> 34</span>
|
||||
<span id="35"> 35</span>
|
||||
<span id="36"> 36</span>
|
||||
<span id="37"> 37</span>
|
||||
<span id="38"> 38</span>
|
||||
<span id="39"> 39</span>
|
||||
<span id="40"> 40</span>
|
||||
<span id="41"> 41</span>
|
||||
<span id="42"> 42</span>
|
||||
<span id="43"> 43</span>
|
||||
<span id="44"> 44</span>
|
||||
<span id="45"> 45</span>
|
||||
<span id="46"> 46</span>
|
||||
<span id="47"> 47</span>
|
||||
<span id="48"> 48</span>
|
||||
<span id="49"> 49</span>
|
||||
<span id="50"> 50</span>
|
||||
<span id="51"> 51</span>
|
||||
<span id="52"> 52</span>
|
||||
<span id="53"> 53</span>
|
||||
<span id="54"> 54</span>
|
||||
<span id="55"> 55</span>
|
||||
<span id="56"> 56</span>
|
||||
<span id="57"> 57</span>
|
||||
<span id="58"> 58</span>
|
||||
<span id="59"> 59</span>
|
||||
<span id="60"> 60</span>
|
||||
<span id="61"> 61</span>
|
||||
<span id="62"> 62</span>
|
||||
<span id="63"> 63</span>
|
||||
<span id="64"> 64</span>
|
||||
<span id="65"> 65</span>
|
||||
<span id="66"> 66</span>
|
||||
<span id="67"> 67</span>
|
||||
<span id="68"> 68</span>
|
||||
<span id="69"> 69</span>
|
||||
<span id="70"> 70</span>
|
||||
<span id="71"> 71</span>
|
||||
<span id="72"> 72</span>
|
||||
<span id="73"> 73</span>
|
||||
<span id="74"> 74</span>
|
||||
<span id="75"> 75</span>
|
||||
<span id="76"> 76</span>
|
||||
<span id="77"> 77</span>
|
||||
<span id="78"> 78</span>
|
||||
<span id="79"> 79</span>
|
||||
<span id="80"> 80</span>
|
||||
<span id="81"> 81</span>
|
||||
<span id="82"> 82</span>
|
||||
<span id="83"> 83</span>
|
||||
<span id="84"> 84</span>
|
||||
<span id="85"> 85</span>
|
||||
<span id="86"> 86</span>
|
||||
<span id="87"> 87</span>
|
||||
<span id="88"> 88</span>
|
||||
<span id="89"> 89</span>
|
||||
<span id="90"> 90</span>
|
||||
<span id="91"> 91</span>
|
||||
<span id="92"> 92</span>
|
||||
<span id="93"> 93</span>
|
||||
<span id="94"> 94</span>
|
||||
<span id="95"> 95</span>
|
||||
<span id="96"> 96</span>
|
||||
<span id="97"> 97</span>
|
||||
<span id="98"> 98</span>
|
||||
<span id="99"> 99</span>
|
||||
<span id="100">100</span>
|
||||
<span id="101">101</span>
|
||||
<span id="102">102</span>
|
||||
<span id="103">103</span>
|
||||
<span id="104">104</span>
|
||||
<span id="105">105</span>
|
||||
<span id="106">106</span>
|
||||
<span id="107">107</span>
|
||||
<span id="108">108</span>
|
||||
<span id="109">109</span>
|
||||
<span id="110">110</span>
|
||||
<span id="111">111</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::{
|
||||
<span class="ident">Color</span>, <span class="ident">DrawWithTooltips</span>, <span class="ident">EventCtx</span>, <span class="ident">GeomBatch</span>, <span class="ident">JustDraw</span>, <span class="ident">RewriteColor</span>, <span class="ident">ScreenDims</span>, <span class="ident">ScreenPt</span>,
|
||||
<span class="ident">Text</span>, <span class="ident">Widget</span>,
|
||||
};
|
||||
<span class="kw">use</span> <span class="ident">geom</span>::<span class="ident">Bounds</span>;
|
||||
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>, <span class="ident">Debug</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Image</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span> {
|
||||
<span class="ident">filename</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>,
|
||||
<span class="ident">source</span>: <span class="ident">ImageSource</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span>,
|
||||
<span class="ident">tooltip</span>: <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Text</span><span class="op">></span>,
|
||||
<span class="ident">color</span>: <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">RewriteColor</span><span class="op">></span>,
|
||||
}
|
||||
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>, <span class="ident">Debug</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">enum</span> <span class="ident">ImageSource</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span> {
|
||||
<span class="ident">Path</span>(<span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>),
|
||||
<span class="ident">Bytes</span> { <span class="ident">bytes</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> [<span class="ident">u8</span>], <span class="ident">cache_key</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span> },
|
||||
<span class="ident">GeomBatch</span>(<span class="ident">GeomBatch</span>, <span class="ident">geom</span>::<span class="ident">Bounds</span>),
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">ImageSource</span><span class="op"><</span><span class="lifetime">'_</span><span class="op">></span> {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">load</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">prerender</span>: <span class="kw-2">&</span><span class="kw">crate</span>::<span class="ident">Prerender</span>) <span class="op">-</span><span class="op">></span> (<span class="ident">GeomBatch</span>, <span class="ident">geom</span>::<span class="ident">Bounds</span>) {
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">svg</span>;
|
||||
<span class="kw">match</span> <span class="self">self</span> {
|
||||
<span class="ident">ImageSource</span>::<span class="ident">Path</span>(<span class="ident">image_path</span>) <span class="op">=</span><span class="op">></span> <span class="ident">svg</span>::<span class="ident">load_svg</span>(<span class="ident">prerender</span>, <span class="ident">image_path</span>),
|
||||
<span class="ident">ImageSource</span>::<span class="ident">Bytes</span> { <span class="ident">bytes</span>, <span class="ident">cache_key</span> } <span class="op">=</span><span class="op">></span> {
|
||||
<span class="ident">svg</span>::<span class="ident">load_svg_bytes</span>(<span class="ident">prerender</span>, <span class="ident">cache_key</span>, <span class="ident">bytes</span>).<span class="ident">expect</span>(<span class="kw-2">&</span><span class="macro">format</span><span class="macro">!</span>(
|
||||
<span class="string">"Failed to load svg from bytes. cache_key: {}"</span>,
|
||||
<span class="ident">cache_key</span>
|
||||
))
|
||||
}
|
||||
<span class="ident">ImageSource</span>::<span class="ident">GeomBatch</span>(<span class="ident">geom_batch</span>, <span class="ident">bounds</span>) <span class="op">=</span><span class="op">></span> (<span class="ident">geom_batch</span>.<span class="ident">clone</span>(), <span class="kw-2">*</span><span class="ident">bounds</span>),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">impl</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span> <span class="ident">Image</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span> {
|
||||
<span class="doccomment">/// An SVG image, read from `filename`, which is colored to match Style.icon_fg</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">icon</span>(<span class="ident">filename</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="self">Self</span> {
|
||||
<span class="self">Self</span> {
|
||||
<span class="ident">filename</span>,
|
||||
<span class="ident">source</span>: <span class="ident">ImageSource</span>::<span class="ident">Path</span>(<span class="ident">filename</span>),
|
||||
<span class="ident">tooltip</span>: <span class="prelude-val">None</span>,
|
||||
<span class="ident">color</span>: <span class="prelude-val">None</span>,
|
||||
}
|
||||
@ -103,6 +167,17 @@
|
||||
<span class="self">Self</span>::<span class="ident">icon</span>(<span class="ident">filename</span>).<span class="ident">color</span>(<span class="ident">RewriteColor</span>::<span class="ident">NoOp</span>)
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">bytes</span>(<span class="ident">labeled_bytes</span>: (<span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>, <span class="kw-2">&</span><span class="lifetime">'a</span> [<span class="ident">u8</span>])) <span class="op">-</span><span class="op">></span> <span class="self">Self</span> {
|
||||
<span class="self">Self</span> {
|
||||
<span class="ident">source</span>: <span class="ident">ImageSource</span>::<span class="ident">Bytes</span> {
|
||||
<span class="ident">cache_key</span>: <span class="ident">labeled_bytes</span>.<span class="number">0</span>,
|
||||
<span class="ident">bytes</span>: <span class="ident">labeled_bytes</span>.<span class="number">1</span>,
|
||||
},
|
||||
<span class="ident">tooltip</span>: <span class="prelude-val">None</span>,
|
||||
<span class="ident">color</span>: <span class="prelude-val">None</span>,
|
||||
}
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Add a tooltip to appear when hovering over the image.</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">tooltip</span>: <span class="ident">Text</span>) <span class="op">-</span><span class="op">></span> <span class="self">Self</span> {
|
||||
<span class="self">self</span>.<span class="ident">tooltip</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">tooltip</span>);
|
||||
@ -115,11 +190,8 @@
|
||||
<span class="self">self</span>
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">into_widget</span>(<span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&</span><span class="ident">EventCtx</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Widget</span> {
|
||||
<span class="comment">// TODO: consolidate the impl from widgetry::widgets::button::Image which allows other</span>
|
||||
<span class="comment">// sources of images, like bytes and a raw GeomBatch.</span>
|
||||
|
||||
<span class="kw">let</span> (<span class="kw-2">mut</span> <span class="ident">batch</span>, <span class="ident">bounds</span>) <span class="op">=</span> <span class="kw">crate</span>::<span class="ident">svg</span>::<span class="ident">load_svg</span>(<span class="ident">ctx</span>.<span class="ident">prerender</span>, <span class="self">self</span>.<span class="ident">filename</span>);
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">batch</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&</span><span class="ident">EventCtx</span>) <span class="op">-</span><span class="op">></span> (<span class="ident">GeomBatch</span>, <span class="ident">Bounds</span>) {
|
||||
<span class="kw">let</span> (<span class="kw-2">mut</span> <span class="ident">batch</span>, <span class="ident">bounds</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">source</span>.<span class="ident">load</span>(<span class="kw-2">&</span><span class="ident">ctx</span>.<span class="ident">prerender</span>);
|
||||
|
||||
<span class="kw">let</span> <span class="ident">color</span> <span class="op">=</span> <span class="self">self</span>
|
||||
.<span class="ident">color</span>
|
||||
@ -130,6 +202,12 @@
|
||||
<span class="comment">// TODO Maybe always do this, add a way to autocrop() to remove it if needed.</span>
|
||||
<span class="ident">batch</span>.<span class="ident">push</span>(<span class="ident">Color</span>::<span class="ident">CLEAR</span>, <span class="ident">bounds</span>.<span class="ident">get_rectangle</span>());
|
||||
|
||||
(<span class="ident">batch</span>, <span class="ident">bounds</span>)
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">into_widget</span>(<span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&</span><span class="ident">EventCtx</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Widget</span> {
|
||||
<span class="kw">let</span> (<span class="ident">batch</span>, <span class="ident">bounds</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">batch</span>(<span class="ident">ctx</span>);
|
||||
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">tooltip</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">tooltip</span> {
|
||||
<span class="ident">DrawWithTooltips</span>::<span class="ident">new</span>(
|
||||
<span class="ident">ctx</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="API documentation for the Rust `backend` mod in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, backend"><title>widgetry::backend - 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><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module backend</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#reexports">Re-exports</a></li></ul></div><p class="location"><a href="../index.html">widgetry</a></p><script>window.sidebarCurrent = {name: "backend", ty: "mod", relpath: "../"};</script><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"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/lib.rs.html#94-97" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../index.html">widgetry</a>::<wbr><a class="mod" href="">backend</a></span></h1><h2 id="reexports" class="section-header"><a href="#reexports">Re-exports</a></h2>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/lib.rs.html#95-98" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../index.html">widgetry</a>::<wbr><a class="mod" href="">backend</a></span></h1><h2 id="reexports" class="section-header"><a href="#reexports">Re-exports</a></h2>
|
||||
<table><tr><td><code>pub use crate::<a class="mod" href="../../widgetry/backend_glow/index.html" title="mod widgetry::backend_glow">backend_glow</a>::*;</code></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "widgetry";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
@ -13,7 +13,7 @@
|
||||
</div></div><h3 id="impl-Deserialize%3C%27de%3E" class="impl"><code class="in-band">impl<'de> <a class="trait" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a><'de> for <a class="struct" href="../../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a></code><a href="#impl-Deserialize%3C%27de%3E" class="anchor"></a><a class="srclink" href="../../src/widgetry/color.rs.html#7" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.deserialize" class="method hidden"><code>fn <a href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html#tymethod.deserialize" class="fnname">deserialize</a><__D>(__deserializer: __D) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, __D::<a class="type" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>> <span class="where fmt-newline">where<br> __D: <a class="trait" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a><'de>, </span></code><a class="srclink" href="../../src/widgetry/color.rs.html#7" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
|
||||
</div></div><h3 id="impl-Display" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="struct" href="../../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a></code><a href="#impl-Display" class="anchor"></a><a class="srclink" href="../../src/widgetry/color.rs.html#15-23" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt-1" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../src/widgetry/color.rs.html#16-22" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id="impl-From%3CColor%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>> for <a class="enum" href="../../widgetry/color/enum.Fill.html" title="enum widgetry::color::Fill">Fill</a></code><a href="#impl-From%3CColor%3E" class="anchor"></a><a class="srclink" href="../../src/widgetry/color.rs.html#231-235" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(color: <a class="struct" href="../../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>) -> <a class="enum" href="../../widgetry/color/enum.Fill.html" title="enum widgetry::color::Fill">Fill</a></code><a class="srclink" href="../../src/widgetry/color.rs.html#232-234" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-From%3CColor%3E-1" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>> for <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-From%3CColor%3E-1" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom.rs.html#289-293" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from-1" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(color: <a class="struct" href="../../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>) -> <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#290-292" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-From%3CColor%3E-1" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>> for <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-From%3CColor%3E-1" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#291-295" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from-1" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(color: <a class="struct" href="../../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>) -> <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#292-294" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-PartialEq%3CColor%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="../../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>> for <a class="struct" href="../../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a></code><a href="#impl-PartialEq%3CColor%3E" class="anchor"></a><a class="srclink" href="../../src/widgetry/color.rs.html#7" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.eq" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="struct" href="../../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../src/widgetry/color.rs.html#7" title="goto source code">[src]</a></h4><div class='docblock hidden'><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/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
||||
</div><h4 id="method.ne" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: &<a class="struct" href="../../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../src/widgetry/color.rs.html#7" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,7 +1,7 @@
|
||||
<!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 `ContentMode` enum in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, ContentMode"><title>widgetry::ContentMode - 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><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../widgetry/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Enum ContentMode</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.ScaleAspectFill">ScaleAspectFill</a><a href="#variant.ScaleAspectFit">ScaleAspectFit</a><a href="#variant.ScaleToFill">ScaleToFill</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-Default">Default</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><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><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><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-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></div></div><p class="location"><a href="index.html">widgetry</a></p><script>window.sidebarCurrent = {name: "ContentMode", ty: "enum", relpath: ""};</script><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"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/lib.rs.html#119-135" title="goto source code">[src]</a></span><span class="in-band">Enum <a href="index.html">widgetry</a>::<wbr><a class="enum" href="">ContentMode</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust enum">pub enum ContentMode {
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/lib.rs.html#120-136" title="goto source code">[src]</a></span><span class="in-band">Enum <a href="index.html">widgetry</a>::<wbr><a class="enum" href="">ContentMode</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust enum">pub enum ContentMode {
|
||||
ScaleToFill,
|
||||
ScaleAspectFit,
|
||||
ScaleAspectFill,
|
||||
@ -16,10 +16,10 @@ then there will be some empty space within the bounds to center the content.</p>
|
||||
</div><div id="variant.ScaleAspectFill" class="variant small-section-header"><a href="#variant.ScaleAspectFill" class="anchor field"></a><code>ScaleAspectFill</code></div><div class="docblock"><p>Maintaining aspect ratio, content grows until both bounds are met.</p>
|
||||
<p>If the aspect ratio of the bounds do not exactly match the aspect ratio of the content,
|
||||
the content will overflow one dimension of its bounds.</p>
|
||||
</div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="../widgetry/enum.ContentMode.html" title="enum widgetry::ContentMode">ContentMode</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#118" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="enum" href="../widgetry/enum.ContentMode.html" title="enum widgetry::ContentMode">ContentMode</a></code><a class="srclink" href="../src/widgetry/lib.rs.html#118" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="../widgetry/enum.ContentMode.html" title="enum widgetry::ContentMode">ContentMode</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#119" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="enum" href="../widgetry/enum.ContentMode.html" title="enum widgetry::ContentMode">ContentMode</a></code><a class="srclink" href="../src/widgetry/lib.rs.html#119" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id="method.clone_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/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/nightly/std/primitive.reference.html">&</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#128-130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../widgetry/enum.ContentMode.html" title="enum widgetry::ContentMode">ContentMode</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#118" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/widgetry/lib.rs.html#118" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id="impl-Default" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="enum" href="../widgetry/enum.ContentMode.html" title="enum widgetry::ContentMode">ContentMode</a></code><a href="#impl-Default" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#137-141" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.default" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default" class="fnname">default</a>() -> Self</code><a class="srclink" href="../src/widgetry/lib.rs.html#138-140" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns the "default value" for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></p>
|
||||
</div></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../widgetry/enum.ContentMode.html" title="enum widgetry::ContentMode">ContentMode</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#119" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/widgetry/lib.rs.html#119" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id="impl-Default" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="enum" href="../widgetry/enum.ContentMode.html" title="enum widgetry::ContentMode">ContentMode</a></code><a href="#impl-Default" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#138-142" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.default" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default" class="fnname">default</a>() -> Self</code><a class="srclink" href="../src/widgetry/lib.rs.html#139-141" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns the "default value" for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></p>
|
||||
</div></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"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="../widgetry/enum.ContentMode.html" title="enum widgetry::ContentMode">ContentMode</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="../widgetry/enum.ContentMode.html" title="enum widgetry::ContentMode">ContentMode</a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="../widgetry/enum.ContentMode.html" title="enum widgetry::ContentMode">ContentMode</a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="../widgetry/enum.ContentMode.html" title="enum widgetry::ContentMode">ContentMode</a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="../widgetry/enum.ContentMode.html" title="enum widgetry::ContentMode">ContentMode</a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></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"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||
|
@ -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 `ControlState` enum in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, ControlState"><title>widgetry::ControlState - 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><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../widgetry/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Enum ControlState</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.Default">Default</a><a href="#variant.Disabled">Disabled</a><a href="#variant.Hovered">Hovered</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Copy">Copy</a><a href="#impl-Debug">Debug</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><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><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><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-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></div></div><p class="location"><a href="index.html">widgetry</a></p><script>window.sidebarCurrent = {name: "ControlState", ty: "enum", relpath: ""};</script><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"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/lib.rs.html#110-115" title="goto source code">[src]</a></span><span class="in-band">Enum <a href="index.html">widgetry</a>::<wbr><a class="enum" href="">ControlState</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust enum">pub enum ControlState {
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/lib.rs.html#111-116" title="goto source code">[src]</a></span><span class="in-band">Enum <a href="index.html">widgetry</a>::<wbr><a class="enum" href="">ControlState</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust enum">pub enum ControlState {
|
||||
Default,
|
||||
Hovered,
|
||||
Disabled,
|
||||
}</pre></div><h2 id="variants" class="variants small-section-header">
|
||||
Variants<a href="#variants" class="anchor"></a></h2>
|
||||
<div id="variant.Default" class="variant small-section-header"><a href="#variant.Default" class="anchor field"></a><code>Default</code></div><div id="variant.Hovered" class="variant small-section-header"><a href="#variant.Hovered" class="anchor field"></a><code>Hovered</code></div><div id="variant.Disabled" class="variant small-section-header"><a href="#variant.Disabled" class="anchor field"></a><code>Disabled</code></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="../widgetry/enum.ControlState.html" title="enum widgetry::ControlState">ControlState</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#109" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="enum" href="../widgetry/enum.ControlState.html" title="enum widgetry::ControlState">ControlState</a></code><a class="srclink" href="../src/widgetry/lib.rs.html#109" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
<div id="variant.Default" class="variant small-section-header"><a href="#variant.Default" class="anchor field"></a><code>Default</code></div><div id="variant.Hovered" class="variant small-section-header"><a href="#variant.Hovered" class="anchor field"></a><code>Hovered</code></div><div id="variant.Disabled" class="variant small-section-header"><a href="#variant.Disabled" class="anchor field"></a><code>Disabled</code></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="../widgetry/enum.ControlState.html" title="enum widgetry::ControlState">ControlState</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#110" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="enum" href="../widgetry/enum.ControlState.html" title="enum widgetry::ControlState">ControlState</a></code><a class="srclink" href="../src/widgetry/lib.rs.html#110" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id="method.clone_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/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/nightly/std/primitive.reference.html">&</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#128-130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></div><h3 id="impl-Copy" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="enum" href="../widgetry/enum.ControlState.html" title="enum widgetry::ControlState">ControlState</a></code><a href="#impl-Copy" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#109" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../widgetry/enum.ControlState.html" title="enum widgetry::ControlState">ControlState</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#109" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/widgetry/lib.rs.html#109" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id="impl-Copy" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="enum" href="../widgetry/enum.ControlState.html" title="enum widgetry::ControlState">ControlState</a></code><a href="#impl-Copy" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#110" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../widgetry/enum.ControlState.html" title="enum widgetry::ControlState">ControlState</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#110" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/widgetry/lib.rs.html#110" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></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"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="../widgetry/enum.ControlState.html" title="enum widgetry::ControlState">ControlState</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="../widgetry/enum.ControlState.html" title="enum widgetry::ControlState">ControlState</a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="../widgetry/enum.ControlState.html" title="enum widgetry::ControlState">ControlState</a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="../widgetry/enum.ControlState.html" title="enum widgetry::ControlState">ControlState</a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="../widgetry/enum.ControlState.html" title="enum widgetry::ControlState">ControlState</a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></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"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||
|
40
rustdoc/widgetry/enum.ImageSource.html
Normal file
40
rustdoc/widgetry/enum.ImageSource.html
Normal file
@ -0,0 +1,40 @@
|
||||
<!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 `ImageSource` enum in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, ImageSource"><title>widgetry::ImageSource - 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><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../widgetry/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Enum ImageSource</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.Bytes">Bytes</a><a href="#variant.GeomBatch">GeomBatch</a><a href="#variant.Path">Path</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.load">load</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><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><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><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-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></div></div><p class="location"><a href="index.html">widgetry</a></p><script>window.sidebarCurrent = {name: "ImageSource", ty: "enum", relpath: ""};</script><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"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/widgets/image.rs.html#15-19" title="goto source code">[src]</a></span><span class="in-band">Enum <a href="index.html">widgetry</a>::<wbr><a class="enum" href="">ImageSource</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust enum">pub enum ImageSource<'a> {
|
||||
Path(&'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>),
|
||||
Bytes {
|
||||
bytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>,
|
||||
cache_key: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
|
||||
},
|
||||
GeomBatch(<a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a>, <a class="struct" href="../geom/bounds/struct.Bounds.html" title="struct geom::bounds::Bounds">Bounds</a>),
|
||||
}</pre></div><h2 id="variants" class="variants small-section-header">
|
||||
Variants<a href="#variants" class="anchor"></a></h2>
|
||||
<div id="variant.Path" class="variant small-section-header"><a href="#variant.Path" class="anchor field"></a><code>Path(&'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>)</code></div><div id="variant.Bytes" class="variant small-section-header"><a href="#variant.Bytes" class="anchor field"></a><code>Bytes</code></div><div class="autohide sub-variant" id="variant.Bytes.fields"><h3>Fields of <b>Bytes</b></h3><div><span id="variant.Bytes.field.bytes" class="variant small-section-header"><a href="#variant.Bytes.field.bytes" class="anchor field"></a><code>bytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></code></span><span id="variant.Bytes.field.cache_key" class="variant small-section-header"><a href="#variant.Bytes.field.cache_key" class="anchor field"></a><code>cache_key: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></code></span></div></div><div id="variant.GeomBatch" class="variant small-section-header"><a href="#variant.GeomBatch" class="anchor field"></a><code>GeomBatch(<a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a>, <a class="struct" href="../geom/bounds/struct.Bounds.html" title="struct geom::bounds::Bounds">Bounds</a>)</code></div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="enum" href="../widgetry/widgets/image/enum.ImageSource.html" title="enum widgetry::widgets::image::ImageSource">ImageSource</a><'_></code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/image.rs.html#21-35" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.load" class="method"><code>pub fn <a href="#method.load" class="fnname">load</a>(&self, prerender: &<a class="struct" href="../widgetry/drawing/struct.Prerender.html" title="struct widgetry::drawing::Prerender">Prerender</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a>, <a class="struct" href="../geom/bounds/struct.Bounds.html" title="struct geom::bounds::Bounds">Bounds</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class="srclink" href="../src/widgetry/widgets/image.rs.html#22-34" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="../widgetry/widgets/image/enum.ImageSource.html" title="enum widgetry::widgets::image::ImageSource">ImageSource</a><'a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/image.rs.html#14" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="enum" href="../widgetry/widgets/image/enum.ImageSource.html" title="enum widgetry::widgets::image::ImageSource">ImageSource</a><'a></code><a class="srclink" href="../src/widgetry/widgets/image.rs.html#14" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id="method.clone_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/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/nightly/std/primitive.reference.html">&</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#128-130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../widgetry/widgets/image/enum.ImageSource.html" title="enum widgetry::widgets::image::ImageSource">ImageSource</a><'a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/image.rs.html#14" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/widgetry/widgets/image.rs.html#14" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></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"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="../widgetry/widgets/image/enum.ImageSource.html" title="enum widgetry::widgets::image::ImageSource">ImageSource</a><'a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="../widgetry/widgets/image/enum.ImageSource.html" title="enum widgetry::widgets::image::ImageSource">ImageSource</a><'a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="../widgetry/widgets/image/enum.ImageSource.html" title="enum widgetry::widgets::image::ImageSource">ImageSource</a><'a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="../widgetry/widgets/image/enum.ImageSource.html" title="enum widgetry::widgets::image::ImageSource">ImageSource</a><'a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="../widgetry/widgets/image/enum.ImageSource.html" title="enum widgetry::widgets::image::ImageSource">ImageSource</a><'a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></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"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||
</div></div><h3 id="impl-Downcast" class="impl"><code class="in-band">impl<T> Downcast for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a>, </span></code><a href="#impl-Downcast" class="anchor"></a></h3><div class="impl-items"><h4 id="method.into_any" class="method hidden"><code>pub fn <a href="#method.into_any" class="fnname">into_any</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><T, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>></code></h4><div class='docblock hidden'><p>Convert <code>Box<dyn Trait></code> (where <code>Trait: Downcast</code>) to <code>Box<dyn Any></code>. <code>Box<dyn Any></code> can
|
||||
then be further <code>downcast</code> into <code>Box<ConcreteType></code> where <code>ConcreteType</code> implements <code>Trait</code>. <a href="#tymethod.into_any">Read more</a></p>
|
||||
</div><h4 id="method.into_any_rc" class="method hidden"><code>pub fn <a href="#method.into_any_rc" class="fnname">into_any_rc</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html" title="struct alloc::rc::Rc">Rc</a><T>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html" title="struct alloc::rc::Rc">Rc</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static></code></h4><div class='docblock hidden'><p>Convert <code>Rc<Trait></code> (where <code>Trait: Downcast</code>) to <code>Rc<Any></code>. <code>Rc<Any></code> can then be
|
||||
further <code>downcast</code> into <code>Rc<ConcreteType></code> where <code>ConcreteType</code> implements <code>Trait</code>. <a href="#tymethod.into_any_rc">Read more</a></p>
|
||||
</div><h4 id="method.as_any" class="method hidden"><code>pub fn <a href="#method.as_any" class="fnname">as_any</a>(&self) -> &(dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static)</code></h4><div class='docblock hidden'><p>Convert <code>&Trait</code> (where <code>Trait: Downcast</code>) to <code>&Any</code>. This is needed since Rust cannot
|
||||
generate <code>&Any</code>'s vtable from <code>&Trait</code>'s. <a href="#tymethod.as_any">Read more</a></p>
|
||||
</div><h4 id="method.as_any_mut" class="method hidden"><code>pub fn <a href="#method.as_any_mut" class="fnname">as_any_mut</a>(&mut self) -> &mut (dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static)</code></h4><div class='docblock hidden'><p>Convert <code>&mut Trait</code> (where <code>Trait: Downcast</code>) to <code>&Any</code>. This is needed since Rust cannot
|
||||
generate <code>&mut Any</code>'s vtable from <code>&mut Trait</code>'s. <a href="#tymethod.as_any_mut">Read more</a></p>
|
||||
</div></div><h3 id="impl-DowncastSync" class="impl"><code class="in-band">impl<T> DowncastSync for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a>, </span></code><a href="#impl-DowncastSync" class="anchor"></a></h3><div class="impl-items"><h4 id="method.into_any_arc" class="method hidden"><code>pub fn <a href="#method.into_any_arc" class="fnname">into_any_arc</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a><T>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>></code></h4><div class='docblock hidden'><p>Convert <code>Arc<Trait></code> (where <code>Trait: Downcast</code>) to <code>Arc<Any></code>. <code>Arc<Any></code> can then be
|
||||
further <code>downcast</code> into <code>Arc<ConcreteType></code> where <code>ConcreteType</code> implements <code>Trait</code>. <a href="#tymethod.into_any_arc">Read more</a></p>
|
||||
</div></div><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#552-556" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#553-555" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-Into%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#541-548" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545-547" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-Same%3CT%3E" class="impl"><code class="in-band">impl<T> Same<T> for T</code><a href="#impl-Same%3CT%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="associatedtype.Output" class="type"><code>type <a href="#associatedtype.Output" class="type">Output</a> = T</code></h4><div class='docblock'><p>Should always be <code>Self</code></p>
|
||||
</div></div><h3 id="impl-ToOwned" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></code><a href="#impl-ToOwned" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#80-92" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Owned" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="type">Owned</a> = T</code></h4><div class='docblock'><p>The resulting type after obtaining ownership.</p>
|
||||
</div><h4 id="method.to_owned" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&self) -> T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#85-87" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p>
|
||||
</div><h4 id="method.clone_into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T)</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#89-91" title="goto source code">[src]</a></h4><div class="item-info hidden"><div class="stab unstable"><details><summary><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>toowned_clone_into</code>)</summary><p>recently added</p>
|
||||
</details></div></div><div class='docblock hidden'><p>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p>
|
||||
</div></div><h3 id="impl-TryFrom%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></code><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#589-598" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||||
</div><h4 id="method.try_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#595-597" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-TryInto%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#575-584" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error-1" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||||
</div><h4 id="method.try_into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#581-583" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "widgetry";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|
@ -1,7 +1,7 @@
|
||||
<!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 `RewriteColor` enum in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, RewriteColor"><title>widgetry::RewriteColor - 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><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../widgetry/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Enum RewriteColor</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.Change">Change</a><a href="#variant.ChangeAll">ChangeAll</a><a href="#variant.ChangeAlpha">ChangeAlpha</a><a href="#variant.MakeGrayscale">MakeGrayscale</a><a href="#variant.NoOp">NoOp</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.apply">apply</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><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-Deserialize%3C%27de%3E">Deserialize<'de></a><a href="#impl-From%3CColor%3E">From<Color></a><a href="#impl-PartialEq%3CRewriteColor%3E">PartialEq<RewriteColor></a><a href="#impl-Serialize">Serialize</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><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><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><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-DeserializeOwned">DeserializeOwned</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-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></div></div><p class="location"><a href="index.html">widgetry</a></p><script>window.sidebarCurrent = {name: "RewriteColor", ty: "enum", relpath: ""};</script><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"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/geom.rs.html#275-287" title="goto source code">[src]</a></span><span class="in-band">Enum <a href="index.html">widgetry</a>::<wbr><a class="enum" href="">RewriteColor</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust enum">pub enum RewriteColor {
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/geom/mod.rs.html#277-289" title="goto source code">[src]</a></span><span class="in-band">Enum <a href="index.html">widgetry</a>::<wbr><a class="enum" href="">RewriteColor</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust enum">pub enum RewriteColor {
|
||||
NoOp,
|
||||
Change(<a class="struct" href="../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>, <a class="struct" href="../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>),
|
||||
ChangeAll(<a class="struct" href="../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>),
|
||||
@ -16,16 +16,16 @@
|
||||
be a solid block of color.</p>
|
||||
</div><div id="variant.ChangeAlpha" class="variant small-section-header"><a href="#variant.ChangeAlpha" class="anchor field"></a><code>ChangeAlpha(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>)</code></div><div class="docblock"><p>Change the alpha value of all colors to this value.</p>
|
||||
</div><div id="variant.MakeGrayscale" class="variant small-section-header"><a href="#variant.MakeGrayscale" class="anchor field"></a><code>MakeGrayscale</code></div><div class="docblock"><p>Convert all colors to greyscale.</p>
|
||||
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/widgetry/geom.rs.html#295-314" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.apply" class="method"><code>fn <a href="#method.apply" class="fnname">apply</a>(&self, c: <a class="struct" href="../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>) -> <a class="struct" href="../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#296-313" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../src/widgetry/geom.rs.html#274" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#274" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#297-316" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.apply" class="method"><code>fn <a href="#method.apply" class="fnname">apply</a>(&self, c: <a class="struct" href="../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>) -> <a class="struct" href="../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a></code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#298-315" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#276" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#276" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id="method.clone_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/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/nightly/std/primitive.reference.html">&</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#128-130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></div><h3 id="impl-Copy" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-Copy" class="anchor"></a><a class="srclink" href="../src/widgetry/geom.rs.html#274" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/widgetry/geom.rs.html#274" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#274" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id="impl-Deserialize%3C%27de%3E" class="impl"><code class="in-band">impl<'de> <a class="trait" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a><'de> for <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-Deserialize%3C%27de%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/geom.rs.html#274" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.deserialize" class="method hidden"><code>fn <a href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html#tymethod.deserialize" class="fnname">deserialize</a><__D>(__deserializer: __D) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, __D::<a class="type" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>> <span class="where fmt-newline">where<br> __D: <a class="trait" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a><'de>, </span></code><a class="srclink" href="../src/widgetry/geom.rs.html#274" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
|
||||
</div></div><h3 id="impl-From%3CColor%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>> for <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-From%3CColor%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/geom.rs.html#289-293" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(color: <a class="struct" href="../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>) -> <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#290-292" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-PartialEq%3CRewriteColor%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>> for <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-PartialEq%3CRewriteColor%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/geom.rs.html#274" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.eq" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#274" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
|
||||
</div></div><h3 id="impl-Copy" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-Copy" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#276" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#276" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#276" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id="impl-Deserialize%3C%27de%3E" class="impl"><code class="in-band">impl<'de> <a class="trait" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a><'de> for <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-Deserialize%3C%27de%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#276" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.deserialize" class="method hidden"><code>fn <a href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html#tymethod.deserialize" class="fnname">deserialize</a><__D>(__deserializer: __D) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, __D::<a class="type" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>> <span class="where fmt-newline">where<br> __D: <a class="trait" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a><'de>, </span></code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#276" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
|
||||
</div></div><h3 id="impl-From%3CColor%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>> for <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-From%3CColor%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#291-295" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(color: <a class="struct" href="../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>) -> <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#292-294" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-PartialEq%3CRewriteColor%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>> for <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-PartialEq%3CRewriteColor%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#276" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.eq" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#276" title="goto source code">[src]</a></h4><div class='docblock hidden'><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/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
||||
</div><h4 id="method.ne" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: &<a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#274" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
|
||||
</div></div><h3 id="impl-Serialize" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a> for <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-Serialize" class="anchor"></a><a class="srclink" href="../src/widgetry/geom.rs.html#274" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.serialize" class="method hidden"><code>fn <a href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serialize.html#tymethod.serialize" class="fnname">serialize</a><__S>(&self, __serializer: __S) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><__S::<a class="type" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, __S::<a class="type" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>> <span class="where fmt-newline">where<br> __S: <a class="trait" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serializer.html" title="trait serde::ser::Serializer">Serializer</a>, </span></code><a class="srclink" href="../src/widgetry/geom.rs.html#274" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Serialize this value into the given Serde serializer. <a href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serialize.html#tymethod.serialize">Read more</a></p>
|
||||
</div></div><h3 id="impl-StructuralPartialEq" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-StructuralPartialEq" class="anchor"></a><a class="srclink" href="../src/widgetry/geom.rs.html#274" title="goto source code">[src]</a></h3><div class="impl-items"></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"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></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"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div><h4 id="method.ne" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: &<a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#276" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
|
||||
</div></div><h3 id="impl-Serialize" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a> for <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-Serialize" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#276" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.serialize" class="method hidden"><code>fn <a href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serialize.html#tymethod.serialize" class="fnname">serialize</a><__S>(&self, __serializer: __S) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><__S::<a class="type" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, __S::<a class="type" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>> <span class="where fmt-newline">where<br> __S: <a class="trait" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serializer.html" title="trait serde::ser::Serializer">Serializer</a>, </span></code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#276" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Serialize this value into the given Serde serializer. <a href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serialize.html#tymethod.serialize">Read more</a></p>
|
||||
</div></div><h3 id="impl-StructuralPartialEq" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-StructuralPartialEq" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#276" title="goto source code">[src]</a></h3><div class="impl-items"></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"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></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"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||
</div></div><h3 id="impl-DeserializeOwned" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://docs.rs/serde/1.0.123/serde/de/trait.DeserializeOwned.html" title="trait serde::de::DeserializeOwned">DeserializeOwned</a> for T <span class="where fmt-newline">where<br> T: for<'de> <a class="trait" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a><'de>, </span></code><a href="#impl-DeserializeOwned" class="anchor"></a><a class="srclink" href="https://docs.rs/serde/1.0.123/src/serde/de/mod.rs.html#603" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Downcast" class="impl"><code class="in-band">impl<T> Downcast for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a>, </span></code><a href="#impl-Downcast" class="anchor"></a></h3><div class="impl-items"><h4 id="method.into_any" class="method hidden"><code>pub fn <a href="#method.into_any" class="fnname">into_any</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><T, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>></code></h4><div class='docblock hidden'><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,7 +1,7 @@
|
||||
<!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 `RewriteColor` enum in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, RewriteColor"><title>widgetry::geom::RewriteColor - 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><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Enum RewriteColor</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.Change">Change</a><a href="#variant.ChangeAll">ChangeAll</a><a href="#variant.ChangeAlpha">ChangeAlpha</a><a href="#variant.MakeGrayscale">MakeGrayscale</a><a href="#variant.NoOp">NoOp</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.apply">apply</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><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-Deserialize%3C%27de%3E">Deserialize<'de></a><a href="#impl-From%3CColor%3E">From<Color></a><a href="#impl-PartialEq%3CRewriteColor%3E">PartialEq<RewriteColor></a><a href="#impl-Serialize">Serialize</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><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><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><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-DeserializeOwned">DeserializeOwned</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-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></div></div><p class="location"><a href="../index.html">widgetry</a>::<wbr><a href="index.html">geom</a></p><script>window.sidebarCurrent = {name: "RewriteColor", ty: "enum", relpath: ""};</script><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"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/geom.rs.html#275-287" title="goto source code">[src]</a></span><span class="in-band">Enum <a href="../index.html">widgetry</a>::<wbr><a href="index.html">geom</a>::<wbr><a class="enum" href="">RewriteColor</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust enum">pub enum RewriteColor {
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/geom/mod.rs.html#277-289" title="goto source code">[src]</a></span><span class="in-band">Enum <a href="../index.html">widgetry</a>::<wbr><a href="index.html">geom</a>::<wbr><a class="enum" href="">RewriteColor</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust enum">pub enum RewriteColor {
|
||||
NoOp,
|
||||
Change(<a class="struct" href="../../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>, <a class="struct" href="../../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>),
|
||||
ChangeAll(<a class="struct" href="../../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>),
|
||||
@ -16,16 +16,16 @@
|
||||
be a solid block of color.</p>
|
||||
</div><div id="variant.ChangeAlpha" class="variant small-section-header"><a href="#variant.ChangeAlpha" class="anchor field"></a><code>ChangeAlpha(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>)</code></div><div class="docblock"><p>Change the alpha value of all colors to this value.</p>
|
||||
</div><div id="variant.MakeGrayscale" class="variant small-section-header"><a href="#variant.MakeGrayscale" class="anchor field"></a><code>MakeGrayscale</code></div><div class="docblock"><p>Convert all colors to greyscale.</p>
|
||||
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom.rs.html#295-314" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.apply" class="method"><code>fn <a href="#method.apply" class="fnname">apply</a>(&self, c: <a class="struct" href="../../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>) -> <a class="struct" href="../../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#296-313" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom.rs.html#274" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#274" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#297-316" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.apply" class="method"><code>fn <a href="#method.apply" class="fnname">apply</a>(&self, c: <a class="struct" href="../../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>) -> <a class="struct" href="../../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a></code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#298-315" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#276" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#276" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id="method.clone_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/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/nightly/std/primitive.reference.html">&</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#128-130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></div><h3 id="impl-Copy" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-Copy" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom.rs.html#274" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom.rs.html#274" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#274" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id="impl-Deserialize%3C%27de%3E" class="impl"><code class="in-band">impl<'de> <a class="trait" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a><'de> for <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-Deserialize%3C%27de%3E" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom.rs.html#274" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.deserialize" class="method hidden"><code>fn <a href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html#tymethod.deserialize" class="fnname">deserialize</a><__D>(__deserializer: __D) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, __D::<a class="type" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>> <span class="where fmt-newline">where<br> __D: <a class="trait" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a><'de>, </span></code><a class="srclink" href="../../src/widgetry/geom.rs.html#274" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
|
||||
</div></div><h3 id="impl-From%3CColor%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>> for <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-From%3CColor%3E" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom.rs.html#289-293" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(color: <a class="struct" href="../../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>) -> <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#290-292" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-PartialEq%3CRewriteColor%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>> for <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-PartialEq%3CRewriteColor%3E" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom.rs.html#274" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.eq" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#274" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
|
||||
</div></div><h3 id="impl-Copy" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-Copy" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#276" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#276" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#276" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id="impl-Deserialize%3C%27de%3E" class="impl"><code class="in-band">impl<'de> <a class="trait" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a><'de> for <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-Deserialize%3C%27de%3E" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#276" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.deserialize" class="method hidden"><code>fn <a href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html#tymethod.deserialize" class="fnname">deserialize</a><__D>(__deserializer: __D) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, __D::<a class="type" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>> <span class="where fmt-newline">where<br> __D: <a class="trait" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a><'de>, </span></code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#276" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
|
||||
</div></div><h3 id="impl-From%3CColor%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>> for <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-From%3CColor%3E" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#291-295" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(color: <a class="struct" href="../../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>) -> <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#292-294" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-PartialEq%3CRewriteColor%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>> for <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-PartialEq%3CRewriteColor%3E" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#276" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.eq" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#276" title="goto source code">[src]</a></h4><div class='docblock hidden'><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/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
||||
</div><h4 id="method.ne" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: &<a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#274" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
|
||||
</div></div><h3 id="impl-Serialize" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a> for <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-Serialize" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom.rs.html#274" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.serialize" class="method hidden"><code>fn <a href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serialize.html#tymethod.serialize" class="fnname">serialize</a><__S>(&self, __serializer: __S) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><__S::<a class="type" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, __S::<a class="type" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>> <span class="where fmt-newline">where<br> __S: <a class="trait" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serializer.html" title="trait serde::ser::Serializer">Serializer</a>, </span></code><a class="srclink" href="../../src/widgetry/geom.rs.html#274" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Serialize this value into the given Serde serializer. <a href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serialize.html#tymethod.serialize">Read more</a></p>
|
||||
</div></div><h3 id="impl-StructuralPartialEq" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-StructuralPartialEq" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom.rs.html#274" title="goto source code">[src]</a></h3><div class="impl-items"></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"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></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"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div><h4 id="method.ne" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: &<a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#276" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
|
||||
</div></div><h3 id="impl-Serialize" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a> for <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-Serialize" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#276" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.serialize" class="method hidden"><code>fn <a href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serialize.html#tymethod.serialize" class="fnname">serialize</a><__S>(&self, __serializer: __S) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><__S::<a class="type" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, __S::<a class="type" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>> <span class="where fmt-newline">where<br> __S: <a class="trait" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serializer.html" title="trait serde::ser::Serializer">Serializer</a>, </span></code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#276" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Serialize this value into the given Serde serializer. <a href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serialize.html#tymethod.serialize">Read more</a></p>
|
||||
</div></div><h3 id="impl-StructuralPartialEq" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-StructuralPartialEq" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#276" title="goto source code">[src]</a></h3><div class="impl-items"></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"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></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"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||
</div></div><h3 id="impl-DeserializeOwned" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://docs.rs/serde/1.0.123/serde/de/trait.DeserializeOwned.html" title="trait serde::de::DeserializeOwned">DeserializeOwned</a> for T <span class="where fmt-newline">where<br> T: for<'de> <a class="trait" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a><'de>, </span></code><a href="#impl-DeserializeOwned" class="anchor"></a><a class="srclink" href="https://docs.rs/serde/1.0.123/src/serde/de/mod.rs.html#603" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Downcast" class="impl"><code class="in-band">impl<T> Downcast for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a>, </span></code><a href="#impl-Downcast" class="anchor"></a></h3><div class="impl-items"><h4 id="method.into_any" class="method hidden"><code>pub fn <a href="#method.into_any" class="fnname">into_any</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><T, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>></code></h4><div class='docblock hidden'><p>Convert <code>Box<dyn Trait></code> (where <code>Trait: Downcast</code>) to <code>Box<dyn Any></code>. <code>Box<dyn Any></code> can
|
||||
|
39
rustdoc/widgetry/geom/geom_batch_stack/enum.Axis.html
Normal file
39
rustdoc/widgetry/geom/geom_batch_stack/enum.Axis.html
Normal file
@ -0,0 +1,39 @@
|
||||
<!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 `Axis` enum in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, Axis"><title>widgetry::geom::geom_batch_stack::Axis - 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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Enum Axis</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.Horizontal">Horizontal</a><a href="#variant.Vertical">Vertical</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><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%3CAxis%3E">PartialEq<Axis></a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><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><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><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-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></div></div><p class="location"><a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">geom</a>::<wbr><a href="index.html">geom_batch_stack</a></p><script>window.sidebarCurrent = {name: "Axis", ty: "enum", relpath: ""};</script><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"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/geom/geom_batch_stack.rs.html#4-7" title="goto source code">[src]</a></span><span class="in-band">Enum <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">geom</a>::<wbr><a href="index.html">geom_batch_stack</a>::<wbr><a class="enum" href="">Axis</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust enum">pub enum Axis {
|
||||
Horizontal,
|
||||
Vertical,
|
||||
}</pre></div><h2 id="variants" class="variants small-section-header">
|
||||
Variants<a href="#variants" class="anchor"></a></h2>
|
||||
<div id="variant.Horizontal" class="variant small-section-header"><a href="#variant.Horizontal" class="anchor field"></a><code>Horizontal</code></div><div id="variant.Vertical" class="variant small-section-header"><a href="#variant.Vertical" class="anchor field"></a><code>Vertical</code></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="../../../widgetry/geom/geom_batch_stack/enum.Axis.html" title="enum widgetry::geom::geom_batch_stack::Axis">Axis</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../../src/widgetry/geom/geom_batch_stack.rs.html#3" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="enum" href="../../../widgetry/geom/geom_batch_stack/enum.Axis.html" title="enum widgetry::geom::geom_batch_stack::Axis">Axis</a></code><a class="srclink" href="../../../src/widgetry/geom/geom_batch_stack.rs.html#3" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id="method.clone_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/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/nightly/std/primitive.reference.html">&</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#128-130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></div><h3 id="impl-Copy" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="enum" href="../../../widgetry/geom/geom_batch_stack/enum.Axis.html" title="enum widgetry::geom::geom_batch_stack::Axis">Axis</a></code><a href="#impl-Copy" class="anchor"></a><a class="srclink" href="../../../src/widgetry/geom/geom_batch_stack.rs.html#3" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../../../widgetry/geom/geom_batch_stack/enum.Axis.html" title="enum widgetry::geom::geom_batch_stack::Axis">Axis</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../../src/widgetry/geom/geom_batch_stack.rs.html#3" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../../src/widgetry/geom/geom_batch_stack.rs.html#3" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id="impl-PartialEq%3CAxis%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="enum" href="../../../widgetry/geom/geom_batch_stack/enum.Axis.html" title="enum widgetry::geom::geom_batch_stack::Axis">Axis</a>> for <a class="enum" href="../../../widgetry/geom/geom_batch_stack/enum.Axis.html" title="enum widgetry::geom::geom_batch_stack::Axis">Axis</a></code><a href="#impl-PartialEq%3CAxis%3E" class="anchor"></a><a class="srclink" href="../../../src/widgetry/geom/geom_batch_stack.rs.html#3" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.eq" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="enum" href="../../../widgetry/geom/geom_batch_stack/enum.Axis.html" title="enum widgetry::geom::geom_batch_stack::Axis">Axis</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../../src/widgetry/geom/geom_batch_stack.rs.html#3" title="goto source code">[src]</a></h4><div class='docblock hidden'><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/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
||||
</div><h4 id="method.ne" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>pub fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#209-211" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
|
||||
</div></div><h3 id="impl-StructuralPartialEq" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="enum" href="../../../widgetry/geom/geom_batch_stack/enum.Axis.html" title="enum widgetry::geom::geom_batch_stack::Axis">Axis</a></code><a href="#impl-StructuralPartialEq" class="anchor"></a><a class="srclink" href="../../../src/widgetry/geom/geom_batch_stack.rs.html#3" title="goto source code">[src]</a></h3><div class="impl-items"></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"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="../../../widgetry/geom/geom_batch_stack/enum.Axis.html" title="enum widgetry::geom::geom_batch_stack::Axis">Axis</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="../../../widgetry/geom/geom_batch_stack/enum.Axis.html" title="enum widgetry::geom::geom_batch_stack::Axis">Axis</a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="../../../widgetry/geom/geom_batch_stack/enum.Axis.html" title="enum widgetry::geom::geom_batch_stack::Axis">Axis</a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="../../../widgetry/geom/geom_batch_stack/enum.Axis.html" title="enum widgetry::geom::geom_batch_stack::Axis">Axis</a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="../../../widgetry/geom/geom_batch_stack/enum.Axis.html" title="enum widgetry::geom::geom_batch_stack::Axis">Axis</a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></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"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||
</div></div><h3 id="impl-Downcast" class="impl"><code class="in-band">impl<T> Downcast for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a>, </span></code><a href="#impl-Downcast" class="anchor"></a></h3><div class="impl-items"><h4 id="method.into_any" class="method hidden"><code>pub fn <a href="#method.into_any" class="fnname">into_any</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><T, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>></code></h4><div class='docblock hidden'><p>Convert <code>Box<dyn Trait></code> (where <code>Trait: Downcast</code>) to <code>Box<dyn Any></code>. <code>Box<dyn Any></code> can
|
||||
then be further <code>downcast</code> into <code>Box<ConcreteType></code> where <code>ConcreteType</code> implements <code>Trait</code>. <a href="#tymethod.into_any">Read more</a></p>
|
||||
</div><h4 id="method.into_any_rc" class="method hidden"><code>pub fn <a href="#method.into_any_rc" class="fnname">into_any_rc</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html" title="struct alloc::rc::Rc">Rc</a><T>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html" title="struct alloc::rc::Rc">Rc</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static></code></h4><div class='docblock hidden'><p>Convert <code>Rc<Trait></code> (where <code>Trait: Downcast</code>) to <code>Rc<Any></code>. <code>Rc<Any></code> can then be
|
||||
further <code>downcast</code> into <code>Rc<ConcreteType></code> where <code>ConcreteType</code> implements <code>Trait</code>. <a href="#tymethod.into_any_rc">Read more</a></p>
|
||||
</div><h4 id="method.as_any" class="method hidden"><code>pub fn <a href="#method.as_any" class="fnname">as_any</a>(&self) -> &(dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static)</code></h4><div class='docblock hidden'><p>Convert <code>&Trait</code> (where <code>Trait: Downcast</code>) to <code>&Any</code>. This is needed since Rust cannot
|
||||
generate <code>&Any</code>'s vtable from <code>&Trait</code>'s. <a href="#tymethod.as_any">Read more</a></p>
|
||||
</div><h4 id="method.as_any_mut" class="method hidden"><code>pub fn <a href="#method.as_any_mut" class="fnname">as_any_mut</a>(&mut self) -> &mut (dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static)</code></h4><div class='docblock hidden'><p>Convert <code>&mut Trait</code> (where <code>Trait: Downcast</code>) to <code>&Any</code>. This is needed since Rust cannot
|
||||
generate <code>&mut Any</code>'s vtable from <code>&mut Trait</code>'s. <a href="#tymethod.as_any_mut">Read more</a></p>
|
||||
</div></div><h3 id="impl-DowncastSync" class="impl"><code class="in-band">impl<T> DowncastSync for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a>, </span></code><a href="#impl-DowncastSync" class="anchor"></a></h3><div class="impl-items"><h4 id="method.into_any_arc" class="method hidden"><code>pub fn <a href="#method.into_any_arc" class="fnname">into_any_arc</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a><T>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>></code></h4><div class='docblock hidden'><p>Convert <code>Arc<Trait></code> (where <code>Trait: Downcast</code>) to <code>Arc<Any></code>. <code>Arc<Any></code> can then be
|
||||
further <code>downcast</code> into <code>Arc<ConcreteType></code> where <code>ConcreteType</code> implements <code>Trait</code>. <a href="#tymethod.into_any_arc">Read more</a></p>
|
||||
</div></div><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#552-556" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#553-555" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-Into%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#541-548" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545-547" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-Same%3CT%3E" class="impl"><code class="in-band">impl<T> Same<T> for T</code><a href="#impl-Same%3CT%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="associatedtype.Output" class="type"><code>type <a href="#associatedtype.Output" class="type">Output</a> = T</code></h4><div class='docblock'><p>Should always be <code>Self</code></p>
|
||||
</div></div><h3 id="impl-ToOwned" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></code><a href="#impl-ToOwned" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#80-92" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Owned" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="type">Owned</a> = T</code></h4><div class='docblock'><p>The resulting type after obtaining ownership.</p>
|
||||
</div><h4 id="method.to_owned" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&self) -> T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#85-87" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p>
|
||||
</div><h4 id="method.clone_into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T)</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#89-91" title="goto source code">[src]</a></h4><div class="item-info hidden"><div class="stab unstable"><details><summary><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>toowned_clone_into</code>)</summary><p>recently added</p>
|
||||
</details></div></div><div class='docblock hidden'><p>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p>
|
||||
</div></div><h3 id="impl-TryFrom%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></code><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#589-598" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||||
</div><h4 id="method.try_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#595-597" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-TryInto%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#575-584" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error-1" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||||
</div><h4 id="method.try_into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#581-583" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "widgetry";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
8
rustdoc/widgetry/geom/geom_batch_stack/index.html
Normal file
8
rustdoc/widgetry/geom/geom_batch_stack/index.html
Normal file
@ -0,0 +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 `geom_batch_stack` mod in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, geom_batch_stack"><title>widgetry::geom::geom_batch_stack - 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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Module geom_batch_stack</p><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><p class="location"><a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">geom</a></p><script>window.sidebarCurrent = {name: "geom_batch_stack", ty: "mod", relpath: "../"};</script><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"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/geom/geom_batch_stack.rs.html#1-108" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">geom</a>::<wbr><a class="mod" href="">geom_batch_stack</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
||||
<table><tr class="module-item"><td><a class="struct" href="struct.GeomBatchStack.html" title="widgetry::geom::geom_batch_stack::GeomBatchStack struct">GeomBatchStack</a></td><td class="docblock-short"><p>Similar to [<code>Widget::row</code>]/[<code>Widget::column</code>], but for <a href="../../../widgetry/geom/struct.GeomBatch.html" title="GeomBatch"><code>GeomBatch</code></a>s instead of [<code>Widget</code>]s,
|
||||
and follows a builder pattern</p>
|
||||
</td></tr></table><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2>
|
||||
<table><tr class="module-item"><td><a class="enum" href="enum.Axis.html" title="widgetry::geom::geom_batch_stack::Axis enum">Axis</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "widgetry";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
1
rustdoc/widgetry/geom/geom_batch_stack/sidebar-items.js
Normal file
1
rustdoc/widgetry/geom/geom_batch_stack/sidebar-items.js
Normal file
@ -0,0 +1 @@
|
||||
initSidebarItems({"enum":[["Axis",""]],"struct":[["GeomBatchStack","Similar to [`Widget::row`]/[`Widget::column`], but for [`GeomBatch`]s instead of [`Widget`]s, and follows a builder pattern"]]});
|
File diff suppressed because one or more lines are too long
@ -1,7 +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 `geom` mod in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, geom"><title>widgetry::geom - 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><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module geom</p><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><p class="location"><a href="../index.html">widgetry</a></p><script>window.sidebarCurrent = {name: "geom", ty: "mod", relpath: "../"};</script><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"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/geom.rs.html#1-314" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../index.html">widgetry</a>::<wbr><a class="mod" href="">geom</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module geom</p><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></ul></div><p class="location"><a href="../index.html">widgetry</a></p><script>window.sidebarCurrent = {name: "geom", ty: "mod", relpath: "../"};</script><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"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/geom/mod.rs.html#1-316" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../index.html">widgetry</a>::<wbr><a class="mod" href="">geom</a></span></h1><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2>
|
||||
<table><tr class="module-item"><td><a class="mod" href="geom_batch_stack/index.html" title="widgetry::geom::geom_batch_stack mod">geom_batch_stack</a></td><td class="docblock-short"></td></tr></table><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
||||
<table><tr class="module-item"><td><a class="struct" href="struct.GeomBatch.html" title="widgetry::geom::GeomBatch struct">GeomBatch</a></td><td class="docblock-short"><p>A mutable builder for a group of colored polygons.</p>
|
||||
</td></tr></table><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2>
|
||||
<table><tr class="module-item"><td><a class="enum" href="enum.RewriteColor.html" title="widgetry::geom::RewriteColor enum">RewriteColor</a></td><td class="docblock-short"><p>A way to transform all colors in a GeomBatch.</p>
|
||||
|
@ -1 +1 @@
|
||||
initSidebarItems({"enum":[["RewriteColor","A way to transform all colors in a GeomBatch."]],"struct":[["GeomBatch","A mutable builder for a group of colored polygons."]]});
|
||||
initSidebarItems({"enum":[["RewriteColor","A way to transform all colors in a GeomBatch."]],"mod":[["geom_batch_stack",""]],"struct":[["GeomBatch","A mutable builder for a group of colored polygons."]]});
|
@ -1,51 +1,51 @@
|
||||
<!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 `GeomBatch` struct in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, GeomBatch"><title>widgetry::geom::GeomBatch - 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><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Struct GeomBatch</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.autocrop_dims">autocrop_dims</a><a href="#structfield.list">list</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.append">append</a><a href="#method.autocrop">autocrop</a><a href="#method.batch">batch</a><a href="#method.centered_on">centered_on</a><a href="#method.color">color</a><a href="#method.consume">consume</a><a href="#method.draw">draw</a><a href="#method.extend">extend</a><a href="#method.get_bounds">get_bounds</a><a href="#method.get_dims">get_dims</a><a href="#method.into_widget">into_widget</a><a href="#method.is_empty">is_empty</a><a href="#method.load_svg">load_svg</a><a href="#method.load_svg_bytes">load_svg_bytes</a><a href="#method.load_svg_bytes_uncached">load_svg_bytes_uncached</a><a href="#method.new">new</a><a href="#method.push">push</a><a href="#method.push_with_z">push_with_z</a><a href="#method.rotate">rotate</a><a href="#method.rotate_around_batch_center">rotate_around_batch_center</a><a href="#method.scale">scale</a><a href="#method.scale_xy">scale_xy</a><a href="#method.set_z_offset">set_z_offset</a><a href="#method.to_geojson">to_geojson</a><a href="#method.translate">translate</a><a href="#method.unioned_polygon">unioned_polygon</a><a href="#method.unshift">unshift</a><a href="#method.upload">upload</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-From%3CVec%3C(F%2C%20Polygon)%2C%20Global%3E%3E">From<Vec<(F, Polygon), Global>></a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><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><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><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-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></div></div><p class="location"><a href="../index.html">widgetry</a>::<wbr><a href="index.html">geom</a></p><script>window.sidebarCurrent = {name: "GeomBatch", ty: "struct", relpath: ""};</script><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"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/geom.rs.html#10-15" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="../index.html">widgetry</a>::<wbr><a href="index.html">geom</a>::<wbr><a class="struct" href="">GeomBatch</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct GeomBatch {
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/geom/mod.rs.html#12-17" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="../index.html">widgetry</a>::<wbr><a href="index.html">geom</a>::<wbr><a class="struct" href="">GeomBatch</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct GeomBatch {
|
||||
pub(crate) list: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="enum" href="../../widgetry/color/enum.Fill.html" title="enum widgetry::color::Fill">Fill</a>, <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>>,
|
||||
pub autocrop_dims: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,
|
||||
}</pre></div><div class="docblock"><p>A mutable builder for a group of colored polygons.</p>
|
||||
</div><h2 id="fields" class="fields small-section-header">
|
||||
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.list" class="structfield small-section-header"><a href="#structfield.list" class="anchor field"></a><code>list: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="enum" href="../../widgetry/color/enum.Fill.html" title="enum widgetry::color::Fill">Fill</a>, <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>></code></span><span id="structfield.autocrop_dims" class="structfield small-section-header"><a href="#structfield.autocrop_dims" class="anchor field"></a><code>autocrop_dims: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom.rs.html#27-261" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>() -> <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#29-34" title="goto source code">[src]</a></h4><div class="docblock"><p>Creates an empty batch.</p>
|
||||
</div><h4 id="method.push" class="method"><code>pub fn <a href="#method.push" class="fnname">push</a><F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../../widgetry/color/enum.Fill.html" title="enum widgetry::color::Fill">Fill</a>>>(&mut self, fill: F, p: <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>)</code><a class="srclink" href="../../src/widgetry/geom.rs.html#37-39" title="goto source code">[src]</a></h4><div class="docblock"><p>Adds a single polygon, painted according to <code>Fill</code></p>
|
||||
</div><h4 id="method.push_with_z" class="method"><code>pub fn <a href="#method.push_with_z" class="fnname">push_with_z</a><F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../../widgetry/color/enum.Fill.html" title="enum widgetry::color::Fill">Fill</a>>>(&mut self, fill: F, p: <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>, z_offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>)</code><a class="srclink" href="../../src/widgetry/geom.rs.html#44-48" title="goto source code">[src]</a></h4><div class="docblock"><p>Offset z value to render above/below other polygons.
|
||||
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.list" class="structfield small-section-header"><a href="#structfield.list" class="anchor field"></a><code>list: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="enum" href="../../widgetry/color/enum.Fill.html" title="enum widgetry::color::Fill">Fill</a>, <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>></code></span><span id="structfield.autocrop_dims" class="structfield small-section-header"><a href="#structfield.autocrop_dims" class="anchor field"></a><code>autocrop_dims: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#29-263" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>() -> <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#31-36" title="goto source code">[src]</a></h4><div class="docblock"><p>Creates an empty batch.</p>
|
||||
</div><h4 id="method.push" class="method"><code>pub fn <a href="#method.push" class="fnname">push</a><F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../../widgetry/color/enum.Fill.html" title="enum widgetry::color::Fill">Fill</a>>>(&mut self, fill: F, p: <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>)</code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#39-41" title="goto source code">[src]</a></h4><div class="docblock"><p>Adds a single polygon, painted according to <code>Fill</code></p>
|
||||
</div><h4 id="method.push_with_z" class="method"><code>pub fn <a href="#method.push_with_z" class="fnname">push_with_z</a><F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../../widgetry/color/enum.Fill.html" title="enum widgetry::color::Fill">Fill</a>>>(&mut self, fill: F, p: <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>, z_offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>)</code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#46-50" title="goto source code">[src]</a></h4><div class="docblock"><p>Offset z value to render above/below other polygons.
|
||||
z must be in (-1, 0] to ensure we don't traverse layers of the UI - to make
|
||||
sure we don't inadvertently render something <em>above</em> a tooltip, etc.</p>
|
||||
</div><h4 id="method.unshift" class="method"><code>pub fn <a href="#method.unshift" class="fnname">unshift</a><F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../../widgetry/color/enum.Fill.html" title="enum widgetry::color::Fill">Fill</a>>>(&mut self, fill: F, p: <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>)</code><a class="srclink" href="../../src/widgetry/geom.rs.html#51-53" title="goto source code">[src]</a></h4><div class="docblock"><p>Adds a single polygon to the front of the batch, painted according to <code>Fill</code></p>
|
||||
</div><h4 id="method.extend" class="method"><code>pub fn <a href="#method.extend" class="fnname">extend</a><F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../../widgetry/color/enum.Fill.html" title="enum widgetry::color::Fill">Fill</a>>>(&mut self, fill: F, polys: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>>)</code><a class="srclink" href="../../src/widgetry/geom.rs.html#56-61" title="goto source code">[src]</a></h4><div class="docblock"><p>Applies one Fill to many polygons.</p>
|
||||
</div><h4 id="method.append" class="method"><code>pub fn <a href="#method.append" class="fnname">append</a>(&mut self, other: <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a>)</code><a class="srclink" href="../../src/widgetry/geom.rs.html#64-66" title="goto source code">[src]</a></h4><div class="docblock"><p>Appends all colored polygons from another batch to the current one.</p>
|
||||
</div><h4 id="method.consume" class="method"><code>pub fn <a href="#method.consume" class="fnname">consume</a>(self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="enum" href="../../widgetry/color/enum.Fill.html" title="enum widgetry::color::Fill">Fill</a>, <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>></code><a class="srclink" href="../../src/widgetry/geom.rs.html#69-71" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns the colored polygons in this batch, destroying the batch.</p>
|
||||
</div><h4 id="method.draw" class="method"><code>pub fn <a href="#method.draw" class="fnname">draw</a>(self, g: &mut <a class="struct" href="../../widgetry/drawing/struct.GfxCtx.html" title="struct widgetry::drawing::GfxCtx">GfxCtx</a><'_>)</code><a class="srclink" href="../../src/widgetry/geom.rs.html#74-77" title="goto source code">[src]</a></h4><div class="docblock"><p>Draws the batch, consuming it. Only use this for drawing things once.</p>
|
||||
</div><h4 id="method.upload" class="method"><code>pub fn <a href="#method.upload" class="fnname">upload</a>(self, ctx: &<a class="struct" href="../../widgetry/event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a><'_>) -> <a class="struct" href="../../widgetry/backend_glow/struct.Drawable.html" title="struct widgetry::backend_glow::Drawable">Drawable</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#81-83" title="goto source code">[src]</a></h4><div class="docblock"><p>Upload the batch of polygons to the GPU, returning something that can be cheaply redrawn
|
||||
</div><h4 id="method.unshift" class="method"><code>pub fn <a href="#method.unshift" class="fnname">unshift</a><F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../../widgetry/color/enum.Fill.html" title="enum widgetry::color::Fill">Fill</a>>>(&mut self, fill: F, p: <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>)</code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#53-55" title="goto source code">[src]</a></h4><div class="docblock"><p>Adds a single polygon to the front of the batch, painted according to <code>Fill</code></p>
|
||||
</div><h4 id="method.extend" class="method"><code>pub fn <a href="#method.extend" class="fnname">extend</a><F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../../widgetry/color/enum.Fill.html" title="enum widgetry::color::Fill">Fill</a>>>(&mut self, fill: F, polys: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>>)</code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#58-63" title="goto source code">[src]</a></h4><div class="docblock"><p>Applies one Fill to many polygons.</p>
|
||||
</div><h4 id="method.append" class="method"><code>pub fn <a href="#method.append" class="fnname">append</a>(&mut self, other: <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a>)</code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#66-68" title="goto source code">[src]</a></h4><div class="docblock"><p>Appends all colored polygons from another batch to the current one.</p>
|
||||
</div><h4 id="method.consume" class="method"><code>pub fn <a href="#method.consume" class="fnname">consume</a>(self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="enum" href="../../widgetry/color/enum.Fill.html" title="enum widgetry::color::Fill">Fill</a>, <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>></code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#71-73" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns the colored polygons in this batch, destroying the batch.</p>
|
||||
</div><h4 id="method.draw" class="method"><code>pub fn <a href="#method.draw" class="fnname">draw</a>(self, g: &mut <a class="struct" href="../../widgetry/drawing/struct.GfxCtx.html" title="struct widgetry::drawing::GfxCtx">GfxCtx</a><'_>)</code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#76-79" title="goto source code">[src]</a></h4><div class="docblock"><p>Draws the batch, consuming it. Only use this for drawing things once.</p>
|
||||
</div><h4 id="method.upload" class="method"><code>pub fn <a href="#method.upload" class="fnname">upload</a>(self, ctx: &<a class="struct" href="../../widgetry/event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a><'_>) -> <a class="struct" href="../../widgetry/backend_glow/struct.Drawable.html" title="struct widgetry::backend_glow::Drawable">Drawable</a></code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#83-85" title="goto source code">[src]</a></h4><div class="docblock"><p>Upload the batch of polygons to the GPU, returning something that can be cheaply redrawn
|
||||
many times later.</p>
|
||||
</div><h4 id="method.batch" class="method"><code>pub fn <a href="#method.batch" class="fnname">batch</a>(self) -> <a class="struct" href="../../widgetry/widgets/struct.Widget.html" title="struct widgetry::widgets::Widget">Widget</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#86-88" title="goto source code">[src]</a></h4><div class="docblock"><p>Wrap in a Widget for layouting, so this batch can become part of a larger one.</p>
|
||||
</div><h4 id="method.into_widget" class="method"><code>pub fn <a href="#method.into_widget" class="fnname">into_widget</a>(self, ctx: &<a class="struct" href="../../widgetry/event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a><'_>) -> <a class="struct" href="../../widgetry/widgets/struct.Widget.html" title="struct widgetry::widgets::Widget">Widget</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#91-93" title="goto source code">[src]</a></h4><div class="docblock"><p>Wrap in a Widget, so the batch can be drawn as part of a Panel.</p>
|
||||
</div><h4 id="method.get_bounds" class="method"><code>pub fn <a href="#method.get_bounds" class="fnname">get_bounds</a>(&self) -> <a class="struct" href="../../geom/bounds/struct.Bounds.html" title="struct geom::bounds::Bounds">Bounds</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#96-105" title="goto source code">[src]</a></h4><div class="docblock"><p>Compute the bounds of all polygons in this batch.</p>
|
||||
</div><h4 id="method.autocrop" class="method"><code>pub fn <a href="#method.autocrop" class="fnname">autocrop</a>(self) -> <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#108-117" title="goto source code">[src]</a></h4><div class="docblock"><p>Sets the top-left to 0, 0. Not sure exactly when this should be used.</p>
|
||||
</div><h4 id="method.unioned_polygon" class="method"><code>pub fn <a href="#method.unioned_polygon" class="fnname">unioned_polygon</a>(&self) -> <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#120-126" title="goto source code">[src]</a></h4><div class="docblock"><p>Builds a single polygon covering everything in this batch. Use to create a hitbox.</p>
|
||||
</div><h4 id="method.is_empty" class="method"><code>pub fn <a href="#method.is_empty" class="fnname">is_empty</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#129-131" title="goto source code">[src]</a></h4><div class="docblock"><p>True when the batch is empty.</p>
|
||||
</div><h4 id="method.get_dims" class="method"><code>pub fn <a href="#method.get_dims" class="fnname">get_dims</a>(&self) -> <a class="struct" href="../../widgetry/screen_geom/struct.ScreenDims.html" title="struct widgetry::screen_geom::ScreenDims">ScreenDims</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#134-142" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns the width and height of all geometry contained in the batch.</p>
|
||||
</div><h4 id="method.load_svg" class="method"><code>pub fn <a href="#method.load_svg" class="fnname">load_svg</a><P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="../../widgetry/drawing/struct.Prerender.html" title="struct widgetry::drawing::Prerender">Prerender</a>>, I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>>>(<br> prerender: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>P, <br> filename: I<br>) -> <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#145-147" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns a batch containing an SVG from a file.</p>
|
||||
</div><h4 id="method.load_svg_bytes" class="method"><code>pub fn <a href="#method.load_svg_bytes" class="fnname">load_svg_bytes</a><P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="../../widgetry/drawing/struct.Prerender.html" title="struct widgetry::drawing::Prerender">Prerender</a>>>(<br> prerender: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>P, <br> labeled_bytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>&<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a><br>) -> <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#150-157" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns a GeomBatch from the bytes of a utf8 encoded SVG string.</p>
|
||||
</div><h4 id="method.load_svg_bytes_uncached" class="method"><code>pub fn <a href="#method.load_svg_bytes_uncached" class="fnname">load_svg_bytes_uncached</a>(raw: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -> <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#164-166" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns a GeomBatch from the bytes of a utf8 encoded SVG string.</p>
|
||||
</div><h4 id="method.batch" class="method"><code>pub fn <a href="#method.batch" class="fnname">batch</a>(self) -> <a class="struct" href="../../widgetry/widgets/struct.Widget.html" title="struct widgetry::widgets::Widget">Widget</a></code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#88-90" title="goto source code">[src]</a></h4><div class="docblock"><p>Wrap in a Widget for layouting, so this batch can become part of a larger one.</p>
|
||||
</div><h4 id="method.into_widget" class="method"><code>pub fn <a href="#method.into_widget" class="fnname">into_widget</a>(self, ctx: &<a class="struct" href="../../widgetry/event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a><'_>) -> <a class="struct" href="../../widgetry/widgets/struct.Widget.html" title="struct widgetry::widgets::Widget">Widget</a></code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#93-95" title="goto source code">[src]</a></h4><div class="docblock"><p>Wrap in a Widget, so the batch can be drawn as part of a Panel.</p>
|
||||
</div><h4 id="method.get_bounds" class="method"><code>pub fn <a href="#method.get_bounds" class="fnname">get_bounds</a>(&self) -> <a class="struct" href="../../geom/bounds/struct.Bounds.html" title="struct geom::bounds::Bounds">Bounds</a></code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#98-107" title="goto source code">[src]</a></h4><div class="docblock"><p>Compute the bounds of all polygons in this batch.</p>
|
||||
</div><h4 id="method.autocrop" class="method"><code>pub fn <a href="#method.autocrop" class="fnname">autocrop</a>(self) -> <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#110-119" title="goto source code">[src]</a></h4><div class="docblock"><p>Sets the top-left to 0, 0. Not sure exactly when this should be used.</p>
|
||||
</div><h4 id="method.unioned_polygon" class="method"><code>pub fn <a href="#method.unioned_polygon" class="fnname">unioned_polygon</a>(&self) -> <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a></code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#122-128" title="goto source code">[src]</a></h4><div class="docblock"><p>Builds a single polygon covering everything in this batch. Use to create a hitbox.</p>
|
||||
</div><h4 id="method.is_empty" class="method"><code>pub fn <a href="#method.is_empty" class="fnname">is_empty</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#131-133" title="goto source code">[src]</a></h4><div class="docblock"><p>True when the batch is empty.</p>
|
||||
</div><h4 id="method.get_dims" class="method"><code>pub fn <a href="#method.get_dims" class="fnname">get_dims</a>(&self) -> <a class="struct" href="../../widgetry/screen_geom/struct.ScreenDims.html" title="struct widgetry::screen_geom::ScreenDims">ScreenDims</a></code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#136-144" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns the width and height of all geometry contained in the batch.</p>
|
||||
</div><h4 id="method.load_svg" class="method"><code>pub fn <a href="#method.load_svg" class="fnname">load_svg</a><P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="../../widgetry/drawing/struct.Prerender.html" title="struct widgetry::drawing::Prerender">Prerender</a>>, I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>>>(<br> prerender: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>P, <br> filename: I<br>) -> <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#147-149" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns a batch containing an SVG from a file.</p>
|
||||
</div><h4 id="method.load_svg_bytes" class="method"><code>pub fn <a href="#method.load_svg_bytes" class="fnname">load_svg_bytes</a><P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="../../widgetry/drawing/struct.Prerender.html" title="struct widgetry::drawing::Prerender">Prerender</a>>>(<br> prerender: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>P, <br> labeled_bytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>&<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a><br>) -> <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#152-159" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns a GeomBatch from the bytes of a utf8 encoded SVG string.</p>
|
||||
</div><h4 id="method.load_svg_bytes_uncached" class="method"><code>pub fn <a href="#method.load_svg_bytes_uncached" class="fnname">load_svg_bytes_uncached</a>(raw: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -> <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#166-168" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns a GeomBatch from the bytes of a utf8 encoded SVG string.</p>
|
||||
<p>Prefer to use <code>load_svg_bytes</code>, which caches the parsed SVG, unless
|
||||
the SVG was dynamically generated, or is otherwise unlikely to be
|
||||
reused.</p>
|
||||
</div><h4 id="method.color" class="method"><code>pub fn <a href="#method.color" class="fnname">color</a>(self, transformation: <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>) -> <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#169-176" title="goto source code">[src]</a></h4><div class="docblock"><p>Transforms all colors in a batch.</p>
|
||||
</div><h4 id="method.centered_on" class="method"><code>pub fn <a href="#method.centered_on" class="fnname">centered_on</a>(self, center: <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>) -> <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#179-184" title="goto source code">[src]</a></h4><div class="docblock"><p>Translates the batch to be centered on some point.</p>
|
||||
</div><h4 id="method.translate" class="method"><code>pub fn <a href="#method.translate" class="fnname">translate</a>(self, dx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>, dy: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#187-192" title="goto source code">[src]</a></h4><div class="docblock"><p>Translates the batch by some offset.</p>
|
||||
</div><h4 id="method.rotate" class="method"><code>pub fn <a href="#method.rotate" class="fnname">rotate</a>(self, angle: <a class="struct" href="../../geom/angle/struct.Angle.html" title="struct geom::angle::Angle">Angle</a>) -> <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#195-200" title="goto source code">[src]</a></h4><div class="docblock"><p>Rotates each polygon in the batch relative to the center of that polygon.</p>
|
||||
</div><h4 id="method.rotate_around_batch_center" class="method"><code>pub fn <a href="#method.rotate_around_batch_center" class="fnname">rotate_around_batch_center</a>(self, angle: <a class="struct" href="../../geom/angle/struct.Angle.html" title="struct geom::angle::Angle">Angle</a>) -> <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#203-209" title="goto source code">[src]</a></h4><div class="docblock"><p>Rotates each polygon in the batch relative to the center of the entire batch.</p>
|
||||
</div><h4 id="method.scale" class="method"><code>pub fn <a href="#method.scale" class="fnname">scale</a>(self, factor: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#212-214" title="goto source code">[src]</a></h4><div class="docblock"><p>Scales the batch by some factor.</p>
|
||||
</div><h4 id="method.scale_xy" class="method"><code>pub fn <a href="#method.scale_xy" class="fnname">scale_xy</a>(self, x_factor: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>, y_factor: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#216-227" title="goto source code">[src]</a></h4><h4 id="method.set_z_offset" class="method"><code>pub fn <a href="#method.set_z_offset" class="fnname">set_z_offset</a>(self, offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#231-239" title="goto source code">[src]</a></h4><div class="docblock"><p>Overrides the Z-ordering offset for the batch. Must be in (-1, 0], with values closer to -1
|
||||
</div><h4 id="method.color" class="method"><code>pub fn <a href="#method.color" class="fnname">color</a>(self, transformation: <a class="enum" href="../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>) -> <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#171-178" title="goto source code">[src]</a></h4><div class="docblock"><p>Transforms all colors in a batch.</p>
|
||||
</div><h4 id="method.centered_on" class="method"><code>pub fn <a href="#method.centered_on" class="fnname">centered_on</a>(self, center: <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>) -> <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#181-186" title="goto source code">[src]</a></h4><div class="docblock"><p>Translates the batch to be centered on some point.</p>
|
||||
</div><h4 id="method.translate" class="method"><code>pub fn <a href="#method.translate" class="fnname">translate</a>(self, dx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>, dy: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#189-194" title="goto source code">[src]</a></h4><div class="docblock"><p>Translates the batch by some offset.</p>
|
||||
</div><h4 id="method.rotate" class="method"><code>pub fn <a href="#method.rotate" class="fnname">rotate</a>(self, angle: <a class="struct" href="../../geom/angle/struct.Angle.html" title="struct geom::angle::Angle">Angle</a>) -> <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#197-202" title="goto source code">[src]</a></h4><div class="docblock"><p>Rotates each polygon in the batch relative to the center of that polygon.</p>
|
||||
</div><h4 id="method.rotate_around_batch_center" class="method"><code>pub fn <a href="#method.rotate_around_batch_center" class="fnname">rotate_around_batch_center</a>(self, angle: <a class="struct" href="../../geom/angle/struct.Angle.html" title="struct geom::angle::Angle">Angle</a>) -> <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#205-211" title="goto source code">[src]</a></h4><div class="docblock"><p>Rotates each polygon in the batch relative to the center of the entire batch.</p>
|
||||
</div><h4 id="method.scale" class="method"><code>pub fn <a href="#method.scale" class="fnname">scale</a>(self, factor: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#214-216" title="goto source code">[src]</a></h4><div class="docblock"><p>Scales the batch by some factor.</p>
|
||||
</div><h4 id="method.scale_xy" class="method"><code>pub fn <a href="#method.scale_xy" class="fnname">scale_xy</a>(self, x_factor: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>, y_factor: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#218-229" title="goto source code">[src]</a></h4><h4 id="method.set_z_offset" class="method"><code>pub fn <a href="#method.set_z_offset" class="fnname">set_z_offset</a>(self, offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#233-241" title="goto source code">[src]</a></h4><div class="docblock"><p>Overrides the Z-ordering offset for the batch. Must be in (-1, 0], with values closer to -1
|
||||
rendering on top.</p>
|
||||
</div><h4 id="method.to_geojson" class="method"><code>pub fn <a href="#method.to_geojson" class="fnname">to_geojson</a>(self, gps_bounds: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="struct" href="../../geom/bounds/struct.GPSBounds.html" title="struct geom::bounds::GPSBounds">GPSBounds</a>>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><Feature></code><a class="srclink" href="../../src/widgetry/geom.rs.html#244-260" title="goto source code">[src]</a></h4><div class="docblock"><p>Exports the batch to a list of GeoJSON features, labeling each colored polygon. Z-values,
|
||||
</div><h4 id="method.to_geojson" class="method"><code>pub fn <a href="#method.to_geojson" class="fnname">to_geojson</a>(self, gps_bounds: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="struct" href="../../geom/bounds/struct.GPSBounds.html" title="struct geom::bounds::GPSBounds">GPSBounds</a>>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><Feature></code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#246-262" title="goto source code">[src]</a></h4><div class="docblock"><p>Exports the batch to a list of GeoJSON features, labeling each colored polygon. Z-values,
|
||||
alpha values from the color, and non-RGB fill patterns are lost. If the polygon isn't a
|
||||
ring, it's skipped. The world-space coordinates are optionally translated back to GPS.</p>
|
||||
</div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom.rs.html#9" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#9" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#11" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#11" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id="method.clone_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/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/nightly/std/primitive.reference.html">&</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#128-130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom.rs.html#17-25" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#18-24" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id="impl-From%3CVec%3C(F%2C%20Polygon)%2C%20Global%3E%3E" class="impl"><code class="in-band">impl<F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../../widgetry/color/enum.Fill.html" title="enum widgetry::color::Fill">Fill</a>>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>F, <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>>> for <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a href="#impl-From%3CVec%3C(F%2C%20Polygon)%2C%20Global%3E%3E" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom.rs.html#263-271" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(list: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>F, <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>>) -> <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#265-270" title="goto source code">[src]</a></h4><div class="docblock"><p>Creates a batch of filled polygons.</p>
|
||||
</div></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#19-27" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#20-26" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id="impl-From%3CVec%3C(F%2C%20Polygon)%2C%20Global%3E%3E" class="impl"><code class="in-band">impl<F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../../widgetry/color/enum.Fill.html" title="enum widgetry::color::Fill">Fill</a>>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>F, <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>>> for <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a href="#impl-From%3CVec%3C(F%2C%20Polygon)%2C%20Global%3E%3E" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#265-273" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(list: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>F, <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>>) -> <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../../src/widgetry/geom/mod.rs.html#267-272" title="goto source code">[src]</a></h4><div class="docblock"><p>Creates a batch of filled polygons.</p>
|
||||
</div></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"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></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"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!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 `widgetry` crate."><meta name="keywords" content="rust, rustlang, rust-lang, widgetry"><title>widgetry - 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><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../widgetry/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Crate widgetry</p><div class="block version"><p>Version 0.1.0</p></div><div class="sidebar-elems"><a id="all-types" href="all.html"><p>See all widgetry's items</p></a><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#macros">Macros</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li><li><a href="#types">Type Definitions</a></li></ul></div><p class="location"></p><script>window.sidebarCurrent = {name: "widgetry", ty: "mod", relpath: "../"};</script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/lib.rs.html#1-222" title="goto source code">[src]</a></span><span class="in-band">Crate <a class="mod" href="">widgetry</a></span></h1><div class="docblock"><h1 id="widgets" class="section-header"><a href="#widgets">Widgets</a></h1>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/lib.rs.html#1-223" title="goto source code">[src]</a></span><span class="in-band">Crate <a class="mod" href="">widgetry</a></span></h1><div class="docblock"><h1 id="widgets" class="section-header"><a href="#widgets">Widgets</a></h1>
|
||||
<p>If none of these do what you need, implementing a new <a href="../widgetry/widgets/trait.WidgetImpl.html" title="WidgetImpl"><code>WidgetImpl</code></a> isn't tough.</p>
|
||||
<p>TODO inline pictures of some of these</p>
|
||||
<ul>
|
||||
@ -40,14 +40,16 @@ creating a <code>GeomBatch</code> and calling <code>ctx.upload(batch)</code>.</p
|
||||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.EdgeInsets.html" title="widgetry::EdgeInsets struct">EdgeInsets</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.EventCtx.html" title="widgetry::EventCtx struct">EventCtx</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.FanChart.html" title="widgetry::FanChart struct">FanChart</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.Filler.html" title="widgetry::Filler struct">Filler</a></td><td class="docblock-short"><p>Doesn't do anything by itself, just used for widgetsing. Something else reaches in, asks for the
|
||||
ScreenRectangle to use.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.GeomBatch.html" title="widgetry::GeomBatch struct">GeomBatch</a></td><td class="docblock-short"><p>A mutable builder for a group of colored polygons.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.GeomBatchStack.html" title="widgetry::GeomBatchStack struct">GeomBatchStack</a></td><td class="docblock-short"><p>Similar to [<code>Widget::row</code>]/[<code>Widget::column</code>], but for <a href="../widgetry/geom/struct.GeomBatch.html" title="GeomBatch"><code>GeomBatch</code></a>s instead of [<code>Widget</code>]s,
|
||||
and follows a builder pattern</p>
|
||||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.GfxCtx.html" title="widgetry::GfxCtx struct">GfxCtx</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.Image.html" title="widgetry::Image struct">Image</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.LinePlot.html" title="widgetry::LinePlot struct">LinePlot</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.LinearGradient.html" title="widgetry::LinearGradient struct">LinearGradient</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.Menu.html" title="widgetry::Menu struct">Menu</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.MultiButton.html" title="widgetry::MultiButton struct">MultiButton</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.Panel.html" title="widgetry::Panel struct">Panel</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.PersistentSplit.html" title="widgetry::PersistentSplit struct">PersistentSplit</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.PlotOptions.html" title="widgetry::PlotOptions struct">PlotOptions</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.Prerender.html" title="widgetry::Prerender struct">Prerender</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.ScatterPlot.html" title="widgetry::ScatterPlot struct">ScatterPlot</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.ScreenDims.html" title="widgetry::ScreenDims struct">ScreenDims</a></td><td class="docblock-short"><p>ScreenDims is in units of logical pixels, as opposed to physical pixels.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.ScreenPt.html" title="widgetry::ScreenPt struct">ScreenPt</a></td><td class="docblock-short"><p>ScreenPt is in units of logical pixels, as opposed to physical pixels.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.ScreenRectangle.html" title="widgetry::ScreenRectangle struct">ScreenRectangle</a></td><td class="docblock-short"><p>ScreenRectangle is in units of logical pixels, as opposed to physical pixels.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Series.html" title="widgetry::Series struct">Series</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.Settings.html" title="widgetry::Settings struct">Settings</a></td><td class="docblock-short"><p>Customize how widgetry works. These settings can't be changed after starting.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Slider.html" title="widgetry::Slider struct">Slider</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.Spinner.html" title="widgetry::Spinner struct">Spinner</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.Style.html" title="widgetry::Style struct">Style</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.Text.html" title="widgetry::Text struct">Text</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.TextSpan.html" title="widgetry::TextSpan struct">TextSpan</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.Texture.html" title="widgetry::Texture struct">Texture</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.Toggle.html" title="widgetry::Toggle struct">Toggle</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.UserInput.html" title="widgetry::UserInput struct">UserInput</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.Warper.html" title="widgetry::Warper struct">Warper</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.Widget.html" title="widgetry::Widget struct">Widget</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.WidgetOutput.html" title="widgetry::WidgetOutput struct">WidgetOutput</a></td><td class="docblock-short"></td></tr></table><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2>
|
||||
<table><tr class="module-item"><td><a class="enum" href="enum.ContentMode.html" title="widgetry::ContentMode enum">ContentMode</a></td><td class="docblock-short"><p>Rules for how content should stretch to fill its bounds</p>
|
||||
<table><tr class="module-item"><td><a class="enum" href="enum.Axis.html" title="widgetry::Axis enum">Axis</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="enum" href="enum.ContentMode.html" title="widgetry::ContentMode enum">ContentMode</a></td><td class="docblock-short"><p>Rules for how content should stretch to fill its bounds</p>
|
||||
</td></tr><tr class="module-item"><td><a class="enum" href="enum.ControlState.html" title="widgetry::ControlState enum">ControlState</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="enum" href="enum.CornerRounding.html" title="widgetry::CornerRounding enum">CornerRounding</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="enum" href="enum.DrawBaselayer.html" title="widgetry::DrawBaselayer enum">DrawBaselayer</a></td><td class="docblock-short"><p>Before <code>State::draw</code> is called, draw something else.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="enum" href="enum.Event.html" title="widgetry::Event enum">Event</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="enum" href="enum.Fill.html" title="widgetry::Fill enum">Fill</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="enum" href="enum.Font.html" title="widgetry::Font enum">Font</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="enum" href="enum.HorizontalAlignment.html" title="widgetry::HorizontalAlignment enum">HorizontalAlignment</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="enum" href="enum.Key.html" title="widgetry::Key enum">Key</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="enum" href="enum.MultiKey.html" title="widgetry::MultiKey enum">MultiKey</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="enum" href="enum.Outcome.html" title="widgetry::Outcome enum">Outcome</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="enum" href="enum.RewriteColor.html" title="widgetry::RewriteColor enum">RewriteColor</a></td><td class="docblock-short"><p>A way to transform all colors in a GeomBatch.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="enum" href="enum.Event.html" title="widgetry::Event enum">Event</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="enum" href="enum.Fill.html" title="widgetry::Fill enum">Fill</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="enum" href="enum.Font.html" title="widgetry::Font enum">Font</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="enum" href="enum.HorizontalAlignment.html" title="widgetry::HorizontalAlignment enum">HorizontalAlignment</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="enum" href="enum.ImageSource.html" title="widgetry::ImageSource enum">ImageSource</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="enum" href="enum.Key.html" title="widgetry::Key enum">Key</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="enum" href="enum.MultiKey.html" title="widgetry::MultiKey enum">MultiKey</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="enum" href="enum.Outcome.html" title="widgetry::Outcome enum">Outcome</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="enum" href="enum.RewriteColor.html" title="widgetry::RewriteColor enum">RewriteColor</a></td><td class="docblock-short"><p>A way to transform all colors in a GeomBatch.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="enum" href="enum.Transition.html" title="widgetry::Transition enum">Transition</a></td><td class="docblock-short"><p>When a state responds to an event, it can specify some way to manipulate the stack of states.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="enum" href="enum.UpdateType.html" title="widgetry::UpdateType enum">UpdateType</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="enum" href="enum.VerticalAlignment.html" title="widgetry::VerticalAlignment enum">VerticalAlignment</a></td><td class="docblock-short"></td></tr></table><h2 id="traits" class="section-header"><a href="#traits">Traits</a></h2>
|
||||
<table><tr class="module-item"><td><a class="trait" href="trait.SharedAppState.html" title="widgetry::SharedAppState trait">SharedAppState</a></td><td class="docblock-short"><p>Any data that should last the entire lifetime of the application should be stored in the struct
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!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 `include_labeled_bytes` macro in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, include_labeled_bytes"><title>widgetry::include_labeled_bytes - 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><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc macro"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../widgetry/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="index.html">widgetry</a></p><script>window.sidebarCurrent = {name: "include_labeled_bytes", ty: "macro", relpath: ""};</script><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"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/lib.rs.html#103-107" title="goto source code">[src]</a></span><span class="in-band">Macro <a href="index.html">widgetry</a>::<wbr><a class="macro" href="">include_labeled_bytes</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><div class="example-wrap"><pre class="rust macro">
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/lib.rs.html#104-108" title="goto source code">[src]</a></span><span class="in-band">Macro <a href="index.html">widgetry</a>::<wbr><a class="macro" href="">include_labeled_bytes</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><div class="example-wrap"><pre class="rust macro">
|
||||
<span class="macro">macro_rules</span><span class="macro">!</span> <span class="ident">include_labeled_bytes</span> {
|
||||
(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">file</span>:<span class="ident">expr</span>) <span class="op">=</span><span class="op">></span> { ... };
|
||||
}</pre></div>
|
||||
|
@ -1 +1 @@
|
||||
initSidebarItems({"enum":[["ContentMode","Rules for how content should stretch to fill its bounds"],["ControlState",""],["CornerRounding",""],["DrawBaselayer","Before `State::draw` is called, draw something else."],["Event",""],["Fill",""],["Font",""],["HorizontalAlignment",""],["Key",""],["MultiKey",""],["Outcome",""],["RewriteColor","A way to transform all colors in a GeomBatch."],["Transition","When a state responds to an event, it can specify some way to manipulate the stack of states."],["UpdateType",""],["VerticalAlignment",""]],"fn":[["Line",""],["hotkeys",""],["lctrl",""],["run",""]],"macro":[["include_labeled_bytes","Like [`std::include_bytes!`], but also returns its argument, the relative path to the bytes"]],"mod":[["app_state","A widgetry application splits its state into two pieces: global shared state that lasts for the entire lifetime of the application, and a stack of smaller states, only one of which is active at a time. For example, imagine an application to view a map. The shared state would include the map and pre-rendered geometry for it. The individual states might start with a splash screen or menu to choose a map, then a map viewer, then maybe a state to drill down into pieces of the map."],["assets",""],["backend",""],["backend_glow",""],["backend_glow_native",""],["canvas",""],["color",""],["drawing",""],["event",""],["event_ctx",""],["geom",""],["input",""],["runner",""],["screen_geom",""],["style",""],["svg",""],["table",""],["text",""],["tools",""],["widgets",""]],"struct":[["Autocomplete",""],["ButtonBuilder",""],["ButtonStyle",""],["Cached","Store a cached key/value pair, only recalculating when the key changes."],["Canvas",""],["Choice",""],["Color",""],["CompareTimes",""],["DrawWithTooltips",""],["Drawable","Geometry that's been uploaded to the GPU once and can be quickly redrawn many times. Create by creating a `GeomBatch` and calling `ctx.upload(batch)`."],["EdgeInsets",""],["EventCtx",""],["FanChart",""],["Filler","Doesn't do anything by itself, just used for widgetsing. Something else reaches in, asks for the ScreenRectangle to use."],["GeomBatch","A mutable builder for a group of colored polygons."],["GfxCtx",""],["Image",""],["LinePlot",""],["LinearGradient",""],["Menu",""],["MultiButton",""],["Panel",""],["PersistentSplit",""],["PlotOptions",""],["Prerender",""],["ScatterPlot",""],["ScreenDims","ScreenDims is in units of logical pixels, as opposed to physical pixels."],["ScreenPt","ScreenPt is in units of logical pixels, as opposed to physical pixels."],["ScreenRectangle","ScreenRectangle is in units of logical pixels, as opposed to physical pixels."],["Series",""],["Settings","Customize how widgetry works. These settings can't be changed after starting."],["Slider",""],["Spinner",""],["Style",""],["Text",""],["TextSpan",""],["Texture",""],["Toggle",""],["UserInput",""],["Warper",""],["Widget",""],["WidgetOutput",""]],"trait":[["SharedAppState","Any data that should last the entire lifetime of the application should be stored in the struct implementing this trait."],["SimpleState","Many states fit a pattern of managing a single panel, handling mouseover events, and other interactions on the map. Implementing this instead of `State` reduces some boilerplate."],["State","A temporary state of an application. There's a stack of these, with the most recent being the active one."],["TextExt",""],["WidgetImpl","Create a new widget by implementing this trait. You can instantiate your widget by calling `Widget::new(Box::new(instance of your new widget))`, which gives you the usual style options."]],"type":[["OutlineStyle",""]]});
|
||||
initSidebarItems({"enum":[["Axis",""],["ContentMode","Rules for how content should stretch to fill its bounds"],["ControlState",""],["CornerRounding",""],["DrawBaselayer","Before `State::draw` is called, draw something else."],["Event",""],["Fill",""],["Font",""],["HorizontalAlignment",""],["ImageSource",""],["Key",""],["MultiKey",""],["Outcome",""],["RewriteColor","A way to transform all colors in a GeomBatch."],["Transition","When a state responds to an event, it can specify some way to manipulate the stack of states."],["UpdateType",""],["VerticalAlignment",""]],"fn":[["Line",""],["hotkeys",""],["lctrl",""],["run",""]],"macro":[["include_labeled_bytes","Like [`std::include_bytes!`], but also returns its argument, the relative path to the bytes"]],"mod":[["app_state","A widgetry application splits its state into two pieces: global shared state that lasts for the entire lifetime of the application, and a stack of smaller states, only one of which is active at a time. For example, imagine an application to view a map. The shared state would include the map and pre-rendered geometry for it. The individual states might start with a splash screen or menu to choose a map, then a map viewer, then maybe a state to drill down into pieces of the map."],["assets",""],["backend",""],["backend_glow",""],["backend_glow_native",""],["canvas",""],["color",""],["drawing",""],["event",""],["event_ctx",""],["geom",""],["input",""],["runner",""],["screen_geom",""],["style",""],["svg",""],["table",""],["text",""],["tools",""],["widgets",""]],"struct":[["Autocomplete",""],["ButtonBuilder",""],["ButtonStyle",""],["Cached","Store a cached key/value pair, only recalculating when the key changes."],["Canvas",""],["Choice",""],["Color",""],["CompareTimes",""],["DrawWithTooltips",""],["Drawable","Geometry that's been uploaded to the GPU once and can be quickly redrawn many times. Create by creating a `GeomBatch` and calling `ctx.upload(batch)`."],["EdgeInsets",""],["EventCtx",""],["FanChart",""],["Filler","Doesn't do anything by itself, just used for widgetsing. Something else reaches in, asks for the ScreenRectangle to use."],["GeomBatch","A mutable builder for a group of colored polygons."],["GeomBatchStack","Similar to [`Widget::row`]/[`Widget::column`], but for [`GeomBatch`]s instead of [`Widget`]s, and follows a builder pattern"],["GfxCtx",""],["Image",""],["LinePlot",""],["LinearGradient",""],["Menu",""],["MultiButton",""],["Panel",""],["PersistentSplit",""],["PlotOptions",""],["Prerender",""],["ScatterPlot",""],["ScreenDims","ScreenDims is in units of logical pixels, as opposed to physical pixels."],["ScreenPt","ScreenPt is in units of logical pixels, as opposed to physical pixels."],["ScreenRectangle","ScreenRectangle is in units of logical pixels, as opposed to physical pixels."],["Series",""],["Settings","Customize how widgetry works. These settings can't be changed after starting."],["Slider",""],["Spinner",""],["Style",""],["Text",""],["TextSpan",""],["Texture",""],["Toggle",""],["UserInput",""],["Warper",""],["Widget",""],["WidgetOutput",""]],"trait":[["SharedAppState","Any data that should last the entire lifetime of the application should be stored in the struct implementing this trait."],["SimpleState","Many states fit a pattern of managing a single panel, handling mouseover events, and other interactions on the map. Implementing this instead of `State` reduces some boilerplate."],["State","A temporary state of an application. There's a stack of these, with the most recent being the active one."],["TextExt",""],["WidgetImpl","Create a new widget by implementing this trait. You can instantiate your widget by calling `Widget::new(Box::new(instance of your new widget))`, which gives you the usual style options."]],"type":[["OutlineStyle",""]]});
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -13,7 +13,7 @@
|
||||
</div></div><h3 id="impl-Deserialize%3C%27de%3E" class="impl"><code class="in-band">impl<'de> <a class="trait" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a><'de> for <a class="struct" href="../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a></code><a href="#impl-Deserialize%3C%27de%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/color.rs.html#7" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.deserialize" class="method hidden"><code>fn <a href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html#tymethod.deserialize" class="fnname">deserialize</a><__D>(__deserializer: __D) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, __D::<a class="type" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>> <span class="where fmt-newline">where<br> __D: <a class="trait" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a><'de>, </span></code><a class="srclink" href="../src/widgetry/color.rs.html#7" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
|
||||
</div></div><h3 id="impl-Display" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="struct" href="../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a></code><a href="#impl-Display" class="anchor"></a><a class="srclink" href="../src/widgetry/color.rs.html#15-23" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt-1" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/widgetry/color.rs.html#16-22" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id="impl-From%3CColor%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>> for <a class="enum" href="../widgetry/color/enum.Fill.html" title="enum widgetry::color::Fill">Fill</a></code><a href="#impl-From%3CColor%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/color.rs.html#231-235" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(color: <a class="struct" href="../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>) -> <a class="enum" href="../widgetry/color/enum.Fill.html" title="enum widgetry::color::Fill">Fill</a></code><a class="srclink" href="../src/widgetry/color.rs.html#232-234" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-From%3CColor%3E-1" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>> for <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-From%3CColor%3E-1" class="anchor"></a><a class="srclink" href="../src/widgetry/geom.rs.html#289-293" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from-1" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(color: <a class="struct" href="../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>) -> <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#290-292" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-From%3CColor%3E-1" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>> for <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a href="#impl-From%3CColor%3E-1" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#291-295" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from-1" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(color: <a class="struct" href="../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>) -> <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a></code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#292-294" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-PartialEq%3CColor%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>> for <a class="struct" href="../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a></code><a href="#impl-PartialEq%3CColor%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/color.rs.html#7" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.eq" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="struct" href="../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../src/widgetry/color.rs.html#7" title="goto source code">[src]</a></h4><div class='docblock hidden'><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/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
||||
</div><h4 id="method.ne" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: &<a class="struct" href="../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../src/widgetry/color.rs.html#7" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
|
||||
|
@ -1,51 +1,51 @@
|
||||
<!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 `GeomBatch` struct in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, GeomBatch"><title>widgetry::GeomBatch - 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><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../widgetry/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Struct GeomBatch</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.autocrop_dims">autocrop_dims</a><a href="#structfield.list">list</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.append">append</a><a href="#method.autocrop">autocrop</a><a href="#method.batch">batch</a><a href="#method.centered_on">centered_on</a><a href="#method.color">color</a><a href="#method.consume">consume</a><a href="#method.draw">draw</a><a href="#method.extend">extend</a><a href="#method.get_bounds">get_bounds</a><a href="#method.get_dims">get_dims</a><a href="#method.into_widget">into_widget</a><a href="#method.is_empty">is_empty</a><a href="#method.load_svg">load_svg</a><a href="#method.load_svg_bytes">load_svg_bytes</a><a href="#method.load_svg_bytes_uncached">load_svg_bytes_uncached</a><a href="#method.new">new</a><a href="#method.push">push</a><a href="#method.push_with_z">push_with_z</a><a href="#method.rotate">rotate</a><a href="#method.rotate_around_batch_center">rotate_around_batch_center</a><a href="#method.scale">scale</a><a href="#method.scale_xy">scale_xy</a><a href="#method.set_z_offset">set_z_offset</a><a href="#method.to_geojson">to_geojson</a><a href="#method.translate">translate</a><a href="#method.unioned_polygon">unioned_polygon</a><a href="#method.unshift">unshift</a><a href="#method.upload">upload</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-From%3CVec%3C(F%2C%20Polygon)%2C%20Global%3E%3E">From<Vec<(F, Polygon), Global>></a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><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><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><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-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></div></div><p class="location"><a href="index.html">widgetry</a></p><script>window.sidebarCurrent = {name: "GeomBatch", ty: "struct", relpath: ""};</script><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"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/geom.rs.html#10-15" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="index.html">widgetry</a>::<wbr><a class="struct" href="">GeomBatch</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct GeomBatch {
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/geom/mod.rs.html#12-17" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="index.html">widgetry</a>::<wbr><a class="struct" href="">GeomBatch</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct GeomBatch {
|
||||
pub(crate) list: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="enum" href="../widgetry/color/enum.Fill.html" title="enum widgetry::color::Fill">Fill</a>, <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>>,
|
||||
pub autocrop_dims: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,
|
||||
}</pre></div><div class="docblock"><p>A mutable builder for a group of colored polygons.</p>
|
||||
</div><h2 id="fields" class="fields small-section-header">
|
||||
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.list" class="structfield small-section-header"><a href="#structfield.list" class="anchor field"></a><code>list: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="enum" href="../widgetry/color/enum.Fill.html" title="enum widgetry::color::Fill">Fill</a>, <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>></code></span><span id="structfield.autocrop_dims" class="structfield small-section-header"><a href="#structfield.autocrop_dims" class="anchor field"></a><code>autocrop_dims: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/widgetry/geom.rs.html#27-261" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>() -> <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#29-34" title="goto source code">[src]</a></h4><div class="docblock"><p>Creates an empty batch.</p>
|
||||
</div><h4 id="method.push" class="method"><code>pub fn <a href="#method.push" class="fnname">push</a><F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../widgetry/color/enum.Fill.html" title="enum widgetry::color::Fill">Fill</a>>>(&mut self, fill: F, p: <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>)</code><a class="srclink" href="../src/widgetry/geom.rs.html#37-39" title="goto source code">[src]</a></h4><div class="docblock"><p>Adds a single polygon, painted according to <code>Fill</code></p>
|
||||
</div><h4 id="method.push_with_z" class="method"><code>pub fn <a href="#method.push_with_z" class="fnname">push_with_z</a><F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../widgetry/color/enum.Fill.html" title="enum widgetry::color::Fill">Fill</a>>>(&mut self, fill: F, p: <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>, z_offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>)</code><a class="srclink" href="../src/widgetry/geom.rs.html#44-48" title="goto source code">[src]</a></h4><div class="docblock"><p>Offset z value to render above/below other polygons.
|
||||
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.list" class="structfield small-section-header"><a href="#structfield.list" class="anchor field"></a><code>list: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="enum" href="../widgetry/color/enum.Fill.html" title="enum widgetry::color::Fill">Fill</a>, <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>></code></span><span id="structfield.autocrop_dims" class="structfield small-section-header"><a href="#structfield.autocrop_dims" class="anchor field"></a><code>autocrop_dims: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#29-263" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>() -> <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#31-36" title="goto source code">[src]</a></h4><div class="docblock"><p>Creates an empty batch.</p>
|
||||
</div><h4 id="method.push" class="method"><code>pub fn <a href="#method.push" class="fnname">push</a><F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../widgetry/color/enum.Fill.html" title="enum widgetry::color::Fill">Fill</a>>>(&mut self, fill: F, p: <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>)</code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#39-41" title="goto source code">[src]</a></h4><div class="docblock"><p>Adds a single polygon, painted according to <code>Fill</code></p>
|
||||
</div><h4 id="method.push_with_z" class="method"><code>pub fn <a href="#method.push_with_z" class="fnname">push_with_z</a><F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../widgetry/color/enum.Fill.html" title="enum widgetry::color::Fill">Fill</a>>>(&mut self, fill: F, p: <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>, z_offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>)</code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#46-50" title="goto source code">[src]</a></h4><div class="docblock"><p>Offset z value to render above/below other polygons.
|
||||
z must be in (-1, 0] to ensure we don't traverse layers of the UI - to make
|
||||
sure we don't inadvertently render something <em>above</em> a tooltip, etc.</p>
|
||||
</div><h4 id="method.unshift" class="method"><code>pub fn <a href="#method.unshift" class="fnname">unshift</a><F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../widgetry/color/enum.Fill.html" title="enum widgetry::color::Fill">Fill</a>>>(&mut self, fill: F, p: <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>)</code><a class="srclink" href="../src/widgetry/geom.rs.html#51-53" title="goto source code">[src]</a></h4><div class="docblock"><p>Adds a single polygon to the front of the batch, painted according to <code>Fill</code></p>
|
||||
</div><h4 id="method.extend" class="method"><code>pub fn <a href="#method.extend" class="fnname">extend</a><F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../widgetry/color/enum.Fill.html" title="enum widgetry::color::Fill">Fill</a>>>(&mut self, fill: F, polys: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>>)</code><a class="srclink" href="../src/widgetry/geom.rs.html#56-61" title="goto source code">[src]</a></h4><div class="docblock"><p>Applies one Fill to many polygons.</p>
|
||||
</div><h4 id="method.append" class="method"><code>pub fn <a href="#method.append" class="fnname">append</a>(&mut self, other: <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a>)</code><a class="srclink" href="../src/widgetry/geom.rs.html#64-66" title="goto source code">[src]</a></h4><div class="docblock"><p>Appends all colored polygons from another batch to the current one.</p>
|
||||
</div><h4 id="method.consume" class="method"><code>pub fn <a href="#method.consume" class="fnname">consume</a>(self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="enum" href="../widgetry/color/enum.Fill.html" title="enum widgetry::color::Fill">Fill</a>, <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>></code><a class="srclink" href="../src/widgetry/geom.rs.html#69-71" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns the colored polygons in this batch, destroying the batch.</p>
|
||||
</div><h4 id="method.draw" class="method"><code>pub fn <a href="#method.draw" class="fnname">draw</a>(self, g: &mut <a class="struct" href="../widgetry/drawing/struct.GfxCtx.html" title="struct widgetry::drawing::GfxCtx">GfxCtx</a><'_>)</code><a class="srclink" href="../src/widgetry/geom.rs.html#74-77" title="goto source code">[src]</a></h4><div class="docblock"><p>Draws the batch, consuming it. Only use this for drawing things once.</p>
|
||||
</div><h4 id="method.upload" class="method"><code>pub fn <a href="#method.upload" class="fnname">upload</a>(self, ctx: &<a class="struct" href="../widgetry/event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a><'_>) -> <a class="struct" href="../widgetry/backend_glow/struct.Drawable.html" title="struct widgetry::backend_glow::Drawable">Drawable</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#81-83" title="goto source code">[src]</a></h4><div class="docblock"><p>Upload the batch of polygons to the GPU, returning something that can be cheaply redrawn
|
||||
</div><h4 id="method.unshift" class="method"><code>pub fn <a href="#method.unshift" class="fnname">unshift</a><F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../widgetry/color/enum.Fill.html" title="enum widgetry::color::Fill">Fill</a>>>(&mut self, fill: F, p: <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>)</code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#53-55" title="goto source code">[src]</a></h4><div class="docblock"><p>Adds a single polygon to the front of the batch, painted according to <code>Fill</code></p>
|
||||
</div><h4 id="method.extend" class="method"><code>pub fn <a href="#method.extend" class="fnname">extend</a><F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../widgetry/color/enum.Fill.html" title="enum widgetry::color::Fill">Fill</a>>>(&mut self, fill: F, polys: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>>)</code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#58-63" title="goto source code">[src]</a></h4><div class="docblock"><p>Applies one Fill to many polygons.</p>
|
||||
</div><h4 id="method.append" class="method"><code>pub fn <a href="#method.append" class="fnname">append</a>(&mut self, other: <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a>)</code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#66-68" title="goto source code">[src]</a></h4><div class="docblock"><p>Appends all colored polygons from another batch to the current one.</p>
|
||||
</div><h4 id="method.consume" class="method"><code>pub fn <a href="#method.consume" class="fnname">consume</a>(self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="enum" href="../widgetry/color/enum.Fill.html" title="enum widgetry::color::Fill">Fill</a>, <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>></code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#71-73" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns the colored polygons in this batch, destroying the batch.</p>
|
||||
</div><h4 id="method.draw" class="method"><code>pub fn <a href="#method.draw" class="fnname">draw</a>(self, g: &mut <a class="struct" href="../widgetry/drawing/struct.GfxCtx.html" title="struct widgetry::drawing::GfxCtx">GfxCtx</a><'_>)</code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#76-79" title="goto source code">[src]</a></h4><div class="docblock"><p>Draws the batch, consuming it. Only use this for drawing things once.</p>
|
||||
</div><h4 id="method.upload" class="method"><code>pub fn <a href="#method.upload" class="fnname">upload</a>(self, ctx: &<a class="struct" href="../widgetry/event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a><'_>) -> <a class="struct" href="../widgetry/backend_glow/struct.Drawable.html" title="struct widgetry::backend_glow::Drawable">Drawable</a></code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#83-85" title="goto source code">[src]</a></h4><div class="docblock"><p>Upload the batch of polygons to the GPU, returning something that can be cheaply redrawn
|
||||
many times later.</p>
|
||||
</div><h4 id="method.batch" class="method"><code>pub fn <a href="#method.batch" class="fnname">batch</a>(self) -> <a class="struct" href="../widgetry/widgets/struct.Widget.html" title="struct widgetry::widgets::Widget">Widget</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#86-88" title="goto source code">[src]</a></h4><div class="docblock"><p>Wrap in a Widget for layouting, so this batch can become part of a larger one.</p>
|
||||
</div><h4 id="method.into_widget" class="method"><code>pub fn <a href="#method.into_widget" class="fnname">into_widget</a>(self, ctx: &<a class="struct" href="../widgetry/event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a><'_>) -> <a class="struct" href="../widgetry/widgets/struct.Widget.html" title="struct widgetry::widgets::Widget">Widget</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#91-93" title="goto source code">[src]</a></h4><div class="docblock"><p>Wrap in a Widget, so the batch can be drawn as part of a Panel.</p>
|
||||
</div><h4 id="method.get_bounds" class="method"><code>pub fn <a href="#method.get_bounds" class="fnname">get_bounds</a>(&self) -> <a class="struct" href="../geom/bounds/struct.Bounds.html" title="struct geom::bounds::Bounds">Bounds</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#96-105" title="goto source code">[src]</a></h4><div class="docblock"><p>Compute the bounds of all polygons in this batch.</p>
|
||||
</div><h4 id="method.autocrop" class="method"><code>pub fn <a href="#method.autocrop" class="fnname">autocrop</a>(self) -> <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#108-117" title="goto source code">[src]</a></h4><div class="docblock"><p>Sets the top-left to 0, 0. Not sure exactly when this should be used.</p>
|
||||
</div><h4 id="method.unioned_polygon" class="method"><code>pub fn <a href="#method.unioned_polygon" class="fnname">unioned_polygon</a>(&self) -> <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#120-126" title="goto source code">[src]</a></h4><div class="docblock"><p>Builds a single polygon covering everything in this batch. Use to create a hitbox.</p>
|
||||
</div><h4 id="method.is_empty" class="method"><code>pub fn <a href="#method.is_empty" class="fnname">is_empty</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#129-131" title="goto source code">[src]</a></h4><div class="docblock"><p>True when the batch is empty.</p>
|
||||
</div><h4 id="method.get_dims" class="method"><code>pub fn <a href="#method.get_dims" class="fnname">get_dims</a>(&self) -> <a class="struct" href="../widgetry/screen_geom/struct.ScreenDims.html" title="struct widgetry::screen_geom::ScreenDims">ScreenDims</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#134-142" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns the width and height of all geometry contained in the batch.</p>
|
||||
</div><h4 id="method.load_svg" class="method"><code>pub fn <a href="#method.load_svg" class="fnname">load_svg</a><P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="../widgetry/drawing/struct.Prerender.html" title="struct widgetry::drawing::Prerender">Prerender</a>>, I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>>>(<br> prerender: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>P, <br> filename: I<br>) -> <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#145-147" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns a batch containing an SVG from a file.</p>
|
||||
</div><h4 id="method.load_svg_bytes" class="method"><code>pub fn <a href="#method.load_svg_bytes" class="fnname">load_svg_bytes</a><P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="../widgetry/drawing/struct.Prerender.html" title="struct widgetry::drawing::Prerender">Prerender</a>>>(<br> prerender: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>P, <br> labeled_bytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>&<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a><br>) -> <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#150-157" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns a GeomBatch from the bytes of a utf8 encoded SVG string.</p>
|
||||
</div><h4 id="method.load_svg_bytes_uncached" class="method"><code>pub fn <a href="#method.load_svg_bytes_uncached" class="fnname">load_svg_bytes_uncached</a>(raw: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -> <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#164-166" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns a GeomBatch from the bytes of a utf8 encoded SVG string.</p>
|
||||
</div><h4 id="method.batch" class="method"><code>pub fn <a href="#method.batch" class="fnname">batch</a>(self) -> <a class="struct" href="../widgetry/widgets/struct.Widget.html" title="struct widgetry::widgets::Widget">Widget</a></code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#88-90" title="goto source code">[src]</a></h4><div class="docblock"><p>Wrap in a Widget for layouting, so this batch can become part of a larger one.</p>
|
||||
</div><h4 id="method.into_widget" class="method"><code>pub fn <a href="#method.into_widget" class="fnname">into_widget</a>(self, ctx: &<a class="struct" href="../widgetry/event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a><'_>) -> <a class="struct" href="../widgetry/widgets/struct.Widget.html" title="struct widgetry::widgets::Widget">Widget</a></code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#93-95" title="goto source code">[src]</a></h4><div class="docblock"><p>Wrap in a Widget, so the batch can be drawn as part of a Panel.</p>
|
||||
</div><h4 id="method.get_bounds" class="method"><code>pub fn <a href="#method.get_bounds" class="fnname">get_bounds</a>(&self) -> <a class="struct" href="../geom/bounds/struct.Bounds.html" title="struct geom::bounds::Bounds">Bounds</a></code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#98-107" title="goto source code">[src]</a></h4><div class="docblock"><p>Compute the bounds of all polygons in this batch.</p>
|
||||
</div><h4 id="method.autocrop" class="method"><code>pub fn <a href="#method.autocrop" class="fnname">autocrop</a>(self) -> <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#110-119" title="goto source code">[src]</a></h4><div class="docblock"><p>Sets the top-left to 0, 0. Not sure exactly when this should be used.</p>
|
||||
</div><h4 id="method.unioned_polygon" class="method"><code>pub fn <a href="#method.unioned_polygon" class="fnname">unioned_polygon</a>(&self) -> <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a></code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#122-128" title="goto source code">[src]</a></h4><div class="docblock"><p>Builds a single polygon covering everything in this batch. Use to create a hitbox.</p>
|
||||
</div><h4 id="method.is_empty" class="method"><code>pub fn <a href="#method.is_empty" class="fnname">is_empty</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#131-133" title="goto source code">[src]</a></h4><div class="docblock"><p>True when the batch is empty.</p>
|
||||
</div><h4 id="method.get_dims" class="method"><code>pub fn <a href="#method.get_dims" class="fnname">get_dims</a>(&self) -> <a class="struct" href="../widgetry/screen_geom/struct.ScreenDims.html" title="struct widgetry::screen_geom::ScreenDims">ScreenDims</a></code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#136-144" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns the width and height of all geometry contained in the batch.</p>
|
||||
</div><h4 id="method.load_svg" class="method"><code>pub fn <a href="#method.load_svg" class="fnname">load_svg</a><P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="../widgetry/drawing/struct.Prerender.html" title="struct widgetry::drawing::Prerender">Prerender</a>>, I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>>>(<br> prerender: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>P, <br> filename: I<br>) -> <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#147-149" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns a batch containing an SVG from a file.</p>
|
||||
</div><h4 id="method.load_svg_bytes" class="method"><code>pub fn <a href="#method.load_svg_bytes" class="fnname">load_svg_bytes</a><P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="../widgetry/drawing/struct.Prerender.html" title="struct widgetry::drawing::Prerender">Prerender</a>>>(<br> prerender: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>P, <br> labeled_bytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>&<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a><br>) -> <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#152-159" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns a GeomBatch from the bytes of a utf8 encoded SVG string.</p>
|
||||
</div><h4 id="method.load_svg_bytes_uncached" class="method"><code>pub fn <a href="#method.load_svg_bytes_uncached" class="fnname">load_svg_bytes_uncached</a>(raw: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -> <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#166-168" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns a GeomBatch from the bytes of a utf8 encoded SVG string.</p>
|
||||
<p>Prefer to use <code>load_svg_bytes</code>, which caches the parsed SVG, unless
|
||||
the SVG was dynamically generated, or is otherwise unlikely to be
|
||||
reused.</p>
|
||||
</div><h4 id="method.color" class="method"><code>pub fn <a href="#method.color" class="fnname">color</a>(self, transformation: <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>) -> <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#169-176" title="goto source code">[src]</a></h4><div class="docblock"><p>Transforms all colors in a batch.</p>
|
||||
</div><h4 id="method.centered_on" class="method"><code>pub fn <a href="#method.centered_on" class="fnname">centered_on</a>(self, center: <a class="struct" href="../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>) -> <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#179-184" title="goto source code">[src]</a></h4><div class="docblock"><p>Translates the batch to be centered on some point.</p>
|
||||
</div><h4 id="method.translate" class="method"><code>pub fn <a href="#method.translate" class="fnname">translate</a>(self, dx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>, dy: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#187-192" title="goto source code">[src]</a></h4><div class="docblock"><p>Translates the batch by some offset.</p>
|
||||
</div><h4 id="method.rotate" class="method"><code>pub fn <a href="#method.rotate" class="fnname">rotate</a>(self, angle: <a class="struct" href="../geom/angle/struct.Angle.html" title="struct geom::angle::Angle">Angle</a>) -> <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#195-200" title="goto source code">[src]</a></h4><div class="docblock"><p>Rotates each polygon in the batch relative to the center of that polygon.</p>
|
||||
</div><h4 id="method.rotate_around_batch_center" class="method"><code>pub fn <a href="#method.rotate_around_batch_center" class="fnname">rotate_around_batch_center</a>(self, angle: <a class="struct" href="../geom/angle/struct.Angle.html" title="struct geom::angle::Angle">Angle</a>) -> <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#203-209" title="goto source code">[src]</a></h4><div class="docblock"><p>Rotates each polygon in the batch relative to the center of the entire batch.</p>
|
||||
</div><h4 id="method.scale" class="method"><code>pub fn <a href="#method.scale" class="fnname">scale</a>(self, factor: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#212-214" title="goto source code">[src]</a></h4><div class="docblock"><p>Scales the batch by some factor.</p>
|
||||
</div><h4 id="method.scale_xy" class="method"><code>pub fn <a href="#method.scale_xy" class="fnname">scale_xy</a>(self, x_factor: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>, y_factor: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#216-227" title="goto source code">[src]</a></h4><h4 id="method.set_z_offset" class="method"><code>pub fn <a href="#method.set_z_offset" class="fnname">set_z_offset</a>(self, offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#231-239" title="goto source code">[src]</a></h4><div class="docblock"><p>Overrides the Z-ordering offset for the batch. Must be in (-1, 0], with values closer to -1
|
||||
</div><h4 id="method.color" class="method"><code>pub fn <a href="#method.color" class="fnname">color</a>(self, transformation: <a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>) -> <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#171-178" title="goto source code">[src]</a></h4><div class="docblock"><p>Transforms all colors in a batch.</p>
|
||||
</div><h4 id="method.centered_on" class="method"><code>pub fn <a href="#method.centered_on" class="fnname">centered_on</a>(self, center: <a class="struct" href="../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>) -> <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#181-186" title="goto source code">[src]</a></h4><div class="docblock"><p>Translates the batch to be centered on some point.</p>
|
||||
</div><h4 id="method.translate" class="method"><code>pub fn <a href="#method.translate" class="fnname">translate</a>(self, dx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>, dy: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#189-194" title="goto source code">[src]</a></h4><div class="docblock"><p>Translates the batch by some offset.</p>
|
||||
</div><h4 id="method.rotate" class="method"><code>pub fn <a href="#method.rotate" class="fnname">rotate</a>(self, angle: <a class="struct" href="../geom/angle/struct.Angle.html" title="struct geom::angle::Angle">Angle</a>) -> <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#197-202" title="goto source code">[src]</a></h4><div class="docblock"><p>Rotates each polygon in the batch relative to the center of that polygon.</p>
|
||||
</div><h4 id="method.rotate_around_batch_center" class="method"><code>pub fn <a href="#method.rotate_around_batch_center" class="fnname">rotate_around_batch_center</a>(self, angle: <a class="struct" href="../geom/angle/struct.Angle.html" title="struct geom::angle::Angle">Angle</a>) -> <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#205-211" title="goto source code">[src]</a></h4><div class="docblock"><p>Rotates each polygon in the batch relative to the center of the entire batch.</p>
|
||||
</div><h4 id="method.scale" class="method"><code>pub fn <a href="#method.scale" class="fnname">scale</a>(self, factor: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#214-216" title="goto source code">[src]</a></h4><div class="docblock"><p>Scales the batch by some factor.</p>
|
||||
</div><h4 id="method.scale_xy" class="method"><code>pub fn <a href="#method.scale_xy" class="fnname">scale_xy</a>(self, x_factor: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>, y_factor: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#218-229" title="goto source code">[src]</a></h4><h4 id="method.set_z_offset" class="method"><code>pub fn <a href="#method.set_z_offset" class="fnname">set_z_offset</a>(self, offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#233-241" title="goto source code">[src]</a></h4><div class="docblock"><p>Overrides the Z-ordering offset for the batch. Must be in (-1, 0], with values closer to -1
|
||||
rendering on top.</p>
|
||||
</div><h4 id="method.to_geojson" class="method"><code>pub fn <a href="#method.to_geojson" class="fnname">to_geojson</a>(self, gps_bounds: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="struct" href="../geom/bounds/struct.GPSBounds.html" title="struct geom::bounds::GPSBounds">GPSBounds</a>>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><Feature></code><a class="srclink" href="../src/widgetry/geom.rs.html#244-260" title="goto source code">[src]</a></h4><div class="docblock"><p>Exports the batch to a list of GeoJSON features, labeling each colored polygon. Z-values,
|
||||
</div><h4 id="method.to_geojson" class="method"><code>pub fn <a href="#method.to_geojson" class="fnname">to_geojson</a>(self, gps_bounds: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="struct" href="../geom/bounds/struct.GPSBounds.html" title="struct geom::bounds::GPSBounds">GPSBounds</a>>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><Feature></code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#246-262" title="goto source code">[src]</a></h4><div class="docblock"><p>Exports the batch to a list of GeoJSON features, labeling each colored polygon. Z-values,
|
||||
alpha values from the color, and non-RGB fill patterns are lost. If the polygon isn't a
|
||||
ring, it's skipped. The world-space coordinates are optionally translated back to GPS.</p>
|
||||
</div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../src/widgetry/geom.rs.html#9" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#9" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#11" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#11" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id="method.clone_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/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/nightly/std/primitive.reference.html">&</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#128-130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/widgetry/geom.rs.html#17-25" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#18-24" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id="impl-From%3CVec%3C(F%2C%20Polygon)%2C%20Global%3E%3E" class="impl"><code class="in-band">impl<F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../widgetry/color/enum.Fill.html" title="enum widgetry::color::Fill">Fill</a>>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>F, <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>>> for <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a href="#impl-From%3CVec%3C(F%2C%20Polygon)%2C%20Global%3E%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/geom.rs.html#263-271" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(list: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>F, <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>>) -> <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#265-270" title="goto source code">[src]</a></h4><div class="docblock"><p>Creates a batch of filled polygons.</p>
|
||||
</div></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#19-27" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#20-26" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id="impl-From%3CVec%3C(F%2C%20Polygon)%2C%20Global%3E%3E" class="impl"><code class="in-band">impl<F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../widgetry/color/enum.Fill.html" title="enum widgetry::color::Fill">Fill</a>>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>F, <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>>> for <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a href="#impl-From%3CVec%3C(F%2C%20Polygon)%2C%20Global%3E%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/geom/mod.rs.html#265-273" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(list: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>F, <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>>) -> <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a class="srclink" href="../src/widgetry/geom/mod.rs.html#267-272" title="goto source code">[src]</a></h4><div class="docblock"><p>Creates a batch of filled polygons.</p>
|
||||
</div></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"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></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"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||
|
35
rustdoc/widgetry/struct.GeomBatchStack.html
Normal file
35
rustdoc/widgetry/struct.GeomBatchStack.html
Normal file
File diff suppressed because one or more lines are too long
@ -1,18 +1,21 @@
|
||||
<!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 `Image` struct in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, Image"><title>widgetry::Image - 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><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../widgetry/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Struct Image</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.color">color</a><a href="#structfield.filename">filename</a><a href="#structfield.tooltip">tooltip</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.color">color</a><a href="#method.icon">icon</a><a href="#method.into_widget">into_widget</a><a href="#method.tooltip">tooltip</a><a href="#method.untinted">untinted</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><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><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><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-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><p class="location"><a href="index.html">widgetry</a></p><script>window.sidebarCurrent = {name: "Image", ty: "struct", relpath: ""};</script><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"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/widgets/image.rs.html#6-10" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="index.html">widgetry</a>::<wbr><a class="struct" href="">Image</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct Image<'a> {
|
||||
filename: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../widgetry/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Struct Image</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.color">color</a><a href="#structfield.source">source</a><a href="#structfield.tooltip">tooltip</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.batch">batch</a><a href="#method.bytes">bytes</a><a href="#method.color">color</a><a href="#method.icon">icon</a><a href="#method.into_widget">into_widget</a><a href="#method.tooltip">tooltip</a><a href="#method.untinted">untinted</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><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><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><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-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></div></div><p class="location"><a href="index.html">widgetry</a></p><script>window.sidebarCurrent = {name: "Image", ty: "struct", relpath: ""};</script><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"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/widgets/image.rs.html#8-12" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="index.html">widgetry</a>::<wbr><a class="struct" href="">Image</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct Image<'a> {
|
||||
source: <a class="enum" href="../widgetry/widgets/image/enum.ImageSource.html" title="enum widgetry::widgets::image::ImageSource">ImageSource</a><'a>,
|
||||
tooltip: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../widgetry/text/struct.Text.html" title="struct widgetry::text::Text">Text</a>>,
|
||||
color: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>>,
|
||||
}</pre></div><h2 id="fields" class="fields small-section-header">
|
||||
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.filename" class="structfield small-section-header"><a href="#structfield.filename" class="anchor field"></a><code>filename: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></code></span><span id="structfield.tooltip" class="structfield small-section-header"><a href="#structfield.tooltip" class="anchor field"></a><code>tooltip: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../widgetry/text/struct.Text.html" title="struct widgetry::text::Text">Text</a>></code></span><span id="structfield.color" class="structfield small-section-header"><a href="#structfield.color" class="anchor field"></a><code>color: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl<'a> <a class="struct" href="../widgetry/widgets/image/struct.Image.html" title="struct widgetry::widgets::image::Image">Image</a><'a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/image.rs.html#12-72" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.icon" class="method"><code>pub fn <a href="#method.icon" class="fnname">icon</a>(filename: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> Self</code><a class="srclink" href="../src/widgetry/widgets/image.rs.html#14-20" title="goto source code">[src]</a></h4><div class="docblock"><p>An SVG image, read from <code>filename</code>, which is colored to match Style.icon_fg</p>
|
||||
</div><h4 id="method.untinted" class="method"><code>pub fn <a href="#method.untinted" class="fnname">untinted</a>(filename: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> Self</code><a class="srclink" href="../src/widgetry/widgets/image.rs.html#26-28" title="goto source code">[src]</a></h4><div class="docblock"><p>An SVG image, read from <code>filename</code>.</p>
|
||||
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.source" class="structfield small-section-header"><a href="#structfield.source" class="anchor field"></a><code>source: <a class="enum" href="../widgetry/widgets/image/enum.ImageSource.html" title="enum widgetry::widgets::image::ImageSource">ImageSource</a><'a></code></span><span id="structfield.tooltip" class="structfield small-section-header"><a href="#structfield.tooltip" class="anchor field"></a><code>tooltip: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../widgetry/text/struct.Text.html" title="struct widgetry::text::Text">Text</a>></code></span><span id="structfield.color" class="structfield small-section-header"><a href="#structfield.color" class="anchor field"></a><code>color: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl<'a> <a class="struct" href="../widgetry/widgets/image/struct.Image.html" title="struct widgetry::widgets::image::Image">Image</a><'a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/image.rs.html#37-111" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.icon" class="method"><code>pub fn <a href="#method.icon" class="fnname">icon</a>(filename: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> Self</code><a class="srclink" href="../src/widgetry/widgets/image.rs.html#39-45" title="goto source code">[src]</a></h4><div class="docblock"><p>An SVG image, read from <code>filename</code>, which is colored to match Style.icon_fg</p>
|
||||
</div><h4 id="method.untinted" class="method"><code>pub fn <a href="#method.untinted" class="fnname">untinted</a>(filename: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> Self</code><a class="srclink" href="../src/widgetry/widgets/image.rs.html#51-53" title="goto source code">[src]</a></h4><div class="docblock"><p>An SVG image, read from <code>filename</code>.</p>
|
||||
<p>The image's intrinsic colors will be used, it will not be tinted like <code>Image::icon</code>, unless
|
||||
you call <code>color()</code></p>
|
||||
</div><h4 id="method.tooltip" class="method"><code>pub fn <a href="#method.tooltip" class="fnname">tooltip</a>(self, tooltip: <a class="struct" href="../widgetry/text/struct.Text.html" title="struct widgetry::text::Text">Text</a>) -> Self</code><a class="srclink" href="../src/widgetry/widgets/image.rs.html#31-34" title="goto source code">[src]</a></h4><div class="docblock"><p>Add a tooltip to appear when hovering over the image.</p>
|
||||
</div><h4 id="method.color" class="method"><code>pub fn <a href="#method.color" class="fnname">color</a><RWC: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>>>(self, color: RWC) -> Self</code><a class="srclink" href="../src/widgetry/widgets/image.rs.html#37-40" title="goto source code">[src]</a></h4><div class="docblock"><p>Transform the color of the image.</p>
|
||||
</div><h4 id="method.into_widget" class="method"><code>pub fn <a href="#method.into_widget" class="fnname">into_widget</a>(self, ctx: &<a class="struct" href="../widgetry/event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a><'_>) -> <a class="struct" href="../widgetry/widgets/struct.Widget.html" title="struct widgetry::widgets::Widget">Widget</a></code><a class="srclink" href="../src/widgetry/widgets/image.rs.html#42-71" title="goto source code">[src]</a></h4></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"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../widgetry/widgets/image/struct.Image.html" title="struct widgetry::widgets::image::Image">Image</a><'a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../widgetry/widgets/image/struct.Image.html" title="struct widgetry::widgets::image::Image">Image</a><'a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../widgetry/widgets/image/struct.Image.html" title="struct widgetry::widgets::image::Image">Image</a><'a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../widgetry/widgets/image/struct.Image.html" title="struct widgetry::widgets::image::Image">Image</a><'a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../widgetry/widgets/image/struct.Image.html" title="struct widgetry::widgets::image::Image">Image</a><'a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></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"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div><h4 id="method.bytes" class="method"><code>pub fn <a href="#method.bytes" class="fnname">bytes</a>(labeled_bytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>&'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>) -> Self</code><a class="srclink" href="../src/widgetry/widgets/image.rs.html#55-64" title="goto source code">[src]</a></h4><h4 id="method.tooltip" class="method"><code>pub fn <a href="#method.tooltip" class="fnname">tooltip</a>(self, tooltip: <a class="struct" href="../widgetry/text/struct.Text.html" title="struct widgetry::text::Text">Text</a>) -> Self</code><a class="srclink" href="../src/widgetry/widgets/image.rs.html#67-70" title="goto source code">[src]</a></h4><div class="docblock"><p>Add a tooltip to appear when hovering over the image.</p>
|
||||
</div><h4 id="method.color" class="method"><code>pub fn <a href="#method.color" class="fnname">color</a><RWC: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>>>(self, color: RWC) -> Self</code><a class="srclink" href="../src/widgetry/widgets/image.rs.html#73-76" title="goto source code">[src]</a></h4><div class="docblock"><p>Transform the color of the image.</p>
|
||||
</div><h4 id="method.batch" class="method"><code>pub fn <a href="#method.batch" class="fnname">batch</a>(&self, ctx: &<a class="struct" href="../widgetry/event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a><'_>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a>, <a class="struct" href="../geom/bounds/struct.Bounds.html" title="struct geom::bounds::Bounds">Bounds</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class="srclink" href="../src/widgetry/widgets/image.rs.html#78-91" title="goto source code">[src]</a></h4><h4 id="method.into_widget" class="method"><code>pub fn <a href="#method.into_widget" class="fnname">into_widget</a>(self, ctx: &<a class="struct" href="../widgetry/event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a><'_>) -> <a class="struct" href="../widgetry/widgets/struct.Widget.html" title="struct widgetry::widgets::Widget">Widget</a></code><a class="srclink" href="../src/widgetry/widgets/image.rs.html#93-110" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../widgetry/widgets/image/struct.Image.html" title="struct widgetry::widgets::image::Image">Image</a><'a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/image.rs.html#7" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="../widgetry/widgets/image/struct.Image.html" title="struct widgetry::widgets::image::Image">Image</a><'a></code><a class="srclink" href="../src/widgetry/widgets/image.rs.html#7" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id="method.clone_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/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/nightly/std/primitive.reference.html">&</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#128-130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../widgetry/widgets/image/struct.Image.html" title="struct widgetry::widgets::image::Image">Image</a><'a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/widgetry/widgets/image.rs.html#7" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/widgetry/widgets/image.rs.html#7" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></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"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../widgetry/widgets/image/struct.Image.html" title="struct widgetry::widgets::image::Image">Image</a><'a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../widgetry/widgets/image/struct.Image.html" title="struct widgetry::widgets::image::Image">Image</a><'a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../widgetry/widgets/image/struct.Image.html" title="struct widgetry::widgets::image::Image">Image</a><'a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../widgetry/widgets/image/struct.Image.html" title="struct widgetry::widgets::image::Image">Image</a><'a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../widgetry/widgets/image/struct.Image.html" title="struct widgetry::widgets::image::Image">Image</a><'a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></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"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||
</div></div><h3 id="impl-Downcast" class="impl"><code class="in-band">impl<T> Downcast for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a>, </span></code><a href="#impl-Downcast" class="anchor"></a></h3><div class="impl-items"><h4 id="method.into_any" class="method hidden"><code>pub fn <a href="#method.into_any" class="fnname">into_any</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><T, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>></code></h4><div class='docblock hidden'><p>Convert <code>Box<dyn Trait></code> (where <code>Trait: Downcast</code>) to <code>Box<dyn Any></code>. <code>Box<dyn Any></code> can
|
||||
@ -28,6 +31,10 @@ further <code>downcast</code> into <code>Arc<ConcreteType></code> where <c
|
||||
</div></div><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#552-556" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#553-555" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-Into%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#541-548" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545-547" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-Same%3CT%3E" class="impl"><code class="in-band">impl<T> Same<T> for T</code><a href="#impl-Same%3CT%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="associatedtype.Output" class="type"><code>type <a href="#associatedtype.Output" class="type">Output</a> = T</code></h4><div class='docblock'><p>Should always be <code>Self</code></p>
|
||||
</div></div><h3 id="impl-ToOwned" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></code><a href="#impl-ToOwned" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#80-92" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Owned" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="type">Owned</a> = T</code></h4><div class='docblock'><p>The resulting type after obtaining ownership.</p>
|
||||
</div><h4 id="method.to_owned" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&self) -> T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#85-87" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p>
|
||||
</div><h4 id="method.clone_into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T)</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#89-91" title="goto source code">[src]</a></h4><div class="item-info hidden"><div class="stab unstable"><details><summary><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>toowned_clone_into</code>)</summary><p>recently added</p>
|
||||
</details></div></div><div class='docblock hidden'><p>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p>
|
||||
</div></div><h3 id="impl-TryFrom%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></code><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#589-598" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||||
</div><h4 id="method.try_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#595-597" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-TryInto%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#575-584" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error-1" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,6 +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 `geom_batch_stack` mod in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, geom_batch_stack"><title>widgetry::widgets::button::geom_batch_stack - 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><noscript><link rel="stylesheet" href="../../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../../../rust-logo.png' alt='logo'></div></a><p class="location">Module geom_batch_stack</p><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><p class="location"><a href="../../../index.html">widgetry</a>::<wbr><a href="../../index.html">widgets</a>::<wbr><a href="../index.html">button</a></p><script>window.sidebarCurrent = {name: "geom_batch_stack", ty: "mod", relpath: "../"};</script><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"><img src="../../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../../settings.html"><img src="../../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/widgets/button.rs.html#868-970" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../../../index.html">widgetry</a>::<wbr><a href="../../index.html">widgets</a>::<wbr><a href="../index.html">button</a>::<wbr><a class="mod" href="">geom_batch_stack</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
||||
<table><tr class="module-item"><td><a class="struct" href="struct.Stack.html" title="widgetry::widgets::button::geom_batch_stack::Stack struct">Stack</a></td><td class="docblock-short"></td></tr></table><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2>
|
||||
<table><tr class="module-item"><td><a class="enum" href="enum.Axis.html" title="widgetry::widgets::button::geom_batch_stack::Axis enum">Axis</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../../";window.currentCrate = "widgetry";</script><script src="../../../../main.js"></script><script defer src="../../../../search-index.js"></script></body></html>
|
@ -1 +0,0 @@
|
||||
initSidebarItems({"enum":[["Axis",""]],"struct":[["Stack",""]]});
|
@ -1,7 +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 `button` mod in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, button"><title>widgetry::widgets::button - 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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Module button</p><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></ul></div><p class="location"><a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">widgets</a></p><script>window.sidebarCurrent = {name: "button", ty: "mod", relpath: "../"};</script><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"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/widgets/button.rs.html#1-970" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">widgets</a>::<wbr><a class="mod" href="">button</a></span></h1><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2>
|
||||
<table><tr class="module-item"><td><a class="mod" href="geom_batch_stack/index.html" title="widgetry::widgets::button::geom_batch_stack mod">geom_batch_stack</a></td><td class="docblock-short"></td></tr></table><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
||||
<table><tr class="module-item"><td><a class="struct" href="struct.Button.html" title="widgetry::widgets::button::Button struct">Button</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.ButtonBuilder.html" title="widgetry::widgets::button::ButtonBuilder struct">ButtonBuilder</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.ButtonStateStyle.html" title="widgetry::widgets::button::ButtonStateStyle struct">ButtonStateStyle</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.Image.html" title="widgetry::widgets::button::Image struct">Image</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.Label.html" title="widgetry::widgets::button::Label struct">Label</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.MultiButton.html" title="widgetry::widgets::button::MultiButton struct">MultiButton</a></td><td class="docblock-short"></td></tr></table><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2>
|
||||
<table><tr class="module-item"><td><a class="enum" href="enum.ImageSource.html" title="widgetry::widgets::button::ImageSource enum">ImageSource</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "widgetry";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Module button</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><p class="location"><a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">widgets</a></p><script>window.sidebarCurrent = {name: "button", ty: "mod", relpath: "../"};</script><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"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/widgets/button.rs.html#1-839" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">widgets</a>::<wbr><a class="mod" href="">button</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
||||
<table><tr class="module-item"><td><a class="struct" href="struct.Button.html" title="widgetry::widgets::button::Button struct">Button</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.ButtonBuilder.html" title="widgetry::widgets::button::ButtonBuilder struct">ButtonBuilder</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.ButtonStateStyle.html" title="widgetry::widgets::button::ButtonStateStyle struct">ButtonStateStyle</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.Image.html" title="widgetry::widgets::button::Image struct">Image</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.Label.html" title="widgetry::widgets::button::Label struct">Label</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.MultiButton.html" title="widgetry::widgets::button::MultiButton struct">MultiButton</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "widgetry";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
@ -1 +1 @@
|
||||
initSidebarItems({"enum":[["ImageSource",""]],"mod":[["geom_batch_stack",""]],"struct":[["Button",""],["ButtonBuilder",""],["ButtonStateStyle",""],["Image",""],["Label",""],["MultiButton",""]]});
|
||||
initSidebarItems({"struct":[["Button",""],["ButtonBuilder",""],["ButtonStateStyle",""],["Image",""],["Label",""],["MultiButton",""]]});
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,17 +1,17 @@
|
||||
<!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 `ButtonStateStyle` struct in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, ButtonStateStyle"><title>widgetry::widgets::button::ButtonStateStyle - 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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Struct ButtonStateStyle</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.bg_color">bg_color</a><a href="#structfield.custom_batch">custom_batch</a><a href="#structfield.image">image</a><a href="#structfield.label">label</a><a href="#structfield.outline">outline</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-Default">Default</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><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><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><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-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></div></div><p class="location"><a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">widgets</a>::<wbr><a href="index.html">button</a></p><script>window.sidebarCurrent = {name: "ButtonStateStyle", ty: "struct", relpath: ""};</script><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"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/widgets/button.rs.html#145-151" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">widgets</a>::<wbr><a href="index.html">button</a>::<wbr><a class="struct" href="">ButtonStateStyle</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">struct ButtonStateStyle<'a> {
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/widgets/button.rs.html#147-153" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">widgets</a>::<wbr><a href="index.html">button</a>::<wbr><a class="struct" href="">ButtonStateStyle</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">struct ButtonStateStyle<'a> {
|
||||
image: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../widgetry/widgets/button/struct.Image.html" title="struct widgetry::widgets::button::Image">Image</a><'a>>,
|
||||
label: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../widgetry/widgets/button/struct.Label.html" title="struct widgetry::widgets::button::Label">Label</a>>,
|
||||
outline: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="type" href="../../../widgetry/style/type.OutlineStyle.html" title="type widgetry::style::OutlineStyle">OutlineStyle</a>>,
|
||||
bg_color: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>>,
|
||||
custom_batch: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a>>,
|
||||
}</pre></div><h2 id="fields" class="fields small-section-header">
|
||||
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.image" class="structfield small-section-header"><a href="#structfield.image" class="anchor field"></a><code>image: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../widgetry/widgets/button/struct.Image.html" title="struct widgetry::widgets::button::Image">Image</a><'a>></code></span><span id="structfield.label" class="structfield small-section-header"><a href="#structfield.label" class="anchor field"></a><code>label: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../widgetry/widgets/button/struct.Label.html" title="struct widgetry::widgets::button::Label">Label</a>></code></span><span id="structfield.outline" class="structfield small-section-header"><a href="#structfield.outline" class="anchor field"></a><code>outline: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="type" href="../../../widgetry/style/type.OutlineStyle.html" title="type widgetry::style::OutlineStyle">OutlineStyle</a>></code></span><span id="structfield.bg_color" class="structfield small-section-header"><a href="#structfield.bg_color" class="anchor field"></a><code>bg_color: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>></code></span><span id="structfield.custom_batch" class="structfield small-section-header"><a href="#structfield.custom_batch" class="anchor field"></a><code>custom_batch: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a>></code></span><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../../widgetry/widgets/button/struct.ButtonStateStyle.html" title="struct widgetry::widgets::button::ButtonStateStyle">ButtonStateStyle</a><'a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#144" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="../../../widgetry/widgets/button/struct.ButtonStateStyle.html" title="struct widgetry::widgets::button::ButtonStateStyle">ButtonStateStyle</a><'a></code><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#144" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.image" class="structfield small-section-header"><a href="#structfield.image" class="anchor field"></a><code>image: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../widgetry/widgets/button/struct.Image.html" title="struct widgetry::widgets::button::Image">Image</a><'a>></code></span><span id="structfield.label" class="structfield small-section-header"><a href="#structfield.label" class="anchor field"></a><code>label: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../widgetry/widgets/button/struct.Label.html" title="struct widgetry::widgets::button::Label">Label</a>></code></span><span id="structfield.outline" class="structfield small-section-header"><a href="#structfield.outline" class="anchor field"></a><code>outline: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="type" href="../../../widgetry/style/type.OutlineStyle.html" title="type widgetry::style::OutlineStyle">OutlineStyle</a>></code></span><span id="structfield.bg_color" class="structfield small-section-header"><a href="#structfield.bg_color" class="anchor field"></a><code>bg_color: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>></code></span><span id="structfield.custom_batch" class="structfield small-section-header"><a href="#structfield.custom_batch" class="anchor field"></a><code>custom_batch: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a>></code></span><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../../widgetry/widgets/button/struct.ButtonStateStyle.html" title="struct widgetry::widgets::button::ButtonStateStyle">ButtonStateStyle</a><'a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#146" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="../../../widgetry/widgets/button/struct.ButtonStateStyle.html" title="struct widgetry::widgets::button::ButtonStateStyle">ButtonStateStyle</a><'a></code><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#146" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id="method.clone_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/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/nightly/std/primitive.reference.html">&</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#128-130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../../../widgetry/widgets/button/struct.ButtonStateStyle.html" title="struct widgetry::widgets::button::ButtonStateStyle">ButtonStateStyle</a><'a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#144" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#144" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id="impl-Default" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="../../../widgetry/widgets/button/struct.ButtonStateStyle.html" title="struct widgetry::widgets::button::ButtonStateStyle">ButtonStateStyle</a><'a></code><a href="#impl-Default" class="anchor"></a><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#144" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.default" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default" class="fnname">default</a>() -> <a class="struct" href="../../../widgetry/widgets/button/struct.ButtonStateStyle.html" title="struct widgetry::widgets::button::ButtonStateStyle">ButtonStateStyle</a><'a></code><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#144" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns the "default value" for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></p>
|
||||
</div></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../../../widgetry/widgets/button/struct.ButtonStateStyle.html" title="struct widgetry::widgets::button::ButtonStateStyle">ButtonStateStyle</a><'a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#146" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#146" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id="impl-Default" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="../../../widgetry/widgets/button/struct.ButtonStateStyle.html" title="struct widgetry::widgets::button::ButtonStateStyle">ButtonStateStyle</a><'a></code><a href="#impl-Default" class="anchor"></a><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#146" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.default" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default" class="fnname">default</a>() -> <a class="struct" href="../../../widgetry/widgets/button/struct.ButtonStateStyle.html" title="struct widgetry::widgets::button::ButtonStateStyle">ButtonStateStyle</a><'a></code><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#146" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns the "default value" for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></p>
|
||||
</div></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"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../../widgetry/widgets/button/struct.ButtonStateStyle.html" title="struct widgetry::widgets::button::ButtonStateStyle">ButtonStateStyle</a><'a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../../widgetry/widgets/button/struct.ButtonStateStyle.html" title="struct widgetry::widgets::button::ButtonStateStyle">ButtonStateStyle</a><'a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../../widgetry/widgets/button/struct.ButtonStateStyle.html" title="struct widgetry::widgets::button::ButtonStateStyle">ButtonStateStyle</a><'a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../../widgetry/widgets/button/struct.ButtonStateStyle.html" title="struct widgetry::widgets::button::ButtonStateStyle">ButtonStateStyle</a><'a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../../widgetry/widgets/button/struct.ButtonStateStyle.html" title="struct widgetry::widgets::button::ButtonStateStyle">ButtonStateStyle</a><'a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></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"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||
|
@ -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 `Image` struct in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, Image"><title>widgetry::widgets::button::Image - 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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Struct Image</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.bg_color">bg_color</a><a href="#structfield.color">color</a><a href="#structfield.content_mode">content_mode</a><a href="#structfield.corner_rounding">corner_rounding</a><a href="#structfield.dims">dims</a><a href="#structfield.padding">padding</a><a href="#structfield.source">source</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-Default">Default</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><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><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><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-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></div></div><p class="location"><a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">widgets</a>::<wbr><a href="index.html">button</a></p><script>window.sidebarCurrent = {name: "Image", ty: "struct", relpath: ""};</script><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"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/widgets/button.rs.html#775-783" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">widgets</a>::<wbr><a href="index.html">button</a>::<wbr><a class="struct" href="">Image</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct Image<'a> {
|
||||
source: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../../../widgetry/widgets/button/enum.ImageSource.html" title="enum widgetry::widgets::button::ImageSource">ImageSource</a><'a>>,
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/widgets/button.rs.html#754-762" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">widgets</a>::<wbr><a href="index.html">button</a>::<wbr><a class="struct" href="">Image</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct Image<'a> {
|
||||
source: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../../../widgetry/widgets/image/enum.ImageSource.html" title="enum widgetry::widgets::image::ImageSource">ImageSource</a><'a>>,
|
||||
color: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>>,
|
||||
bg_color: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>>,
|
||||
dims: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../widgetry/screen_geom/struct.ScreenDims.html" title="struct widgetry::screen_geom::ScreenDims">ScreenDims</a>>,
|
||||
@ -10,10 +10,10 @@
|
||||
corner_rounding: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../../../widgetry/widgets/enum.CornerRounding.html" title="enum widgetry::widgets::CornerRounding">CornerRounding</a>>,
|
||||
padding: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a>>,
|
||||
}</pre></div><h2 id="fields" class="fields small-section-header">
|
||||
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.source" class="structfield small-section-header"><a href="#structfield.source" class="anchor field"></a><code>source: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../../../widgetry/widgets/button/enum.ImageSource.html" title="enum widgetry::widgets::button::ImageSource">ImageSource</a><'a>></code></span><span id="structfield.color" class="structfield small-section-header"><a href="#structfield.color" class="anchor field"></a><code>color: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>></code></span><span id="structfield.bg_color" class="structfield small-section-header"><a href="#structfield.bg_color" class="anchor field"></a><code>bg_color: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>></code></span><span id="structfield.dims" class="structfield small-section-header"><a href="#structfield.dims" class="anchor field"></a><code>dims: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../widgetry/screen_geom/struct.ScreenDims.html" title="struct widgetry::screen_geom::ScreenDims">ScreenDims</a>></code></span><span id="structfield.content_mode" class="structfield small-section-header"><a href="#structfield.content_mode" class="anchor field"></a><code>content_mode: <a class="enum" href="../../../widgetry/enum.ContentMode.html" title="enum widgetry::ContentMode">ContentMode</a></code></span><span id="structfield.corner_rounding" class="structfield small-section-header"><a href="#structfield.corner_rounding" class="anchor field"></a><code>corner_rounding: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../../../widgetry/widgets/enum.CornerRounding.html" title="enum widgetry::widgets::CornerRounding">CornerRounding</a>></code></span><span id="structfield.padding" class="structfield small-section-header"><a href="#structfield.padding" class="anchor field"></a><code>padding: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a>></code></span><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../../widgetry/widgets/button/struct.Image.html" title="struct widgetry::widgets::button::Image">Image</a><'a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#774" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="../../../widgetry/widgets/button/struct.Image.html" title="struct widgetry::widgets::button::Image">Image</a><'a></code><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#774" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.source" class="structfield small-section-header"><a href="#structfield.source" class="anchor field"></a><code>source: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../../../widgetry/widgets/image/enum.ImageSource.html" title="enum widgetry::widgets::image::ImageSource">ImageSource</a><'a>></code></span><span id="structfield.color" class="structfield small-section-header"><a href="#structfield.color" class="anchor field"></a><code>color: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>></code></span><span id="structfield.bg_color" class="structfield small-section-header"><a href="#structfield.bg_color" class="anchor field"></a><code>bg_color: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>></code></span><span id="structfield.dims" class="structfield small-section-header"><a href="#structfield.dims" class="anchor field"></a><code>dims: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../widgetry/screen_geom/struct.ScreenDims.html" title="struct widgetry::screen_geom::ScreenDims">ScreenDims</a>></code></span><span id="structfield.content_mode" class="structfield small-section-header"><a href="#structfield.content_mode" class="anchor field"></a><code>content_mode: <a class="enum" href="../../../widgetry/enum.ContentMode.html" title="enum widgetry::ContentMode">ContentMode</a></code></span><span id="structfield.corner_rounding" class="structfield small-section-header"><a href="#structfield.corner_rounding" class="anchor field"></a><code>corner_rounding: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../../../widgetry/widgets/enum.CornerRounding.html" title="enum widgetry::widgets::CornerRounding">CornerRounding</a>></code></span><span id="structfield.padding" class="structfield small-section-header"><a href="#structfield.padding" class="anchor field"></a><code>padding: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../widgetry/widgets/struct.EdgeInsets.html" title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a>></code></span><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../../widgetry/widgets/button/struct.Image.html" title="struct widgetry::widgets::button::Image">Image</a><'a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#753" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="../../../widgetry/widgets/button/struct.Image.html" title="struct widgetry::widgets::button::Image">Image</a><'a></code><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#753" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id="method.clone_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/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/nightly/std/primitive.reference.html">&</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#128-130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../../../widgetry/widgets/button/struct.Image.html" title="struct widgetry::widgets::button::Image">Image</a><'a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#774" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#774" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id="impl-Default" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="../../../widgetry/widgets/button/struct.Image.html" title="struct widgetry::widgets::button::Image">Image</a><'a></code><a href="#impl-Default" class="anchor"></a><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#774" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.default" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default" class="fnname">default</a>() -> <a class="struct" href="../../../widgetry/widgets/button/struct.Image.html" title="struct widgetry::widgets::button::Image">Image</a><'a></code><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#774" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns the "default value" for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></p>
|
||||
</div></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../../../widgetry/widgets/button/struct.Image.html" title="struct widgetry::widgets::button::Image">Image</a><'a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#753" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#753" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id="impl-Default" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="../../../widgetry/widgets/button/struct.Image.html" title="struct widgetry::widgets::button::Image">Image</a><'a></code><a href="#impl-Default" class="anchor"></a><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#753" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.default" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default" class="fnname">default</a>() -> <a class="struct" href="../../../widgetry/widgets/button/struct.Image.html" title="struct widgetry::widgets::button::Image">Image</a><'a></code><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#753" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns the "default value" for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></p>
|
||||
</div></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"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../../widgetry/widgets/button/struct.Image.html" title="struct widgetry::widgets::button::Image">Image</a><'a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../../widgetry/widgets/button/struct.Image.html" title="struct widgetry::widgets::button::Image">Image</a><'a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../../widgetry/widgets/button/struct.Image.html" title="struct widgetry::widgets::button::Image">Image</a><'a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../../widgetry/widgets/button/struct.Image.html" title="struct widgetry::widgets::button::Image">Image</a><'a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../../widgetry/widgets/button/struct.Image.html" title="struct widgetry::widgets::button::Image">Image</a><'a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></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"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||
|
@ -1,17 +1,17 @@
|
||||
<!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 `Label` struct in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, Label"><title>widgetry::widgets::button::Label - 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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Struct Label</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.color">color</a><a href="#structfield.font">font</a><a href="#structfield.font_size">font_size</a><a href="#structfield.styled_text">styled_text</a><a href="#structfield.text">text</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-Default">Default</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><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><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><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-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></div></div><p class="location"><a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">widgets</a>::<wbr><a href="index.html">button</a></p><script>window.sidebarCurrent = {name: "Label", ty: "struct", relpath: ""};</script><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"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/widgets/button.rs.html#786-792" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">widgets</a>::<wbr><a href="index.html">button</a>::<wbr><a class="struct" href="">Label</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">struct Label {
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/widgets/button.rs.html#765-771" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">widgets</a>::<wbr><a href="index.html">button</a>::<wbr><a class="struct" href="">Label</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">struct Label {
|
||||
text: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>,
|
||||
color: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>>,
|
||||
styled_text: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../widgetry/text/struct.Text.html" title="struct widgetry::text::Text">Text</a>>,
|
||||
font_size: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>,
|
||||
font: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../../../widgetry/text/enum.Font.html" title="enum widgetry::text::Font">Font</a>>,
|
||||
}</pre></div><h2 id="fields" class="fields small-section-header">
|
||||
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.text" class="structfield small-section-header"><a href="#structfield.text" class="anchor field"></a><code>text: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></code></span><span id="structfield.color" class="structfield small-section-header"><a href="#structfield.color" class="anchor field"></a><code>color: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>></code></span><span id="structfield.styled_text" class="structfield small-section-header"><a href="#structfield.styled_text" class="anchor field"></a><code>styled_text: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../widgetry/text/struct.Text.html" title="struct widgetry::text::Text">Text</a>></code></span><span id="structfield.font_size" class="structfield small-section-header"><a href="#structfield.font_size" class="anchor field"></a><code>font_size: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>></code></span><span id="structfield.font" class="structfield small-section-header"><a href="#structfield.font" class="anchor field"></a><code>font: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../../../widgetry/text/enum.Font.html" title="enum widgetry::text::Font">Font</a>></code></span><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../../widgetry/widgets/button/struct.Label.html" title="struct widgetry::widgets::button::Label">Label</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#785" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="../../../widgetry/widgets/button/struct.Label.html" title="struct widgetry::widgets::button::Label">Label</a></code><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#785" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.text" class="structfield small-section-header"><a href="#structfield.text" class="anchor field"></a><code>text: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></code></span><span id="structfield.color" class="structfield small-section-header"><a href="#structfield.color" class="anchor field"></a><code>color: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../widgetry/color/struct.Color.html" title="struct widgetry::color::Color">Color</a>></code></span><span id="structfield.styled_text" class="structfield small-section-header"><a href="#structfield.styled_text" class="anchor field"></a><code>styled_text: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../widgetry/text/struct.Text.html" title="struct widgetry::text::Text">Text</a>></code></span><span id="structfield.font_size" class="structfield small-section-header"><a href="#structfield.font_size" class="anchor field"></a><code>font_size: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>></code></span><span id="structfield.font" class="structfield small-section-header"><a href="#structfield.font" class="anchor field"></a><code>font: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../../../widgetry/text/enum.Font.html" title="enum widgetry::text::Font">Font</a>></code></span><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../../widgetry/widgets/button/struct.Label.html" title="struct widgetry::widgets::button::Label">Label</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#764" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="../../../widgetry/widgets/button/struct.Label.html" title="struct widgetry::widgets::button::Label">Label</a></code><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#764" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id="method.clone_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/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/nightly/std/primitive.reference.html">&</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#128-130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../../../widgetry/widgets/button/struct.Label.html" title="struct widgetry::widgets::button::Label">Label</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#785" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#785" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id="impl-Default" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="../../../widgetry/widgets/button/struct.Label.html" title="struct widgetry::widgets::button::Label">Label</a></code><a href="#impl-Default" class="anchor"></a><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#785" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.default" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default" class="fnname">default</a>() -> <a class="struct" href="../../../widgetry/widgets/button/struct.Label.html" title="struct widgetry::widgets::button::Label">Label</a></code><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#785" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns the "default value" for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></p>
|
||||
</div></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../../../widgetry/widgets/button/struct.Label.html" title="struct widgetry::widgets::button::Label">Label</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#764" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#764" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id="impl-Default" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="../../../widgetry/widgets/button/struct.Label.html" title="struct widgetry::widgets::button::Label">Label</a></code><a href="#impl-Default" class="anchor"></a><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#764" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.default" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default" class="fnname">default</a>() -> <a class="struct" href="../../../widgetry/widgets/button/struct.Label.html" title="struct widgetry::widgets::button::Label">Label</a></code><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#764" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns the "default value" for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></p>
|
||||
</div></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"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../../widgetry/widgets/button/struct.Label.html" title="struct widgetry::widgets::button::Label">Label</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../../widgetry/widgets/button/struct.Label.html" title="struct widgetry::widgets::button::Label">Label</a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../../widgetry/widgets/button/struct.Label.html" title="struct widgetry::widgets::button::Label">Label</a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../../widgetry/widgets/button/struct.Label.html" title="struct widgetry::widgets::button::Label">Label</a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../../widgetry/widgets/button/struct.Label.html" title="struct widgetry::widgets::button::Label">Label</a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></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"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,7 +1,7 @@
|
||||
<!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 `ImageSource` enum in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, ImageSource"><title>widgetry::widgets::button::ImageSource - 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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
|
||||
<!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 `ImageSource` enum in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, ImageSource"><title>widgetry::widgets::image::ImageSource - 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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Enum ImageSource</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.Bytes">Bytes</a><a href="#variant.GeomBatch">GeomBatch</a><a href="#variant.Path">Path</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.load">load</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><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><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><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-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></div></div><p class="location"><a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">widgets</a>::<wbr><a href="index.html">button</a></p><script>window.sidebarCurrent = {name: "ImageSource", ty: "enum", relpath: ""};</script><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"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/widgets/button.rs.html#753-757" title="goto source code">[src]</a></span><span class="in-band">Enum <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">widgets</a>::<wbr><a href="index.html">button</a>::<wbr><a class="enum" href="">ImageSource</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust enum">enum ImageSource<'a> {
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Enum ImageSource</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.Bytes">Bytes</a><a href="#variant.GeomBatch">GeomBatch</a><a href="#variant.Path">Path</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.load">load</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><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><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><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-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></div></div><p class="location"><a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">widgets</a>::<wbr><a href="index.html">image</a></p><script>window.sidebarCurrent = {name: "ImageSource", ty: "enum", relpath: ""};</script><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"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/widgets/image.rs.html#15-19" title="goto source code">[src]</a></span><span class="in-band">Enum <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">widgets</a>::<wbr><a href="index.html">image</a>::<wbr><a class="enum" href="">ImageSource</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust enum">pub enum ImageSource<'a> {
|
||||
Path(&'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>),
|
||||
Bytes {
|
||||
bytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>,
|
||||
@ -10,10 +10,10 @@
|
||||
GeomBatch(<a class="struct" href="../../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a>, <a class="struct" href="../../../geom/bounds/struct.Bounds.html" title="struct geom::bounds::Bounds">Bounds</a>),
|
||||
}</pre></div><h2 id="variants" class="variants small-section-header">
|
||||
Variants<a href="#variants" class="anchor"></a></h2>
|
||||
<div id="variant.Path" class="variant small-section-header"><a href="#variant.Path" class="anchor field"></a><code>Path(&'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>)</code></div><div id="variant.Bytes" class="variant small-section-header"><a href="#variant.Bytes" class="anchor field"></a><code>Bytes</code></div><div class="autohide sub-variant" id="variant.Bytes.fields"><h3>Fields of <b>Bytes</b></h3><div><span id="variant.Bytes.field.bytes" class="variant small-section-header"><a href="#variant.Bytes.field.bytes" class="anchor field"></a><code>bytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></code></span><span id="variant.Bytes.field.cache_key" class="variant small-section-header"><a href="#variant.Bytes.field.cache_key" class="anchor field"></a><code>cache_key: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></code></span></div></div><div id="variant.GeomBatch" class="variant small-section-header"><a href="#variant.GeomBatch" class="anchor field"></a><code>GeomBatch(<a class="struct" href="../../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a>, <a class="struct" href="../../../geom/bounds/struct.Bounds.html" title="struct geom::bounds::Bounds">Bounds</a>)</code></div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="enum" href="../../../widgetry/widgets/button/enum.ImageSource.html" title="enum widgetry::widgets::button::ImageSource">ImageSource</a><'_></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#759-772" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.load" class="method"><code>fn <a href="#method.load" class="fnname">load</a>(&self, prerender: &<a class="struct" href="../../../widgetry/drawing/struct.Prerender.html" title="struct widgetry::drawing::Prerender">Prerender</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a>, <a class="struct" href="../../../geom/bounds/struct.Bounds.html" title="struct geom::bounds::Bounds">Bounds</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#760-771" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="../../../widgetry/widgets/button/enum.ImageSource.html" title="enum widgetry::widgets::button::ImageSource">ImageSource</a><'a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#752" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="enum" href="../../../widgetry/widgets/button/enum.ImageSource.html" title="enum widgetry::widgets::button::ImageSource">ImageSource</a><'a></code><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#752" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
<div id="variant.Path" class="variant small-section-header"><a href="#variant.Path" class="anchor field"></a><code>Path(&'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>)</code></div><div id="variant.Bytes" class="variant small-section-header"><a href="#variant.Bytes" class="anchor field"></a><code>Bytes</code></div><div class="autohide sub-variant" id="variant.Bytes.fields"><h3>Fields of <b>Bytes</b></h3><div><span id="variant.Bytes.field.bytes" class="variant small-section-header"><a href="#variant.Bytes.field.bytes" class="anchor field"></a><code>bytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></code></span><span id="variant.Bytes.field.cache_key" class="variant small-section-header"><a href="#variant.Bytes.field.cache_key" class="anchor field"></a><code>cache_key: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></code></span></div></div><div id="variant.GeomBatch" class="variant small-section-header"><a href="#variant.GeomBatch" class="anchor field"></a><code>GeomBatch(<a class="struct" href="../../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a>, <a class="struct" href="../../../geom/bounds/struct.Bounds.html" title="struct geom::bounds::Bounds">Bounds</a>)</code></div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="enum" href="../../../widgetry/widgets/image/enum.ImageSource.html" title="enum widgetry::widgets::image::ImageSource">ImageSource</a><'_></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../../src/widgetry/widgets/image.rs.html#21-35" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.load" class="method"><code>pub fn <a href="#method.load" class="fnname">load</a>(&self, prerender: &<a class="struct" href="../../../widgetry/drawing/struct.Prerender.html" title="struct widgetry::drawing::Prerender">Prerender</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a>, <a class="struct" href="../../../geom/bounds/struct.Bounds.html" title="struct geom::bounds::Bounds">Bounds</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class="srclink" href="../../../src/widgetry/widgets/image.rs.html#22-34" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="../../../widgetry/widgets/image/enum.ImageSource.html" title="enum widgetry::widgets::image::ImageSource">ImageSource</a><'a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../../src/widgetry/widgets/image.rs.html#14" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="enum" href="../../../widgetry/widgets/image/enum.ImageSource.html" title="enum widgetry::widgets::image::ImageSource">ImageSource</a><'a></code><a class="srclink" href="../../../src/widgetry/widgets/image.rs.html#14" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id="method.clone_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/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/nightly/std/primitive.reference.html">&</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#128-130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../../../widgetry/widgets/button/enum.ImageSource.html" title="enum widgetry::widgets::button::ImageSource">ImageSource</a><'a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#752" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../../src/widgetry/widgets/button.rs.html#752" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></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"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="../../../widgetry/widgets/button/enum.ImageSource.html" title="enum widgetry::widgets::button::ImageSource">ImageSource</a><'a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="../../../widgetry/widgets/button/enum.ImageSource.html" title="enum widgetry::widgets::button::ImageSource">ImageSource</a><'a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="../../../widgetry/widgets/button/enum.ImageSource.html" title="enum widgetry::widgets::button::ImageSource">ImageSource</a><'a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="../../../widgetry/widgets/button/enum.ImageSource.html" title="enum widgetry::widgets::button::ImageSource">ImageSource</a><'a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="../../../widgetry/widgets/button/enum.ImageSource.html" title="enum widgetry::widgets::button::ImageSource">ImageSource</a><'a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></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"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../../../widgetry/widgets/image/enum.ImageSource.html" title="enum widgetry::widgets::image::ImageSource">ImageSource</a><'a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../../src/widgetry/widgets/image.rs.html#14" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../../src/widgetry/widgets/image.rs.html#14" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></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"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="../../../widgetry/widgets/image/enum.ImageSource.html" title="enum widgetry::widgets::image::ImageSource">ImageSource</a><'a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="../../../widgetry/widgets/image/enum.ImageSource.html" title="enum widgetry::widgets::image::ImageSource">ImageSource</a><'a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="../../../widgetry/widgets/image/enum.ImageSource.html" title="enum widgetry::widgets::image::ImageSource">ImageSource</a><'a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="../../../widgetry/widgets/image/enum.ImageSource.html" title="enum widgetry::widgets::image::ImageSource">ImageSource</a><'a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="../../../widgetry/widgets/image/enum.ImageSource.html" title="enum widgetry::widgets::image::ImageSource">ImageSource</a><'a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></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"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||
</div></div><h3 id="impl-Downcast" class="impl"><code class="in-band">impl<T> Downcast for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a>, </span></code><a href="#impl-Downcast" class="anchor"></a></h3><div class="impl-items"><h4 id="method.into_any" class="method hidden"><code>pub fn <a href="#method.into_any" class="fnname">into_any</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><T, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>></code></h4><div class='docblock hidden'><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,6 @@
|
||||
<!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 `image` mod in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, image"><title>widgetry::widgets::image - 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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Module image</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><p class="location"><a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">widgets</a></p><script>window.sidebarCurrent = {name: "image", ty: "mod", relpath: "../"};</script><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"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/widgets/image.rs.html#1-72" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">widgets</a>::<wbr><a class="mod" href="">image</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
||||
<table><tr class="module-item"><td><a class="struct" href="struct.Image.html" title="widgetry::widgets::image::Image struct">Image</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "widgetry";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Module image</p><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><p class="location"><a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">widgets</a></p><script>window.sidebarCurrent = {name: "image", ty: "mod", relpath: "../"};</script><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"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/widgets/image.rs.html#1-111" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">widgets</a>::<wbr><a class="mod" href="">image</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
||||
<table><tr class="module-item"><td><a class="struct" href="struct.Image.html" title="widgetry::widgets::image::Image struct">Image</a></td><td class="docblock-short"></td></tr></table><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2>
|
||||
<table><tr class="module-item"><td><a class="enum" href="enum.ImageSource.html" title="widgetry::widgets::image::ImageSource enum">ImageSource</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "widgetry";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
@ -1 +1 @@
|
||||
initSidebarItems({"struct":[["Image",""]]});
|
||||
initSidebarItems({"enum":[["ImageSource",""]],"struct":[["Image",""]]});
|
@ -1,18 +1,21 @@
|
||||
<!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 `Image` struct in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, Image"><title>widgetry::widgets::image::Image - 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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Struct Image</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.color">color</a><a href="#structfield.filename">filename</a><a href="#structfield.tooltip">tooltip</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.color">color</a><a href="#method.icon">icon</a><a href="#method.into_widget">into_widget</a><a href="#method.tooltip">tooltip</a><a href="#method.untinted">untinted</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><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><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><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-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><p class="location"><a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">widgets</a>::<wbr><a href="index.html">image</a></p><script>window.sidebarCurrent = {name: "Image", ty: "struct", relpath: ""};</script><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"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/widgets/image.rs.html#6-10" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">widgets</a>::<wbr><a href="index.html">image</a>::<wbr><a class="struct" href="">Image</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct Image<'a> {
|
||||
filename: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Struct Image</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.color">color</a><a href="#structfield.source">source</a><a href="#structfield.tooltip">tooltip</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.batch">batch</a><a href="#method.bytes">bytes</a><a href="#method.color">color</a><a href="#method.icon">icon</a><a href="#method.into_widget">into_widget</a><a href="#method.tooltip">tooltip</a><a href="#method.untinted">untinted</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><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><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><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-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></div></div><p class="location"><a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">widgets</a>::<wbr><a href="index.html">image</a></p><script>window.sidebarCurrent = {name: "Image", ty: "struct", relpath: ""};</script><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"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><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/widgets/image.rs.html#8-12" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">widgets</a>::<wbr><a href="index.html">image</a>::<wbr><a class="struct" href="">Image</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct Image<'a> {
|
||||
source: <a class="enum" href="../../../widgetry/widgets/image/enum.ImageSource.html" title="enum widgetry::widgets::image::ImageSource">ImageSource</a><'a>,
|
||||
tooltip: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../widgetry/text/struct.Text.html" title="struct widgetry::text::Text">Text</a>>,
|
||||
color: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>>,
|
||||
}</pre></div><h2 id="fields" class="fields small-section-header">
|
||||
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.filename" class="structfield small-section-header"><a href="#structfield.filename" class="anchor field"></a><code>filename: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></code></span><span id="structfield.tooltip" class="structfield small-section-header"><a href="#structfield.tooltip" class="anchor field"></a><code>tooltip: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../widgetry/text/struct.Text.html" title="struct widgetry::text::Text">Text</a>></code></span><span id="structfield.color" class="structfield small-section-header"><a href="#structfield.color" class="anchor field"></a><code>color: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl<'a> <a class="struct" href="../../../widgetry/widgets/image/struct.Image.html" title="struct widgetry::widgets::image::Image">Image</a><'a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../../src/widgetry/widgets/image.rs.html#12-72" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.icon" class="method"><code>pub fn <a href="#method.icon" class="fnname">icon</a>(filename: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> Self</code><a class="srclink" href="../../../src/widgetry/widgets/image.rs.html#14-20" title="goto source code">[src]</a></h4><div class="docblock"><p>An SVG image, read from <code>filename</code>, which is colored to match Style.icon_fg</p>
|
||||
</div><h4 id="method.untinted" class="method"><code>pub fn <a href="#method.untinted" class="fnname">untinted</a>(filename: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> Self</code><a class="srclink" href="../../../src/widgetry/widgets/image.rs.html#26-28" title="goto source code">[src]</a></h4><div class="docblock"><p>An SVG image, read from <code>filename</code>.</p>
|
||||
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.source" class="structfield small-section-header"><a href="#structfield.source" class="anchor field"></a><code>source: <a class="enum" href="../../../widgetry/widgets/image/enum.ImageSource.html" title="enum widgetry::widgets::image::ImageSource">ImageSource</a><'a></code></span><span id="structfield.tooltip" class="structfield small-section-header"><a href="#structfield.tooltip" class="anchor field"></a><code>tooltip: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../widgetry/text/struct.Text.html" title="struct widgetry::text::Text">Text</a>></code></span><span id="structfield.color" class="structfield small-section-header"><a href="#structfield.color" class="anchor field"></a><code>color: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl<'a> <a class="struct" href="../../../widgetry/widgets/image/struct.Image.html" title="struct widgetry::widgets::image::Image">Image</a><'a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../../src/widgetry/widgets/image.rs.html#37-111" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.icon" class="method"><code>pub fn <a href="#method.icon" class="fnname">icon</a>(filename: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> Self</code><a class="srclink" href="../../../src/widgetry/widgets/image.rs.html#39-45" title="goto source code">[src]</a></h4><div class="docblock"><p>An SVG image, read from <code>filename</code>, which is colored to match Style.icon_fg</p>
|
||||
</div><h4 id="method.untinted" class="method"><code>pub fn <a href="#method.untinted" class="fnname">untinted</a>(filename: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> Self</code><a class="srclink" href="../../../src/widgetry/widgets/image.rs.html#51-53" title="goto source code">[src]</a></h4><div class="docblock"><p>An SVG image, read from <code>filename</code>.</p>
|
||||
<p>The image's intrinsic colors will be used, it will not be tinted like <code>Image::icon</code>, unless
|
||||
you call <code>color()</code></p>
|
||||
</div><h4 id="method.tooltip" class="method"><code>pub fn <a href="#method.tooltip" class="fnname">tooltip</a>(self, tooltip: <a class="struct" href="../../../widgetry/text/struct.Text.html" title="struct widgetry::text::Text">Text</a>) -> Self</code><a class="srclink" href="../../../src/widgetry/widgets/image.rs.html#31-34" title="goto source code">[src]</a></h4><div class="docblock"><p>Add a tooltip to appear when hovering over the image.</p>
|
||||
</div><h4 id="method.color" class="method"><code>pub fn <a href="#method.color" class="fnname">color</a><RWC: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>>>(self, color: RWC) -> Self</code><a class="srclink" href="../../../src/widgetry/widgets/image.rs.html#37-40" title="goto source code">[src]</a></h4><div class="docblock"><p>Transform the color of the image.</p>
|
||||
</div><h4 id="method.into_widget" class="method"><code>pub fn <a href="#method.into_widget" class="fnname">into_widget</a>(self, ctx: &<a class="struct" href="../../../widgetry/event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a><'_>) -> <a class="struct" href="../../../widgetry/widgets/struct.Widget.html" title="struct widgetry::widgets::Widget">Widget</a></code><a class="srclink" href="../../../src/widgetry/widgets/image.rs.html#42-71" title="goto source code">[src]</a></h4></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"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../../widgetry/widgets/image/struct.Image.html" title="struct widgetry::widgets::image::Image">Image</a><'a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../../widgetry/widgets/image/struct.Image.html" title="struct widgetry::widgets::image::Image">Image</a><'a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../../widgetry/widgets/image/struct.Image.html" title="struct widgetry::widgets::image::Image">Image</a><'a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../../widgetry/widgets/image/struct.Image.html" title="struct widgetry::widgets::image::Image">Image</a><'a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../../widgetry/widgets/image/struct.Image.html" title="struct widgetry::widgets::image::Image">Image</a><'a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></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"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div><h4 id="method.bytes" class="method"><code>pub fn <a href="#method.bytes" class="fnname">bytes</a>(labeled_bytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>&'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>) -> Self</code><a class="srclink" href="../../../src/widgetry/widgets/image.rs.html#55-64" title="goto source code">[src]</a></h4><h4 id="method.tooltip" class="method"><code>pub fn <a href="#method.tooltip" class="fnname">tooltip</a>(self, tooltip: <a class="struct" href="../../../widgetry/text/struct.Text.html" title="struct widgetry::text::Text">Text</a>) -> Self</code><a class="srclink" href="../../../src/widgetry/widgets/image.rs.html#67-70" title="goto source code">[src]</a></h4><div class="docblock"><p>Add a tooltip to appear when hovering over the image.</p>
|
||||
</div><h4 id="method.color" class="method"><code>pub fn <a href="#method.color" class="fnname">color</a><RWC: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../../../widgetry/geom/enum.RewriteColor.html" title="enum widgetry::geom::RewriteColor">RewriteColor</a>>>(self, color: RWC) -> Self</code><a class="srclink" href="../../../src/widgetry/widgets/image.rs.html#73-76" title="goto source code">[src]</a></h4><div class="docblock"><p>Transform the color of the image.</p>
|
||||
</div><h4 id="method.batch" class="method"><code>pub fn <a href="#method.batch" class="fnname">batch</a>(&self, ctx: &<a class="struct" href="../../../widgetry/event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a><'_>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../../widgetry/geom/struct.GeomBatch.html" title="struct widgetry::geom::GeomBatch">GeomBatch</a>, <a class="struct" href="../../../geom/bounds/struct.Bounds.html" title="struct geom::bounds::Bounds">Bounds</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class="srclink" href="../../../src/widgetry/widgets/image.rs.html#78-91" title="goto source code">[src]</a></h4><h4 id="method.into_widget" class="method"><code>pub fn <a href="#method.into_widget" class="fnname">into_widget</a>(self, ctx: &<a class="struct" href="../../../widgetry/event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a><'_>) -> <a class="struct" href="../../../widgetry/widgets/struct.Widget.html" title="struct widgetry::widgets::Widget">Widget</a></code><a class="srclink" href="../../../src/widgetry/widgets/image.rs.html#93-110" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../../widgetry/widgets/image/struct.Image.html" title="struct widgetry::widgets::image::Image">Image</a><'a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../../src/widgetry/widgets/image.rs.html#7" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="../../../widgetry/widgets/image/struct.Image.html" title="struct widgetry::widgets::image::Image">Image</a><'a></code><a class="srclink" href="../../../src/widgetry/widgets/image.rs.html#7" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id="method.clone_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/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/nightly/std/primitive.reference.html">&</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#128-130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../../../widgetry/widgets/image/struct.Image.html" title="struct widgetry::widgets::image::Image">Image</a><'a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../../src/widgetry/widgets/image.rs.html#7" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../../src/widgetry/widgets/image.rs.html#7" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></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"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../../widgetry/widgets/image/struct.Image.html" title="struct widgetry::widgets::image::Image">Image</a><'a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../../widgetry/widgets/image/struct.Image.html" title="struct widgetry::widgets::image::Image">Image</a><'a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../../widgetry/widgets/image/struct.Image.html" title="struct widgetry::widgets::image::Image">Image</a><'a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../../widgetry/widgets/image/struct.Image.html" title="struct widgetry::widgets::image::Image">Image</a><'a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../../widgetry/widgets/image/struct.Image.html" title="struct widgetry::widgets::image::Image">Image</a><'a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../../../src/widgetry/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></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"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/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/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||
</div></div><h3 id="impl-Downcast" class="impl"><code class="in-band">impl<T> Downcast for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a>, </span></code><a href="#impl-Downcast" class="anchor"></a></h3><div class="impl-items"><h4 id="method.into_any" class="method hidden"><code>pub fn <a href="#method.into_any" class="fnname">into_any</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><T, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>></code></h4><div class='docblock hidden'><p>Convert <code>Box<dyn Trait></code> (where <code>Trait: Downcast</code>) to <code>Box<dyn Any></code>. <code>Box<dyn Any></code> can
|
||||
@ -28,6 +31,10 @@ further <code>downcast</code> into <code>Arc<ConcreteType></code> where <c
|
||||
</div></div><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#552-556" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#553-555" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-Into%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#541-548" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545-547" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-Same%3CT%3E" class="impl"><code class="in-band">impl<T> Same<T> for T</code><a href="#impl-Same%3CT%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="associatedtype.Output" class="type"><code>type <a href="#associatedtype.Output" class="type">Output</a> = T</code></h4><div class='docblock'><p>Should always be <code>Self</code></p>
|
||||
</div></div><h3 id="impl-ToOwned" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></code><a href="#impl-ToOwned" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#80-92" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Owned" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="type">Owned</a> = T</code></h4><div class='docblock'><p>The resulting type after obtaining ownership.</p>
|
||||
</div><h4 id="method.to_owned" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&self) -> T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#85-87" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p>
|
||||
</div><h4 id="method.clone_into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T)</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#89-91" title="goto source code">[src]</a></h4><div class="item-info hidden"><div class="stab unstable"><details><summary><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>toowned_clone_into</code>)</summary><p>recently added</p>
|
||||
</details></div></div><div class='docblock hidden'><p>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p>
|
||||
</div></div><h3 id="impl-TryFrom%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></code><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#589-598" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||||
</div><h4 id="method.try_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#595-597" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-TryInto%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#575-584" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error-1" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user