<!DOCTYPE html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1.0"><metaname="generator"content="rustdoc"><metaname="description"content="A mutable builder for a group of colored polygons."><metaname="keywords"content="rust, rustlang, rust-lang, GeomBatch"><title>GeomBatch in widgetry - Rust</title><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../SourceSerif4-Regular.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../FiraSans-Regular.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../FiraSans-Medium.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../SourceCodePro-Regular.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../SourceSerif4-Bold.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../SourceCodePro-Semibold.ttf.woff2"><linkrel="stylesheet"type="text/css"href="../normalize.css"><linkrel="stylesheet"type="text/css"href="../rustdoc.css"id="mainThemeStyle"><linkrel="stylesheet"type="text/css"href="../ayu.css"disabled><linkrel="stylesheet"type="text/css"href="../dark.css"disabled><linkrel="stylesheet"type="text/css"href="../light.css"id="themeStyle"><scriptid="default-settings"></script><scriptsrc="../storage.js"></script><scriptsrc="../crates.js"></script><scriptdefersrc="../main.js"></script>
<noscript><linkrel="stylesheet"href="../noscript.css"></noscript><linkrel="alternate icon"type="image/png"href="../favicon-16x16.png"><linkrel="alternate icon"type="image/png"href="../favicon-32x32.png"><linkrel="icon"type="image/svg+xml"href="../favicon.svg"></head><bodyclass="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><navclass="mobile-topbar"><buttonclass="sidebar-menu-toggle">☰</button><aclass="sidebar-logo"href="../widgetry/index.html"><divclass="logo-container"><imgclass="rust-logo"src="../rust-logo.svg"alt="logo"></div>
}</code></pre></div><detailsclass="rustdoc-toggle top-doc"open><summaryclass="hideme"><span>Expand description</span></summary><divclass="docblock"><p>A mutable builder for a group of colored polygons.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.push"class="method has-srclink"><spanclass="rightside"><aclass="srclink"href="../src/widgetry/geom/mod.rs.html#39-41">source</a></span><ahref="#method.push"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.push"class="fnname">push</a><F: <aclass="trait"href="https://doc.rust-lang.org/1.62.1/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><<aclass="enum"href="color/enum.Fill.html"title="enum widgetry::color::Fill">Fill</a>>>(&mut self, fill: F, p: <aclass="struct"href="../geom/polygon/struct.Polygon.html"title="struct geom::polygon::Polygon">Polygon</a>)</h4></section></summary><divclass="docblock"><p>Adds a single polygon, painted according to <code>Fill</code></p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.push_with_z"class="method has-srclink"><spanclass="rightside"><aclass="srclink"href="../src/widgetry/geom/mod.rs.html#46-50">source</a></span><ahref="#method.push_with_z"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.push_with_z"class="fnname">push_with_z</a><F: <aclass="trait"href="https://doc.rust-lang.org/1.62.1/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><<aclass="enum"href="color/enum.Fill.html"title="enum widgetry::color::Fill">Fill</a>>>(&mut self, fill: F, p: <aclass="struct"href="../geom/polygon/struct.Polygon.html"title="struct geom::polygon::Polygon">Polygon</a>, z_offset: <aclass="primitive"href="https://doc.rust-lang.org/1.62.1/std/primitive.f64.html">f64</a>)</h4></section></summary><divclass="docblock"><p>Offset z value to render above/below other polygons.
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.unshift"class="method has-srclink"><spanclass="rightside"><aclass="srclink"href="../src/widgetry/geom/mod.rs.html#53-55">source</a></span><ahref="#method.unshift"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.unshift"class="fnname">unshift</a><F: <aclass="trait"href="https://doc.rust-lang.org/1.62.1/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><<aclass="enum"href="color/enum.Fill.html"title="enum widgetry::color::Fill">Fill</a>>>(&mut self, fill: F, p: <aclass="struct"href="../geom/polygon/struct.Polygon.html"title="struct geom::polygon::Polygon">Polygon</a>)</h4></section></summary><divclass="docblock"><p>Adds a single polygon to the front of the batch, painted according to <code>Fill</code></p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.shift"class="method has-srclink"><spanclass="rightside"><aclass="srclink"href="../src/widgetry/geom/mod.rs.html#58-60">source</a></span><ahref="#method.shift"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.shift"class="fnname">shift</a>(&mut self)</h4></section></summary><divclass="docblock"><p>Removes the first polygon in the batch.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.extend"class="method has-srclink"><spanclass="rightside"><aclass="srclink"href="../src/widgetry/geom/mod.rs.html#63-68">source</a></span><ahref="#method.extend"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.extend"class="fnname">extend</a><F: <aclass="trait"href="https://doc.rust-lang.org/1.62.1/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><<aclass="enum"href="color/enum.Fill.html"title="enum widgetry::color::Fill">Fill</a>>>(&mut self, fill: F, polys: <aclass="struct"href="https://doc.rust-lang.org/1.62.1/alloc/vec/struct.Vec.html"title="struct alloc::vec::Vec">Vec</a><<aclass="struct"href="../geom/polygon/struct.Polygon.html"title="struct geom::polygon::Polygon">Polygon</a>>)</h4></section></summary><divclass="docblock"><p>Applies one Fill to many polygons.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.append"class="method has-srclink"><spanclass="rightside"><aclass="srclink"href="../src/widgetry/geom/mod.rs.html#71-73">source</a></span><ahref="#method.append"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.append"class="fnname">append</a>(&mut self, other: <aclass="struct"href="geom/struct.GeomBatch.html"title="struct widgetry::geom::GeomBatch">GeomBatch</a>)</h4></section></summary><divclass="docblock"><p>Appends all colored polygons from another batch to the current one.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.draw"class="method has-srclink"><spanclass="rightside"><aclass="srclink"href="../src/widgetry/geom/mod.rs.html#81-84">source</a></span><ahref="#method.draw"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.draw"class="fnname">draw</a>(self, g: &mut <aclass="struct"href="drawing/struct.GfxCtx.html"title="struct widgetry::drawing::GfxCtx">GfxCtx</a><'_>)</h4></section></summary><divclass="docblock"><p>Draws the batch, consuming it. Only use this for drawing things once.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.upload"class="method has-srclink"><spanclass="rightside"><aclass="srclink"href="../src/widgetry/geom/mod.rs.html#88-90">source</a></span><ahref="#method.upload"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.upload"class="fnname">upload</a>(self, ctx: &<aclass="struct"href="event_ctx/struct.EventCtx.html"title="struct widgetry::event_ctx::EventCtx">EventCtx</a><'_>) -><aclass="struct"href="backend_glow/struct.Drawable.html"title="struct widgetry::backend_glow::Drawable">Drawable</a></h4></section></summary><divclass="docblock"><p>Upload the batch of polygons to the GPU, returning something that can be cheaply redrawn
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.batch"class="method has-srclink"><spanclass="rightside"><aclass="srclink"href="../src/widgetry/geom/mod.rs.html#93-95">source</a></span><ahref="#method.batch"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.batch"class="fnname">batch</a>(self) -><aclass="struct"href="widgets/struct.Widget.html"title="struct widgetry::widgets::Widget">Widget</a></h4></section></summary><divclass="docblock"><p>Wrap in a Widget for layouting, so this batch can become part of a larger one.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.into_widget"class="method has-srclink"><spanclass="rightside"><aclass="srclink"href="../src/widgetry/geom/mod.rs.html#98-100">source</a></span><ahref="#method.into_widget"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.into_widget"class="fnname">into_widget</a>(self, ctx: &<aclass="struct"href="event_ctx/struct.EventCtx.html"title="struct widgetry::event_ctx::EventCtx">EventCtx</a><'_>) -><aclass="struct"href="widgets/struct.Widget.html"title="struct widgetry::widgets::Widget">Widget</a></h4></section></summary><divclass="docblock"><p>Wrap in a Widget, so the batch can be drawn as part of a Panel.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.get_bounds"class="method has-srclink"><spanclass="rightside"><aclass="srclink"href="../src/widgetry/geom/mod.rs.html#103-112">source</a></span><ahref="#method.get_bounds"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.get_bounds"class="fnname">get_bounds</a>(&self) -><aclass="struct"href="../geom/bounds/struct.Bounds.html"title="struct geom::bounds::Bounds">Bounds</a></h4></section></summary><divclass="docblock"><p>Compute the bounds of all polygons in this batch.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.autocrop"class="method has-srclink"><spanclass="rightside"><aclass="srclink"href="../src/widgetry/geom/mod.rs.html#115-124">source</a></span><ahref="#method.autocrop"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.autocrop"class="fnname">autocrop</a>(self) -><aclass="struct"href="geom/struct.GeomBatch.html"title="struct widgetry::geom::GeomBatch">GeomBatch</a></h4></section></summary><divclass="docblock"><p>Sets the top-left to 0, 0. Not sure exactly when this should be used.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.unioned_polygon"class="method has-srclink"><spanclass="rightside"><aclass="srclink"href="../src/widgetry/geom/mod.rs.html#127-133">source</a></span><ahref="#method.unioned_polygon"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.unioned_polygon"class="fnname">unioned_polygon</a>(&self) -><aclass="struct"href="../geom/polygon/struct.Polygon.html"title="struct geom::polygon::Polygon">Polygon</a></h4></section></summary><divclass="docblock"><p>Builds a single polygon covering everything in this batch. Use to create a hitbox.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.is_empty"class="method has-srclink"><spanclass="rightside"><aclass="srclink"href="../src/widgetry/geom/mod.rs.html#136-138">source</a></span><ahref="#method.is_empty"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.is_empty"class="fnname">is_empty</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.62.1/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>True when the batch is empty.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.get_dims"class="method has-srclink"><spanclass="rightside"><aclass="srclink"href="../src/widgetry/geom/mod.rs.html#141-149">source</a></span><ahref="#method.get_dims"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.get_dims"class="fnname">get_dims</a>(&self) -><aclass="struct"href="screen_geom/struct.ScreenDims.html"title="struct widgetry::screen_geom::ScreenDims">ScreenDims</a></h4></section></summary><divclass="docblock"><p>Returns the width and height of all geometry contained in the batch.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.load_svg"class="method has-srclink"><spanclass="rightside"><aclass="srclink"href="../src/widgetry/geom/mod.rs.html#152-154">source</a></span><ahref="#method.load_svg"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.load_svg"class="fnname">load_svg</a><P: <aclass="trait"href="https://doc.rust-lang.org/1.62.1/core/convert/trait.AsRef.html"title="trait core::convert::AsRef">AsRef</a><<aclass="struct"href="drawing/struct.Prerender.html"title="struct widgetry::drawing::Prerender">Prerender</a>>, I: <aclass="trait"href="https://doc.rust-lang.org/1.62.1/core/convert/trait.AsRef.html"title="trait core::convert::AsRef">AsRef</a><<aclass="primitive"href="https://doc.rust-lang.org/1.62.1/std/primitive.str.html">str</a>>>(<br> prerender: <aclass="primitive"href="https://doc.rust-lang.org/1.62.1/std/primitive.reference.html">&</a>P, <br> filename: I<br>) -><aclass="struct"href="geom/struct.GeomBatch.html"title="struct widgetry::geom::GeomBatch">GeomBatch</a></h4></section></summary><divclass="docblock"><p>Returns a batch containing an SVG from a file.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.load_svg_bytes"class="method has-srclink"><spanclass="rightside"><aclass="srclink"href="../src/widgetry/geom/mod.rs.html#157-164">source</a></span><ahref="#method.load_svg_bytes"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.load_svg_bytes"class="fnname">load_svg_bytes</a><P: <aclass="trait"href="https://doc.rust-lang.org/1.62.1/core/convert/trait.AsRef.html"title="trait core::convert::AsRef">AsRef</a><<aclass="struct"href="drawing/struct.Prerender.html"title="struct widgetry::drawing::Prerender">Prerender</a>>>(<br> prerender: <aclass="primitive"href="https://doc.rust-lang.org/1.62.1/std/primitive.reference.html">&</a>P, <br> labeled_bytes: <aclass="primitive"href="https://doc.rust-lang.org/1.62.1/std/primitive.tuple.html">(</a>&<aclass="primitive"href="https://doc.rust-lang.org/1.62.1/std/primitive.str.html">str</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.62.1/std/primitive.slice.html">&[</a><aclass="primitive"href="https://doc.rust-lang.org/1.62.1/std/primitive.u8.html">u8</a><aclass="primitive"href="https://doc.rust-lang.org/1.62.1/std/primitive.slice.html">]</a><aclass="primitive"href="https://doc.rust-lang.org/1.62.1/std/primitive.tuple.html">)</a><br>) -><aclass="struct"href="geom/struct.GeomBatch.html"title="struct widgetry::geom::GeomBatch">GeomBatch</a></h4></section></summary><divclass="docblock"><p>Returns a GeomBatch from the bytes of a utf8 encoded SVG string.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.load_svg_bytes_uncached"class="method has-srclink"><spanclass="rightside"><aclass="srclink"href="../src/widgetry/geom/mod.rs.html#171-173">source</a></span><ahref="#method.load_svg_bytes_uncached"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.load_svg_bytes_uncached"class="fnname">load_svg_bytes_uncached</a>(raw: <aclass="primitive"href="https://doc.rust-lang.org/1.62.1/std/primitive.slice.html">&[</a><aclass="primitive"href="https://doc.rust-lang.org/1.62.1/std/primitive.u8.html">u8</a><aclass="primitive"href="https://doc.rust-lang.org/1.62.1/std/primitive.slice.html">]</a>) -><aclass="struct"href="geom/struct.GeomBatch.html"title="struct widgetry::geom::GeomBatch">GeomBatch</a></h4></section></summary><divclass="docblock"><p>Returns a GeomBatch from the bytes of a utf8 encoded SVG string.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.color"class="method has-srclink"><spanclass="rightside"><aclass="srclink"href="../src/widgetry/geom/mod.rs.html#176-183">source</a></span><ahref="#method.color"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.color"class="fnname">color</a>(self, transformation: <aclass="enum"href="geom/enum.RewriteColor.html"title="enum widgetry::geom::RewriteColor">RewriteColor</a>) -><aclass="struct"href="geom/struct.GeomBatch.html"title="struct widgetry::geom::GeomBatch">GeomBatch</a></h4></section></summary><divclass="docblock"><p>Transforms all colors in a batch.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.centered_on"class="method has-srclink"><spanclass="rightside"><aclass="srclink"href="../src/widgetry/geom/mod.rs.html#186-191">source</a></span><ahref="#method.centered_on"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.centered_on"class="fnname">centered_on</a>(self, center: <aclass="struct"href="../geom/pt/struct.Pt2D.html"title="struct geom::pt::Pt2D">Pt2D</a>) -><aclass="struct"href="geom/struct.GeomBatch.html"title="struct widgetry::geom::GeomBatch">GeomBatch</a></h4></section></summary><divclass="docblock"><p>Translates the batch to be centered on some point.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.rotate"class="method has-srclink"><spanclass="rightside"><aclass="srclink"href="../src/widgetry/geom/mod.rs.html#202-207">source</a></span><ahref="#method.rotate"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.rotate"class="fnname">rotate</a>(self, angle: <aclass="struct"href="../geom/angle/struct.Angle.html"title="struct geom::angle::Angle">Angle</a>) -><aclass="struct"href="geom/struct.GeomBatch.html"title="struct widgetry::geom::GeomBatch">GeomBatch</a></h4></section></summary><divclass="docblock"><p>Rotates each polygon in the batch relative to the center of that polygon.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.rotate_around_batch_center"class="method has-srclink"><spanclass="rightside"><aclass="srclink"href="../src/widgetry/geom/mod.rs.html#210-221">source</a></span><ahref="#method.rotate_around_batch_center"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.rotate_around_batch_center"class="fnname">rotate_around_batch_center</a>(self, angle: <aclass="struct"href="../geom/angle/struct.Angle.html"title="struct geom::angle::Angle">Angle</a>) -><aclass="struct"href="geom/struct.GeomBatch.html"title="struct widgetry::geom::GeomBatch">GeomBatch</a></h4></section></summary><divclass="docblock"><p>Rotates each polygon in the batch relative to the center of the entire batch.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.scale"class="method has-srclink"><spanclass="rightside"><aclass="srclink"href="../src/widgetry/geom/mod.rs.html#243-245">source</a></span><ahref="#method.scale"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.scale"class="fnname">scale</a>(self, factor: <aclass="primitive"href="https://doc.rust-lang.org/1.62.1/std/primitive.f64.html">f64</a>) -><aclass="struct"href="geom/struct.GeomBatch.html"title="struct widgetry::geom::GeomBatch">GeomBatch</a></h4></section></summary><divclass="docblock"><p>Scales the batch by some factor.</p>
</div></details><sectionid="method.scale_xy"class="method has-srclink"><spanclass="rightside"><aclass="srclink"href="../src/widgetry/geom/mod.rs.html#247-259">source</a></span><ahref="#method.scale_xy"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.scale_xy"class="fnname">scale_xy</a>(self, x_factor: <aclass="primitive"href="https://doc.rust-lang.org/1.62.1/std/primitive.f64.html">f64</a>, y_factor: <aclass="primitive"href="https://doc.rust-lang.org/1.62.1/std/primitive.f64.html">f64</a>) -><aclass="struct"href="geom/struct.GeomBatch.html"title="struct widgetry::geom::GeomBatch">GeomBatch</a></h4></section><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.scale_to_fit_width"class="method has-srclink"><spanclass="rightside"><aclass="srclink"href="../src/widgetry/geom/mod.rs.html#262-265">source</a></span><ahref="#method.scale_to_fit_width"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.scale_to_fit_width"class="fnname">scale_to_fit_width</a>(self, width: <aclass="primitive"href="https://doc.rust-lang.org/1.62.1/std/primitive.f64.html">f64</a>) -><aclass="struct"href="geom/struct.GeomBatch.html"title="struct widgetry::geom::GeomBatch">GeomBatch</a></h4></section></summary><divclass="docblock"><p>Scales the batch so that the width matches something, preserving aspect ratio.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.set_z_offset"class="method has-srclink"><spanclass="rightside"><aclass="srclink"href="../src/widgetry/geom/mod.rs.html#269-277">source</a></span><ahref="#method.set_z_offset"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.set_z_offset"class="fnname">set_z_offset</a>(self, offset: <aclass="primitive"href="https://doc.rust-lang.org/1.62.1/std/primitive.f64.html">f64</a>) -><aclass="struct"href="geom/struct.GeomBatch.html"title="struct widgetry::geom::GeomBatch">GeomBatch</a></h4></section></summary><divclass="docblock"><p>Overrides the Z-ordering offset for the batch. Must be in (-1, 0], with values closer to -1
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.into_geojson"class="method has-srclink"><spanclass="rightside"><aclass="srclink"href="../src/widgetry/geom/mod.rs.html#282-298">source</a></span><ahref="#method.into_geojson"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.into_geojson"class="fnname">into_geojson</a>(self, gps_bounds: <aclass="enum"href="https://doc.rust-lang.org/1.62.1/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&<aclass="struct"href="../geom/bounds/struct.GPSBounds.html"title="struct geom::bounds::GPSBounds">GPSBounds</a>>) -><aclass="struct"href="https://doc.rust-lang.org/1.62.1/alloc/vec/struct.Vec.html"title="struct alloc::vec::Vec">Vec</a><Feature><spanclass="notable-traits"><spanclass="notable-traits-tooltip">ⓘ<spanclass="notable-traits-tooltiptext"><spanclass="docblock"><spanclass="notable">Notable traits for <aclass="struct"href="https://doc.rust-lang.org/1.62.1/alloc/vec/struct.Vec.html"title="struct alloc::vec::Vec">Vec</a><<aclass="primitive"href="https://doc.rust-lang.org/1.62.1/std/primitive.u8.html">u8</a>, A></span><codeclass="content"><spanclass="where fmt-newline">impl<A><aclass="trait"href="https://doc.rust-lang.org/1.62.1/std/io/trait.Write.html"title="trait std::io::Write">Write</a> for <aclass="struct"href="https://doc.rust-lang.org/1.62.1/alloc/vec/struct.Vec.html"title="struct alloc::vec::Vec">Vec</a><<aclass="primitive"href="https://doc.rust-lang.org/1.62.1/std/primitive.u8.html">u8</a>, A><spanclass="where fmt-newline">where<br> A: <aclass="trait"href="https://doc.rust-lang.org/1.62.1/core/alloc/trait.Allocator.html"title="trait core::alloc::Allocator">Allocator</a>, </span></span></code></span></span></span></span></h4></section></summary><divclass="docblock"><p>Exports the batch to a list of GeoJSON features, labeling each colored polygon. Z-values,
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.clone_from"class="method trait-impl has-srclink"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="srclink"href="https://doc.rust-lang.org/1.62.1/src/core/clone.rs.html#133-135">source</a></span><ahref="#method.clone_from"class="anchor"></a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.62.1/core/clone/trait.Clone.html#method.clone_from"class="fnname">clone_from</a>(&mut self, source: <aclass="primitive"href="https://doc.rust-lang.org/1.62.1/std/primitive.reference.html">&</a>Self)</h4></section></summary><divclass='docblock'><p>Performs copy-assignment from <code>source</code>. <ahref="https://doc.rust-lang.org/1.62.1/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></details></div></details><detailsclass="rustdoc-toggle implementors-toggle"open><summary><sectionid="impl-Debug"class="impl has-srclink"><spanclass="rightside"><aclass="srclink"href="../src/widgetry/geom/mod.rs.html#19-27">source</a></span><ahref="#impl-Debug"class="anchor"></a><h3class="code-header in-band">impl <aclass="trait"href="https://doc.rust-lang.org/1.62.1/core/fmt/trait.Debug.html"title="trait core::fmt::Debug">Debug</a> for <aclass="struct"href="geom/struct.GeomBatch.html"title="struct widgetry::geom::GeomBatch">GeomBatch</a></h3></section></summary><divclass="impl-items"><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.fmt"class="method trait-impl has-srclink"><spanclass="rightside"><aclass="srclink"href="../src/widgetry/geom/mod.rs.html#20-26">source</a></span><ahref="#method.fmt"class="anchor"></a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.62.1/core/fmt/trait.Debug.html#tymethod.fmt"class="fnname">fmt</a>(&self, f: &mut <aclass="struct"href="https://doc.rust-lang.org/1.62.1/core/fmt/struct.Formatter.html"title="struct core::fmt::Formatter">Formatter</a><'_>) -><aclass="type"href="https://doc.rust-lang.org/1.62.1/core/fmt/type.Result.html"title="type core::fmt::Result">Result</a></h4></section></summary><divclass='docblock'><p>Formats the value using the given formatter. <ahref="https://doc.rust-lang.org/1.62.1/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></details></div></details><detailsclass="rustdoc-toggle implementors-toggle"open><summary><sectionid="impl-From%3CGeomBatch%3E"class="impl has-srclink"><spanclass="rightside"><aclass="srclink"href="../src/widgetry/mapspace/mod.rs.html#109-117">source</a></span><ahref="#impl-From%3CGeomBatch%3E"class="anchor"></a><h3class="code-header in-band">impl <aclass="trait"href="https://doc.rust-lang.org/1.62.1/core/convert/trait.From.html"title="trait core::convert::From">From</a><<aclass="struct"href="geom/struct.GeomBatch.html"title="struct widgetry::geom::GeomBatch">GeomBatch</a>> for <aclass="struct"href="mapspace/struct.ToggleZoomedBuilder.html"title="struct widgetry::mapspace::ToggleZoomedBuilder">ToggleZoomedBuilder</a></h3></section></summary><divclass="impl-items"><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.from-1"class="method trait-impl has-srclink"><spanclass="rightside"><aclass="srclink"href="../src/widgetry/mapspace/mod.rs.html#110-116">source</a></span><ahref="#method.from-1"class="anchor"></a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.62.1/core/convert/trait.From.html#tymethod.from"class="fnname">from</a>(unzoomed: <aclass="struct"href="geom/struct.GeomBatch.html"title="struct widgetry::geom::GeomBatch">GeomBatch</a>) -> Self</h4></section></summary><divclass='docblock'><p>Converts to this type from the input type.</p>
then be further <code>downcast</code> into <code>Box<ConcreteType></code> where <code>ConcreteType</code> implements <code>Trait</code>. <a>Read more</a></p>
further <code>downcast</code> into <code>Rc<ConcreteType></code> where <code>ConcreteType</code> implements <code>Trait</code>. <a>Read more</a></p>
further <code>downcast</code> into <code>Arc<ConcreteType></code> where <code>ConcreteType</code> implements <code>Trait</code>. <a>Read more</a></p>
</div></details></div></details><detailsclass="rustdoc-toggle implementors-toggle"><summary><sectionid="impl-Instrument"class="impl has-srclink"><spanclass="rightside"><aclass="srclink"href="https://docs.rs/tracing/0.1.26/src/tracing/instrument.rs.html#155">source</a></span><ahref="#impl-Instrument"class="anchor"></a><h3class="code-header in-band">impl<T><aclass="trait"href="https://docs.rs/tracing/0.1.26/tracing/instrument/trait.Instrument.html"title="trait tracing::instrument::Instrument">Instrument</a> for T</h3></section></summary><divclass="impl-items"><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.instrument"class="method trait-impl has-srclink"><spanclass="rightside"><aclass="srclink"href="https://docs.rs/tracing/0.1.26/src/tracing/instrument.rs.html#38">source</a></span><ahref="#method.instrument"class="anchor"></a><h4class="code-header">fn <ahref="https://docs.rs/tracing/0.1.26/tracing/instrument/trait.Instrument.html#method.instrument"class="fnname">instrument</a>(self, span: <aclass="struct"href="https://docs.rs/tracing/0.1.26/tracing/span/struct.Span.html"title="struct tracing::span::Span">Span</a>) -><aclass="struct"href="https://docs.rs/tracing/0.1.26/tracing/instrument/struct.Instrumented.html"title="struct tracing::instrument::Instrumented">Instrumented</a><Self></h4></section></summary><divclass='docblock'><p>Instruments this type with the provided <code>Span</code>, returning an
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.in_current_span"class="method trait-impl has-srclink"><spanclass="rightside"><aclass="srclink"href="https://docs.rs/tracing/0.1.26/src/tracing/instrument.rs.html#74">source</a></span><ahref="#method.in_current_span"class="anchor"></a><h4class="code-header">fn <ahref="https://docs.rs/tracing/0.1.26/tracing/instrument/trait.Instrument.html#method.in_current_span"class="fnname">in_current_span</a>(self) -><aclass="struct"href="https://docs.rs/tracing/0.1.26/tracing/instrument/struct.Instrumented.html"title="struct tracing::instrument::Instrumented">Instrumented</a><Self></h4></section></summary><divclass='docblock'><p>Instruments this type with the <ahref="../struct.Span.html#method.current">current</a><code>Span</code>, returning an
<code><ahref="https://doc.rust-lang.org/1.62.1/core/convert/trait.From.html"title="From">From</a><T> for U</code> chooses to do.</p>
</div></details></div></details><detailsclass="rustdoc-toggle implementors-toggle"><summary><sectionid="impl-ToOwned"class="impl has-srclink"><spanclass="rightside"><aclass="srclink"href="https://doc.rust-lang.org/1.62.1/src/alloc/borrow.rs.html#84-96">source</a></span><ahref="#impl-ToOwned"class="anchor"></a><h3class="code-header in-band">impl<T><aclass="trait"href="https://doc.rust-lang.org/1.62.1/alloc/borrow/trait.ToOwned.html"title="trait alloc::borrow::ToOwned">ToOwned</a> for T <spanclass="where fmt-newline">where<br> T: <aclass="trait"href="https://doc.rust-lang.org/1.62.1/core/clone/trait.Clone.html"title="trait core::clone::Clone">Clone</a>, </span></h3></section></summary><divclass="impl-items"><detailsclass="rustdoc-toggle"open><summary><sectionid="associatedtype.Owned"class="associatedtype trait-impl has-srclink"><ahref="#associatedtype.Owned"class="anchor"></a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.62.1/alloc/borrow/trait.ToOwned.html#associatedtype.Owned"class="associatedtype">Owned</a> = T</h4></section></summary><divclass='docblock'><p>The resulting type after obtaining ownership.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.to_owned"class="method trait-impl has-srclink"><spanclass="rightside"><aclass="srclink"href="https://doc.rust-lang.org/1.62.1/src/alloc/borrow.rs.html#89">source</a></span><ahref="#method.to_owned"class="anchor"></a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.62.1/alloc/borrow/trait.ToOwned.html#tymethod.to_owned"class="fnname">to_owned</a>(&self) -> T</h4></section></summary><divclass='docblock'><p>Creates owned data from borrowed data, usually by cloning. <ahref="https://doc.rust-lang.org/1.62.1/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.clone_into"class="method trait-impl has-srclink"><spanclass="rightside"><aclass="srclink"href="https://doc.rust-lang.org/1.62.1/src/alloc/borrow.rs.html#93">source</a></span><ahref="#method.clone_into"class="anchor"></a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.62.1/alloc/borrow/trait.ToOwned.html#method.clone_into"class="fnname">clone_into</a>(&self, target: <aclass="primitive"href="https://doc.rust-lang.org/1.62.1/std/primitive.reference.html">&mut </a>T)</h4></section></summary><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span> This is a nightly-only experimental API. (<code>toowned_clone_into</code>)</div></span><divclass='docblock'><p>Uses borrowed data to replace owned data, usually by cloning. <ahref="https://doc.rust-lang.org/1.62.1/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p>
</div></details></div></details><detailsclass="rustdoc-toggle implementors-toggle"><summary><sectionid="impl-TryFrom%3CU%3E"class="impl has-srclink"><spanclass="rightside"><aclass="srclink"href="https://doc.rust-lang.org/1.62.1/src/core/convert/mod.rs.html#598-607">source</a></span><ahref="#impl-TryFrom%3CU%3E"class="anchor"></a><h3class="code-header in-band">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/1.62.1/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U> for T <spanclass="where fmt-newline">where<br> U: <aclass="trait"href="https://doc.rust-lang.org/1.62.1/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><T>, </span></h3></section></summary><divclass="impl-items"><detailsclass="rustdoc-toggle"open><summary><sectionid="associatedtype.Error-1"class="associatedtype trait-impl has-srclink"><ahref="#associatedtype.Error-1"class="anchor"></a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.62.1/core/convert/trait.TryFrom.html#associatedtype.Error"class="associatedtype">Error</a> = <aclass="enum"href="https://doc.rust-lang.org/1.62.1/core/convert/enum.Infallible.html"title="enum core::convert::Infallible">Infallible</a></h4></section></summary><divclass='docblock'><p>The type returned in the event of a conversion error.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.try_from"class="method trait-impl has-srclink"><spanclass="rightside"><spanclass="since"title="const unstable">const: <ahref="https://github.com/rust-lang/rust/issues/88674"title="Tracking issue for const_convert">unstable</a></span> · <aclass="srclink"href="https://doc.rust-lang.org/1.62.1/src/core/convert/mod.rs.html#604">source</a></span><ahref="#method.try_from"class="anchor"></a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.62.1/core/convert/trait.TryFrom.html#tymethod.try_from"class="fnname">try_from</a>(value: U) -><aclass="enum"href="https://doc.rust-lang.org/1.62.1/core/result/enum.Result.html"title="enum core::result::Result">Result</a><T, <T as <aclass="trait"href="https://doc.rust-lang.org/1.62.1/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.62.1/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><divclass='docblock'><p>Performs the conversion.</p>
</div></details></div></details><detailsclass="rustdoc-toggle implementors-toggle"><summary><sectionid="impl-TryInto%3CU%3E"class="impl has-srclink"><spanclass="rightside"><aclass="srclink"href="https://doc.rust-lang.org/1.62.1/src/core/convert/mod.rs.html#583-592">source</a></span><ahref="#impl-TryInto%3CU%3E"class="anchor"></a><h3class="code-header in-band">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/1.62.1/core/convert/trait.TryInto.html"title="trait core::convert::TryInto">TryInto</a><U> for T <spanclass="where fmt-newline">where<br> U: <aclass="trait"href="https://doc.rust-lang.org/1.62.1/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>, </span></h3></section></summary><divclass="impl-items"><detailsclass="rustdoc-toggle"open><summary><sectionid="associatedtype.Error"class="associatedtype trait-impl has-srclink"><ahref="#associatedtype.Error"class="anchor"></a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.62.1/core/convert/trait.TryInto.html#associatedtype.Error"class="associatedtype">Error</a> = <U as <aclass="trait"href="https://doc.rust-lang.org/1.62.1/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.62.1/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><divclass='docblock'><p>The type returned in the event of a conversion error.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.try_into"class="method trait-impl has-srclink"><spanclass="rightside"><spanclass="since"title="const unstable">const: <ahref="https://github.com/rust-lang/rust/issues/88674"title="Tracking issue for const_convert">unstable</a></span> · <aclass="srclink"href="https://doc.rust-lang.org/1.62.1/src/core/convert/mod.rs.html#589">source</a></span><ahref="#method.try_into"class="anchor"></a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.62.1/core/convert/trait.TryInto.html#tymethod.try_into"class="fnname">try_into</a>(self) -><aclass="enum"href="https://doc.rust-lang.org/1.62.1/core/result/enum.Result.html"title="enum core::result::Result">Result</a><U, <U as <aclass="trait"href="https://doc.rust-lang.org/1.62.1/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.62.1/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><divclass='docblock'><p>Performs the conversion.</p>