<!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="This struct gives the library a understanding what Buttons on the Arduboy are."><title>ButtonSet in arduboy_rust::hardware::buttons - Rust</title><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><linkrel="stylesheet"href="../../../static.files/normalize-76eba96aa4d2e634.css"><linkrel="stylesheet"href="../../../static.files/rustdoc-cb6f1f67f1bcd037.css"id="mainThemeStyle"><metaname="rustdoc-vars"data-root-path="../../../"data-static-root-path="../../../static.files/"data-current-crate="arduboy_rust"data-themes=""data-resource-suffix=""data-rustdoc-version="1.73.0-nightly (8131b9774 2023-08-02)"data-channel="nightly"data-search-js="search-6dfdfced5eff6596.js"data-settings-js="settings-de11bff964e9d4e5.js"data-settings-css="settings-8c76f75bfb6bd192.css"data-theme-light-css="light-6d2c9675f3d09c26.css"data-theme-dark-css="dark-45ceb8f2e522f4d1.css"data-theme-ayu-css="ayu-fd19013d6ce078bf.css"><scriptsrc="../../../static.files/storage-db41da1a38ea3cb8.js"></script><scriptdefersrc="sidebar-items.js"></script><scriptdefersrc="../../../static.files/main-0795b7d26be81095.js"></script><noscript><linkrel="stylesheet"media="(prefers-color-scheme:light)"href="../../../static.files/light-6d2c9675f3d09c26.css"><linkrel="stylesheet"media="(prefers-color-scheme:dark)"href="../../../static.files/dark-45ceb8f2e522f4d1.css"><linkrel="stylesheet"href="../../../static.files/noscript-cffde32267a19fd6.css"></noscript><linkrel="alternate icon"type="image/png"href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><linkrel="alternate icon"type="image/png"href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><linkrel="icon"type="image/svg+xml"href="../../../static.files/favicon-2c020d218678b618.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="logo-container"href="../../../arduboy_rust/index.html"><imgclass="rust-logo"src="../../../static.files/rust-logo-151179464ae7ed46.svg"alt="logo"></a><h2></h2></nav><navclass="sidebar"><aclass="logo-container"href="../../../arduboy_rust/index.html"><imgclass="rust-logo"src="../../../static.files/rust-logo-151179464ae7ed46.svg"alt="logo"></a><h2class="location"><ahref="#">ButtonSet</a></h2><divclass="sidebar-elems"><section><h3><ahref="#fields">Fields</a></h3><ulclass="block"><li><ahref="#structfield.flag_set">flag_set</a></li></ul><h3><ahref="#implementations">Methods</a></h3><ulclass="block"><li><ahref="#method.just_pressed">just_pressed</a></li><li><ahref="#method.just_released">just_released</a></li><li><ahref="#method.not_pressed">not_pressed</a></li><li><ahref="#method.pressed">pressed</a></li></ul><h3><ahref="#trait-implementations">Trait Implementations</a></h3><ulclass="block"><li><ahref="#impl-BitOr%3CButtonSet%3E-for-ButtonSet">BitOr<ButtonSet></a></li><li><ahref="#impl-Clone-for-ButtonSet">Clone</a></li><li><ahref="#impl-Copy-for-ButtonSet">Copy</a></li><l
}</code></pre><detailsclass="toggle top-doc"open><summaryclass="hideme"><span>Expand description</span></summary><divclass="docblock"><p>This struct gives the library a understanding what Buttons on the Arduboy are.</p>
Self: Sized,</span></h4></section></summary><divclass='docblock'>Feeds a slice of this type into the given [<code>Hasher</code>]. <a>Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-Ord-for-ButtonSet"class="impl"><aclass="src rightside"href="../../../src/arduboy_rust/hardware/buttons.rs.html#43">source</a><ahref="#impl-Ord-for-ButtonSet"class="anchor">§</a><h3class="code-header">impl Ord for <aclass="struct"href="../../prelude/struct.ButtonSet.html"title="struct arduboy_rust::prelude::ButtonSet">ButtonSet</a></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.cmp"class="method trait-impl"><aclass="src rightside"href="../../../src/arduboy_rust/hardware/buttons.rs.html#43">source</a><ahref="#method.cmp"class="anchor">§</a><h4class="code-header">fn <aclass="fn">cmp</a>(&self, other: &<aclass="struct"href="../../prelude/struct.ButtonSet.html"title="struct arduboy_rust::prelude::ButtonSet">ButtonSet</a>) -> Ordering</h4></section></summary><divclass='docblock'>This method returns an [<code>Ordering</code>] between <code>self</code> and <code>other</code>. <a>Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.max"class="method trait-impl"><spanclass="since rightside"title="Stable since Rust version 1.21.0">1.21.0</span><ahref="#method.max"class="anchor">§</a><h4class="code-header">fn <aclass="fn">max</a>(self, other: Self) -> Self<spanclass="where fmt-newline">where
Self: Sized,</span></h4></section></summary><divclass='docblock'>Compares and returns the maximum of two values. <a>Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.min"class="method trait-impl"><spanclass="since rightside"title="Stable since Rust version 1.21.0">1.21.0</span><ahref="#method.min"class="anchor">§</a><h4class="code-header">fn <aclass="fn">min</a>(self, other: Self) -> Self<spanclass="where fmt-newline">where
Self: Sized,</span></h4></section></summary><divclass='docblock'>Compares and returns the minimum of two values. <a>Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.clamp"class="method trait-impl"><spanclass="since rightside"title="Stable since Rust version 1.50.0">1.50.0</span><ahref="#method.clamp"class="anchor">§</a><h4class="code-header">fn <aclass="fn">clamp</a>(self, min: Self, max: Self) -> Self<spanclass="where fmt-newline">where
Self: Sized + PartialOrd<Self>,</span></h4></section></summary><divclass='docblock'>Restrict a value to a certain interval. <a>Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-PartialEq%3CButtonSet%3E-for-ButtonSet"class="impl"><aclass="src rightside"href="../../../src/arduboy_rust/hardware/buttons.rs.html#43">source</a><ahref="#impl-PartialEq%3CButtonSet%3E-for-ButtonSet"class="anchor">§</a><h3class="code-header">impl PartialEq<<aclass="struct"href="../../prelude/struct.ButtonSet.html"title="struct arduboy_rust::prelude::ButtonSet">ButtonSet</a>> for <aclass="struct"href="../../prelude/struct.ButtonSet.html"title="struct arduboy_rust::prelude::ButtonSet">ButtonSet</a></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.eq"class="method trait-impl"><aclass="src rightside"href="../../../src/arduboy_rust/hardware/buttons.rs.html#43">source</a><ahref="#method.eq"class="anchor">§</a><h4class="code-header">fn <aclass="fn">eq</a>(&self, other: &<aclass="struct"href="../../prelude/struct.ButtonSet.html"title="struct arduboy_rust::prelude::ButtonSet">ButtonSet</a>) -> bool</h4></section></summary><divclass='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
by <code>==</code>.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.ne"class="method trait-impl"><spanclass="since rightside"title="Stable since Rust version 1.0.0">1.0.0</span><ahref="#method.ne"class="anchor">§</a><h4class="code-header">fn <aclass="fn">ne</a>(&self, other: &Rhs) -> bool</h4></section></summary><divclass='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
sufficient, and should not be overridden without very good reason.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-PartialOrd%3CButtonSet%3E-for-ButtonSet"class="impl"><aclass="src rightside"href="../../../src/arduboy_rust/hardware/buttons.rs.html#43">source</a><ahref="#impl-PartialOrd%3CButtonSet%3E-for-ButtonSet"class="anchor">§</a><h3class="code-header">impl PartialOrd<<aclass="struct"href="../../prelude/struct.ButtonSet.html"title="struct arduboy_rust::prelude::ButtonSet">ButtonSet</a>> for <aclass="struct"href="../../prelude/struct.ButtonSet.html"title="struct arduboy_rust::prelude::ButtonSet">ButtonSet</a></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.partial_cmp"class="method trait-impl"><aclass="src rightside"href="../../../src/arduboy_rust/hardware/buttons.rs.html#43">source</a><ahref="#method.partial_cmp"class="anchor">§</a><h4class="code-header">fn <aclass="fn">partial_cmp</a>(&self, other: &<aclass="struct"href="../../prelude/struct.ButtonSet.html"title="struct arduboy_rust::prelude::ButtonSet">ButtonSet</a>) -> Option<Ordering></h4></section></summary><divclass='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a>Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.lt"class="method trait-impl"><spanclass="since rightside"title="Stable since Rust version 1.0.0">1.0.0</span><ahref="#method.lt"class="anchor">§</a><h4class="code-header">fn <aclass="fn">lt</a>(&self, other: &Rhs) -> bool</h4></section></summary><divclass='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a>Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.le"class="method trait-impl"><spanclass="since rightside"title="Stable since Rust version 1.0.0">1.0.0</span><ahref="#method.le"class="anchor">§</a><h4class="code-header">fn <aclass="fn">le</a>(&self, other: &Rhs) -> bool</h4></section></summary><divclass='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code>
operator. <a>Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.gt"class="method trait-impl"><spanclass="since rightside"title="Stable since Rust version 1.0.0">1.0.0</span><ahref="#method.gt"class="anchor">§</a><h4class="code-header">fn <aclass="fn">gt</a>(&self, other: &Rhs) -> bool</h4></section></summary><divclass='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a>Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.ge"class="method trait-impl"><spanclass="since rightside"title="Stable since Rust version 1.0.0">1.0.0</span><ahref="#method.ge"class="anchor">§</a><h4class="code-header">fn <aclass="fn">ge</a>(&self, other: &Rhs) -> bool</h4></section></summary><divclass='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code>
operator. <a>Read more</a></div></details></div></details><sectionid="impl-Copy-for-ButtonSet"class="impl"><aclass="src rightside"href="../../../src/arduboy_rust/hardware/buttons.rs.html#43">source</a><ahref="#impl-Copy-for-ButtonSet"class="anchor">§</a><h3class="code-header">impl Copy for <aclass="struct"href="../../prelude/struct.ButtonSet.html"title="struct arduboy_rust::prelude::ButtonSet">ButtonSet</a></h3></section><sectionid="impl-Eq-for-ButtonSet"class="impl"><aclass="src rightside"href="../../../src/arduboy_rust/hardware/buttons.rs.html#43">source</a><ahref="#impl-Eq-for-ButtonSet"class="anchor">§</a><h3class="code-header">impl Eq for <aclass="struct"href="../../prelude/struct.ButtonSet.html"title="struct arduboy_rust::prelude::ButtonSet">ButtonSet</a></h3></section><sectionid="impl-StructuralEq-for-ButtonSet"class="impl"><aclass="src rightside"href="../../../src/arduboy_rust/hardware/buttons.rs.html#43">source</a><ahref="#impl-StructuralEq-for-ButtonSet"class="anchor">§</a><h3class="code-header">impl StructuralEq for <aclass="struct"href="../../prelude/struct.ButtonSet.html"title="struct arduboy_rust::prelude::ButtonSet">ButtonSet</a></h3></section><sectionid="impl-StructuralPartialEq-for-ButtonSet"class="impl"><aclass="src rightside"href="../../../src/arduboy_rust/hardware/buttons.rs.html#43">source</a><ahref="#impl-StructuralPartialEq-for-ButtonSet"class="anchor">§</a><h3class="code-header">impl StructuralPartialEq for <aclass="struct"href="../../prelude/struct.ButtonSet.html"title="struct arduboy_rust::prelude::ButtonSet">ButtonSet</a></h3></section></div><h2id="synthetic-implementations"class="small-section-header">Auto Trait Implementations<ahref="#synthetic-implementations"class="anchor">§</a></h2><divid="synthetic-implementations-list"><sectionid="impl-RefUnwindSafe-for-ButtonSet"class="impl"><ahref="#impl-RefUnwindSafe-for-ButtonSet"class="anchor">§</a><h3class="code-header">impl RefUnwindSafe for <aclass="struct"href="../../prelude/struct.ButtonSet.html"title="struct arduboy_rust::prelude::ButtonSet">ButtonSet</a></h3></section><sectionid="impl-Send-for-ButtonSet"class="impl"><ahref="#impl-Send-for-ButtonSet"class="anchor">§</a><h3class="code-header">impl Send for <aclass="struct"href="../../prelude/struct.ButtonSet.html"title="struct arduboy_rust::prelude::ButtonSet">ButtonSet</a></h3></section><sectionid="impl-Sync-for-ButtonSet"class="impl"><ahref="#impl-Sync-for-ButtonSet"class="anchor">§</a><h3class="code-header">impl Sync for <aclass="struct"href="../../prelude/struct.ButtonSet.html"title="struct arduboy_rust::prelude::ButtonSet">ButtonSet</a></h3></section><sectionid="impl-Unpin-for-ButtonSet"class="impl"><ahref="#impl-Unpin-for-ButtonSet"class="anchor">§</a><h3class="code-header">impl Unpin for <aclass="struct"href="../../prelude/struct.ButtonSet.html"title="struct arduboy_rust::prelude::ButtonSet">ButtonSet</a></h3></section><sectionid="impl-UnwindSafe-for-ButtonSet"class="impl"><ahref="#impl-UnwindSafe-for-ButtonSet"class="anchor">§</a><h3class="code-header">impl UnwindSafe for <aclass="struct"href="../../prelude/struct.ButtonSet.html"title="struct arduboy_rust::prelude::ButtonSet">ButtonSet</a></h3></section></div><h2id="blanket-implementations"class="small-section-header">Blanket Implementations<ahref="#blanket-implementations"class="anchor">§</a></h2><divid="blanket-implementations-list"><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-Any-for-ButtonSet"class="impl"><ahref="#impl-Any-for-ButtonSet"class="anchor">§</a><h3class="code-header">impl<T> Any for T<spanclass="where fmt-newline">where
<p>That is, this conversion is whatever the implementation of
<code>[From]<T> for U</code> chooses to do.</p>
</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-TryFrom%3CU%3E-for-ButtonSet"class="impl"><ahref="#impl-TryFrom%3CU%3E-for-ButtonSet"class="anchor">§</a><h3class="code-header">impl<T, U> TryFrom<U> for T<spanclass="where fmt-newline">where
U: Into<T>,</span></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Error-1"class="associatedtype trait-impl"><ahref="#associatedtype.Error-1"class="anchor">§</a><h4class="code-header">type <aclass="associatedtype">Error</a> = Infallible</h4></section></summary><divclass='docblock'>The type returned in the event of a conversion error.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.try_from"class="method trait-impl"><ahref="#method.try_from"class="anchor">§</a><h4class="code-header">fn <aclass="fn">try_from</a>(value: U) -> Result<T, <T as TryFrom<U>>::Error></h4></section></summary><divclass='docblock'>Performs the conversion.</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-TryInto%3CU%3E-for-ButtonSet"class="impl"><ahref="#impl-TryInto%3CU%3E-for-ButtonSet"class="anchor">§</a><h3class="code-header">impl<T, U> TryInto<U> for T<spanclass="where fmt-newline">where
U: TryFrom<T>,</span></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Error"class="associatedtype trait-impl"><ahref="#associatedtype.Error"class="anchor">§</a><h4class="code-header">type <aclass="associatedtype">Error</a> = <U as TryFrom<T>>::Error</h4></section></summary><divclass='docblock'>The type returned in the event of a conversion error.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.try_into"class="method trait-impl"><ahref="#method.try_into"class="anchor">§</a><h4class="code-header">fn <aclass="fn">try_into</a>(self) -> Result<U, <U as TryFrom<T>>::Error></h4></section></summary><divclass='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html>