esp-idf-hal/enumset/struct.EnumSet.html

310 lines
124 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="An efficient set type for enums."><title>EnumSet in enumset - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-46132b98.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="enumset" data-themes="" data-resource-suffix="" data-rustdoc-version="1.86.0-nightly (8361aef0d 2025-01-14)" data-channel="nightly" data-search-js="search-75f5ac3e.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../enumset/index.html">enumset</a><span class="version">1.1.5</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">EnumSet</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#numeric-representation" title="Numeric representation">Numeric representation</a></li><li><a href="#array-representation" title="Array representation">Array representation</a></li><li><a href="#serialization" title="Serialization">Serialization</a></li><li><a href="#ffi-safety-and-repr" title="FFI, Safety and `repr`">FFI, Safety and <code>repr</code></a></li></ul><h3><a href="#implementations">Associated Constants</a></h3><ul class="block associatedconstant"><li><a href="#associatedconstant.ALL" title="ALL">ALL</a></li><li><a href="#associatedconstant.EMPTY" title="EMPTY">EMPTY</a></li></ul><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.all" title="all">all</a></li><li><a href="#method.as_array" title="as_array">as_array</a></li><li><a href="#method.as_array_truncated" title="as_array_truncated">as_array_truncated</a></li><li><a href="#method.as_repr" title="as_repr">as_repr</a></li><li><a href="#method.as_u128" title="as_u128">as_u128</a></li><li><a href="#method.as_u128_truncated" title="as_u128_truncated">as_u128_truncated</a></li><li><a href="#method.as_u16" title="as_u16">as_u16</a></li><li><a href="#method.as_u16_truncated" title="as_u16_truncated">as_u16_truncated</a></li><li><a href="#method.as_u32" title="as_u32">as_u32</a></li><li><a href="#method.as_u32_truncated" title="as_u32_truncated">as_u32_truncated</a></li><li><a href="#method.as_u64" title="as_u64">as_u64</a></li><li><a href="#method.as_u64_truncated" title="as_u64_truncated">as_u64_truncated</a></li><li><a href="#method.as_u8" title="as_u8">as_u8</a></li><li><a href="#method.as_u8_truncated" title="as_u8_truncated">as_u8_truncated</a></li><li><a href="#method.as_usize" title="as_usize">as_usize</a></li><li><a href="#method.as_usize_truncated" title="as_usize_truncated">as_usize_truncated</a></li><li><a href="#method.bit_width" title="bit_width">bit_width</a></li><li><a href="#method.clear" title="clear">clear</a></li><li><a href="#method.complement" title="complement">complement</a></li><li><a href="#method.contains" title="contains">contains</a></li><li><a href="#method.copy_into_slice" title="copy_into_slice">copy_into_slice</a></li><li><a href="#method.copy_into_slice_truncated" title="copy_into_slice_truncated">copy_into_slice_truncated</a></li><li><a href="#method.difference" title="difference">difference</a></li><li><a href="#method.empty" title="empty">empty</a></li><li><a href="#method.from_array" title="from_array">from_array</a></li><li><a href="#method.from_array_truncated" title="from_array_truncated">from_array_truncated</a></li><li><a href="#method.from_array_unchecked" title="from_array_unchecked">from_array_unchecked</a></li><li><a href="#method.from_repr" title="from_repr">from_repr</a></li><li><a href="#method.from_repr_truncated" title="from_repr_truncated">from_repr_truncated</a></li><li><a href="#method.from_repr_unchecked" title="from_repr_unchecked">from_repr_unchecked</a></li><li><a href="#method.from_slice" title="from_slice">from_slice</a></li><li><a href="#method.from_slice_truncated" title="from_slice_truncated">from_slice_truncated</a></li><li><a href="#method.from_slice_unchecked" title="from_slice_unchecked">from_slice_unchecked</a></li><li><a href="#method.from_u128" title="from_u128">from_u128</a></li><li><a href="#method.from_u128_truncated" title="from_u128_truncated">from_u128_truncated</a></li><li><a href="#method.from_u128_unchecked" title="from_u128_unchecked">from_u128_unchecked</a></li><li><a href="#method.from_u16" title="from_u16">from_u16</a></li><li><a href="#method.from_u16_truncated" title="from_u16_truncated">from_u16_truncated</a></li><li><a href="#method.from_u16_unchecked" title="from_u16_unchecked">from_u16_unchecked</a></li><li><a href="#method.from_u32" title="from_u32">from_u32</a></li><li><a href="#method.from_u32_truncated" title="from_u32_truncated">from_u32_truncated</a></li><li><a href="#method.from_u32_unchecked" title="from_u32_unchecked">from_u32_unchecked</a></li><li><a href="#method.from_u64" title="from_u64">from_u64</a></li><li><a href="#method.from_u64_truncated" title="from_u64_truncated">from_u64_truncated</a></li><li><a href="#method.from_u64_unchecked" title="from_u64_unchecked">from_u64_unchecked</a></li><li><a href="#method.from_u8" title="from_u8">from_u8</a></li><li><a href="#method.from_u8_truncated" title="from_u8_truncated">from_u8_truncated</a></li><li><a href="#method.from_u8_unchecked" title="from_u8_unchecked">from_u8_unchecked</a></li><li><a href="#method.from_usize" title="from_usize">from_usize</a></li><li><a href="#method.from_usize_truncated" title="from_usize_truncated">from_usize_truncated</a></li><li><a href="#method.from_usize_unchecked" title="from_usize_unchecked">from_usize_unchecked</a></li><li><a href="#method.insert" title="insert">insert</a></li><li><a href="#method.insert_all" title="insert_all">insert_all</a></li><li><a href="#method.intersection" title="intersection">intersection</a></li><li><a href="#method.is_disjoint" title="is_disjoint">is_disjoint</a></li><li><a href="#method.is_empty" title="is_empty">is_empty</a></li><li><a href="#method.is_subset" title="is_subset">is_subset</a></li><li><a href="#method.is_superset" title="is_superset">is_superset</a></li><li><a href="#method.iter" title="iter">iter</a></li><li><a href="#method.len" title="len">len</a></li><li><a href="#method.new" title="new">new</a></li><li><a href="#method.only" title="only">only</a></li><li><a href="#method.remove" title="remove">remove</a></li><li><a href="#method.remove_all" title="remove_all">remove_all</a></li><li><a href="#method.symmetrical_difference" title="symmetrical_difference">symmetrical_difference</a></li><li><a href="#method.try_as_array" title="try_as_array">try_as_array</a></li><li><a href="#method.try_as_u128" title="try_as_u128">try_as_u128</a></li><li><a href="#method.try_as_u16" title="try_as_u16">try_as_u16</a></li><li><a href="#method.try_as_u32" title="try_as_u32">try_as_u32</a></li><li><a href="#method.try_as_u64" title="try_as_u64">try_as_u64</a></li><li><a href="#method.try_as_u8" title="try_as_u8">try_as_u8</a></li><li><a href="#method.try_as_usize" title="try_as_usize">try_as_usize</a></li><li><a href="#method.try_copy_into_slice" title="try_copy_into_slice">try_copy_into_slice</a></li><li><a href="#method.try_from_array" title="try_from_array">try_from_array</a></li><li><a href="#method.try_from_repr" title="try_from_repr">try_from_repr</a></li><li><a href="#method.try_from_slice" title="try_from_slice">try_from_slice</a></li><li><a href="#method.try_from_u128" title="try_from_u128">try_from_u128</a></li><li><a href="#method.try_from_u16" title="try_from_u16">try_from_u16</a></li><li><a href="#method.try_from_u32" title="try_from_u32">try_from_u32</a></li><li><a href="#method.try_from_u64" title="try_from_u64">try_from_u64</a></li><li><a href="#method.try_from_u8" title="try_from_u8">try_from_u8</a></li><li><a href="#method.try_from_usize" title="try_from_usize">try_from_usize</a></li><li><a href="#method.union" title="union">union</a></li><li><a href="#method.variant_count" title="variant_count">variant_count</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-BitAnd%3CO%3E-for-EnumSet%3CT%3E" title="BitAnd&#60;O&#62;">BitAnd&#60;O&#62;</a></li><li><a href="#impl-BitAndAssign%3CO%3E-for-EnumSet%3CT%3E" title="BitAndAssign&#60;O&#62;">BitAndAssign&#60;O&#62;</a></li><li><a href="#impl-BitOr%3CO%3E-for-EnumSet%3CT%3E" title="BitOr&#60;O&#62;">BitOr&#60;O&#62;</a></li><li><a href="#impl-BitOrAssign%3CO%3E-for-EnumSet%3CT%3E" title="BitOrAssign&#60;O&#62;">BitOrAssign&#60;O&#62;</a></li><li><a href="#impl-BitXor%3CO%3E-for-EnumSet%3CT%3E" title="BitXor&#60;O&#62;">BitXor&#60;O&#62;</a></li><li><a href="#impl-BitXorAssign%3CO%3E-for-EnumSet%3CT%3E" title="BitXorAssign&#60;O&#62;">BitXorAssign&#60;O&#62;</a></li><li><a href="#impl-Clone-for-EnumSet%3CT%3E" title="Clone">Clone</a></li><li><a href="#impl-Copy-for-EnumSet%3CT%3E" title="Copy">Copy</a></li><li><a href="#impl-Debug-for-EnumSet%3CT%3E" title="Debug">Debug</a></li><li><a href="#impl-Default-for-EnumSet%3CT%3E" title="Default">Default</a></li><li><a href="#impl-Display-for-EnumSet%3CT%3E" title="Display">Display</a></li><li><a href="#impl-Eq-for-EnumSet%3CT%3E" title="Eq">Eq</a></li><li><a href="#impl-Extend%3CEnumSet%3CT%3E%3E-for-EnumSet%3CT%3E" title="Extend&#60;EnumSet&#60;T&#62;&#62;">Extend&#60;EnumSet&#60;T&#62;&#62;</a></li><li><a href="#impl-Extend%3CT%3E-for-EnumSet%3CT%3E" title="Extend&#60;T&#62;">Extend&#60;T&#62;</a></li><li><a href="#impl-From%3CT%3E-for-EnumSet%3CT%3E" title="From&#60;T&#62;">From&#60;T&#62;</a></li><li><a href="#impl-FromIterator%3CEnumSet%3CT%3E%3E-for-EnumSet%3CT%3E" title="FromIterator&#60;EnumSet&#60;T&#62;&#62;">FromIterator&#60;EnumSet&#60;T&#62;&#62;</a></li><li><a href="#impl-FromIterator%3CT%3E-for-EnumSet%3CT%3E" title="FromIterator&#60;T&#62;">FromIterator&#60;T&#62;</a></li><li><a href="#impl-Hash-for-EnumSet%3CT%3E" title="Hash">Hash</a></li><li><a href="#impl-IntoIterator-for-EnumSet%3CT%3E" title="IntoIterator">IntoIterator</a></li><li><a href="#impl-Not-for-EnumSet%3CT%3E" title="Not">Not</a></li><li><a href="#impl-Ord-for-EnumSet%3CT%3E" title="Ord">Ord</a></li><li><a href="#impl-PartialEq-for-EnumSet%3CT%3E" title="PartialEq">PartialEq</a></li><li><a href="#impl-PartialEq%3CT%3E-for-EnumSet%3CT%3E" title="PartialEq&#60;T&#62;">PartialEq&#60;T&#62;</a></li><li><a href="#impl-PartialOrd-for-EnumSet%3CT%3E" title="PartialOrd">PartialOrd</a></li><li><a href="#impl-StructuralPartialEq-for-EnumSet%3CT%3E" title="StructuralPartialEq">StructuralPartialEq</a></li><li><a href="#impl-Sub%3CO%3E-for-EnumSet%3CT%3E" title="Sub&#60;O&#62;">Sub&#60;O&#62;</a></li><li><a href="#impl-SubAssign%3CO%3E-for-EnumSet%3CT%3E" title="SubAssign&#60;O&#62;">SubAssign&#60;O&#62;</a></li><li><a href="#impl-Sum-for-EnumSet%3CT%3E" title="Sum">Sum</a></li><li><a href="#impl-Sum%3C%26EnumSet%3CT%3E%3E-for-EnumSet%3CT%3E" title="Sum&#60;&#38;&#39;a EnumSet&#60;T&#62;&#62;">Sum&#60;&#38;&#39;a EnumSet&#60;T&#62;&#62;</a></li><li><a href="#impl-Sum%3C%26T%3E-for-EnumSet%3CT%3E" title="Sum&#60;&#38;&#39;a T&#62;">Sum&#60;&#38;&#39;a T&#62;</a></li><li><a href="#impl-Sum%3CT%3E-for-EnumSet%3CT%3E" title="Sum&#60;T&#62;">Sum&#60;T&#62;</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Freeze-for-EnumSet%3CT%3E" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-EnumSet%3CT%3E" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Send-for-EnumSet%3CT%3E" title="Send">Send</a></li><li><a href="#impl-Sync-for-EnumSet%3CT%3E" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-EnumSet%3CT%3E" title="Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe-for-EnumSet%3CT%3E" title="UnwindSafe">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T" title="Any">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T" title="Borrow&#60;T&#62;">Borrow&#60;T&#62;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T" title="BorrowMut&#60;T&#62;">BorrowMut&#60;T&#62;</a></li><li><a href="#impl-CloneToUninit-for-T" title="CloneToUninit">CloneToUninit</a></li><li><a href="#impl-From%3CT%3E-for-T" title="From&#60;T&#62;">From&#60;T&#62;</a></li><li><a href="#impl-Into%3CU%3E-for-T" title="Into&#60;U&#62;">Into&#60;U&#62;</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T" title="TryFrom&#60;U&#62;">TryFrom&#60;U&#62;</a></li><li><a href="#impl-TryInto%3CU%3E-for-T" title="TryInto&#60;U&#62;">TryInto&#60;U&#62;</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate enumset</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="index.html">enumset</a></span><h1>Struct <span class="struct">EnumSet</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/enumset/set.rs.html#125-130">Source</a> </span></div><pre class="rust item-decl"><code><div class="code-attribute">#[repr(transparent)]</div>pub struct EnumSet&lt;T: <a class="trait" href="trait.EnumSetType.html" title="trait enumset::EnumSetType">EnumSetType</a>&gt; { <span class="comment">/* private fields */</span> }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>An efficient set type for enums.</p>
<p>It is implemented using a bitset stored using the smallest integer that can fit all bits
in the underlying enum. In general, an enum variant with a discriminator of <code>n</code> is stored in
the nth least significant bit (corresponding with a mask of, e.g. <code>1 &lt;&lt; enum as u32</code>).</p>
<h2 id="numeric-representation"><a class="doc-anchor" href="#numeric-representation">§</a>Numeric representation</h2>
<p><code>EnumSet</code> is internally implemented using integer types, and as such can be easily converted
from and to numbers.</p>
<p>Each bit of the underlying integer corresponds to at most one particular enum variant. If the
corresponding bit for a variant is set, it present in the set. Bits that do not correspond to
any variant are always unset.</p>
<p>By default, each enum variant is stored in a bit corresponding to its discriminator. An enum
variant with a discriminator of <code>n</code> is stored in the <code>n + 1</code>th least significant bit
(corresponding to a mask of e.g. <code>1 &lt;&lt; enum as u32</code>).</p>
<h2 id="array-representation"><a class="doc-anchor" href="#array-representation">§</a>Array representation</h2>
<p>Sets with more than 128 variants are instead stored with an underlying array of <code>u64</code>s. This
is treated as if it was a single large integer. The <code>n</code>th least significant bit of this integer
is stored in the <code>n % 64</code>th least significant bit of the <code>n / 64</code>th element in the array.</p>
<h2 id="serialization"><a class="doc-anchor" href="#serialization">§</a>Serialization</h2>
<p>When the <code>serde</code> feature is enabled, <code>EnumSet</code>s can be serialized and deserialized using
the <code>serde</code> crate. The exact serialization format can be controlled with additional attributes
on the enum type. These attributes are valid regardless of whether the <code>serde</code> feature
is enabled.</p>
<p>By default, <code>EnumSet</code> is serialized by directly writing out a single integer containing the
numeric representation of the bitset. The integer type used is the smallest one that can fit
the largest variant in the enum. If no integer type is large enough, instead the <code>EnumSet</code> is
serialized as an array of <code>u64</code>s containing the array representation.</p>
<p>The <code>#[enumset(serialize_repr = "…")]</code> attribute can be used to override the representation
used. Valid values are as follows:</p>
<ul>
<li><code>u8</code>, <code>u16</code>, <code>u32</code>, <code>u64</code>, and <code>u128</code> serialize the type as the corresponding integer type.</li>
<li><code>array</code> serializes the set as an list of <code>u64</code>s corresponding to the array representation.</li>
<li><code>list</code> serializes the set as a list of enum variants. This requires your enum type implement
<a href="https://docs.rs/serde/latest/serde/trait.Serialize.html"><code>Serialize</code></a> and <a href="https://docs.rs/serde/latest/serde/trait.Deserialize.html"><code>Deserialize</code></a>.</li>
<li><code>map</code> serializes the set as a map of enum variants to booleans. The set contains a value if
the boolean is <code>true</code>. This requires your enum type implement <code>Serialize</code> and <code>Deserialize</code>.</li>
</ul>
<p>The representation used is determined statically at compile time, and there is currently no
support for reading different formats with the same deserializer.</p>
<p>By default, unknown bits are ignored and silently removed from the bitset. To override this
behavior, you can add a <code>#[enumset(serialize_deny_unknown)]</code> attribute. This will cause
deserialization to fail if an invalid bit is set.</p>
<h2 id="ffi-safety-and-repr"><a class="doc-anchor" href="#ffi-safety-and-repr">§</a>FFI, Safety and <code>repr</code></h2>
<p>If an enum type <code>T</code> is annotated with
<a href="derive.EnumSetType.html#options" title="derive enumset::EnumSetType"><code>#[enumset(repr = "…")]</code></a> where <code></code> is a primitive integer
type, then several things happen:</p>
<ul>
<li><code>T</code> will implement
<code><a href="trait.EnumSetTypeWithRepr.html" title="trait enumset::EnumSetTypeWithRepr">EnumSetTypeWithRepr</a>&lt;Repr = R&gt;</code> in
addition to <a href="trait.EnumSetType.html" title="trait enumset::EnumSetType"><code>EnumSetType</code></a>.</li>
<li>The <code>EnumSet</code> methods with <code>repr</code> in their name, such as <a href="struct.EnumSet.html#method.as_repr" title="method enumset::EnumSet::as_repr"><code>as_repr</code></a> and
<a href="struct.EnumSet.html#method.from_repr" title="associated function enumset::EnumSet::from_repr"><code>from_repr</code></a>, will be available for <code>EnumSet&lt;T&gt;</code>.</li>
<li>The in-memory representation of <code>EnumSet&lt;T&gt;</code> is guaranteed to be <code>R</code>.</li>
</ul>
<p>That last guarantee makes it sound to send <code>EnumSet&lt;T&gt;</code> across an FFI boundary. For example:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">extern </span><span class="string">"C" </span>{
<span class="comment">// This function is written in C like:
// uint32_t some_foreign_function(uint32_t set) { … }
</span><span class="kw">fn </span>some_foreign_function(set: EnumSet&lt;MyEnum&gt;) -&gt; EnumSet&lt;MyEnum&gt;;
}
<span class="attr">#[derive(Debug, EnumSetType)]
#[enumset(repr = <span class="string">"u32"</span>)]
</span><span class="kw">enum </span>MyEnum { A, B, C }
<span class="kw">let </span>set: EnumSet&lt;MyEnum&gt; = <span class="macro">enum_set!</span>(MyEnum::A | MyEnum::C);
<span class="kw">let </span>new_set: EnumSet&lt;MyEnum&gt; = <span class="kw">unsafe </span>{ some_foreign_function(set) };
<span class="macro">assert_eq!</span>(new_set, <span class="macro">enum_set!</span>(MyEnum::C));</code></pre></div>
<p>When an <code>EnumSet&lt;T&gt;</code> is received via FFI, all bits that dont correspond to an enum variant
of <code>T</code> must be set to <code>0</code>. Behavior is <strong>undefined</strong> if any of these bits are set to <code>1</code>.</p>
</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-EnumSet%3CT%3E" class="impl"><a class="src rightside" href="../src/enumset/set.rs.html#133-293">Source</a><a href="#impl-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.EnumSetType.html" title="trait enumset::EnumSetType">EnumSetType</a>&gt; <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedconstant.EMPTY" class="associatedconstant"><a class="src rightside" href="../src/enumset/set.rs.html#141">Source</a><h4 class="code-header">pub const <a href="#associatedconstant.EMPTY" class="constant">EMPTY</a>: Self = Self::EMPTY_REPR</h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated: Use <code>EnumSet::empty()</code> instead.</span></div></span></summary><div class="docblock"><p>An empty <code>EnumSet</code>.</p>
<p>This is deprecated because <a href="struct.EnumSet.html#method.empty" title="associated function enumset::EnumSet::empty"><code>EnumSet::empty</code></a> is now <code>const</code>.</p>
</div></details><details class="toggle" open><summary><section id="associatedconstant.ALL" class="associatedconstant"><a class="src rightside" href="../src/enumset/set.rs.html#147">Source</a><h4 class="code-header">pub const <a href="#associatedconstant.ALL" class="constant">ALL</a>: Self = Self::ALL_REPR</h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated: Use <code>EnumSet::all()</code> instead.</span></div></span></summary><div class="docblock"><p>An <code>EnumSet</code> containing all valid variants of the enum.</p>
<p>This is deprecated because <a href="struct.EnumSet.html#method.all" title="associated function enumset::EnumSet::all"><code>EnumSet::all</code></a> is now <code>const</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.new" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#151-153">Source</a><h4 class="code-header">pub const fn <a href="#method.new" class="fn">new</a>() -&gt; Self</h4></section></summary><div class="docblock"><p>Creates an empty <code>EnumSet</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.only" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#157-161">Source</a><h4 class="code-header">pub fn <a href="#method.only" class="fn">only</a>(t: T) -&gt; Self</h4></section></summary><div class="docblock"><p>Returns an <code>EnumSet</code> containing a single element.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.empty" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#167-169">Source</a><h4 class="code-header">pub const fn <a href="#method.empty" class="fn">empty</a>() -&gt; Self</h4></section></summary><div class="docblock"><p>Creates an empty <code>EnumSet</code>.</p>
<p>This is an alias for <a href="struct.EnumSet.html#method.new" title="associated function enumset::EnumSet::new"><code>EnumSet::new</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.all" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#173-175">Source</a><h4 class="code-header">pub const fn <a href="#method.all" class="fn">all</a>() -&gt; Self</h4></section></summary><div class="docblock"><p>Returns an <code>EnumSet</code> containing all valid variants of the enum.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.bit_width" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#183-185">Source</a><h4 class="code-header">pub const fn <a href="#method.bit_width" class="fn">bit_width</a>() -&gt; u32</h4></section></summary><div class="docblock"><p>Total number of bits used by this type. Note that the actual amount of space used is
rounded up to the next highest integer type (<code>u8</code>, <code>u16</code>, <code>u32</code>, <code>u64</code>, or <code>u128</code>).</p>
<p>This is the same as <a href="struct.EnumSet.html#method.variant_count" title="associated function enumset::EnumSet::variant_count"><code>EnumSet::variant_count</code></a> except in enums with “sparse” variants.
(e.g. <code>enum Foo { A = 10, B = 20 }</code>)</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.variant_count" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#192-194">Source</a><h4 class="code-header">pub const fn <a href="#method.variant_count" class="fn">variant_count</a>() -&gt; u32</h4></section></summary><div class="docblock"><p>The number of valid variants that this type can contain.</p>
<p>This is the same as <a href="struct.EnumSet.html#method.bit_width" title="associated function enumset::EnumSet::bit_width"><code>EnumSet::bit_width</code></a> except in enums with “sparse” variants.
(e.g. <code>enum Foo { A = 10, B = 20 }</code>)</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.len" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#198-200">Source</a><h4 class="code-header">pub fn <a href="#method.len" class="fn">len</a>(&amp;self) -&gt; usize</h4></section></summary><div class="docblock"><p>Returns the number of elements in this set.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_empty" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#203-205">Source</a><h4 class="code-header">pub fn <a href="#method.is_empty" class="fn">is_empty</a>(&amp;self) -&gt; bool</h4></section></summary><div class="docblock"><p>Returns <code>true</code> if the set contains no elements.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.clear" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#208-210">Source</a><h4 class="code-header">pub fn <a href="#method.clear" class="fn">clear</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Removes all elements from the set.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_disjoint" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#215-217">Source</a><h4 class="code-header">pub fn <a href="#method.is_disjoint" class="fn">is_disjoint</a>(&amp;self, other: Self) -&gt; bool</h4></section></summary><div class="docblock"><p>Returns <code>true</code> if <code>self</code> has no elements in common with <code>other</code>. This is equivalent to
checking for an empty intersection.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_superset" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#221-223">Source</a><h4 class="code-header">pub fn <a href="#method.is_superset" class="fn">is_superset</a>(&amp;self, other: Self) -&gt; bool</h4></section></summary><div class="docblock"><p>Returns <code>true</code> if the set is a superset of another, i.e., <code>self</code> contains at least all the
values in <code>other</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_subset" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#227-229">Source</a><h4 class="code-header">pub fn <a href="#method.is_subset" class="fn">is_subset</a>(&amp;self, other: Self) -&gt; bool</h4></section></summary><div class="docblock"><p>Returns <code>true</code> if the set is a subset of another, i.e., <code>other</code> contains at least all
the values in <code>self</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.union" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#233-235">Source</a><h4 class="code-header">pub fn <a href="#method.union" class="fn">union</a>(&amp;self, other: Self) -&gt; Self</h4></section></summary><div class="docblock"><p>Returns a set containing any elements present in either set.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.intersection" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#238-240">Source</a><h4 class="code-header">pub fn <a href="#method.intersection" class="fn">intersection</a>(&amp;self, other: Self) -&gt; Self</h4></section></summary><div class="docblock"><p>Returns a set containing every element present in both sets.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.difference" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#243-245">Source</a><h4 class="code-header">pub fn <a href="#method.difference" class="fn">difference</a>(&amp;self, other: Self) -&gt; Self</h4></section></summary><div class="docblock"><p>Returns a set containing element present in <code>self</code> but not in <code>other</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.symmetrical_difference" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#249-251">Source</a><h4 class="code-header">pub fn <a href="#method.symmetrical_difference" class="fn">symmetrical_difference</a>(&amp;self, other: Self) -&gt; Self</h4></section></summary><div class="docblock"><p>Returns a set containing every element present in either <code>self</code> or <code>other</code>, but is not
present in both.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.complement" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#254-256">Source</a><h4 class="code-header">pub fn <a href="#method.complement" class="fn">complement</a>(&amp;self) -&gt; Self</h4></section></summary><div class="docblock"><p>Returns a set containing all enum variants not in this set.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.contains" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#260-262">Source</a><h4 class="code-header">pub fn <a href="#method.contains" class="fn">contains</a>(&amp;self, value: T) -&gt; bool</h4></section></summary><div class="docblock"><p>Checks whether this set contains a value.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.insert" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#270-274">Source</a><h4 class="code-header">pub fn <a href="#method.insert" class="fn">insert</a>(&amp;mut self, value: T) -&gt; bool</h4></section></summary><div class="docblock"><p>Adds a value to this set.</p>
<p>If the set did not have this value present, <code>true</code> is returned.</p>
<p>If the set did have this value present, <code>false</code> is returned.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.remove" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#277-281">Source</a><h4 class="code-header">pub fn <a href="#method.remove" class="fn">remove</a>(&amp;mut self, value: T) -&gt; bool</h4></section></summary><div class="docblock"><p>Removes a value from this set. Returns whether the value was present in the set.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.insert_all" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#285-287">Source</a><h4 class="code-header">pub fn <a href="#method.insert_all" class="fn">insert_all</a>(&amp;mut self, other: Self)</h4></section></summary><div class="docblock"><p>Adds all elements in another set to this one.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.remove_all" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#290-292">Source</a><h4 class="code-header">pub fn <a href="#method.remove_all" class="fn">remove_all</a>(&amp;mut self, other: Self)</h4></section></summary><div class="docblock"><p>Removes all values in another set from this one.</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-EnumSet%3CT%3E-1" class="impl"><a class="src rightside" href="../src/enumset/set.rs.html#461-530">Source</a><a href="#impl-EnumSet%3CT%3E-1" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.EnumSetType.html" title="trait enumset::EnumSetType">EnumSetType</a> + <a class="trait" href="trait.EnumSetTypeWithRepr.html" title="trait enumset::EnumSetTypeWithRepr">EnumSetTypeWithRepr</a>&gt; <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_repr" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#470-472">Source</a><h4 class="code-header">pub fn <a href="#method.as_repr" class="fn">as_repr</a>(&amp;self) -&gt; &lt;T as <a class="trait" href="trait.EnumSetTypeWithRepr.html" title="trait enumset::EnumSetTypeWithRepr">EnumSetTypeWithRepr</a>&gt;::<a class="associatedtype" href="trait.EnumSetTypeWithRepr.html#associatedtype.Repr" title="type enumset::EnumSetTypeWithRepr::Repr">Repr</a></h4></section></summary><div class="docblock"><p>Returns a <code>T::Repr</code> representing the elements of this set.</p>
<p>Unlike the other <code>as_*</code> methods, this method is zero-cost and guaranteed not to fail,
panic or truncate any bits.</p>
<p>In order to use this method, the definition of <code>T</code> must have the <code>#[enumset(repr = "…")]</code>
annotation.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_repr_unchecked" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#487-489">Source</a><h4 class="code-header">pub unsafe fn <a href="#method.from_repr_unchecked" class="fn">from_repr_unchecked</a>(
bits: &lt;T as <a class="trait" href="trait.EnumSetTypeWithRepr.html" title="trait enumset::EnumSetTypeWithRepr">EnumSetTypeWithRepr</a>&gt;::<a class="associatedtype" href="trait.EnumSetTypeWithRepr.html#associatedtype.Repr" title="type enumset::EnumSetTypeWithRepr::Repr">Repr</a>,
) -&gt; Self</h4></section></summary><div class="docblock"><p>Constructs a bitset from a <code>T::Repr</code> without checking for invalid bits.</p>
<p>Unlike the other <code>from_*</code> methods, this method is zero-cost and guaranteed not to fail,
panic or truncate any bits, provided the conditions under “Safety” are upheld.</p>
<p>In order to use this method, the definition of <code>T</code> must have the <code>#[enumset(repr = "…")]</code>
annotation.</p>
<h5 id="safety"><a class="doc-anchor" href="#safety">§</a>Safety</h5>
<p>All bits in the provided parameter <code>bits</code> that dont correspond to an enum variant of
<code>T</code> must be set to <code>0</code>. Behavior is <strong>undefined</strong> if any of these bits are set to <code>1</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_repr" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#499-501">Source</a><h4 class="code-header">pub fn <a href="#method.from_repr" class="fn">from_repr</a>(bits: &lt;T as <a class="trait" href="trait.EnumSetTypeWithRepr.html" title="trait enumset::EnumSetTypeWithRepr">EnumSetTypeWithRepr</a>&gt;::<a class="associatedtype" href="trait.EnumSetTypeWithRepr.html#associatedtype.Repr" title="type enumset::EnumSetTypeWithRepr::Repr">Repr</a>) -&gt; Self</h4></section></summary><div class="docblock"><p>Constructs a bitset from a <code>T::Repr</code>.</p>
<p>If a bit that doesnt correspond to an enum variant is set, this
method will panic.</p>
<p>In order to use this method, the definition of <code>T</code> must have the <code>#[enumset(repr = "…")]</code>
annotation.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from_repr" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#511-518">Source</a><h4 class="code-header">pub fn <a href="#method.try_from_repr" class="fn">try_from_repr</a>(bits: &lt;T as <a class="trait" href="trait.EnumSetTypeWithRepr.html" title="trait enumset::EnumSetTypeWithRepr">EnumSetTypeWithRepr</a>&gt;::<a class="associatedtype" href="trait.EnumSetTypeWithRepr.html#associatedtype.Repr" title="type enumset::EnumSetTypeWithRepr::Repr">Repr</a>) -&gt; Option&lt;Self&gt;</h4></section></summary><div class="docblock"><p>Attempts to constructs a bitset from a <code>T::Repr</code>.</p>
<p>If a bit that doesnt correspond to an enum variant is set, this
method will return <code>None</code>.</p>
<p>In order to use this method, the definition of <code>T</code> must have the <code>#[enumset(repr = "…")]</code>
annotation.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_repr_truncated" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#525-529">Source</a><h4 class="code-header">pub fn <a href="#method.from_repr_truncated" class="fn">from_repr_truncated</a>(bits: &lt;T as <a class="trait" href="trait.EnumSetTypeWithRepr.html" title="trait enumset::EnumSetTypeWithRepr">EnumSetTypeWithRepr</a>&gt;::<a class="associatedtype" href="trait.EnumSetTypeWithRepr.html#associatedtype.Repr" title="type enumset::EnumSetTypeWithRepr::Repr">Repr</a>) -&gt; Self</h4></section></summary><div class="docblock"><p>Constructs a bitset from a <code>T::Repr</code>, ignoring invalid variants.</p>
<p>In order to use this method, the definition of <code>T</code> must have the <code>#[enumset(repr = "…")]</code>
annotation.</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-EnumSet%3CT%3E-2" class="impl"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><a href="#impl-EnumSet%3CT%3E-2" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.EnumSetType.html" title="trait enumset::EnumSetType">EnumSetType</a>&gt; <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_u8" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub fn <a href="#method.as_u8" class="fn">as_u8</a>(&amp;self) -&gt; u8</h4></section></summary><div class="docblock"><p>Returns a <code>u8</code> representing the elements of this set.</p>
<p>If the underlying bitset will not fit in a <code>u8</code>, this method will panic.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.try_as_u8" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub fn <a href="#method.try_as_u8" class="fn">try_as_u8</a>(&amp;self) -&gt; Option&lt;u8&gt;</h4></section></summary><div class="docblock"><p>Tries to return a <code>u8</code> representing the elements of this set.</p>
<p>If the underlying bitset will not fit in a <code>u8</code>, this method will panic.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.as_u8_truncated" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub fn <a href="#method.as_u8_truncated" class="fn">as_u8_truncated</a>(&amp;self) -&gt; u8</h4></section></summary><div class="docblock"><p>Returns a truncated <code>u8</code> representing the elements of this set.</p>
<p>If the underlying bitset will not fit in a <code>u8</code>, this method will truncate any bits that dont fit.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_u8" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub fn <a href="#method.from_u8" class="fn">from_u8</a>(bits: u8) -&gt; Self</h4></section></summary><div class="docblock"><p>Constructs a bitset from a <code>u8</code>.</p>
<p>If a bit that doesnt correspond to an enum variant is set, this method will panic.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from_u8" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub fn <a href="#method.try_from_u8" class="fn">try_from_u8</a>(bits: u8) -&gt; Option&lt;Self&gt;</h4></section></summary><div class="docblock"><p>Attempts to constructs a bitset from a <code>u8</code>.</p>
<p>If a bit that doesnt correspond to an enum variant is set, this method will return <code>None</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_u8_truncated" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub fn <a href="#method.from_u8_truncated" class="fn">from_u8_truncated</a>(bits: u8) -&gt; Self</h4></section></summary><div class="docblock"><p>Constructs a bitset from a <code>u8</code>, ignoring bits that do not correspond to a variant.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_u8_unchecked" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub unsafe fn <a href="#method.from_u8_unchecked" class="fn">from_u8_unchecked</a>(bits: u8) -&gt; Self</h4></section></summary><div class="docblock"><p>Constructs a bitset from a <code>u8</code>, without checking for invalid bits.</p>
<h5 id="safety-1"><a class="doc-anchor" href="#safety-1">§</a>Safety</h5>
<p>All bits in the provided parameter <code>bits</code> that dont correspond to an enum variant
of <code>T</code> must be set to <code>0</code>. Behavior is <strong>undefined</strong> if any of these bits are set
to <code>1</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.as_u16" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub fn <a href="#method.as_u16" class="fn">as_u16</a>(&amp;self) -&gt; u16</h4></section></summary><div class="docblock"><p>Returns a <code>u16</code> representing the elements of this set.</p>
<p>If the underlying bitset will not fit in a <code>u16</code>, this method will panic.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.try_as_u16" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub fn <a href="#method.try_as_u16" class="fn">try_as_u16</a>(&amp;self) -&gt; Option&lt;u16&gt;</h4></section></summary><div class="docblock"><p>Tries to return a <code>u16</code> representing the elements of this set.</p>
<p>If the underlying bitset will not fit in a <code>u16</code>, this method will panic.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.as_u16_truncated" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub fn <a href="#method.as_u16_truncated" class="fn">as_u16_truncated</a>(&amp;self) -&gt; u16</h4></section></summary><div class="docblock"><p>Returns a truncated <code>u16</code> representing the elements of this set.</p>
<p>If the underlying bitset will not fit in a <code>u16</code>, this method will truncate any bits that dont fit.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_u16" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub fn <a href="#method.from_u16" class="fn">from_u16</a>(bits: u16) -&gt; Self</h4></section></summary><div class="docblock"><p>Constructs a bitset from a <code>u16</code>.</p>
<p>If a bit that doesnt correspond to an enum variant is set, this method will panic.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from_u16" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub fn <a href="#method.try_from_u16" class="fn">try_from_u16</a>(bits: u16) -&gt; Option&lt;Self&gt;</h4></section></summary><div class="docblock"><p>Attempts to constructs a bitset from a <code>u16</code>.</p>
<p>If a bit that doesnt correspond to an enum variant is set, this method will return <code>None</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_u16_truncated" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub fn <a href="#method.from_u16_truncated" class="fn">from_u16_truncated</a>(bits: u16) -&gt; Self</h4></section></summary><div class="docblock"><p>Constructs a bitset from a <code>u16</code>, ignoring bits that do not correspond to a variant.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_u16_unchecked" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub unsafe fn <a href="#method.from_u16_unchecked" class="fn">from_u16_unchecked</a>(bits: u16) -&gt; Self</h4></section></summary><div class="docblock"><p>Constructs a bitset from a <code>u16</code>, without checking for invalid bits.</p>
<h5 id="safety-2"><a class="doc-anchor" href="#safety-2">§</a>Safety</h5>
<p>All bits in the provided parameter <code>bits</code> that dont correspond to an enum variant
of <code>T</code> must be set to <code>0</code>. Behavior is <strong>undefined</strong> if any of these bits are set
to <code>1</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.as_u32" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub fn <a href="#method.as_u32" class="fn">as_u32</a>(&amp;self) -&gt; u32</h4></section></summary><div class="docblock"><p>Returns a <code>u32</code> representing the elements of this set.</p>
<p>If the underlying bitset will not fit in a <code>u32</code>, this method will panic.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.try_as_u32" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub fn <a href="#method.try_as_u32" class="fn">try_as_u32</a>(&amp;self) -&gt; Option&lt;u32&gt;</h4></section></summary><div class="docblock"><p>Tries to return a <code>u32</code> representing the elements of this set.</p>
<p>If the underlying bitset will not fit in a <code>u32</code>, this method will panic.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.as_u32_truncated" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub fn <a href="#method.as_u32_truncated" class="fn">as_u32_truncated</a>(&amp;self) -&gt; u32</h4></section></summary><div class="docblock"><p>Returns a truncated <code>u32</code> representing the elements of this set.</p>
<p>If the underlying bitset will not fit in a <code>u32</code>, this method will truncate any bits that dont fit.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_u32" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub fn <a href="#method.from_u32" class="fn">from_u32</a>(bits: u32) -&gt; Self</h4></section></summary><div class="docblock"><p>Constructs a bitset from a <code>u32</code>.</p>
<p>If a bit that doesnt correspond to an enum variant is set, this method will panic.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from_u32" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub fn <a href="#method.try_from_u32" class="fn">try_from_u32</a>(bits: u32) -&gt; Option&lt;Self&gt;</h4></section></summary><div class="docblock"><p>Attempts to constructs a bitset from a <code>u32</code>.</p>
<p>If a bit that doesnt correspond to an enum variant is set, this method will return <code>None</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_u32_truncated" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub fn <a href="#method.from_u32_truncated" class="fn">from_u32_truncated</a>(bits: u32) -&gt; Self</h4></section></summary><div class="docblock"><p>Constructs a bitset from a <code>u32</code>, ignoring bits that do not correspond to a variant.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_u32_unchecked" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub unsafe fn <a href="#method.from_u32_unchecked" class="fn">from_u32_unchecked</a>(bits: u32) -&gt; Self</h4></section></summary><div class="docblock"><p>Constructs a bitset from a <code>u32</code>, without checking for invalid bits.</p>
<h5 id="safety-3"><a class="doc-anchor" href="#safety-3">§</a>Safety</h5>
<p>All bits in the provided parameter <code>bits</code> that dont correspond to an enum variant
of <code>T</code> must be set to <code>0</code>. Behavior is <strong>undefined</strong> if any of these bits are set
to <code>1</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.as_u64" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub fn <a href="#method.as_u64" class="fn">as_u64</a>(&amp;self) -&gt; u64</h4></section></summary><div class="docblock"><p>Returns a <code>u64</code> representing the elements of this set.</p>
<p>If the underlying bitset will not fit in a <code>u64</code>, this method will panic.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.try_as_u64" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub fn <a href="#method.try_as_u64" class="fn">try_as_u64</a>(&amp;self) -&gt; Option&lt;u64&gt;</h4></section></summary><div class="docblock"><p>Tries to return a <code>u64</code> representing the elements of this set.</p>
<p>If the underlying bitset will not fit in a <code>u64</code>, this method will panic.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.as_u64_truncated" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub fn <a href="#method.as_u64_truncated" class="fn">as_u64_truncated</a>(&amp;self) -&gt; u64</h4></section></summary><div class="docblock"><p>Returns a truncated <code>u64</code> representing the elements of this set.</p>
<p>If the underlying bitset will not fit in a <code>u64</code>, this method will truncate any bits that dont fit.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_u64" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub fn <a href="#method.from_u64" class="fn">from_u64</a>(bits: u64) -&gt; Self</h4></section></summary><div class="docblock"><p>Constructs a bitset from a <code>u64</code>.</p>
<p>If a bit that doesnt correspond to an enum variant is set, this method will panic.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from_u64" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub fn <a href="#method.try_from_u64" class="fn">try_from_u64</a>(bits: u64) -&gt; Option&lt;Self&gt;</h4></section></summary><div class="docblock"><p>Attempts to constructs a bitset from a <code>u64</code>.</p>
<p>If a bit that doesnt correspond to an enum variant is set, this method will return <code>None</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_u64_truncated" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub fn <a href="#method.from_u64_truncated" class="fn">from_u64_truncated</a>(bits: u64) -&gt; Self</h4></section></summary><div class="docblock"><p>Constructs a bitset from a <code>u64</code>, ignoring bits that do not correspond to a variant.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_u64_unchecked" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub unsafe fn <a href="#method.from_u64_unchecked" class="fn">from_u64_unchecked</a>(bits: u64) -&gt; Self</h4></section></summary><div class="docblock"><p>Constructs a bitset from a <code>u64</code>, without checking for invalid bits.</p>
<h5 id="safety-4"><a class="doc-anchor" href="#safety-4">§</a>Safety</h5>
<p>All bits in the provided parameter <code>bits</code> that dont correspond to an enum variant
of <code>T</code> must be set to <code>0</code>. Behavior is <strong>undefined</strong> if any of these bits are set
to <code>1</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.as_u128" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub fn <a href="#method.as_u128" class="fn">as_u128</a>(&amp;self) -&gt; u128</h4></section></summary><div class="docblock"><p>Returns a <code>u128</code> representing the elements of this set.</p>
<p>If the underlying bitset will not fit in a <code>u128</code>, this method will panic.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.try_as_u128" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub fn <a href="#method.try_as_u128" class="fn">try_as_u128</a>(&amp;self) -&gt; Option&lt;u128&gt;</h4></section></summary><div class="docblock"><p>Tries to return a <code>u128</code> representing the elements of this set.</p>
<p>If the underlying bitset will not fit in a <code>u128</code>, this method will panic.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.as_u128_truncated" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub fn <a href="#method.as_u128_truncated" class="fn">as_u128_truncated</a>(&amp;self) -&gt; u128</h4></section></summary><div class="docblock"><p>Returns a truncated <code>u128</code> representing the elements of this set.</p>
<p>If the underlying bitset will not fit in a <code>u128</code>, this method will truncate any bits that dont fit.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_u128" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub fn <a href="#method.from_u128" class="fn">from_u128</a>(bits: u128) -&gt; Self</h4></section></summary><div class="docblock"><p>Constructs a bitset from a <code>u128</code>.</p>
<p>If a bit that doesnt correspond to an enum variant is set, this method will panic.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from_u128" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub fn <a href="#method.try_from_u128" class="fn">try_from_u128</a>(bits: u128) -&gt; Option&lt;Self&gt;</h4></section></summary><div class="docblock"><p>Attempts to constructs a bitset from a <code>u128</code>.</p>
<p>If a bit that doesnt correspond to an enum variant is set, this method will return <code>None</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_u128_truncated" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub fn <a href="#method.from_u128_truncated" class="fn">from_u128_truncated</a>(bits: u128) -&gt; Self</h4></section></summary><div class="docblock"><p>Constructs a bitset from a <code>u128</code>, ignoring bits that do not correspond to a variant.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_u128_unchecked" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub unsafe fn <a href="#method.from_u128_unchecked" class="fn">from_u128_unchecked</a>(bits: u128) -&gt; Self</h4></section></summary><div class="docblock"><p>Constructs a bitset from a <code>u128</code>, without checking for invalid bits.</p>
<h5 id="safety-5"><a class="doc-anchor" href="#safety-5">§</a>Safety</h5>
<p>All bits in the provided parameter <code>bits</code> that dont correspond to an enum variant
of <code>T</code> must be set to <code>0</code>. Behavior is <strong>undefined</strong> if any of these bits are set
to <code>1</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.as_usize" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub fn <a href="#method.as_usize" class="fn">as_usize</a>(&amp;self) -&gt; usize</h4></section></summary><div class="docblock"><p>Returns a <code>usize</code> representing the elements of this set.</p>
<p>If the underlying bitset will not fit in a <code>usize</code>, this method will panic.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.try_as_usize" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub fn <a href="#method.try_as_usize" class="fn">try_as_usize</a>(&amp;self) -&gt; Option&lt;usize&gt;</h4></section></summary><div class="docblock"><p>Tries to return a <code>usize</code> representing the elements of this set.</p>
<p>If the underlying bitset will not fit in a <code>usize</code>, this method will panic.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.as_usize_truncated" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub fn <a href="#method.as_usize_truncated" class="fn">as_usize_truncated</a>(&amp;self) -&gt; usize</h4></section></summary><div class="docblock"><p>Returns a truncated <code>usize</code> representing the elements of this set.</p>
<p>If the underlying bitset will not fit in a <code>usize</code>, this method will truncate any bits that dont fit.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_usize" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub fn <a href="#method.from_usize" class="fn">from_usize</a>(bits: usize) -&gt; Self</h4></section></summary><div class="docblock"><p>Constructs a bitset from a <code>usize</code>.</p>
<p>If a bit that doesnt correspond to an enum variant is set, this method will panic.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from_usize" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub fn <a href="#method.try_from_usize" class="fn">try_from_usize</a>(bits: usize) -&gt; Option&lt;Self&gt;</h4></section></summary><div class="docblock"><p>Attempts to constructs a bitset from a <code>usize</code>.</p>
<p>If a bit that doesnt correspond to an enum variant is set, this method will return <code>None</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_usize_truncated" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub fn <a href="#method.from_usize_truncated" class="fn">from_usize_truncated</a>(bits: usize) -&gt; Self</h4></section></summary><div class="docblock"><p>Constructs a bitset from a <code>usize</code>, ignoring bits that do not correspond to a variant.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_usize_unchecked" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#626-651">Source</a><h4 class="code-header">pub unsafe fn <a href="#method.from_usize_unchecked" class="fn">from_usize_unchecked</a>(bits: usize) -&gt; Self</h4></section></summary><div class="docblock"><p>Constructs a bitset from a <code>usize</code>, without checking for invalid bits.</p>
<h5 id="safety-6"><a class="doc-anchor" href="#safety-6">§</a>Safety</h5>
<p>All bits in the provided parameter <code>bits</code> that dont correspond to an enum variant
of <code>T</code> must be set to <code>0</code>. Behavior is <strong>undefined</strong> if any of these bits are set
to <code>1</code>.</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-EnumSet%3CT%3E-3" class="impl"><a class="src rightside" href="../src/enumset/set.rs.html#653-791">Source</a><a href="#impl-EnumSet%3CT%3E-3" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.EnumSetType.html" title="trait enumset::EnumSetType">EnumSetType</a>&gt; <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_array" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#657-660">Source</a><h4 class="code-header">pub fn <a href="#method.as_array" class="fn">as_array</a>&lt;const O: usize&gt;(&amp;self) -&gt; [u64; O]</h4></section></summary><div class="docblock"><p>Returns an <code>[u64; O]</code> representing the elements of this set.</p>
<p>If the underlying bitset will not fit in a <code>[u64; O]</code>, this method will panic.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.try_as_array" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#666-668">Source</a><h4 class="code-header">pub fn <a href="#method.try_as_array" class="fn">try_as_array</a>&lt;const O: usize&gt;(&amp;self) -&gt; Option&lt;[u64; O]&gt;</h4></section></summary><div class="docblock"><p>Returns an <code>[u64; O]</code> representing the elements of this set.</p>
<p>If the underlying bitset will not fit in a <code>[u64; O]</code>, this method will instead return
<code>None</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.as_array_truncated" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#674-676">Source</a><h4 class="code-header">pub fn <a href="#method.as_array_truncated" class="fn">as_array_truncated</a>&lt;const O: usize&gt;(&amp;self) -&gt; [u64; O]</h4></section></summary><div class="docblock"><p>Returns an <code>[u64; O]</code> representing the elements of this set.</p>
<p>If the underlying bitset will not fit in a <code>[u64; O]</code>, this method will truncate any bits
that dont fit.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_array" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#681-683">Source</a><h4 class="code-header">pub fn <a href="#method.from_array" class="fn">from_array</a>&lt;const O: usize&gt;(v: [u64; O]) -&gt; Self</h4></section></summary><div class="docblock"><p>Attempts to constructs a bitset from a <code>[u64; O]</code>.</p>
<p>If a bit that doesnt correspond to an enum variant is set, this method will panic.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from_array" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#688-698">Source</a><h4 class="code-header">pub fn <a href="#method.try_from_array" class="fn">try_from_array</a>&lt;const O: usize&gt;(bits: [u64; O]) -&gt; Option&lt;Self&gt;</h4></section></summary><div class="docblock"><p>Attempts to constructs a bitset from a <code>[u64; O]</code>.</p>
<p>If a bit that doesnt correspond to an enum variant is set, this method will return <code>None</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_array_truncated" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#701-704">Source</a><h4 class="code-header">pub fn <a href="#method.from_array_truncated" class="fn">from_array_truncated</a>&lt;const O: usize&gt;(bits: [u64; O]) -&gt; Self</h4></section></summary><div class="docblock"><p>Constructs a bitset from a <code>[u64; O]</code>, ignoring bits that do not correspond to a variant.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_array_unchecked" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#714-716">Source</a><h4 class="code-header">pub unsafe fn <a href="#method.from_array_unchecked" class="fn">from_array_unchecked</a>&lt;const O: usize&gt;(bits: [u64; O]) -&gt; Self</h4></section></summary><div class="docblock"><p>Constructs a bitset from a <code>[u64; O]</code>, without checking for invalid bits.</p>
<h5 id="safety-7"><a class="doc-anchor" href="#safety-7">§</a>Safety</h5>
<p>All bits in the provided parameter <code>bits</code> that dont correspond to an enum variant
of <code>T</code> must be set to <code>0</code>. Behavior is <strong>undefined</strong> if any of these bits are set
to <code>1</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.copy_into_slice" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#730-733">Source</a><h4 class="code-header">pub fn <a href="#method.copy_into_slice" class="fn">copy_into_slice</a>(&amp;self, data: &amp;mut [u64])</h4></section></summary><div class="docblock"><p>Copies the elements of this set into a <code>&amp;mut [u64]</code>.</p>
<p>If the underlying bitset will not fit in the provided slice, this method will panic.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.try_copy_into_slice" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#740-742">Source</a><h4 class="code-header">pub fn <a href="#method.try_copy_into_slice" class="fn">try_copy_into_slice</a>(&amp;self, data: &amp;mut [u64]) -&gt; Option&lt;()&gt;</h4></section></summary><div class="docblock"><p>Copies the elements of this set into a <code>&amp;mut [u64]</code>.</p>
<p>If the underlying bitset will not fit in the provided slice, this method will return
<code>None</code>. Otherwise, it will return <code>Some(())</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.copy_into_slice_truncated" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#748-750">Source</a><h4 class="code-header">pub fn <a href="#method.copy_into_slice_truncated" class="fn">copy_into_slice_truncated</a>(&amp;self, data: &amp;mut [u64])</h4></section></summary><div class="docblock"><p>Copies the elements of this set into a <code>&amp;mut [u64]</code>.</p>
<p>If the underlying bitset will not fit in the provided slice, this method will truncate any
bits that dont fit.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_slice" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#755-757">Source</a><h4 class="code-header">pub fn <a href="#method.from_slice" class="fn">from_slice</a>(v: &amp;[u64]) -&gt; Self</h4></section></summary><div class="docblock"><p>Attempts to constructs a bitset from a <code>&amp;[u64]</code>.</p>
<p>If a bit that doesnt correspond to an enum variant is set, this method will panic.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from_slice" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#762-772">Source</a><h4 class="code-header">pub fn <a href="#method.try_from_slice" class="fn">try_from_slice</a>(bits: &amp;[u64]) -&gt; Option&lt;Self&gt;</h4></section></summary><div class="docblock"><p>Attempts to constructs a bitset from a <code>&amp;[u64]</code>.</p>
<p>If a bit that doesnt correspond to an enum variant is set, this method will return <code>None</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_slice_truncated" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#775-778">Source</a><h4 class="code-header">pub fn <a href="#method.from_slice_truncated" class="fn">from_slice_truncated</a>(bits: &amp;[u64]) -&gt; Self</h4></section></summary><div class="docblock"><p>Constructs a bitset from a <code>&amp;[u64]</code>, ignoring bits that do not correspond to a variant.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_slice_unchecked" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#788-790">Source</a><h4 class="code-header">pub unsafe fn <a href="#method.from_slice_unchecked" class="fn">from_slice_unchecked</a>(bits: &amp;[u64]) -&gt; Self</h4></section></summary><div class="docblock"><p>Constructs a bitset from a <code>&amp;[u64]</code>, without checking for invalid bits.</p>
<h5 id="safety-8"><a class="doc-anchor" href="#safety-8">§</a>Safety</h5>
<p>All bits in the provided parameter <code>bits</code> that dont correspond to an enum variant
of <code>T</code> must be set to <code>0</code>. Behavior is <strong>undefined</strong> if any of these bits are set
to <code>1</code>.</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-EnumSet%3CT%3E-4" class="impl"><a class="src rightside" href="../src/enumset/set.rs.html#806-815">Source</a><a href="#impl-EnumSet%3CT%3E-4" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.EnumSetType.html" title="trait enumset::EnumSetType">EnumSetType</a>&gt; <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.iter" class="method"><a class="src rightside" href="../src/enumset/set.rs.html#812-814">Source</a><h4 class="code-header">pub fn <a href="#method.iter" class="fn">iter</a>(&amp;self) -&gt; <a class="struct" href="struct.EnumSetIter.html" title="struct enumset::EnumSetIter">EnumSetIter</a>&lt;T&gt; <a href="#" class="tooltip" data-notable-ty="EnumSetIter&lt;T&gt;"></a></h4></section></summary><div class="docblock"><p>Iterates the contents of the set in order from the least significant bit to the most
significant bit.</p>
<p>Note that iterator invalidation is impossible as the iterator contains a copy of this type,
rather than holding a reference to it.</p>
</div></details></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-BitAnd%3CO%3E-for-EnumSet%3CT%3E" class="impl"><a class="src rightside" href="../src/enumset/set.rs.html#330-336">Source</a><a href="#impl-BitAnd%3CO%3E-for-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.EnumSetType.html" title="trait enumset::EnumSetType">EnumSetType</a>, O: Into&lt;<a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;&gt;&gt; BitAnd&lt;O&gt; for <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output-1" class="associatedtype trait-impl"><a class="src rightside" href="../src/enumset/set.rs.html#331">Source</a><a href="#associatedtype.Output-1" class="anchor">§</a><h4 class="code-header">type <a class="associatedtype">Output</a> = <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h4></section></summary><div class='docblock'>The resulting type after applying the <code>&amp;</code> operator.</div></details><details class="toggle method-toggle" open><summary><section id="method.bitand" class="method trait-impl"><a class="src rightside" href="../src/enumset/set.rs.html#333-335">Source</a><a href="#method.bitand" class="anchor">§</a><h4 class="code-header">fn <a class="fn">bitand</a>(self, other: O) -&gt; Self::Output</h4></section></summary><div class='docblock'>Performs the <code>&amp;</code> operation. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitAndAssign%3CO%3E-for-EnumSet%3CT%3E" class="impl"><a class="src rightside" href="../src/enumset/set.rs.html#358-363">Source</a><a href="#impl-BitAndAssign%3CO%3E-for-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.EnumSetType.html" title="trait enumset::EnumSetType">EnumSetType</a>, O: Into&lt;<a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;&gt;&gt; BitAndAssign&lt;O&gt; for <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.bitand_assign" class="method trait-impl"><a class="src rightside" href="../src/enumset/set.rs.html#360-362">Source</a><a href="#method.bitand_assign" class="anchor">§</a><h4 class="code-header">fn <a class="fn">bitand_assign</a>(&amp;mut self, rhs: O)</h4></section></summary><div class='docblock'>Performs the <code>&amp;=</code> operation. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitOr%3CO%3E-for-EnumSet%3CT%3E" class="impl"><a class="src rightside" href="../src/enumset/set.rs.html#337-343">Source</a><a href="#impl-BitOr%3CO%3E-for-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.EnumSetType.html" title="trait enumset::EnumSetType">EnumSetType</a>, O: Into&lt;<a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;&gt;&gt; BitOr&lt;O&gt; for <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output-2" class="associatedtype trait-impl"><a class="src rightside" href="../src/enumset/set.rs.html#338">Source</a><a href="#associatedtype.Output-2" class="anchor">§</a><h4 class="code-header">type <a class="associatedtype">Output</a> = <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h4></section></summary><div class='docblock'>The resulting type after applying the <code>|</code> operator.</div></details><details class="toggle method-toggle" open><summary><section id="method.bitor" class="method trait-impl"><a class="src rightside" href="../src/enumset/set.rs.html#340-342">Source</a><a href="#method.bitor" class="anchor">§</a><h4 class="code-header">fn <a class="fn">bitor</a>(self, other: O) -&gt; Self::Output</h4></section></summary><div class='docblock'>Performs the <code>|</code> operation. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitOrAssign%3CO%3E-for-EnumSet%3CT%3E" class="impl"><a class="src rightside" href="../src/enumset/set.rs.html#364-369">Source</a><a href="#impl-BitOrAssign%3CO%3E-for-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.EnumSetType.html" title="trait enumset::EnumSetType">EnumSetType</a>, O: Into&lt;<a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;&gt;&gt; BitOrAssign&lt;O&gt; for <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.bitor_assign" class="method trait-impl"><a class="src rightside" href="../src/enumset/set.rs.html#366-368">Source</a><a href="#method.bitor_assign" class="anchor">§</a><h4 class="code-header">fn <a class="fn">bitor_assign</a>(&amp;mut self, rhs: O)</h4></section></summary><div class='docblock'>Performs the <code>|=</code> operation. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitXor%3CO%3E-for-EnumSet%3CT%3E" class="impl"><a class="src rightside" href="../src/enumset/set.rs.html#344-350">Source</a><a href="#impl-BitXor%3CO%3E-for-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.EnumSetType.html" title="trait enumset::EnumSetType">EnumSetType</a>, O: Into&lt;<a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;&gt;&gt; BitXor&lt;O&gt; for <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output-3" class="associatedtype trait-impl"><a class="src rightside" href="../src/enumset/set.rs.html#345">Source</a><a href="#associatedtype.Output-3" class="anchor">§</a><h4 class="code-header">type <a class="associatedtype">Output</a> = <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h4></section></summary><div class='docblock'>The resulting type after applying the <code>^</code> operator.</div></details><details class="toggle method-toggle" open><summary><section id="method.bitxor" class="method trait-impl"><a class="src rightside" href="../src/enumset/set.rs.html#347-349">Source</a><a href="#method.bitxor" class="anchor">§</a><h4 class="code-header">fn <a class="fn">bitxor</a>(self, other: O) -&gt; Self::Output</h4></section></summary><div class='docblock'>Performs the <code>^</code> operation. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitXorAssign%3CO%3E-for-EnumSet%3CT%3E" class="impl"><a class="src rightside" href="../src/enumset/set.rs.html#370-375">Source</a><a href="#impl-BitXorAssign%3CO%3E-for-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.EnumSetType.html" title="trait enumset::EnumSetType">EnumSetType</a>, O: Into&lt;<a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;&gt;&gt; BitXorAssign&lt;O&gt; for <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.bitxor_assign" class="method trait-impl"><a class="src rightside" href="../src/enumset/set.rs.html#372-374">Source</a><a href="#method.bitxor_assign" class="anchor">§</a><h4 class="code-header">fn <a class="fn">bitxor_assign</a>(&amp;mut self, rhs: O)</h4></section></summary><div class='docblock'>Performs the <code>^=</code> operation. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-EnumSet%3CT%3E" class="impl"><a class="src rightside" href="../src/enumset/set.rs.html#123">Source</a><a href="#impl-Clone-for-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: Clone + <a class="trait" href="trait.EnumSetType.html" title="trait enumset::EnumSetType">EnumSetType</a>&gt; Clone for <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;<div class="where">where
T::Repr: Clone,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../src/enumset/set.rs.html#123">Source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a class="fn">clone</a>(&amp;self) -&gt; <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h4></section></summary><div class='docblock'>Returns a copy of the value. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="since rightside" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a class="fn">clone_from</a>(&amp;mut self, source: &amp;Self)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-EnumSet%3CT%3E" class="impl"><a class="src rightside" href="../src/enumset/set.rs.html#397-412">Source</a><a href="#impl-Debug-for-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.EnumSetType.html" title="trait enumset::EnumSetType">EnumSetType</a> + Debug&gt; Debug for <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../src/enumset/set.rs.html#398-411">Source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a class="fn">fmt</a>(&amp;self, f: &amp;mut Formatter&lt;'_&gt;) -&gt; Result</h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-EnumSet%3CT%3E" class="impl"><a class="src rightside" href="../src/enumset/set.rs.html#316-321">Source</a><a href="#impl-Default-for-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.EnumSetType.html" title="trait enumset::EnumSetType">EnumSetType</a>&gt; Default for <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../src/enumset/set.rs.html#318-320">Source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a class="fn">default</a>() -&gt; Self</h4></section></summary><div class="docblock"><p>Returns an empty set.</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Display-for-EnumSet%3CT%3E" class="impl"><a class="src rightside" href="../src/enumset/set.rs.html#413-425">Source</a><a href="#impl-Display-for-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.EnumSetType.html" title="trait enumset::EnumSetType">EnumSetType</a> + Display&gt; Display for <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt-1" class="method trait-impl"><a class="src rightside" href="../src/enumset/set.rs.html#414-424">Source</a><a href="#method.fmt-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">fmt</a>(&amp;self, f: &amp;mut Formatter&lt;'_&gt;) -&gt; Result</h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Extend%3CEnumSet%3CT%3E%3E-for-EnumSet%3CT%3E" class="impl"><a class="src rightside" href="../src/enumset/set.rs.html#854-860">Source</a><a href="#impl-Extend%3CEnumSet%3CT%3E%3E-for-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.EnumSetType.html" title="trait enumset::EnumSetType">EnumSetType</a>&gt; Extend&lt;<a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;&gt; for <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.extend-1" class="method trait-impl"><a class="src rightside" href="../src/enumset/set.rs.html#855-859">Source</a><a href="#method.extend-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">extend</a>&lt;I: IntoIterator&lt;Item = <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;&gt;&gt;(&amp;mut self, iter: I)</h4></section></summary><div class='docblock'>Extends a collection with the contents of an iterator. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.extend_one-1" class="method trait-impl"><a href="#method.extend_one-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">extend_one</a>(&amp;mut self, item: A)</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>extend_one</code>)</span></div></span><div class='docblock'>Extends a collection with exactly one element.</div></details><details class="toggle method-toggle" open><summary><section id="method.extend_reserve-1" class="method trait-impl"><a href="#method.extend_reserve-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">extend_reserve</a>(&amp;mut self, additional: usize)</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>extend_one</code>)</span></div></span><div class='docblock'>Reserves capacity in a collection for the given number of additional elements. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Extend%3CT%3E-for-EnumSet%3CT%3E" class="impl"><a class="src rightside" href="../src/enumset/set.rs.html#838-844">Source</a><a href="#impl-Extend%3CT%3E-for-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.EnumSetType.html" title="trait enumset::EnumSetType">EnumSetType</a>&gt; Extend&lt;T&gt; for <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.extend" class="method trait-impl"><a class="src rightside" href="../src/enumset/set.rs.html#839-843">Source</a><a href="#method.extend" class="anchor">§</a><h4 class="code-header">fn <a class="fn">extend</a>&lt;I: IntoIterator&lt;Item = T&gt;&gt;(&amp;mut self, iter: I)</h4></section></summary><div class='docblock'>Extends a collection with the contents of an iterator. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.extend_one" class="method trait-impl"><a href="#method.extend_one" class="anchor">§</a><h4 class="code-header">fn <a class="fn">extend_one</a>(&amp;mut self, item: A)</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>extend_one</code>)</span></div></span><div class='docblock'>Extends a collection with exactly one element.</div></details><details class="toggle method-toggle" open><summary><section id="method.extend_reserve" class="method trait-impl"><a href="#method.extend_reserve" class="anchor">§</a><h4 class="code-header">fn <a class="fn">extend_reserve</a>(&amp;mut self, additional: usize)</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>extend_one</code>)</span></div></span><div class='docblock'>Reserves capacity in a collection for the given number of additional elements. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CT%3E-for-EnumSet%3CT%3E" class="impl"><a class="src rightside" href="../src/enumset/set.rs.html#385-389">Source</a><a href="#impl-From%3CT%3E-for-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.EnumSetType.html" title="trait enumset::EnumSetType">EnumSetType</a>&gt; From&lt;T&gt; for <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../src/enumset/set.rs.html#386-388">Source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a class="fn">from</a>(t: T) -&gt; Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-FromIterator%3CEnumSet%3CT%3E%3E-for-EnumSet%3CT%3E" class="impl"><a class="src rightside" href="../src/enumset/set.rs.html#862-868">Source</a><a href="#impl-FromIterator%3CEnumSet%3CT%3E%3E-for-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.EnumSetType.html" title="trait enumset::EnumSetType">EnumSetType</a>&gt; FromIterator&lt;<a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;&gt; for <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_iter-1" class="method trait-impl"><a class="src rightside" href="../src/enumset/set.rs.html#863-867">Source</a><a href="#method.from_iter-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">from_iter</a>&lt;I: IntoIterator&lt;Item = <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;&gt;&gt;(iter: I) -&gt; Self</h4></section></summary><div class='docblock'>Creates a value from an iterator. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-FromIterator%3CT%3E-for-EnumSet%3CT%3E" class="impl"><a class="src rightside" href="../src/enumset/set.rs.html#846-852">Source</a><a href="#impl-FromIterator%3CT%3E-for-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.EnumSetType.html" title="trait enumset::EnumSetType">EnumSetType</a>&gt; FromIterator&lt;T&gt; for <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_iter" class="method trait-impl"><a class="src rightside" href="../src/enumset/set.rs.html#847-851">Source</a><a href="#method.from_iter" class="anchor">§</a><h4 class="code-header">fn <a class="fn">from_iter</a>&lt;I: IntoIterator&lt;Item = T&gt;&gt;(iter: I) -&gt; Self</h4></section></summary><div class='docblock'>Creates a value from an iterator. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Hash-for-EnumSet%3CT%3E" class="impl"><a class="src rightside" href="../src/enumset/set.rs.html#428-432">Source</a><a href="#impl-Hash-for-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.EnumSetType.html" title="trait enumset::EnumSetType">EnumSetType</a>&gt; Hash for <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.hash" class="method trait-impl"><a class="src rightside" href="../src/enumset/set.rs.html#429-431">Source</a><a href="#method.hash" class="anchor">§</a><h4 class="code-header">fn <a class="fn">hash</a>&lt;H: Hasher&gt;(&amp;self, state: &amp;mut H)</h4></section></summary><div class='docblock'>Feeds this value into the given [<code>Hasher</code>]. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.hash_slice" class="method trait-impl"><span class="since rightside" title="Stable since Rust version 1.3.0">1.3.0</span><a href="#method.hash_slice" class="anchor">§</a><h4 class="code-header">fn <a class="fn">hash_slice</a>&lt;H&gt;(data: &amp;[Self], state: &amp;mut H)<div class="where">where
H: Hasher,
Self: Sized,</div></h4></section></summary><div class='docblock'>Feeds a slice of this type into the given [<code>Hasher</code>]. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoIterator-for-EnumSet%3CT%3E" class="impl"><a class="src rightside" href="../src/enumset/set.rs.html#870-877">Source</a><a href="#impl-IntoIterator-for-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.EnumSetType.html" title="trait enumset::EnumSetType">EnumSetType</a>&gt; IntoIterator for <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Item" class="associatedtype trait-impl"><a class="src rightside" href="../src/enumset/set.rs.html#871">Source</a><a href="#associatedtype.Item" class="anchor">§</a><h4 class="code-header">type <a class="associatedtype">Item</a> = T</h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="toggle" open><summary><section id="associatedtype.IntoIter" class="associatedtype trait-impl"><a class="src rightside" href="../src/enumset/set.rs.html#872">Source</a><a href="#associatedtype.IntoIter" class="anchor">§</a><h4 class="code-header">type <a class="associatedtype">IntoIter</a> = <a class="struct" href="struct.EnumSetIter.html" title="struct enumset::EnumSetIter">EnumSetIter</a>&lt;T&gt;</h4></section></summary><div class='docblock'>Which kind of iterator are we turning this into?</div></details><details class="toggle method-toggle" open><summary><section id="method.into_iter" class="method trait-impl"><a class="src rightside" href="../src/enumset/set.rs.html#874-876">Source</a><a href="#method.into_iter" class="anchor">§</a><h4 class="code-header">fn <a class="fn">into_iter</a>(self) -&gt; Self::IntoIter</h4></section></summary><div class='docblock'>Creates an iterator from a value. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Not-for-EnumSet%3CT%3E" class="impl"><a class="src rightside" href="../src/enumset/set.rs.html#377-383">Source</a><a href="#impl-Not-for-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.EnumSetType.html" title="trait enumset::EnumSetType">EnumSetType</a>&gt; Not for <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output-4" class="associatedtype trait-impl"><a class="src rightside" href="../src/enumset/set.rs.html#378">Source</a><a href="#associatedtype.Output-4" class="anchor">§</a><h4 class="code-header">type <a class="associatedtype">Output</a> = <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h4></section></summary><div class='docblock'>The resulting type after applying the <code>!</code> operator.</div></details><details class="toggle method-toggle" open><summary><section id="method.not" class="method trait-impl"><a class="src rightside" href="../src/enumset/set.rs.html#380-382">Source</a><a href="#method.not" class="anchor">§</a><h4 class="code-header">fn <a class="fn">not</a>(self) -&gt; Self::Output</h4></section></summary><div class='docblock'>Performs the unary <code>!</code> operation. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Ord-for-EnumSet%3CT%3E" class="impl"><a class="src rightside" href="../src/enumset/set.rs.html#439-443">Source</a><a href="#impl-Ord-for-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.EnumSetType.html" title="trait enumset::EnumSetType">EnumSetType</a>&gt; Ord for <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.cmp" class="method trait-impl"><a class="src rightside" href="../src/enumset/set.rs.html#440-442">Source</a><a href="#method.cmp" class="anchor">§</a><h4 class="code-header">fn <a class="fn">cmp</a>(&amp;self, other: &amp;Self) -&gt; Ordering</h4></section></summary><div class='docblock'>This method returns an [<code>Ordering</code>] between <code>self</code> and <code>other</code>. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.max" class="method trait-impl"><span class="since rightside" title="Stable since Rust version 1.21.0">1.21.0</span><a href="#method.max" class="anchor">§</a><h4 class="code-header">fn <a class="fn">max</a>(self, other: Self) -&gt; Self<div class="where">where
Self: Sized,</div></h4></section></summary><div class='docblock'>Compares and returns the maximum of two values. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.min" class="method trait-impl"><span class="since rightside" title="Stable since Rust version 1.21.0">1.21.0</span><a href="#method.min" class="anchor">§</a><h4 class="code-header">fn <a class="fn">min</a>(self, other: Self) -&gt; Self<div class="where">where
Self: Sized,</div></h4></section></summary><div class='docblock'>Compares and returns the minimum of two values. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clamp" class="method trait-impl"><span class="since rightside" title="Stable since Rust version 1.50.0">1.50.0</span><a href="#method.clamp" class="anchor">§</a><h4 class="code-header">fn <a class="fn">clamp</a>(self, min: Self, max: Self) -&gt; Self<div class="where">where
Self: Sized,</div></h4></section></summary><div class='docblock'>Restrict a value to a certain interval. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CT%3E-for-EnumSet%3CT%3E" class="impl"><a class="src rightside" href="../src/enumset/set.rs.html#391-395">Source</a><a href="#impl-PartialEq%3CT%3E-for-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.EnumSetType.html" title="trait enumset::EnumSetType">EnumSetType</a>&gt; PartialEq&lt;T&gt; for <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-1" class="method trait-impl"><a class="src rightside" href="../src/enumset/set.rs.html#392-394">Source</a><a href="#method.eq-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">eq</a>(&amp;self, other: &amp;T) -&gt; bool</h4></section></summary><div class='docblock'>Tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-1" class="method trait-impl"><span class="since rightside" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.ne-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">ne</a>(&amp;self, other: &amp;Rhs) -&gt; bool</h4></section></summary><div class='docblock'>Tests for <code>!=</code>. The default implementation is almost always sufficient,
and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-EnumSet%3CT%3E" class="impl"><a class="src rightside" href="../src/enumset/set.rs.html#123">Source</a><a href="#impl-PartialEq-for-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: PartialEq + <a class="trait" href="trait.EnumSetType.html" title="trait enumset::EnumSetType">EnumSetType</a>&gt; PartialEq for <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;<div class="where">where
T::Repr: PartialEq,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><a class="src rightside" href="../src/enumset/set.rs.html#123">Source</a><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a class="fn">eq</a>(&amp;self, other: &amp;<a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;) -&gt; bool</h4></section></summary><div class='docblock'>Tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl"><span class="since rightside" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a class="fn">ne</a>(&amp;self, other: &amp;Rhs) -&gt; bool</h4></section></summary><div class='docblock'>Tests for <code>!=</code>. The default implementation is almost always sufficient,
and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd-for-EnumSet%3CT%3E" class="impl"><a class="src rightside" href="../src/enumset/set.rs.html#434-438">Source</a><a href="#impl-PartialOrd-for-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.EnumSetType.html" title="trait enumset::EnumSetType">EnumSetType</a>&gt; PartialOrd for <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp" class="method trait-impl"><a class="src rightside" href="../src/enumset/set.rs.html#435-437">Source</a><a href="#method.partial_cmp" class="anchor">§</a><h4 class="code-header">fn <a class="fn">partial_cmp</a>(&amp;self, other: &amp;Self) -&gt; Option&lt;Ordering&gt;</h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt" class="method trait-impl"><span class="since rightside" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.lt" class="anchor">§</a><h4 class="code-header">fn <a class="fn">lt</a>(&amp;self, other: &amp;Rhs) -&gt; bool</h4></section></summary><div class='docblock'>Tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le" class="method trait-impl"><span class="since rightside" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.le" class="anchor">§</a><h4 class="code-header">fn <a class="fn">le</a>(&amp;self, other: &amp;Rhs) -&gt; bool</h4></section></summary><div class='docblock'>Tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the
<code>&lt;=</code> operator. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt" class="method trait-impl"><span class="since rightside" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.gt" class="anchor">§</a><h4 class="code-header">fn <a class="fn">gt</a>(&amp;self, other: &amp;Rhs) -&gt; bool</h4></section></summary><div class='docblock'>Tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code>
operator. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge" class="method trait-impl"><span class="since rightside" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.ge" class="anchor">§</a><h4 class="code-header">fn <a class="fn">ge</a>(&amp;self, other: &amp;Rhs) -&gt; bool</h4></section></summary><div class='docblock'>Tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by
the <code>&gt;=</code> operator. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Sub%3CO%3E-for-EnumSet%3CT%3E" class="impl"><a class="src rightside" href="../src/enumset/set.rs.html#323-329">Source</a><a href="#impl-Sub%3CO%3E-for-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.EnumSetType.html" title="trait enumset::EnumSetType">EnumSetType</a>, O: Into&lt;<a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;&gt;&gt; Sub&lt;O&gt; for <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output" class="associatedtype trait-impl"><a class="src rightside" href="../src/enumset/set.rs.html#324">Source</a><a href="#associatedtype.Output" class="anchor">§</a><h4 class="code-header">type <a class="associatedtype">Output</a> = <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h4></section></summary><div class='docblock'>The resulting type after applying the <code>-</code> operator.</div></details><details class="toggle method-toggle" open><summary><section id="method.sub" class="method trait-impl"><a class="src rightside" href="../src/enumset/set.rs.html#326-328">Source</a><a href="#method.sub" class="anchor">§</a><h4 class="code-header">fn <a class="fn">sub</a>(self, other: O) -&gt; Self::Output</h4></section></summary><div class='docblock'>Performs the <code>-</code> operation. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-SubAssign%3CO%3E-for-EnumSet%3CT%3E" class="impl"><a class="src rightside" href="../src/enumset/set.rs.html#352-357">Source</a><a href="#impl-SubAssign%3CO%3E-for-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.EnumSetType.html" title="trait enumset::EnumSetType">EnumSetType</a>, O: Into&lt;<a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;&gt;&gt; SubAssign&lt;O&gt; for <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.sub_assign" class="method trait-impl"><a class="src rightside" href="../src/enumset/set.rs.html#354-356">Source</a><a href="#method.sub_assign" class="anchor">§</a><h4 class="code-header">fn <a class="fn">sub_assign</a>(&amp;mut self, rhs: O)</h4></section></summary><div class='docblock'>Performs the <code>-=</code> operation. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Sum%3C%26EnumSet%3CT%3E%3E-for-EnumSet%3CT%3E" class="impl"><a class="src rightside" href="../src/enumset/set.rs.html#883-887">Source</a><a href="#impl-Sum%3C%26EnumSet%3CT%3E%3E-for-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a, T: <a class="trait" href="trait.EnumSetType.html" title="trait enumset::EnumSetType">EnumSetType</a>&gt; Sum&lt;&amp;'a <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;&gt; for <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.sum-1" class="method trait-impl"><a class="src rightside" href="../src/enumset/set.rs.html#884-886">Source</a><a href="#method.sum-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">sum</a>&lt;I: Iterator&lt;Item = &amp;'a Self&gt;&gt;(iter: I) -&gt; Self</h4></section></summary><div class='docblock'>Takes an iterator and generates <code>Self</code> from the elements by “summing up”
the items.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Sum%3C%26T%3E-for-EnumSet%3CT%3E" class="impl"><a class="src rightside" href="../src/enumset/set.rs.html#893-897">Source</a><a href="#impl-Sum%3C%26T%3E-for-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a, T: <a class="trait" href="trait.EnumSetType.html" title="trait enumset::EnumSetType">EnumSetType</a>&gt; Sum&lt;&amp;'a T&gt; for <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.sum-3" class="method trait-impl"><a class="src rightside" href="../src/enumset/set.rs.html#894-896">Source</a><a href="#method.sum-3" class="anchor">§</a><h4 class="code-header">fn <a class="fn">sum</a>&lt;I: Iterator&lt;Item = &amp;'a T&gt;&gt;(iter: I) -&gt; Self</h4></section></summary><div class='docblock'>Takes an iterator and generates <code>Self</code> from the elements by “summing up”
the items.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Sum%3CT%3E-for-EnumSet%3CT%3E" class="impl"><a class="src rightside" href="../src/enumset/set.rs.html#888-892">Source</a><a href="#impl-Sum%3CT%3E-for-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.EnumSetType.html" title="trait enumset::EnumSetType">EnumSetType</a>&gt; Sum&lt;T&gt; for <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.sum-2" class="method trait-impl"><a class="src rightside" href="../src/enumset/set.rs.html#889-891">Source</a><a href="#method.sum-2" class="anchor">§</a><h4 class="code-header">fn <a class="fn">sum</a>&lt;I: Iterator&lt;Item = T&gt;&gt;(iter: I) -&gt; Self</h4></section></summary><div class='docblock'>Takes an iterator and generates <code>Self</code> from the elements by “summing up”
the items.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Sum-for-EnumSet%3CT%3E" class="impl"><a class="src rightside" href="../src/enumset/set.rs.html#878-882">Source</a><a href="#impl-Sum-for-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.EnumSetType.html" title="trait enumset::EnumSetType">EnumSetType</a>&gt; Sum for <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.sum" class="method trait-impl"><a class="src rightside" href="../src/enumset/set.rs.html#879-881">Source</a><a href="#method.sum" class="anchor">§</a><h4 class="code-header">fn <a class="fn">sum</a>&lt;I: Iterator&lt;Item = Self&gt;&gt;(iter: I) -&gt; Self</h4></section></summary><div class='docblock'>Takes an iterator and generates <code>Self</code> from the elements by “summing up”
the items.</div></details></div></details><section id="impl-Copy-for-EnumSet%3CT%3E" class="impl"><a class="src rightside" href="../src/enumset/set.rs.html#123">Source</a><a href="#impl-Copy-for-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: Copy + <a class="trait" href="trait.EnumSetType.html" title="trait enumset::EnumSetType">EnumSetType</a>&gt; Copy for <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;<div class="where">where
T::Repr: Copy,</div></h3></section><section id="impl-Eq-for-EnumSet%3CT%3E" class="impl"><a class="src rightside" href="../src/enumset/set.rs.html#123">Source</a><a href="#impl-Eq-for-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: Eq + <a class="trait" href="trait.EnumSetType.html" title="trait enumset::EnumSetType">EnumSetType</a>&gt; Eq for <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;<div class="where">where
T::Repr: Eq,</div></h3></section><section id="impl-StructuralPartialEq-for-EnumSet%3CT%3E" class="impl"><a class="src rightside" href="../src/enumset/set.rs.html#123">Source</a><a href="#impl-StructuralPartialEq-for-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.EnumSetType.html" title="trait enumset::EnumSetType">EnumSetType</a>&gt; StructuralPartialEq for <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;</h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-Freeze-for-EnumSet%3CT%3E" class="impl"><a href="#impl-Freeze-for-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; Freeze for <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;<div class="where">where
&lt;T as EnumSetTypePrivate&gt;::Repr: Freeze,</div></h3></section><section id="impl-RefUnwindSafe-for-EnumSet%3CT%3E" class="impl"><a href="#impl-RefUnwindSafe-for-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; RefUnwindSafe for <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;<div class="where">where
&lt;T as EnumSetTypePrivate&gt;::Repr: RefUnwindSafe,</div></h3></section><section id="impl-Send-for-EnumSet%3CT%3E" class="impl"><a href="#impl-Send-for-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; Send for <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;<div class="where">where
&lt;T as EnumSetTypePrivate&gt;::Repr: Send,</div></h3></section><section id="impl-Sync-for-EnumSet%3CT%3E" class="impl"><a href="#impl-Sync-for-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; Sync for <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;<div class="where">where
&lt;T as EnumSetTypePrivate&gt;::Repr: Sync,</div></h3></section><section id="impl-Unpin-for-EnumSet%3CT%3E" class="impl"><a href="#impl-Unpin-for-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; Unpin for <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;<div class="where">where
&lt;T as EnumSetTypePrivate&gt;::Repr: Unpin,</div></h3></section><section id="impl-UnwindSafe-for-EnumSet%3CT%3E" class="impl"><a href="#impl-UnwindSafe-for-EnumSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; UnwindSafe for <a class="struct" href="struct.EnumSet.html" title="struct enumset::EnumSet">EnumSet</a>&lt;T&gt;<div class="where">where
&lt;T as EnumSetTypePrivate&gt;::Repr: UnwindSafe,</div></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; Any for T<div class="where">where
T: 'static + ?Sized,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a class="fn">type_id</a>(&amp;self) -&gt; TypeId</h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; Borrow&lt;T&gt; for T<div class="where">where
T: ?Sized,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a class="fn">borrow</a>(&amp;self) -&gt; &amp;T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; BorrowMut&lt;T&gt; for T<div class="where">where
T: ?Sized,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a class="fn">borrow_mut</a>(&amp;mut self) -&gt; &amp;mut T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-CloneToUninit-for-T" class="impl"><a href="#impl-CloneToUninit-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; CloneToUninit for T<div class="where">where
T: Clone,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone_to_uninit" class="method trait-impl"><a href="#method.clone_to_uninit" class="anchor">§</a><h4 class="code-header">unsafe fn <a class="fn">clone_to_uninit</a>(&amp;self, dst: *mut u8)</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>clone_to_uninit</code>)</span></div></span><div class='docblock'>Performs copy-assignment from <code>self</code> to <code>dst</code>. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; From&lt;T&gt; for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">from</a>(t: T) -&gt; T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; Into&lt;U&gt; for T<div class="where">where
U: From&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a class="fn">into</a>(self) -&gt; U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
<p>That is, this conversion is whatever the implementation of
<code>[From]&lt;T&gt; for U</code> chooses to do.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; TryFrom&lt;U&gt; for T<div class="where">where
U: Into&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a class="associatedtype">Error</a> = Infallible</h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a class="fn">try_from</a>(value: U) -&gt; Result&lt;T, &lt;T as TryFrom&lt;U&gt;&gt;::Error&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; TryInto&lt;U&gt; for T<div class="where">where
U: TryFrom&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a class="associatedtype">Error</a> = &lt;U as TryFrom&lt;T&gt;&gt;::Error</h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a class="fn">try_into</a>(self) -&gt; Result&lt;U, &lt;U as TryFrom&lt;T&gt;&gt;::Error&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div><script type="text/json" id="notable-traits-data">{"EnumSetIter<T>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.EnumSetIter.html\" title=\"struct enumset::EnumSetIter\">EnumSetIter</a>&lt;T&gt;</code></h3><pre><code><div class=\"where\">impl&lt;T: <a class=\"trait\" href=\"trait.EnumSetType.html\" title=\"trait enumset::EnumSetType\">EnumSetType</a>&gt; Iterator for <a class=\"struct\" href=\"struct.EnumSetIter.html\" title=\"struct enumset::EnumSetIter\">EnumSetIter</a>&lt;T&gt;</div><div class=\"where\"> type <a class=\"associatedtype\">Item</a> = T;</div>"}</script></section></div></main></body></html>