<linkrel="alternate icon"type="image/png"href="../favicon-32x32.png"><styletype="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><bodyclass="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><navclass="sidebar"><divclass="sidebar-menu">☰</div><ahref='../widgetry/index.html'><divclass='logo-container rust-logo'><imgsrc='../rust-logo.png'alt='logo'></div></a><pclass="location">Struct ButtonBuilder</p><divclass="sidebar-elems"><divclass="block items"><aclass="sidebar-title"href="#fields">Fields</a><divclass="sidebar-links"><ahref="#structfield.corner_rounding">corner_rounding</a><ahref="#structfield.default_style">default_style</a><ahref="#structfield.disable_style">disable_style</a><ahref="#structfield.hotkey">hotkey</a><ahref="#structfield.hover_style">hover_style</a><ahref="#structfield.is_disabled">is_disabled</a><ahref="#structfield.is_label_before_image">is_label_before_image</a><ahref="#structfield.padding">padding</a><ahref="#structfield.stack_axis">stack_axis</a><ahref="#structfield.stack_spacing">stack_spacing</a><ahref="#structfield.tooltip">tooltip</a></div><aclass="sidebar-title"href="#implementations">Methods</a><divclass="sidebar-links"><ahref="#method.batch">batch</a><ahref="#method.bg_color">bg_color</a><ahref="#method.build">build</a><ahref="#method.build_def">build_def</a><ahref="#method.build_widget">build_widget</a><ahref="#method.corner_rounding">corner_rounding</a><ahref="#method.custom_batch">custom_batch</a><ahref="#method.disabled">disabled</a><ahref="#method.font">font</a><ahref="#method.font_size">font_size</a><ahref="#method.horizontal">horizontal</a><ahref="#method.hotkey">hotkey</a><ahref="#method.image_batch">image_batch</a><ahref="#method.image_bg_color">image_bg_color</a><ahref="#method.image_bytes">image_bytes</a><ahref="#method.image_color">image_color</a><ahref="#method.image_content_mode">image_content_mode</a><ahref="#method.image_corner_rounding">image_corner_rounding</a><ahref="#method.image_dims">image_dims</a><ahref="#method.image_first">image_first</a><ahref="#method.image_padding">image_padding</a><ahref="#method.image_path">image_path</a><ahref="#method.label_color">label_color</a><ahref="#method.label_first">label_first</a><ahref="#method.label_styled_text">label_styled_text</a><ahref="#method.label_text">label_text</a><ahref="#method.label_underlined_text">label_underlined_text</a><ahref="#method.new">new</a><ahref="#method.no_tooltip">no_tooltip</a><ahref="#method.outline">outline</a><ahref="#method.padding">padding</a><ahref="#method.padding_bottom">padding_bottom</a><ahref="#method.padding_left">padding_left</a><ahref="#method.padding_right">padding_right</a><ahref="#method.padding_top">padding_top</a><ahref="#method.stack_spacing">stack_spacing</a><ahref="#method.style">style</a><ahref="#method.style_mut">style_mut</a><ahref="#method.tooltip">tooltip</a><ahref="#method.vertical">vertical</a></div><aclass="sidebar-title"href="#trait-implementations">Trait Implementations</a><divclass="sidebar-links"><ahref="#impl-Clone">Clone</a><ahref="#impl-Debug">Debug</a><ahref="#impl-Default">Default</a></div><aclass="sidebar-title"href="#synthetic-implementations">Auto Trait Implementations</a><divclass="sidebar-links"><ahref="#impl-RefUnwindSafe">RefUnwindSafe</a><ahref="#impl-Send">Send</a><ahref="#impl-Sync">Sync</a><ahref="#impl-Unpin">Unpin</a><ahref="#impl-UnwindSafe">UnwindSafe</a></div><aclass="sidebar-title"href="#blanket-implementations">Blanket Implementations</a><divclass="sidebar-links"><ahref="#impl-Any">Any</a><ahref="#impl-Borrow%3CT%3E">Borrow<T></a><ahref="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><ahref="#impl-Downcast">Downcast</a><ahref="#impl-DowncastSync">DowncastSync</a><ahref="#impl-From%3CT%3E">From<T></a><ahref="#impl-Into%3CU%3E">Into<U></a><ahref="#impl-Same%3CT%3E">Same<T></a><ahref="#impl-ToOwned
</div><h4id="method.padding_top"class="method"><code>pub fn <ahref="#method.padding_top"class="fnname">padding_top</a>(self, padding: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> Self</code><aclass="srclink"href="../src/widgetry/widgets/button.rs.html#185-188"title="goto source code">[src]</a></h4><divclass="docblock"><p>Extra spacing around a button's items (label and/or image).</p>
</div><h4id="method.padding_left"class="method"><code>pub fn <ahref="#method.padding_left"class="fnname">padding_left</a>(self, padding: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> Self</code><aclass="srclink"href="../src/widgetry/widgets/button.rs.html#191-194"title="goto source code">[src]</a></h4><divclass="docblock"><p>Extra spacing around a button's items (label and/or image).</p>
</div><h4id="method.padding_bottom"class="method"><code>pub fn <ahref="#method.padding_bottom"class="fnname">padding_bottom</a>(self, padding: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> Self</code><aclass="srclink"href="../src/widgetry/widgets/button.rs.html#197-200"title="goto source code">[src]</a></h4><divclass="docblock"><p>Extra spacing around a button's items (label and/or image).</p>
</div><h4id="method.padding_right"class="method"><code>pub fn <ahref="#method.padding_right"class="fnname">padding_right</a>(self, padding: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> Self</code><aclass="srclink"href="../src/widgetry/widgets/button.rs.html#203-206"title="goto source code">[src]</a></h4><divclass="docblock"><p>Extra spacing around a button's items (label and/or image).</p>
</div><h4id="method.label_text"class="method"><code>pub fn <ahref="#method.label_text"class="fnname">label_text</a><I: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><<aclass="struct"href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html"title="struct alloc::string::String">String</a>>>(self, text: I) -> Self</code><aclass="srclink"href="../src/widgetry/widgets/button.rs.html#211-216"title="goto source code">[src]</a></h4><divclass="docblock"><p>Set the text of the button's label.</p>
</div><h4id="method.label_underlined_text"class="method"><code>pub fn <ahref="#method.label_underlined_text"class="fnname">label_underlined_text</a>(self, text: &'a <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> Self</code><aclass="srclink"href="../src/widgetry/widgets/button.rs.html#221-227"title="goto source code">[src]</a></h4><divclass="docblock"><p>Set the text of the button's label. The text will be decorated with an underline.</p>
</div><h4id="method.label_styled_text"class="method"><code>pub fn <ahref="#method.label_styled_text"class="fnname">label_styled_text</a>(<br> self, <br> styled_text: <aclass="struct"href="../widgetry/text/struct.Text.html"title="struct widgetry::text::Text">Text</a>, <br> for_state: <aclass="enum"href="../widgetry/enum.ControlState.html"title="enum widgetry::ControlState">ControlState</a><br>) -> Self</code><aclass="srclink"href="../src/widgetry/widgets/button.rs.html#231-241"title="goto source code">[src]</a></h4><divclass="docblock"><p>Assign a pre-styled <code>Text</code> instance if your button need something more than uniformly
</div><h4id="method.label_color"class="method"><code>pub fn <ahref="#method.label_color"class="fnname">label_color</a>(self, color: <aclass="struct"href="../widgetry/color/struct.Color.html"title="struct widgetry::color::Color">Color</a>, for_state: <aclass="enum"href="../widgetry/enum.ControlState.html"title="enum widgetry::ControlState">ControlState</a>) -> Self</code><aclass="srclink"href="../src/widgetry/widgets/button.rs.html#246-252"title="goto source code">[src]</a></h4><divclass="docblock"><p>Set the color of the button's label.</p>
</div><h4id="method.font"class="method"><code>pub fn <ahref="#method.font"class="fnname">font</a>(self, font: <aclass="enum"href="../widgetry/text/enum.Font.html"title="enum widgetry::text::Font">Font</a>) -> Self</code><aclass="srclink"href="../src/widgetry/widgets/button.rs.html#257-262"title="goto source code">[src]</a></h4><divclass="docblock"><p>Set the font used by the button's label.</p>
</div><h4id="method.font_size"class="method"><code>pub fn <ahref="#method.font_size"class="fnname">font_size</a>(self, font_size: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> Self</code><aclass="srclink"href="../src/widgetry/widgets/button.rs.html#267-272"title="goto source code">[src]</a></h4><divclass="docblock"><p>Set the size of the font of the button's label.</p>
</div><h4id="method.image_path"class="method"><code>pub fn <ahref="#method.image_path"class="fnname">image_path</a>(self, path: &'a <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> Self</code><aclass="srclink"href="../src/widgetry/widgets/button.rs.html#277-284"title="goto source code">[src]</a></h4><divclass="docblock"><p>Set the image for the button. If not set, the button will have no image.</p>
</div><h4id="method.image_bytes"class="method"><code>pub fn <ahref="#method.image_bytes"class="fnname">image_bytes</a>(self, labeled_bytes: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>&'a <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a [</a><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>) -> Self</code><aclass="srclink"href="../src/widgetry/widgets/button.rs.html#294-305"title="goto source code">[src]</a></h4><divclass="docblock"><p>Set the image for the button. If not set, the button will have no image.</p>
</div><h4id="method.image_batch"class="method"><code>pub fn <ahref="#method.image_batch"class="fnname">image_batch</a>(self, batch: <aclass="struct"href="../widgetry/geom/struct.GeomBatch.html"title="struct widgetry::geom::GeomBatch">GeomBatch</a>, bounds: <aclass="struct"href="../geom/bounds/struct.Bounds.html"title="struct geom::bounds::Bounds">Bounds</a>) -> Self</code><aclass="srclink"href="../src/widgetry/widgets/button.rs.html#313-318"title="goto source code">[src]</a></h4><divclass="docblock"><p>Set the image for the button. If not set, the button will have no image.</p>
</div><h4id="method.image_color"class="method"><code>pub fn <ahref="#method.image_color"class="fnname">image_color</a><C: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><<aclass="enum"href="../widgetry/geom/enum.RewriteColor.html"title="enum widgetry::geom::RewriteColor">RewriteColor</a>>>(<br> self, <br> color: C, <br> for_state: <aclass="enum"href="../widgetry/enum.ControlState.html"title="enum widgetry::ControlState">ControlState</a><br>) -> Self</code><aclass="srclink"href="../src/widgetry/widgets/button.rs.html#326-332"title="goto source code">[src]</a></h4><divclass="docblock"><p>Rewrite the color of the button's image.</p>
</div><h4id="method.image_bg_color"class="method"><code>pub fn <ahref="#method.image_bg_color"class="fnname">image_bg_color</a>(self, color: <aclass="struct"href="../widgetry/color/struct.Color.html"title="struct widgetry::color::Color">Color</a>, for_state: <aclass="enum"href="../widgetry/enum.ControlState.html"title="enum widgetry::ControlState">ControlState</a>) -> Self</code><aclass="srclink"href="../src/widgetry/widgets/button.rs.html#340-346"title="goto source code">[src]</a></h4><divclass="docblock"><p>Set a background color for the image, other than the buttons background.</p>
</div><h4id="method.image_dims"class="method"><code>pub fn <ahref="#method.image_dims"class="fnname">image_dims</a><D: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><<aclass="struct"href="../widgetry/screen_geom/struct.ScreenDims.html"title="struct widgetry::screen_geom::ScreenDims">ScreenDims</a>>>(self, dims: D) -> Self</code><aclass="srclink"href="../src/widgetry/widgets/button.rs.html#353-358"title="goto source code">[src]</a></h4><divclass="docblock"><p>Scale the bounds containing the image. If <code>image_dims</code> are not specified, the images
<p>See <ahref="../widgetry/widgets/button/struct.ButtonBuilder.html#method.image_content_mode"title="ButtonBuilder::image_content_mode"><code>ButtonBuilder::image_content_mode</code></a> to control how the image scales to fit
</div><h4id="method.image_content_mode"class="method"><code>pub fn <ahref="#method.image_content_mode"class="fnname">image_content_mode</a>(self, content_mode: <aclass="enum"href="../widgetry/enum.ContentMode.html"title="enum widgetry::ContentMode">ContentMode</a>) -> Self</code><aclass="srclink"href="../src/widgetry/widgets/button.rs.html#367-372"title="goto source code">[src]</a></h4><divclass="docblock"><p>If a custom <code>image_dims</code> was set, control how the image should be scaled to its new bounds</p>
<p>If <code>image_dims</code> were not specified, the image will not be scaled, so content_mode has no
affect.</p>
<p>The default, <ahref="../widgetry/enum.ContentMode.html#variant.ScaleAspectFit"title="ContentMode::ScaleAspectFit"><code>ContentMode::ScaleAspectFit</code></a> will only grow as much as it can while
maintaining its aspect ratio and not exceeding its bounds.</p>
</div><h4id="method.image_corner_rounding"class="method"><code>pub fn <ahref="#method.image_corner_rounding"class="fnname">image_corner_rounding</a><R: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><<aclass="enum"href="../widgetry/widgets/enum.CornerRounding.html"title="enum widgetry::widgets::CornerRounding">CornerRounding</a>>>(self, value: R) -> Self</code><aclass="srclink"href="../src/widgetry/widgets/button.rs.html#375-380"title="goto source code">[src]</a></h4><divclass="docblock"><p>Set independent rounding for each of the button's image's corners</p>
</div><h4id="method.image_padding"class="method"><code>pub fn <ahref="#method.image_padding"class="fnname">image_padding</a><EI: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><<aclass="struct"href="../widgetry/widgets/struct.EdgeInsets.html"title="struct widgetry::widgets::EdgeInsets">EdgeInsets</a>>>(self, value: EI) -> Self</code><aclass="srclink"href="../src/widgetry/widgets/button.rs.html#383-388"title="goto source code">[src]</a></h4><divclass="docblock"><p>Set padding for the image</p>
</div><h4id="method.bg_color"class="method"><code>pub fn <ahref="#method.bg_color"class="fnname">bg_color</a>(self, color: <aclass="struct"href="../widgetry/color/struct.Color.html"title="struct widgetry::color::Color">Color</a>, for_state: <aclass="enum"href="../widgetry/enum.ControlState.html"title="enum widgetry::ControlState">ControlState</a>) -> Self</code><aclass="srclink"href="../src/widgetry/widgets/button.rs.html#394-397"title="goto source code">[src]</a></h4><divclass="docblock"><p>Set a background color for the button based on the button's <ahref="../widgetry/enum.ControlState.html"title="ControlState"><code>ControlState</code></a>.</p>
</div><h4id="method.outline"class="method"><code>pub fn <ahref="#method.outline"class="fnname">outline</a>(self, outline: <aclass="type"href="../widgetry/style/type.OutlineStyle.html"title="type widgetry::style::OutlineStyle">OutlineStyle</a>, for_state: <aclass="enum"href="../widgetry/enum.ControlState.html"title="enum widgetry::ControlState">ControlState</a>) -> Self</code><aclass="srclink"href="../src/widgetry/widgets/button.rs.html#403-406"title="goto source code">[src]</a></h4><divclass="docblock"><p>Set an outline for the button based on the button's <ahref="../widgetry/enum.ControlState.html"title="ControlState"><code>ControlState</code></a>.</p>
</div><h4id="method.custom_batch"class="method"><code>pub fn <ahref="#method.custom_batch"class="fnname">custom_batch</a>(self, batch: <aclass="struct"href="../widgetry/geom/struct.GeomBatch.html"title="struct widgetry::geom::GeomBatch">GeomBatch</a>, for_state: <aclass="enum"href="../widgetry/enum.ControlState.html"title="enum widgetry::ControlState">ControlState</a>) -> Self</code><aclass="srclink"href="../src/widgetry/widgets/button.rs.html#412-415"title="goto source code">[src]</a></h4><divclass="docblock"><p>Set a pre-rendered <ahref="../widgetry/geom/struct.GeomBatch.html"title="GeomBatch">GeomBatch</a> to use for the button instead of individual fields.</p>
</div><h4id="method.hotkey"class="method"><code>pub fn <ahref="#method.hotkey"class="fnname">hotkey</a><MK: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><<aclass="enum"href="../widgetry/event/enum.MultiKey.html"title="enum widgetry::event::MultiKey">MultiKey</a>>>(self, key: MK) -> Self</code><aclass="srclink"href="../src/widgetry/widgets/button.rs.html#418-421"title="goto source code">[src]</a></h4><divclass="docblock"><p>Set a hotkey for the button</p>
</div><h4id="method.tooltip"class="method"><code>pub fn <ahref="#method.tooltip"class="fnname">tooltip</a>(self, tooltip: <aclass="struct"href="../widgetry/text/struct.Text.html"title="struct widgetry::text::Text">Text</a>) -> Self</code><aclass="srclink"href="../src/widgetry/widgets/button.rs.html#426-429"title="goto source code">[src]</a></h4><divclass="docblock"><p>Set a non-default tooltip <ahref="../widgetry/text/struct.Text.html"title="Text"><code>Text</code></a> to appear when hovering over the button.</p>
</div><h4id="method.no_tooltip"class="method"><code>pub fn <ahref="#method.no_tooltip"class="fnname">no_tooltip</a>(self) -> Self</code><aclass="srclink"href="../src/widgetry/widgets/button.rs.html#433-437"title="goto source code">[src]</a></h4><divclass="docblock"><p>If a <code>tooltip</code> is not specified, a default tooltip will be applied. Use <code>no_tooltip</code> when
</div><h4id="method.vertical"class="method"><code>pub fn <ahref="#method.vertical"class="fnname">vertical</a>(self) -> Self</code><aclass="srclink"href="../src/widgetry/widgets/button.rs.html#442-445"title="goto source code">[src]</a></h4><divclass="docblock"><p>The button's items will be rendered in a vertical column</p>
</div><h4id="method.horizontal"class="method"><code>pub fn <ahref="#method.horizontal"class="fnname">horizontal</a>(self) -> Self</code><aclass="srclink"href="../src/widgetry/widgets/button.rs.html#450-453"title="goto source code">[src]</a></h4><divclass="docblock"><p>The button's items will be rendered in a horizontal row</p>
</div><h4id="method.disabled"class="method"><code>pub fn <ahref="#method.disabled"class="fnname">disabled</a>(self, is_disabled: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> Self</code><aclass="srclink"href="../src/widgetry/widgets/button.rs.html#456-459"title="goto source code">[src]</a></h4><divclass="docblock"><p>The button cannot be clicked and will be styled as <ahref="../widgetry/enum.ControlState.html#variant.Disabled"title="ControlState::Disabled"><code>ControlState::Disabled</code></a></p>
</div><h4id="method.label_first"class="method"><code>pub fn <ahref="#method.label_first"class="fnname">label_first</a>(self) -> Self</code><aclass="srclink"href="../src/widgetry/widgets/button.rs.html#464-467"title="goto source code">[src]</a></h4><divclass="docblock"><p>Display the button's label before the button's image.</p>
</div><h4id="method.image_first"class="method"><code>pub fn <ahref="#method.image_first"class="fnname">image_first</a>(self) -> Self</code><aclass="srclink"href="../src/widgetry/widgets/button.rs.html#472-475"title="goto source code">[src]</a></h4><divclass="docblock"><p>Display the button's image before the button's label.</p>
</div><h4id="method.stack_spacing"class="method"><code>pub fn <ahref="#method.stack_spacing"class="fnname">stack_spacing</a>(self, value: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> Self</code><aclass="srclink"href="../src/widgetry/widgets/button.rs.html#479-482"title="goto source code">[src]</a></h4><divclass="docblock"><p>Spacing between the image and text of a button.
</div><h4id="method.corner_rounding"class="method"><code>pub fn <ahref="#method.corner_rounding"class="fnname">corner_rounding</a><R: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><<aclass="enum"href="../widgetry/widgets/enum.CornerRounding.html"title="enum widgetry::widgets::CornerRounding">CornerRounding</a>>>(self, value: R) -> Self</code><aclass="srclink"href="../src/widgetry/widgets/button.rs.html#485-488"title="goto source code">[src]</a></h4><divclass="docblock"><p>Set independent rounding for each of the button's corners</p>
<spanclass="kw">let</span><spanclass="ident">red_button_1</span><spanclass="op">=</span><spanclass="ident">red_builder</span>.<spanclass="ident">clone</span>().<spanclass="ident">label_text</span>(<spanclass="string">"First red button"</span>).<spanclass="ident">build</span>(<spanclass="ident">ctx</span>, <spanclass="string">"first"</span>);
<spanclass="kw">let</span><spanclass="ident">red_button_2</span><spanclass="op">=</span><spanclass="ident">red_builder</span>.<spanclass="ident">clone</span>().<spanclass="ident">label_text</span>(<spanclass="string">"Second red button"</span>).<spanclass="ident">build</span>(<spanclass="ident">ctx</span>, <spanclass="string">"second"</span>);
<spanclass="kw">let</span><spanclass="ident">red_button_3</span><spanclass="op">=</span><spanclass="ident">red_builder</span>.<spanclass="ident">label_text</span>(<spanclass="string">"Last red button"</span>).<spanclass="ident">build</span>(<spanclass="ident">ctx</span>, <spanclass="string">"third"</span>);
</div><h4id="method.build_def"class="method"><code>pub fn <ahref="#method.build_def"class="fnname">build_def</a>(&self, ctx: &<aclass="struct"href="../widgetry/event_ctx/struct.EventCtx.html"title="struct widgetry::event_ctx::EventCtx">EventCtx</a><'_>) -><aclass="struct"href="../widgetry/widgets/struct.Widget.html"title="struct widgetry::widgets::Widget">Widget</a></code><aclass="srclink"href="../src/widgetry/widgets/button.rs.html#544-553"title="goto source code">[src]</a></h4><divclass="docblock"><p>Shorthand method to build a default widget whose <code>action</code> is derived from the label's text.</p>
</div></div><h3id="impl-Debug"class="impl"><codeclass="in-band">impl<'a><aclass="trait"href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html"title="trait core::fmt::Debug">Debug</a> for <aclass="struct"href="../widgetry/widgets/button/struct.ButtonBuilder.html"title="struct widgetry::widgets::button::ButtonBuilder">ButtonBuilder</a><'a></code><ahref="#impl-Debug"class="anchor"></a><aclass="srclink"href="../src/widgetry/widgets/button.rs.html#131"title="goto source code">[src]</a></h3><divclass="impl-items"><h4id="method.fmt"class="method hidden"><code>fn <ahref="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt"class="fnname">fmt</a>(&self, f: &mut <aclass="struct"href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html"title="struct core::fmt::Formatter">Formatter</a><'_>) -><aclass="type"href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html"title="type core::fmt::Result">Result</a></code><aclass="srclink"href="../src/widgetry/widgets/button.rs.html#131"title="goto source code">[src]</a></h4><divclass='docblock hidden'><p>Formats the value using the given formatter. <ahref="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div><h3id="impl-Default"class="impl"><codeclass="in-band">impl<'a><aclass="trait"href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html"title="trait core::default::Default">Default</a> for <aclass="struct"href="../widgetry/widgets/button/struct.ButtonBuilder.html"title="struct widgetry::widgets::button::ButtonBuilder">ButtonBuilder</a><'a></code><ahref="#impl-Default"class="anchor"></a><aclass="srclink"href="../src/widgetry/widgets/button.rs.html#131"title="goto source code">[src]</a></h3><divclass="impl-items"><h4id="method.default"class="method hidden"><code>fn <ahref="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default"class="fnname">default</a>() -><aclass="struct"href="../widgetry/widgets/button/struct.ButtonBuilder.html"title="struct widgetry::widgets::button::ButtonBuilder">ButtonBuilder</a><'a></code><aclass="srclink"href="../src/widgetry/widgets/button.rs.html#131"title="goto source code">[src]</a></h4><divclass='docblock hidden'><p>Returns the "default value" for a type. <ahref="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></p>
</div></div><h3id="impl-Borrow%3CT%3E"class="impl"><codeclass="in-band">impl<T><aclass="trait"href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html"title="trait core::borrow::Borrow">Borrow</a><T> for T <spanclass="where fmt-newline">where<br> T: ?<aclass="trait"href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>, </span></code><ahref="#impl-Borrow%3CT%3E"class="anchor"></a><aclass="srclink"href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214"title="goto source code">[src]</a></h3><divclass="impl-items"><h4id="method.borrow"class="method hidden"><code>pub fn <ahref="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow"class="fnname">borrow</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><aclass="srclink"href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213"title="goto source code">[src]</a></h4><divclass='docblock hidden'><p>Immutably borrows from an owned value. <ahref="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3id="impl-BorrowMut%3CT%3E"class="impl"><codeclass="in-band">impl<T><aclass="trait"href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html"title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <spanclass="where fmt-newline">where<br> T: ?<aclass="trait"href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>, </span></code><ahref="#impl-BorrowMut%3CT%3E"class="anchor"></a><aclass="srclink"href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221"title="goto source code">[src]</a></h3><divclass="impl-items"><h4id="method.borrow_mut"class="method hidden"><code>pub fn <ahref="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut"class="fnname">borrow_mut</a>(&mut self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><aclass="srclink"href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220"title="goto source code">[src]</a></h4><divclass='docblock hidden'><p>Mutably borrows from an owned value. <ahref="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></div><h3id="impl-Downcast"class="impl"><codeclass="in-band">impl<T> Downcast for T <spanclass="where fmt-newline">where<br> T: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html"title="trait core::any::Any">Any</a>, </span></code><ahref="#impl-Downcast"class="anchor"></a></h3><divclass="impl-items"><h4id="method.into_any"class="method hidden"><code>pub fn <ahref="#method.into_any"class="fnname">into_any</a>(self: <aclass="struct"href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html"title="struct alloc::boxed::Box">Box</a><T, <aclass="struct"href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html"title="struct alloc::alloc::Global">Global</a>>) -><aclass="struct"href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html"title="struct alloc::boxed::Box">Box</a><dyn <aclass="trait"href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html"title="trait core::any::Any">Any</a> + 'static, <aclass="struct"href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html"title="struct alloc::alloc::Global">Global</a>></code></h4><divclass='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>. <ahref="#tymethod.into_any">Read more</a></p>
</div><h4id="method.into_any_rc"class="method hidden"><code>pub fn <ahref="#method.into_any_rc"class="fnname">into_any_rc</a>(self: <aclass="struct"href="https://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html"title="struct alloc::rc::Rc">Rc</a><T>) -><aclass="struct"href="https://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html"title="struct alloc::rc::Rc">Rc</a><dyn <aclass="trait"href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html"title="trait core::any::Any">Any</a> + 'static></code></h4><divclass='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>. <ahref="#tymethod.into_any_rc">Read more</a></p>
</div><h4id="method.as_any"class="method hidden"><code>pub fn <ahref="#method.as_any"class="fnname">as_any</a>(&self) ->&(dyn <aclass="trait"href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html"title="trait core::any::Any">Any</a> + 'static)</code></h4><divclass='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. <ahref="#tymethod.as_any">Read more</a></p>
</div><h4id="method.as_any_mut"class="method hidden"><code>pub fn <ahref="#method.as_any_mut"class="fnname">as_any_mut</a>(&mut self) ->&mut (dyn <aclass="trait"href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html"title="trait core::any::Any">Any</a> + 'static)</code></h4><divclass='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. <ahref="#tymethod.as_any_mut">Read more</a></p>
</div></div><h3id="impl-DowncastSync"class="impl"><codeclass="in-band">impl<T> DowncastSync for T <spanclass="where fmt-newline">where<br> T: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html"title="trait core::marker::Send">Send</a> + <aclass="trait"href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html"title="trait core::marker::Sync">Sync</a> + <aclass="trait"href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html"title="trait core::any::Any">Any</a>, </span></code><ahref="#impl-DowncastSync"class="anchor"></a></h3><divclass="impl-items"><h4id="method.into_any_arc"class="method hidden"><code>pub fn <ahref="#method.into_any_arc"class="fnname">into_any_arc</a>(self: <aclass="struct"href="https://doc.rust-lang.org/nightly/alloc/sync/struct.Arc.html"title="struct alloc::sync::Arc">Arc</a><T>) -><aclass="struct"href="https://doc.rust-lang.org/nightly/alloc/sync/struct.Arc.html"title="struct alloc::sync::Arc">Arc</a><dyn <aclass="trait"href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html"title="trait core::any::Any">Any</a> + 'static + <aclass="trait"href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html"title="trait core::marker::Sync">Sync</a> + <aclass="trait"href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html"title="trait core::marker::Send">Send</a>></code></h4><divclass='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>. <ahref="#tymethod.into_any_arc">Read more</a></p>
</div></div><h3id="impl-From%3CT%3E"class="impl"><codeclass="in-band">impl<T><aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html"title="trait core::convert::From">From</a><T> for T</code><ahref="#impl-From%3CT%3E"class="anchor"></a><aclass="srclink"href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#552-556"title="goto source code">[src]</a></h3><divclass="impl-items"><h4id="method.from"class="method hidden"><code>pub fn <ahref="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from"class="fnname">from</a>(t: T) -> T</code><aclass="srclink"href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#553-555"title="goto source code">[src]</a></h4><divclass='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3id="impl-Into%3CU%3E"class="impl"><codeclass="in-band">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><U> for T <spanclass="where fmt-newline">where<br> U: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html"title="trait core::convert::From">From</a><T>, </span></code><ahref="#impl-Into%3CU%3E"class="anchor"></a><aclass="srclink"href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#541-548"title="goto source code">[src]</a></h3><divclass="impl-items"><h4id="method.into"class="method hidden"><code>pub fn <ahref="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into"class="fnname">into</a>(self) -> U</code><aclass="srclink"href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545-547"title="goto source code">[src]</a></h4><divclass='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3id="impl-Same%3CT%3E"class="impl"><codeclass="in-band">impl<T> Same<T> for T</code><ahref="#impl-Same%3CT%3E"class="anchor"></a></h3><divclass="impl-items"><h4id="associatedtype.Output"class="type"><code>type <ahref="#associatedtype.Output"class="type">Output</a> = T</code></h4><divclass='docblock'><p>Should always be <code>Self</code></p>
</div></div><h3id="impl-ToOwned"class="impl"><codeclass="in-band">impl<T><aclass="trait"href="https://doc.rust-lang.org/nightly/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/nightly/core/clone/trait.Clone.html"title="trait core::clone::Clone">Clone</a>, </span></code><ahref="#impl-ToOwned"class="anchor"></a><aclass="srclink"href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#80-92"title="goto source code">[src]</a></h3><divclass="impl-items"><h4id="associatedtype.Owned"class="type"><code>type <ahref="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned"class="type">Owned</a> = T</code></h4><divclass='docblock'><p>The resulting type after obtaining ownership.</p>
</div><h4id="method.to_owned"class="method hidden"><code>pub fn <ahref="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned"class="fnname">to_owned</a>(&self) -> T</code><aclass="srclink"href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#85-87"title="goto source code">[src]</a></h4><divclass='docblock hidden'><p>Creates owned data from borrowed data, usually by cloning. <ahref="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p>
</details></div></div><divclass='docblock hidden'><p>Uses borrowed data to replace owned data, usually by cloning. <ahref="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p>
</div></div><h3id="impl-TryFrom%3CU%3E"class="impl"><codeclass="in-band">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/nightly/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/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><T>, </span></code><ahref="#impl-TryFrom%3CU%3E"class="anchor"></a><aclass="srclink"href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#589-598"title="goto source code">[src]</a></h3><divclass="impl-items"><h4id="associatedtype.Error"class="type"><code>type <ahref="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error"class="type">Error</a> = <aclass="enum"href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html"title="enum core::convert::Infallible">Infallible</a></code></h4><divclass='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4id="method.try_from"class="method hidden"><code>pub fn <ahref="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from"class="fnname">try_from</a>(value: U) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><T, <T as <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U>>::<aclass="type"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></code><aclass="srclink"href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#595-597"title="goto source code">[src]</a></h4><divclass='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3id="impl-TryInto%3CU%3E"class="impl"><codeclass="in-band">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/nightly/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/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><ahref="#impl-TryInto%3CU%3E"class="anchor"></a><aclass="srclink"href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#575-584"title="goto source code">[src]</a></h3><divclass="impl-items"><h4id="associatedtype.Error-1"class="type"><code>type <ahref="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error"class="type">Error</a> = <U as <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="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><divclass='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4id="method.try_into"class="method hidden"><code>pub fn <ahref="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into"class="fnname">try_into</a>(self) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><U, <U as <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="type"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></code><aclass="srclink"href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#581-583"title="goto source code">[src]</a></h4><divclass='docblock hidden'><p>Performs the conversion.</p>