kanidm/docs/master/rustdoc/kanidmd_lib/entry/struct.Set.html

495 lines
203 KiB
HTML
Raw Normal View History

<!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 ordered set based on a B-Tree."><meta name="keywords" content="rust, rustlang, rust-lang, Set"><title>Set in kanidmd_lib::entry - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-93196c7a1c3542a8.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../../static.files/light-4743e13df3dfe8c4.css"><link rel="stylesheet" disabled href="../../static.files/dark-0e1b889528bd466b.css"><link rel="stylesheet" disabled href="../../static.files/ayu-65289d5d067c7c66.css"><script id="default-settings" ></script><script src="../../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-3367e395607fafc1.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.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">&#9776;</button><a class="logo-container" href="../../kanidmd_lib/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../kanidmd_lib/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location"><a href="#">Set</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block"><li><a href="#method.append">append</a></li><li><a href="#method.clear">clear</a></li><li><a href="#method.contains">contains</a></li><li><a href="#method.difference">difference</a></li><li><a href="#method.drain_filter">drain_filter</a></li><li><a href="#method.first">first</a></li><li><a href="#method.get">get</a></li><li><a href="#method.insert">insert</a></li><li><a href="#method.intersection">intersection</a></li><li><a href="#method.is_disjoint">is_disjoint</a></li><li><a href="#method.is_empty">is_empty</a></li><li><a href="#method.is_subset">is_subset</a></li><li><a href="#method.is_superset">is_superset</a></li><li><a href="#method.iter">iter</a></li><li><a href="#method.last">last</a></li><li><a href="#method.len">len</a></li><li><a href="#method.new">new</a></li><li><a href="#method.new_in">new_in</a></li><li><a href="#method.pop_first">pop_first</a></li><li><a href="#method.pop_last">pop_last</a></li><li><a href="#method.range">range</a></li><li><a href="#method.remove">remove</a></li><li><a href="#method.replace">replace</a></li><li><a href="#method.retain">retain</a></li><li><a href="#method.split_off">split_off</a></
<p>See <a href="https://doc.rust-lang.org/1.68.2/alloc/collections/btree/map/struct.BTreeMap.html" title="BTreeMap"><code>BTreeMap</code></a>s documentation for a detailed discussion of this collections performance
benefits and drawbacks.</p>
<p>It is a logic error for an item to be modified in such a way that the items ordering relative
to any other item, as determined by the <a href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html"><code>Ord</code></a> trait, changes while it is in the set. This is
normally only possible through <a href="https://doc.rust-lang.org/1.68.2/core/cell/struct.Cell.html"><code>Cell</code></a>, <a href="https://doc.rust-lang.org/1.68.2/core/cell/struct.RefCell.html"><code>RefCell</code></a>, global state, I/O, or unsafe code.
The behavior resulting from such a logic error is not specified, but will be encapsulated to the
<code>BTreeSet</code> that observed the logic error and not result in undefined behavior. This could
include panics, incorrect results, aborts, memory leaks, and non-termination.</p>
<p>Iterators returned by <a href="../idm/authsession/struct.Set.html#method.iter" title="BTreeSet::iter"><code>BTreeSet::iter</code></a> produce their items in order, and take worst-case
logarithmic and amortized constant time per item returned.</p>
<h2 id="examples"><a href="#examples">Examples</a></h2>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::BTreeSet;
<span class="comment">// Type inference lets us omit an explicit type signature (which
// would be `BTreeSet&lt;&amp;str&gt;` in this example).
</span><span class="kw">let </span><span class="kw-2">mut </span>books = BTreeSet::new();
<span class="comment">// Add some books.
</span>books.insert(<span class="string">&quot;A Dance With Dragons&quot;</span>);
books.insert(<span class="string">&quot;To Kill a Mockingbird&quot;</span>);
books.insert(<span class="string">&quot;The Odyssey&quot;</span>);
books.insert(<span class="string">&quot;The Great Gatsby&quot;</span>);
<span class="comment">// Check for a specific one.
</span><span class="kw">if </span>!books.contains(<span class="string">&quot;The Winds of Winter&quot;</span>) {
<span class="macro">println!</span>(<span class="string">&quot;We have {} books, but The Winds of Winter ain&#39;t one.&quot;</span>,
books.len());
}
<span class="comment">// Remove a book.
</span>books.remove(<span class="string">&quot;The Odyssey&quot;</span>);
<span class="comment">// Iterate over everything.
</span><span class="kw">for </span>book <span class="kw">in </span><span class="kw-2">&amp;</span>books {
<span class="macro">println!</span>(<span class="string">&quot;{book}&quot;</span>);
}</code></pre></div>
<p>A <code>BTreeSet</code> with a known list of items can be initialized from an array:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::BTreeSet;
<span class="kw">let </span>set = BTreeSet::from([<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]);</code></pre></div>
</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-BTreeSet%3CT%2C%20Global%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#332">source</a><a href="#impl-BTreeSet%3CT%2C%20Global%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, <a class="struct" href="https://doc.rust-lang.org/1.68.2/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.new" class="method has-srclink"><span class="rightside"><span class="since" title="const since 1.66.0">const: 1.66.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#348">source</a></span><h4 class="code-header">pub const fn <a href="#method.new" class="fn">new</a>() -&gt; <a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, <a class="struct" href="https://doc.rust-lang.org/1.68.2/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;</h4></section></summary><div class="docblock"><p>Makes a new, empty <code>BTreeSet</code>.</p>
<p>Does not allocate anything on its own.</p>
<h5 id="examples-1"><a href="#examples-1">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::BTreeSet;
<span class="kw">let </span><span class="kw-2">mut </span>set: BTreeSet&lt;i32&gt; = BTreeSet::new();</code></pre></div>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BTreeSet%3CT%2C%20A%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#353">source</a><a href="#impl-BTreeSet%3CT%2C%20A%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, A&gt; <a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/alloc/trait.Allocator.html" title="trait core::alloc::Allocator">Allocator</a> + <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.new_in" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#368">source</a><h4 class="code-header">pub fn <a href="#method.new_in" class="fn">new_in</a>(alloc: A) -&gt; <a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>btreemap_alloc</code>)</span></div></span></summary><div class="docblock"><p>Makes a new <code>BTreeSet</code> with a reasonable choice of B.</p>
<h5 id="examples-2"><a href="#examples-2">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::BTreeSet;
<span class="kw">use </span>std::alloc::Global;
<span class="kw">let </span><span class="kw-2">mut </span>set: BTreeSet&lt;i32&gt; = BTreeSet::new_in(Global);</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.range" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.17.0">1.17.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#400-404">source</a></span><h4 class="code-header">pub fn <a href="#method.range" class="fn">range</a>&lt;K, R&gt;(&amp;self, range: R) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.68.2/alloc/collections/btree/set/struct.Range.html" title="struct alloc::collections::btree::set::Range">Range</a>&lt;'_, T&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;K: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.68.2/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;K&gt; + <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;R: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/ops/range/trait.RangeBounds.html" title="trait core::ops::range::RangeBounds">RangeBounds</a>&lt;K&gt;,</span></h4></section></summary><div class="docblock"><p>Constructs a double-ended iterator over a sub-range of elements in the set.
The simplest way is to use the range syntax <code>min..max</code>, thus <code>range(min..max)</code> will
yield elements from min (inclusive) to max (exclusive).
The range may also be entered as <code>(Bound&lt;T&gt;, Bound&lt;T&gt;)</code>, so for example
<code>range((Excluded(4), Included(10)))</code> will yield a left-exclusive, right-inclusive
range from 4 to 10.</p>
<h5 id="panics"><a href="#panics">Panics</a></h5>
<p>Panics if range <code>start &gt; end</code>.
Panics if range <code>start == end</code> and both bounds are <code>Excluded</code>.</p>
<h5 id="examples-3"><a href="#examples-3">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::BTreeSet;
<span class="kw">use </span>std::ops::Bound::Included;
<span class="kw">let </span><span class="kw-2">mut </span>set = BTreeSet::new();
set.insert(<span class="number">3</span>);
set.insert(<span class="number">5</span>);
set.insert(<span class="number">8</span>);
<span class="kw">for </span><span class="kw-2">&amp;</span>elem <span class="kw">in </span>set.range((Included(<span class="kw-2">&amp;</span><span class="number">4</span>), Included(<span class="kw-2">&amp;</span><span class="number">8</span>))) {
<span class="macro">println!</span>(<span class="string">&quot;{elem}&quot;</span>);
}
<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="number">5</span>), set.range(<span class="number">4</span>..).next());</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.difference" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#430-432">source</a><h4 class="code-header">pub fn <a href="#method.difference" class="fn">difference</a>&lt;'a&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;'a self,<br>&nbsp;&nbsp;&nbsp;&nbsp;other: &amp;'a <a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;<br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.68.2/alloc/collections/btree/set/struct.Difference.html" title="struct alloc::collections::btree::set::Difference">Difference</a>&lt;'a, T, A&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</span></h4></section></summary><div class="docblock"><p>Visits the elements representing the difference,
i.e., the elements that are in <code>self</code> but not in <code>other</code>,
in ascending order.</p>
<h5 id="examples-4"><a href="#examples-4">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::BTreeSet;
<span class="kw">let </span><span class="kw-2">mut </span>a = BTreeSet::new();
a.insert(<span class="number">1</span>);
a.insert(<span class="number">2</span>);
<span class="kw">let </span><span class="kw-2">mut </span>b = BTreeSet::new();
b.insert(<span class="number">2</span>);
b.insert(<span class="number">3</span>);
<span class="kw">let </span>diff: Vec&lt;<span class="kw">_</span>&gt; = a.difference(<span class="kw-2">&amp;</span>b).cloned().collect();
<span class="macro">assert_eq!</span>(diff, [<span class="number">1</span>]);</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.symmetric_difference" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#491-496">source</a><h4 class="code-header">pub fn <a href="#method.symmetric_difference" class="fn">symmetric_difference</a>&lt;'a&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;'a self,<br>&nbsp;&nbsp;&nbsp;&nbsp;other: &amp;'a <a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;<br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.68.2/alloc/collections/btree/set/struct.SymmetricDifference.html" title="struct alloc::collections::btree::set::SymmetricDifference">SymmetricDifference</a>&lt;'a, T&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</span></h4></section></summary><div class="docblock"><p>Visits the elements representing the symmetric difference,
i.e., the elements that are in <code>self</code> or in <code>other</code> but not in both,
in ascending order.</p>
<h5 id="examples-5"><a href="#examples-5">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::BTreeSet;
<span class="kw">let </span><span class="kw-2">mut </span>a = BTreeSet::new();
a.insert(<span class="number">1</span>);
a.insert(<span class="number">2</span>);
<span class="kw">let </span><span class="kw-2">mut </span>b = BTreeSet::new();
b.insert(<span class="number">2</span>);
b.insert(<span class="number">3</span>);
<span class="kw">let </span>sym_diff: Vec&lt;<span class="kw">_</span>&gt; = a.symmetric_difference(<span class="kw-2">&amp;</span>b).cloned().collect();
<span class="macro">assert_eq!</span>(sym_diff, [<span class="number">1</span>, <span class="number">3</span>]);</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.intersection" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#522-524">source</a><h4 class="code-header">pub fn <a href="#method.intersection" class="fn">intersection</a>&lt;'a&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;'a self,<br>&nbsp;&nbsp;&nbsp;&nbsp;other: &amp;'a <a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;<br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.68.2/alloc/collections/btree/set/struct.Intersection.html" title="struct alloc::collections::btree::set::Intersection">Intersection</a>&lt;'a, T, A&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</span></h4></section></summary><div class="docblock"><p>Visits the elements representing the intersection,
i.e., the elements that are both in <code>self</code> and <code>other</code>,
in ascending order.</p>
<h5 id="examples-6"><a href="#examples-6">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::BTreeSet;
<span class="kw">let </span><span class="kw-2">mut </span>a = BTreeSet::new();
a.insert(<span class="number">1</span>);
a.insert(<span class="number">2</span>);
<span class="kw">let </span><span class="kw-2">mut </span>b = BTreeSet::new();
b.insert(<span class="number">2</span>);
b.insert(<span class="number">3</span>);
<span class="kw">let </span>intersection: Vec&lt;<span class="kw">_</span>&gt; = a.intersection(<span class="kw-2">&amp;</span>b).cloned().collect();
<span class="macro">assert_eq!</span>(intersection, [<span class="number">2</span>]);</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.union" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#573-575">source</a><h4 class="code-header">pub fn <a href="#method.union" class="fn">union</a>&lt;'a&gt;(&amp;'a self, other: &amp;'a <a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.68.2/alloc/collections/btree/set/struct.Union.html" title="struct alloc::collections::btree::set::Union">Union</a>&lt;'a, T&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</span></h4></section></summary><div class="docblock"><p>Visits the elements representing the union,
i.e., all the elements in <code>self</code> or <code>other</code>, without duplicates,
in ascending order.</p>
<h5 id="examples-7"><a href="#examples-7">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::BTreeSet;
<span class="kw">let </span><span class="kw-2">mut </span>a = BTreeSet::new();
a.insert(<span class="number">1</span>);
<span class="kw">let </span><span class="kw-2">mut </span>b = BTreeSet::new();
b.insert(<span class="number">2</span>);
<span class="kw">let union</span>: Vec&lt;<span class="kw">_</span>&gt; = a.union(<span class="kw-2">&amp;</span>b).cloned().collect();
<span class="macro">assert_eq!</span>(union, [<span class="number">1</span>, <span class="number">2</span>]);</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.clear" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#593-595">source</a><h4 class="code-header">pub fn <a href="#method.clear" class="fn">clear</a>(&amp;mut self)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h4></section></summary><div class="docblock"><p>Clears the set, removing all elements.</p>
<h5 id="examples-8"><a href="#examples-8">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::BTreeSet;
<span class="kw">let </span><span class="kw-2">mut </span>v = BTreeSet::new();
v.insert(<span class="number">1</span>);
v.clear();
<span class="macro">assert!</span>(v.is_empty());</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.contains" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#616-619">source</a><h4 class="code-header">pub fn <a href="#method.contains" class="fn">contains</a>&lt;Q&gt;(&amp;self, value: <a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.reference.html">&amp;</a>Q) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.bool.html">bool</a><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;Q&gt; + <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Q: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.68.2/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class="docblock"><p>Returns <code>true</code> if the set contains an element equal to the value.</p>
<p>The value may be any borrowed form of the sets element type,
but the ordering on the borrowed form <em>must</em> match the
ordering on the element type.</p>
<h5 id="examples-9"><a href="#examples-9">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::BTreeSet;
<span class="kw">let </span>set = BTreeSet::from([<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]);
<span class="macro">assert_eq!</span>(set.contains(<span class="kw-2">&amp;</span><span class="number">1</span>), <span class="bool-val">true</span>);
<span class="macro">assert_eq!</span>(set.contains(<span class="kw-2">&amp;</span><span class="number">4</span>), <span class="bool-val">false</span>);</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.get" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.9.0">1.9.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#641-644">source</a></span><h4 class="code-header">pub fn <a href="#method.get" class="fn">get</a>&lt;Q&gt;(&amp;self, value: <a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.reference.html">&amp;</a>Q) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.68.2/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.reference.html">&amp;</a>T&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;Q&gt; + <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Q: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.68.2/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class="docblock"><p>Returns a reference to the element in the set, if any, that is equal to
the value.</p>
<p>The value may be any borrowed form of the sets element type,
but the ordering on the borrowed form <em>must</em> match the
ordering on the element type.</p>
<h5 id="examples-10"><a href="#examples-10">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::BTreeSet;
<span class="kw">let </span>set = BTreeSet::from([<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]);
<span class="macro">assert_eq!</span>(set.get(<span class="kw-2">&amp;</span><span class="number">2</span>), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="number">2</span>));
<span class="macro">assert_eq!</span>(set.get(<span class="kw-2">&amp;</span><span class="number">4</span>), <span class="prelude-val">None</span>);</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_disjoint" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#668-670">source</a><h4 class="code-header">pub fn <a href="#method.is_disjoint" class="fn">is_disjoint</a>(&amp;self, other: &amp;<a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.bool.html">bool</a><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</span></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>
<h5 id="examples-11"><a href="#examples-11">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::BTreeSet;
<span class="kw">let </span>a = BTreeSet::from([<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]);
<span class="kw">let </span><span class="kw-2">mut </span>b = BTreeSet::new();
<span class="macro">assert_eq!</span>(a.is_disjoint(<span class="kw-2">&amp;</span>b), <span class="bool-val">true</span>);
b.insert(<span class="number">4</span>);
<span class="macro">assert_eq!</span>(a.is_disjoint(<span class="kw-2">&amp;</span>b), <span class="bool-val">true</span>);
b.insert(<span class="number">1</span>);
<span class="macro">assert_eq!</span>(a.is_disjoint(<span class="kw-2">&amp;</span>b), <span class="bool-val">false</span>);</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_subset" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#694-696">source</a><h4 class="code-header">pub fn <a href="#method.is_subset" class="fn">is_subset</a>(&amp;self, other: &amp;<a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.bool.html">bool</a><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</span></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 elements in <code>self</code>.</p>
<h5 id="examples-12"><a href="#examples-12">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::BTreeSet;
<span class="kw">let </span>sup = BTreeSet::from([<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]);
<span class="kw">let </span><span class="kw-2">mut </span>set = BTreeSet::new();
<span class="macro">assert_eq!</span>(set.is_subset(<span class="kw-2">&amp;</span>sup), <span class="bool-val">true</span>);
set.insert(<span class="number">2</span>);
<span class="macro">assert_eq!</span>(set.is_subset(<span class="kw-2">&amp;</span>sup), <span class="bool-val">true</span>);
set.insert(<span class="number">4</span>);
<span class="macro">assert_eq!</span>(set.is_subset(<span class="kw-2">&amp;</span>sup), <span class="bool-val">false</span>);</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_superset" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#774-776">source</a><h4 class="code-header">pub fn <a href="#method.is_superset" class="fn">is_superset</a>(&amp;self, other: &amp;<a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.bool.html">bool</a><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</span></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 elements in <code>other</code>.</p>
<h5 id="examples-13"><a href="#examples-13">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::BTreeSet;
<span class="kw">let </span>sub = BTreeSet::from([<span class="number">1</span>, <span class="number">2</span>]);
<span class="kw">let </span><span class="kw-2">mut </span>set = BTreeSet::new();
<span class="macro">assert_eq!</span>(set.is_superset(<span class="kw-2">&amp;</span>sub), <span class="bool-val">false</span>);
set.insert(<span class="number">0</span>);
set.insert(<span class="number">1</span>);
<span class="macro">assert_eq!</span>(set.is_superset(<span class="kw-2">&amp;</span>sub), <span class="bool-val">false</span>);
set.insert(<span class="number">2</span>);
<span class="macro">assert_eq!</span>(set.is_superset(<span class="kw-2">&amp;</span>sub), <span class="bool-val">true</span>);</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.first" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.66.0">1.66.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#800-802">source</a></span><h4 class="code-header">pub fn <a href="#method.first" class="fn">first</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.68.2/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.reference.html">&amp;</a>T&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</span></h4></section></summary><div class="docblock"><p>Returns a reference to the first element in the set, if any.
This element is always the minimum of all elements in the set.</p>
<h5 id="examples-14"><a href="#examples-14">Examples</a></h5>
<p>Basic usage:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::BTreeSet;
<span class="kw">let </span><span class="kw-2">mut </span>set = BTreeSet::new();
<span class="macro">assert_eq!</span>(set.first(), <span class="prelude-val">None</span>);
set.insert(<span class="number">1</span>);
<span class="macro">assert_eq!</span>(set.first(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="number">1</span>));
set.insert(<span class="number">2</span>);
<span class="macro">assert_eq!</span>(set.first(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="number">1</span>));</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.last" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.66.0">1.66.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#826-828">source</a></span><h4 class="code-header">pub fn <a href="#method.last" class="fn">last</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.68.2/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.reference.html">&amp;</a>T&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</span></h4></section></summary><div class="docblock"><p>Returns a reference to the last element in the set, if any.
This element is always the maximum of all elements in the set.</p>
<h5 id="examples-15"><a href="#examples-15">Examples</a></h5>
<p>Basic usage:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::BTreeSet;
<span class="kw">let </span><span class="kw-2">mut </span>set = BTreeSet::new();
<span class="macro">assert_eq!</span>(set.last(), <span class="prelude-val">None</span>);
set.insert(<span class="number">1</span>);
<span class="macro">assert_eq!</span>(set.last(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="number">1</span>));
set.insert(<span class="number">2</span>);
<span class="macro">assert_eq!</span>(set.last(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="number">2</span>));</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.pop_first" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.66.0">1.66.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#850-852">source</a></span><h4 class="code-header">pub fn <a href="#method.pop_first" class="fn">pop_first</a>(&amp;mut self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.68.2/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;T&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</span></h4></section></summary><div class="docblock"><p>Removes the first element from the set and returns it, if any.
The first element is always the minimum element in the set.</p>
<h5 id="examples-16"><a href="#examples-16">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::BTreeSet;
<span class="kw">let </span><span class="kw-2">mut </span>set = BTreeSet::new();
set.insert(<span class="number">1</span>);
<span class="kw">while let </span><span class="prelude-val">Some</span>(n) = set.pop_first() {
<span class="macro">assert_eq!</span>(n, <span class="number">1</span>);
}
<span class="macro">assert!</span>(set.is_empty());</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.pop_last" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.66.0">1.66.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#874-876">source</a></span><h4 class="code-header">pub fn <a href="#method.pop_last" class="fn">pop_last</a>(&amp;mut self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.68.2/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;T&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</span></h4></section></summary><div class="docblock"><p>Removes the last element from the set and returns it, if any.
The last element is always the maximum element in the set.</p>
<h5 id="examples-17"><a href="#examples-17">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::BTreeSet;
<span class="kw">let </span><span class="kw-2">mut </span>set = BTreeSet::new();
set.insert(<span class="number">1</span>);
<span class="kw">while let </span><span class="prelude-val">Some</span>(n) = set.pop_last() {
<span class="macro">assert_eq!</span>(n, <span class="number">1</span>);
}
<span class="macro">assert!</span>(set.is_empty());</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.insert" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#906-908">source</a><h4 class="code-header">pub fn <a href="#method.insert" class="fn">insert</a>(&amp;mut self, value: T) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.bool.html">bool</a><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</span></h4></section></summary><div class="docblock"><p>Adds a value to the set.</p>
<p>Returns whether the value was newly inserted. That is:</p>
<ul>
<li>If the set did not previously contain an equal value, <code>true</code> is
returned.</li>
<li>If the set already contained an equal value, <code>false</code> is returned, and
the entry is not updated.</li>
</ul>
<p>See the <a href="index.html#insert-and-complex-keys">module-level documentation</a> for more.</p>
<h5 id="examples-18"><a href="#examples-18">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::BTreeSet;
<span class="kw">let </span><span class="kw-2">mut </span>set = BTreeSet::new();
<span class="macro">assert_eq!</span>(set.insert(<span class="number">2</span>), <span class="bool-val">true</span>);
<span class="macro">assert_eq!</span>(set.insert(<span class="number">2</span>), <span class="bool-val">false</span>);
<span class="macro">assert_eq!</span>(set.len(), <span class="number">1</span>);</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.replace" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.9.0">1.9.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#929-931">source</a></span><h4 class="code-header">pub fn <a href="#method.replace" class="fn">replace</a>(&amp;mut self, value: T) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.68.2/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;T&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</span></h4></section></summary><div class="docblock"><p>Adds a value to the set, replacing the existing element, if any, that is
equal to the value. Returns the replaced element.</p>
<h5 id="examples-19"><a href="#examples-19">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::BTreeSet;
<span class="kw">let </span><span class="kw-2">mut </span>set = BTreeSet::new();
set.insert(Vec::&lt;i32&gt;::new());
<span class="macro">assert_eq!</span>(set.get(<span class="kw-2">&amp;</span>[][..]).unwrap().capacity(), <span class="number">0</span>);
set.replace(Vec::with_capacity(<span class="number">10</span>));
<span class="macro">assert_eq!</span>(set.get(<span class="kw-2">&amp;</span>[][..]).unwrap().capacity(), <span class="number">10</span>);</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.remove" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#955-958">source</a><h4 class="code-header">pub fn <a href="#method.remove" class="fn">remove</a>&lt;Q&gt;(&amp;mut self, value: <a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.reference.html">&amp;</a>Q) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.bool.html">bool</a><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;Q&gt; + <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Q: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.68.2/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class="docblock"><p>If the set contains an element equal to the value, removes it from the
set and drops it. Returns whether such an element was present.</p>
<p>The value may be any borrowed form of the sets element type,
but the ordering on the borrowed form <em>must</em> match the
ordering on the element type.</p>
<h5 id="examples-20"><a href="#examples-20">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::BTreeSet;
<span class="kw">let </span><span class="kw-2">mut </span>set = BTreeSet::new();
set.insert(<span class="number">2</span>);
<span class="macro">assert_eq!</span>(set.remove(<span class="kw-2">&amp;</span><span class="number">2</span>), <span class="bool-val">true</span>);
<span class="macro">assert_eq!</span>(set.remove(<span class="kw-2">&amp;</span><span class="number">2</span>), <span class="bool-val">false</span>);</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.take" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.9.0">1.9.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#980-983">source</a></span><h4 class="code-header">pub fn <a href="#method.take" class="fn">take</a>&lt;Q&gt;(&amp;mut self, value: <a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.reference.html">&amp;</a>Q) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.68.2/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;T&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;Q&gt; + <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Q: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.68.2/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class="docblock"><p>Removes and returns the element in the set, if any, that is equal to
the value.</p>
<p>The value may be any borrowed form of the sets element type,
but the ordering on the borrowed form <em>must</em> match the
ordering on the element type.</p>
<h5 id="examples-21"><a href="#examples-21">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::BTreeSet;
<span class="kw">let </span><span class="kw-2">mut </span>set = BTreeSet::from([<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]);
<span class="macro">assert_eq!</span>(set.take(<span class="kw-2">&amp;</span><span class="number">2</span>), <span class="prelude-val">Some</span>(<span class="number">2</span>));
<span class="macro">assert_eq!</span>(set.take(<span class="kw-2">&amp;</span><span class="number">2</span>), <span class="prelude-val">None</span>);</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.retain" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.53.0">1.53.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#1004-1007">source</a></span><h4 class="code-header">pub fn <a href="#method.retain" class="fn">retain</a>&lt;F&gt;(&amp;mut self, f: F)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.bool.html">bool</a>,</span></h4></section></summary><div class="docblock"><p>Retains only the elements specified by the predicate.</p>
<p>In other words, remove all elements <code>e</code> for which <code>f(&amp;e)</code> returns <code>false</code>.
The elements are visited in ascending order.</p>
<h5 id="examples-22"><a href="#examples-22">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::BTreeSet;
<span class="kw">let </span><span class="kw-2">mut </span>set = BTreeSet::from([<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
<span class="comment">// Keep only the even numbers.
</span>set.retain(|<span class="kw-2">&amp;</span>k| k % <span class="number">2 </span>== <span class="number">0</span>);
<span class="macro">assert!</span>(set.iter().eq([<span class="number">2</span>, <span class="number">4</span>, <span class="number">6</span>].iter()));</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.append" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.11.0">1.11.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#1041-1044">source</a></span><h4 class="code-header">pub fn <a href="#method.append" class="fn">append</a>(&amp;mut self, other: &amp;mut <a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h4></section></summary><div class="docblock"><p>Moves all elements from <code>other</code> into <code>self</code>, leaving <code>other</code> empty.</p>
<h5 id="examples-23"><a href="#examples-23">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::BTreeSet;
<span class="kw">let </span><span class="kw-2">mut </span>a = BTreeSet::new();
a.insert(<span class="number">1</span>);
a.insert(<span class="number">2</span>);
a.insert(<span class="number">3</span>);
<span class="kw">let </span><span class="kw-2">mut </span>b = BTreeSet::new();
b.insert(<span class="number">3</span>);
b.insert(<span class="number">4</span>);
b.insert(<span class="number">5</span>);
a.append(<span class="kw-2">&amp;mut </span>b);
<span class="macro">assert_eq!</span>(a.len(), <span class="number">5</span>);
<span class="macro">assert_eq!</span>(b.len(), <span class="number">0</span>);
<span class="macro">assert!</span>(a.contains(<span class="kw-2">&amp;</span><span class="number">1</span>));
<span class="macro">assert!</span>(a.contains(<span class="kw-2">&amp;</span><span class="number">2</span>));
<span class="macro">assert!</span>(a.contains(<span class="kw-2">&amp;</span><span class="number">3</span>));
<span class="macro">assert!</span>(a.contains(<span class="kw-2">&amp;</span><span class="number">4</span>));
<span class="macro">assert!</span>(a.contains(<span class="kw-2">&amp;</span><span class="number">5</span>));</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.split_off" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.11.0">1.11.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#1079-1082">source</a></span><h4 class="code-header">pub fn <a href="#method.split_off" class="fn">split_off</a>&lt;Q&gt;(&amp;mut self, value: <a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.reference.html">&amp;</a>Q) -&gt; <a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Q: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.68.2/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;Q&gt; + <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h4></section></summary><div class="docblock"><p>Splits the collection into two at the value. Returns a new collection
with all elements greater than or equal to the value.</p>
<h5 id="examples-24"><a href="#examples-24">Examples</a></h5>
<p>Basic usage:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::BTreeSet;
<span class="kw">let </span><span class="kw-2">mut </span>a = BTreeSet::new();
a.insert(<span class="number">1</span>);
a.insert(<span class="number">2</span>);
a.insert(<span class="number">3</span>);
a.insert(<span class="number">17</span>);
a.insert(<span class="number">41</span>);
<span class="kw">let </span>b = a.split_off(<span class="kw-2">&amp;</span><span class="number">3</span>);
<span class="macro">assert_eq!</span>(a.len(), <span class="number">2</span>);
<span class="macro">assert_eq!</span>(b.len(), <span class="number">3</span>);
<span class="macro">assert!</span>(a.contains(<span class="kw-2">&amp;</span><span class="number">1</span>));
<span class="macro">assert!</span>(a.contains(<span class="kw-2">&amp;</span><span class="number">2</span>));
<span class="macro">assert!</span>(b.contains(<span class="kw-2">&amp;</span><span class="number">3</span>));
<span class="macro">assert!</span>(b.contains(<span class="kw-2">&amp;</span><span class="number">17</span>));
<span class="macro">assert!</span>(b.contains(<span class="kw-2">&amp;</span><span class="number">41</span>));</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.drain_filter" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#1117-1120">source</a><h4 class="code-header">pub fn <a href="#method.drain_filter" class="fn">drain_filter</a>&lt;'a, F&gt;(&amp;'a mut self, pred: F) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.68.2/alloc/collections/btree/set/struct.DrainFilter.html" title="struct alloc::collections::btree::set::DrainFilter">DrainFilter</a>&lt;'a, T, F, A&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;F: 'a + <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.bool.html">bool</a>,</span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>btree_drain_filter</code>)</span></div></span></summary><div class="docblock"><p>Creates an iterator that visits all elements in ascending order and
uses a closure to determine if an element should be removed.</p>
<p>If the closure returns <code>true</code>, the element is removed from the set and
yielded. If the closure returns <code>false</code>, or panics, the element remains
in the set and will not be yielded.</p>
<p>If the iterator is only partially consumed or not consumed at all, each
of the remaining elements is still subjected to the closure and removed
and dropped if it returns <code>true</code>.</p>
<p>It is unspecified how many more elements will be subjected to the
closure if a panic occurs in the closure, or if a panic occurs while
dropping an element, or if the <code>DrainFilter</code> itself is leaked.</p>
<h5 id="examples-25"><a href="#examples-25">Examples</a></h5>
<p>Splitting a set into even and odd values, reusing the original set:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(btree_drain_filter)]
</span><span class="kw">use </span>std::collections::BTreeSet;
<span class="kw">let </span><span class="kw-2">mut </span>set: BTreeSet&lt;i32&gt; = (<span class="number">0</span>..<span class="number">8</span>).collect();
<span class="kw">let </span>evens: BTreeSet&lt;<span class="kw">_</span>&gt; = set.drain_filter(|v| v % <span class="number">2 </span>== <span class="number">0</span>).collect();
<span class="kw">let </span>odds = set;
<span class="macro">assert_eq!</span>(evens.into_iter().collect::&lt;Vec&lt;<span class="kw">_</span>&gt;&gt;(), <span class="macro">vec!</span>[<span class="number">0</span>, <span class="number">2</span>, <span class="number">4</span>, <span class="number">6</span>]);
<span class="macro">assert_eq!</span>(odds.into_iter().collect::&lt;Vec&lt;<span class="kw">_</span>&gt;&gt;(), <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">7</span>]);</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.iter" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#1155">source</a><h4 class="code-header">pub fn <a href="#method.iter" class="fn">iter</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.68.2/alloc/collections/btree/set/struct.Iter.html" title="struct alloc::collections::btree::set::Iter">Iter</a>&lt;'_, T&gt;</h4></section></summary><div class="docblock"><p>Gets an iterator that visits the elements in the <code>BTreeSet</code> in ascending
order.</p>
<h5 id="examples-26"><a href="#examples-26">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::BTreeSet;
<span class="kw">let </span>set = BTreeSet::from([<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]);
<span class="kw">let </span><span class="kw-2">mut </span>set_iter = set.iter();
<span class="macro">assert_eq!</span>(set_iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="number">1</span>));
<span class="macro">assert_eq!</span>(set_iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="number">2</span>));
<span class="macro">assert_eq!</span>(set_iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="number">3</span>));
<span class="macro">assert_eq!</span>(set_iter.next(), <span class="prelude-val">None</span>);</code></pre></div>
<p>Values returned by the iterator are returned in ascending order:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::BTreeSet;
<span class="kw">let </span>set = BTreeSet::from([<span class="number">3</span>, <span class="number">1</span>, <span class="number">2</span>]);
<span class="kw">let </span><span class="kw-2">mut </span>set_iter = set.iter();
<span class="macro">assert_eq!</span>(set_iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="number">1</span>));
<span class="macro">assert_eq!</span>(set_iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="number">2</span>));
<span class="macro">assert_eq!</span>(set_iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="number">3</span>));
<span class="macro">assert_eq!</span>(set_iter.next(), <span class="prelude-val">None</span>);</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.len" class="method has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/71835" title="Tracking issue for const_btree_len">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#1178">source</a></span><h4 class="code-header">pub fn <a href="#method.len" class="fn">len</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Returns the number of elements in the set.</p>
<h5 id="examples-27"><a href="#examples-27">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::BTreeSet;
<span class="kw">let </span><span class="kw-2">mut </span>v = BTreeSet::new();
<span class="macro">assert_eq!</span>(v.len(), <span class="number">0</span>);
v.insert(<span class="number">1</span>);
<span class="macro">assert_eq!</span>(v.len(), <span class="number">1</span>);</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_empty" class="method has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/71835" title="Tracking issue for const_btree_len">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#1201">source</a></span><h4 class="code-header">pub fn <a href="#method.is_empty" class="fn">is_empty</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns <code>true</code> if the set contains no elements.</p>
<h5 id="examples-28"><a href="#examples-28">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::BTreeSet;
<span class="kw">let </span><span class="kw-2">mut </span>v = BTreeSet::new();
<span class="macro">assert!</span>(v.is_empty());
v.insert(<span class="number">1</span>);
<span class="macro">assert!</span>(!v.is_empty());</code></pre></div>
</div></details></div></details></div><h2 id="trait-implementations" class="small-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%3C%26BTreeSet%3CT%2C%20A%3E%3E-for-%26BTreeSet%3CT%2C%20A%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#1433">source</a><a href="#impl-BitAnd%3C%26BTreeSet%3CT%2C%20A%3E%3E-for-%26BTreeSet%3CT%2C%20A%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, A&gt; <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/ops/bit/trait.BitAnd.html" title="trait core::ops::bit::BitAnd">BitAnd</a>&lt;&amp;<a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;&gt; for &amp;<a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> + <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/alloc/trait.Allocator.html" title="trait core::alloc::Allocator">Allocator</a> + <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.bitand" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#1449">source</a><a href="#method.bitand" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.68.2/core/ops/bit/trait.BitAnd.html#tymethod.bitand" class="fn">bitand</a>(self, rhs: &amp;<a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;) -&gt; <a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;</h4></section></summary><div class="docblock"><p>Returns the intersection of <code>self</code> and <code>rhs</code> as a new <code>BTreeSet&lt;T&gt;</code>.</p>
<h5 id="examples-30"><a href="#examples-30">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::BTreeSet;
<span class="kw">let </span>a = BTreeSet::from([<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]);
<span class="kw">let </span>b = BTreeSet::from([<span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]);
<span class="kw">let </span>result = <span class="kw-2">&amp;</span>a &amp; <span class="kw-2">&amp;</span>b;
<span class="macro">assert_eq!</span>(result, BTreeSet::from([<span class="number">2</span>, <span class="number">3</span>]));</code></pre></div>
</div></details><details class="toggle" open><summary><section id="associatedtype.Output-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.68.2/core/ops/bit/trait.BitAnd.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;</h4></section></summary><div class='docblock'>The resulting type after applying the <code>&amp;</code> operator.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitOr%3C%26BTreeSet%3CT%2C%20A%3E%3E-for-%26BTreeSet%3CT%2C%20A%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#1458">source</a><a href="#impl-BitOr%3C%26BTreeSet%3CT%2C%20A%3E%3E-for-%26BTreeSet%3CT%2C%20A%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, A&gt; <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/ops/bit/trait.BitOr.html" title="trait core::ops::bit::BitOr">BitOr</a>&lt;&amp;<a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;&gt; for &amp;<a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> + <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/alloc/trait.Allocator.html" title="trait core::alloc::Allocator">Allocator</a> + <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.bitor" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#1474">source</a><a href="#method.bitor" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.68.2/core/ops/bit/trait.BitOr.html#tymethod.bitor" class="fn">bitor</a>(self, rhs: &amp;<a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;) -&gt; <a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;</h4></section></summary><div class="docblock"><p>Returns the union of <code>self</code> and <code>rhs</code> as a new <code>BTreeSet&lt;T&gt;</code>.</p>
<h5 id="examples-29"><a href="#examples-29">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::BTreeSet;
<span class="kw">let </span>a = BTreeSet::from([<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]);
<span class="kw">let </span>b = BTreeSet::from([<span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]);
<span class="kw">let </span>result = <span class="kw-2">&amp;</span>a | <span class="kw-2">&amp;</span>b;
<span class="macro">assert_eq!</span>(result, BTreeSet::from([<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]));</code></pre></div>
</div></details><details class="toggle" open><summary><section id="associatedtype.Output" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.68.2/core/ops/bit/trait.BitOr.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;</h4></section></summary><div class='docblock'>The resulting type after applying the <code>|</code> operator.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitXor%3C%26BTreeSet%3CT%2C%20A%3E%3E-for-%26BTreeSet%3CT%2C%20A%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#1408">source</a><a href="#impl-BitXor%3C%26BTreeSet%3CT%2C%20A%3E%3E-for-%26BTreeSet%3CT%2C%20A%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, A&gt; <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/ops/bit/trait.BitXor.html" title="trait core::ops::bit::BitXor">BitXor</a>&lt;&amp;<a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;&gt; for &amp;<a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> + <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/alloc/trait.Allocator.html" title="trait core::alloc::Allocator">Allocator</a> + <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.bitxor" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#1424">source</a><a href="#method.bitxor" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.68.2/core/ops/bit/trait.BitXor.html#tymethod.bitxor" class="fn">bitxor</a>(self, rhs: &amp;<a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;) -&gt; <a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;</h4></section></summary><div class="docblock"><p>Returns the symmetric difference of <code>self</code> and <code>rhs</code> as a new <code>BTreeSet&lt;T&gt;</code>.</p>
<h5 id="examples-31"><a href="#examples-31">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::BTreeSet;
<span class="kw">let </span>a = BTreeSet::from([<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]);
<span class="kw">let </span>b = BTreeSet::from([<span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]);
<span class="kw">let </span>result = <span class="kw-2">&amp;</span>a ^ <span class="kw-2">&amp;</span>b;
<span class="macro">assert_eq!</span>(result, BTreeSet::from([<span class="number">1</span>, <span class="number">4</span>]));</code></pre></div>
</div></details><details class="toggle" open><summary><section id="associatedtype.Output-2" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output-2" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.68.2/core/ops/bit/trait.BitXor.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;</h4></section></summary><div class='docblock'>The resulting type after applying the <code>^</code> operator.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-CheckDerConstraints-for-BTreeSet%3CT%2C%20Global%3E" class="impl has-srclink"><a href="#impl-CheckDerConstraints-for-BTreeSet%3CT%2C%20Global%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; CheckDerConstraints for <a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, <a class="struct" href="https://doc.rust-lang.org/1.68.2/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: CheckDerConstraints,</span></h3></section></summary><div class="impl-items"><section id="method.check_constraints" class="method trait-impl has-srclink"><a href="#method.check_constraints" class="anchor">§</a><h4 class="code-header">fn <a class="fn">check_constraints</a>(any: &amp;Any&lt;'_&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.68.2/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.unit.html">()</a>, Error&gt;</h4></section></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-BTreeSet%3CT%2C%20A%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#120">source</a><a href="#impl-Clone-for-BTreeSet%3CT%2C%20A%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, A&gt; <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/alloc/trait.Allocator.html" title="trait core::alloc::Allocator">Allocator</a> + <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#121">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.68.2/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&amp;self) -&gt; <a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;</h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.68.2/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#125">source</a><a href="#method.clone_from" class="anchor">§</a><h4 class=
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Deserialize%3C%27de%3E-for-BTreeSet%3CT%2C%20Global%3E" class="impl has-srclink"><a class="srclink rightside" href="https://docs.rs/serde/1.0.160/src/serde/de/impls.rs.html#971-978">source</a><a href="#impl-Deserialize%3C%27de%3E-for-BTreeSet%3CT%2C%20Global%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'de, T&gt; <a class="trait" href="https://docs.rs/serde/1.0.160/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt; for <a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, <a class="struct" href="https://doc.rust-lang.org/1.68.2/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://docs.rs/serde/1.0.160/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt; + <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> + <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</span></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.deserialize" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://docs.rs/serde/1.0.160/src/serde/de/impls.rs.html#971-978">source</a><a href="#method.deserialize" class="anchor">§</a><h4 class="code-header">fn <a href="https://docs.rs/serde/1.0.160/serde/de/trait.Deserialize.html#tymethod.deserialize" class="fn">deserialize</a>&lt;D&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;deserializer: D<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.68.2/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, <a class="struct" href="https://doc.rust-lang.org/1.68.2/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;, &lt;D as <a class="trait" href="https://docs.rs/serde/1.0.160/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a>&lt;'de&gt;&gt;::<a class="associatedtype" href="https://docs.rs/serde/1.0.160/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;D: <a class="trait" href="https://docs.rs/serde/1.0.160/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a>&lt;'de&gt;,</span></h4></section></summary><div class='docblock'>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.160/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Extend%3C%26%27a%20T%3E-for-BTreeSet%3CT%2C%20A%3E" class="impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.2.0">1.2.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#1363">source</a></span><a href="#impl-Extend%3C%26%27a%20T%3E-for-BTreeSet%3CT%2C%20A%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a, T, A&gt; <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/iter/traits/collect/trait.Extend.html" title="trait core::iter::traits::collect::Extend">Extend</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.reference.html">&amp;'a </a>T&gt; for <a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'a + <a class="trait" href="htt
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::BTreeSet;
<span class="kw">let </span>set1 = BTreeSet::from([<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]);
<span class="kw">let </span>set2: BTreeSet&lt;<span class="kw">_</span>&gt; = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>].into();
<span class="macro">assert_eq!</span>(set1, set2);</code></pre></div>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-FromFallibleIterator%3CT%3E-for-BTreeSet%3CT%2C%20Global%3E" class="impl has-srclink"><a class="srclink rightside" href="https://docs.rs/fallible-iterator/0.2/src/fallible_iterator/lib.rs.html#1122">source</a><a href="#impl-FromFallibleIterator%3CT%3E-for-BTreeSet%3CT%2C%20Global%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://docs.rs/fallible-iterator/0.2/fallible_iterator/trait.FromFallibleIterator.html" title="trait fallible_iterator::FromFallibleIterator">FromFallibleIterator</a>&lt;T&gt; for <a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, <a class="struct" href="https://doc.rust-lang.org/1.68.2/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</span></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_fallible_iter" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://docs.rs/fallible-iterator/0.2/src/fallible_iterator/lib.rs.html#1127-1129">source</a><a href="#method.from_fallible_iter" class="anchor">§</a><h4 class="code-header">fn <a href="https://docs.rs/fallible-iterator/0.2/fallible_iterator/trait.FromFallibleIterator.html#tymethod.from_fallible_iter" class="fn">from_fallible_iter</a>&lt;I&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;it: I<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.68.2/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, <a class="struct" href="https://doc.rust-lang.org/1.68.2/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;, &lt;I as <a class="trait" href="https://docs.rs/fallible-iterator/0.2/fallible_iterator/trait.IntoFallibleIterator.html" title="trait fallible_iterator::IntoFallibleIterator">IntoFallibleIterator</a>&gt;::<a class="associatedtype" href="https://docs.rs/fallible-iterator/0.2/fallible_iterator/trait.IntoFallibleIterator.html#associatedtype.Error" title="type fallible_iterator::IntoFallibleIterator::Error">Error</a>&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://docs.rs/fallible-iterator/0.2/fallible_iterator/trait.IntoFallibleIterator.html" title="trait fallible_iterator::IntoFallibleIterator">IntoFallibleIterator</a>&lt;Item = T&gt;,</span></h4></section></summary><div class='docblock'>Creates a value from a fallible iterator.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-FromIterator%3CT%3E-for-BTreeSet%3CT%2C%20Global%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#1207">source</a><a href="#impl-FromIterator%3CT%3E-for-BTreeSet%3CT%2C%20Global%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/iter/traits/collect/trait.FromIterator.html" title="trait core::iter::traits::collect::FromIterator">FromIterator</a>&lt;T&gt; for <a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, <a class="struct" href="https://doc.rust-lang.org/1.68.2/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</span></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" op
<h5 id="examples-32"><a href="#examples-32">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::BTreeSet;
<span class="kw">let </span>set = BTreeSet::from([<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]);
<span class="kw">let </span>v: Vec&lt;<span class="kw">_</span>&gt; = set.into_iter().collect();
<span class="macro">assert_eq!</span>(v, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]);</code></pre></div>
</div></details><details class="toggle" open><summary><section id="associatedtype.Item" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.68.2/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" 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 has-srclink"><a href="#associatedtype.IntoIter" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.68.2/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = <a class="struct" href="https://doc.rust-lang.org/1.68.2/alloc/collections/btree/set/struct.IntoIter.html" title="struct alloc::collections::btree::set::IntoIter">IntoIter</a>&lt;T, A&gt;</h4></section></summary><div class='docblock'>Which kind of iterator are we turning this into?</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Ord-for-BTreeSet%3CT%2C%20A%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#113">source</a><a href="#impl-Ord-for-BTreeSet%3CT%2C%20A%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, A&gt; <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/alloc/trait.Allocator.html" title="trait core::alloc::Allocator">Allocator</a> + <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.cmp" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#114">source</a><a href="#method.cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html#tymethod.cmp" class="fn">cmp</a>(&amp;self, other: &amp;<a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.68.2/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></h4></section></summary><div class='docblock'>This method returns an <a href="https://doc.rust-lang.org/1.68.2/core/cmp/enum.Ordering.html" title="Ordering"><code>Ordering</code></a> between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.max" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.68.2/src/core/cmp.rs.html#796-799">source</a></span><a href="#method.max" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html#method.max" class="fn">max</a>(self, other: Self) -&gt; Self<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section><
by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/core/cmp.rs.html#227">source</a><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CBTreeSet%3CT%2C%20A%3E%3E-for-BTreeSet%3CT%2C%20A%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#106">source</a><a href="#impl-PartialOrd%3CBTreeSet%3CT%2C%20A%3E%3E-for-BTreeSet%3CT%2C%20A%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, A&gt; <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;&gt; for <a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;T&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/alloc/trait.Allocator.html" title="trait core::alloc::Allocator">Allocator</a> + <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#107">source</a><a href="#method.partial_cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&amp;self, other: &amp;<a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.68.2/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="https://doc.rust-lang.org/1.68.2/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&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 href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/core/cmp.rs.html#1096">source</a><a href="#method.lt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/core/cmp.rs.html#1115">source</a><a href="#method.le" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class
operator. <a href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/core/cmp.rs.html#1133">source</a><a href="#method.gt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/core/cmp.rs.html#1152">source</a><a href="#method.ge" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code>
operator. <a href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Serialize-for-BTreeSet%3CT%2C%20Global%3E" class="impl has-srclink"><a class="srclink rightside" href="https://docs.rs/serde/1.0.160/src/serde/ser/impls.rs.html#226">source</a><a href="#impl-Serialize-for-BTreeSet%3CT%2C%20Global%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://docs.rs/serde/1.0.160/serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a> for <a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, <a class="struct" href="https://doc.rust-lang.org/1.68.2/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://docs.rs/serde/1.0.160/serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a>,</span></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.serialize" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://docs.rs/serde/1.0.160/src/serde/ser/impls.rs.html#226">source</a><a href="#method.serialize" class="anchor">§</a><h4 class="code-header">fn <a href="https://docs.rs/serde/1.0.160/serde/ser/trait.Serialize.html#tymethod.serialize" class="fn">serialize</a>&lt;S&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self,<br>&nbsp;&nbsp;&nbsp;&nbsp;serializer: S<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.68.2/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;&lt;S as <a class="trait" href="https://docs.rs/serde/1.0.160/serde/ser/trait.Serializer.html" title="trait serde::ser::Serializer">Serializer</a>&gt;::<a class="associatedtype" href="https://docs.rs/serde/1.0.160/serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, &lt;S as <a class="trait" href="https://docs.rs/serde/1.0.160/serde/ser/trait.Serializer.html" title="trait serde::ser::Serializer">Serializer</a>&gt;::<a class="associatedtype" href="https://docs.rs/serde/1.0.160/serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="https://docs.rs/serde/1.0.160/serde/ser/trait.Serializer.html" title="trait serde::ser::Serializer">Serializer</a>,</span></h4></section></summary><div class='docblock'>Serialize this value into the given Serde serializer. <a href="https://docs.rs/serde/1.0.160/serde/ser/trait.Serialize.html#tymethod.serialize">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Sub%3C%26BTreeSet%3CT%2C%20A%3E%3E-for-%26BTreeSet%3CT%2C%20A%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#1383">source</a><a href="#impl-Sub%3C%26BTreeSet%3CT%2C%20A%3E%3E-for-%26BTreeSet%3CT%2C%20A%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, A&gt; <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/ops/arith/trait.Sub.html" title="trait core::ops::arith::Sub">Sub</a>&lt;&amp;<a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;&gt; for &amp;<a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> + <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,<br>&nbsp;&
<h5 id="examples-33"><a href="#examples-33">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::BTreeSet;
<span class="kw">let </span>a = BTreeSet::from([<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]);
<span class="kw">let </span>b = BTreeSet::from([<span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]);
<span class="kw">let </span>result = <span class="kw-2">&amp;</span>a - <span class="kw-2">&amp;</span>b;
<span class="macro">assert_eq!</span>(result, BTreeSet::from([<span class="number">1</span>, <span class="number">2</span>]));</code></pre></div>
</div></details><details class="toggle" open><summary><section id="associatedtype.Output-3" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output-3" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.68.2/core/ops/arith/trait.Sub.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;</h4></section></summary><div class='docblock'>The resulting type after applying the <code>-</code> operator.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Tagged-for-BTreeSet%3CT%2C%20Global%3E" class="impl has-srclink"><a href="#impl-Tagged-for-BTreeSet%3CT%2C%20Global%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; Tagged for <a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, <a class="struct" href="https://doc.rust-lang.org/1.68.2/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;</h3></section></summary><div class="impl-items"><section id="associatedconstant.TAG" class="associatedconstant trait-impl has-srclink"><a href="#associatedconstant.TAG" class="anchor">§</a><h4 class="code-header">const <a class="constant">TAG</a>: Tag = Tag::Set</h4></section></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-ToDer-for-BTreeSet%3CT%2C%20Global%3E" class="impl has-srclink"><a href="#impl-ToDer-for-BTreeSet%3CT%2C%20Global%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; ToDer for <a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, <a class="struct" href="https://doc.rust-lang.org/1.68.2/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ToDer,</span></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_der_len" class="method trait-impl has-srclink"><a href="#method.to_der_len" class="anchor">§</a><h4 class="code-header">fn <a class="fn">to_der_len</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.68.2/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.usize.html">usize</a>, Error&gt;</h4></section></summary><div class='docblock'>Get the length of the object, when encoded</div></details><details class="toggle method-toggle" open><summary><section id="method.write_der_header" class="method trait-impl has-srclink"><a href="#method.write_der_header" class="anchor">§</a><h4 class="code-header">fn <a class="fn">write_der_header</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self,<br>&nbsp;&nbsp;&nbsp;&nbsp;writer: &amp;mut dyn <a class="trait" href="https://doc.rust-lang.org/1.68.2/std/io/trait.Write.html" title="trait std::io::Write">Write</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.68.2/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.usize.html">usize</a>, SerializeError&gt;</h4></section></summary><div class='docblock'>Attempt to write the DER header to this writer.</div></details><details class="toggle method-toggle" open><summary><section id="method.write_der_content" class="method trait-impl has-srclink"><a href="#method.write_der_content" class="anchor">§</a><h4 class="code-header">fn <a class="fn">write_der_content</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self,<br>&nbsp;&nbsp;&nbsp;&nbsp;writer: &amp;mut dyn <a class="trait" href="https://doc.rust-lang.org/1.68.2/std/io/trait.Write.html" title="trait std::io::Write">Write</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.68.2/core/result/enum.Result.html" title="enum c
This can generate an invalid encoding for a DER object.</div></details><details class="toggle method-toggle" open><summary><section id="method.write_der" class="method trait-impl has-srclink"><a href="#method.write_der" class="anchor">§</a><h4 class="code-header">fn <a class="fn">write_der</a>(&amp;self, writer: &amp;mut dyn <a class="trait" href="https://doc.rust-lang.org/1.68.2/std/io/trait.Write.html" title="trait std::io::Write">Write</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.68.2/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.usize.html">usize</a>, SerializeError&gt;</h4></section></summary><div class='docblock'>Attempt to write the DER encoded representation (header and content) into this writer. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_der_raw" class="method trait-impl has-srclink"><a href="#method.write_der_raw" class="anchor">§</a><h4 class="code-header">fn <a class="fn">write_der_raw</a>(&amp;self, writer: &amp;mut dyn <a class="trait" href="https://doc.rust-lang.org/1.68.2/std/io/trait.Write.html" title="trait std::io::Write">Write</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.68.2/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.usize.html">usize</a>, SerializeError&gt;</h4></section></summary><div class='docblock'>Similar to using <code>to_der</code>, but uses provided values without changes.
This can generate an invalid encoding for a DER object.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-TryFrom%3CAny%3C%27a%3E%3E-for-BTreeSet%3CT%2C%20Global%3E" class="impl has-srclink"><a href="#impl-TryFrom%3CAny%3C%27a%3E%3E-for-BTreeSet%3CT%2C%20Global%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a, T&gt; <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;Any&lt;'a&gt;&gt; for <a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, <a class="struct" href="https://doc.rust-lang.org/1.68.2/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: FromBer&lt;'a&gt; + <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</span></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.68.2/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = 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_from" class="method trait-impl has-srclink"><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.68.2/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(any: Any&lt;'a&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.68.2/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, <a class="struct" href="https://doc.rust-lang.org/1.68.2/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;, Error&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><section id="impl-Eq-for-BTreeSet%3CT%2C%20A%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/alloc/collections/btree/set.rs.html#103">source</a><a href="#impl-Eq-for-BTreeSet%3CT%2C%20A%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, A&gt; <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;T, A&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/alloc/trait.Allocator.html" title="trait core::alloc::Allocator">Allocator</a> + <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-BTreeSet%3CT%2C%20A%3E" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-BTreeSet%3CT%2C%20A%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, A&gt; <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../idm/authsession/struct.Set.html" t
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-FromBer%3C%27a%3E-for-BTreeSet%3CT%2C%20A%3E" class="impl has-srclink"><a href="#impl-FromBer%3C%27a%3E-for-BTreeSet%3CT%2C%20A%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a, T&gt; FromBer&lt;'a&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;Any&lt;'a&gt;, Error = Error&gt;,</span></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_ber" class="method trait-impl has-srclink"><a href="#method.from_ber" class="anchor">§</a><h4 class="code-header">fn <a class="fn">from_ber</a>(bytes: &amp;'a [<a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.u8.html">u8</a>]) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.68.2/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(&amp;'a [<a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.u8.html">u8</a>], T), Err&lt;Error&gt;&gt;</h4></section></summary><div class='docblock'>Attempt to parse input bytes into a BER object</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-FromDer%3C%27a%3E-for-BTreeSet%3CT%2C%20A%3E" class="impl has-srclink"><a href="#impl-FromDer%3C%27a%3E-for-BTreeSet%3CT%2C%20A%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a, T&gt; FromDer&lt;'a&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;Any&lt;'a&gt;, Error = Error&gt; + CheckDerConstraints,</span></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_der" class="method trait-impl has-srclink"><a href="#method.from_der" class="anchor">§</a><h4 class="code-header">fn <a class="fn">from_der</a>(bytes: &amp;'a [<a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.u8.html">u8</a>]) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.68.2/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(&amp;'a [<a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.u8.html">u8</a>], T), Err&lt;Error&gt;&gt;</h4></section></summary><div class='docblock'>Attempt to parse input bytes into a DER object (enforcing constraints)</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Instrument-for-BTreeSet%3CT%2C%20A%3E" class="impl has-srclink"><a class="srclink rightside" href="https://docs.rs/tracing/0.1.37/src/tracing/instrument.rs.html#276">source</a><a href="#impl-Instrument-for-BTreeSet%3CT%2C%20A%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.Instrument.html" title="trait tracing::instrument::Instrument">Instrument</a> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.instrument" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://docs.rs/tracing/0.1.37/src/tracing/instrument.rs.html#82">source</a><a href="#method.instrument" class="anchor">§</a><h4 class="code-header">fn <a href="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.Instrument.html#method.instrument" class="fn">instrument</a>(self, span: <a class="struct" href="https://docs.rs/tracing/0.1.37/tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -&gt; <a class="struct" href="https://docs.rs/tracing/0.1.37/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a>&lt;Self&gt;</h4></section></summary><div class='docblock'>Instruments this type w
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.Instrument.html#method.instrument">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.in_current_span" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://docs.rs/tracing/0.1.37/src/tracing/instrument.rs.html#121">source</a><a href="#method.in_current_span" class="anchor">§</a><h4 class="code-header">fn <a href="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.Instrument.html#method.in_current_span" class="fn">in_current_span</a>(self) -&gt; <a class="struct" href="https://docs.rs/tracing/0.1.37/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a>&lt;Self&gt;</h4></section></summary><div class='docblock'>Instruments this type with the <a href="https://docs.rs/tracing/0.1.37/tracing/span/struct.Span.html#method.current">current</a> <a href="https://docs.rs/tracing/0.1.37/tracing/span/struct.Span.html"><code>Span</code></a>, returning an
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.Instrument.html#method.in_current_span">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-BTreeSet%3CT%2C%20A%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.68.2/src/core/convert/mod.rs.html#717">source</a><a href="#impl-Into%3CU%3E-for-BTreeSet%3CT%2C%20A%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/1.68.2/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.68.2/src/core/convert/mod.rs.html#725">source</a></span><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.68.2/core/convert/trait.Into.html#tymethod.into" 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><a href="https://doc.rust-lang.org/1.68.2/core/convert/trait.From.html" title="From">From</a>&lt;T&gt; for U</code> chooses to do.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Pointable-for-BTreeSet%3CT%2C%20A%3E" class="impl has-srclink"><a href="#impl-Pointable-for-BTreeSet%3CT%2C%20A%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; Pointable for T</h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedconstant.ALIGN" class="associatedconstant trait-impl has-srclink"><a href="#associatedconstant.ALIGN" class="anchor">§</a><h4 class="code-header">const <a class="constant">ALIGN</a>: <a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.usize.html">usize</a> = mem::align_of::&lt;T&gt;()</h4></section></summary><div class='docblock'>The alignment of pointer.</div></details><details class="toggle" open><summary><section id="associatedtype.Init" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Init" class="anchor">§</a><h4 class="code-header">type <a class="associatedtype">Init</a> = T</h4></section></summary><div class='docblock'>The type for initializers.</div></details><details class="toggle method-toggle" open><summary><section id="method.init" class="method trait-impl has-srclink"><a href="#method.init" class="anchor">§</a><h4 class="code-header">unsafe fn <a class="fn">init</a>(init: &lt;T as Pointable&gt;::Init) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.usize.html">usize</a></h4></section></summary><div class='docblock'>Initializes a with the given initializer. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.deref" class="method trait-impl has-srclink"><a href="#method.deref" class="anchor">§</a><h4 class="code-header">unsafe fn <a class="fn">deref</a>&lt;'a&gt;(ptr: <a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.reference.html">&amp;'a </a>T</h4></section></summary><div class='docblock'>Dereferences the given pointer. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.deref_mut" class="method trait-impl has-srclink"><a href="#method.deref_mut" class="anchor">§</a><h4 class="code-header">unsafe fn <a class="fn">deref_mut</a>&lt;'a&gt;(ptr: <a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.reference.html">&amp;'a mut </a>T</h4></section></summary><div class='docblock'>Mutably dereferences the given pointer. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.drop" class="method trait-impl has-srclink"><a href="#method.drop" class="anchor">§</a><h4 class="code-header">unsafe fn <a class="fn">drop</a>(ptr: <a class="primitive" href="https://doc.rust-lang.org/1.68.2/std/primitive.usize.html">usize</a>)</h4></section></summary><div class='docblock'>Drops the object pointed to by the given pointer. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Same%3CT%3E-for-BTreeSet%3CT%2C%20A%3E" class="impl has-srclink"><a class="srclink rightside" href="https://docs.rs/typenum/1.16.0/src/typenum/type_operators.rs.html#34">source</a><a href="#impl-Same%3CT%3E-for-BTreeSet%3CT%2C%20A%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://docs.rs/typenum/1.16.0/typenum/type_operators/trait.Same.html" title="trait typenum::type_operators::Same">Same</a>&lt;T&gt; for T</h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output-4" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output-4" class="anchor">§</a><h4 class="code-header">type <a href="https://docs.rs/typenum/1.16.0/typenum/type_operators/trait.Same.html#associatedtype.Output" class="associatedtyp
<a href="https://docs.rs/tracing/0.1.37/tracing/instrument/struct.WithDispatch.html" title="WithDispatch"><code>WithDispatch</code></a> wrapper. <a href="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.WithSubscriber.html#method.with_subscriber">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.with_current_subscriber" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://docs.rs/tracing/0.1.37/src/tracing/instrument.rs.html#221">source</a><a href="#method.with_current_subscriber" class="anchor">§</a><h4 class="code-header">fn <a href="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.WithSubscriber.html#method.with_current_subscriber" class="fn">with_current_subscriber</a>(self) -&gt; <a class="struct" href="https://docs.rs/tracing/0.1.37/tracing/instrument/struct.WithDispatch.html" title="struct tracing::instrument::WithDispatch">WithDispatch</a>&lt;Self&gt;</h4></section></summary><div class='docblock'>Attaches the current <a href="https://docs.rs/tracing/0.1.37/tracing/dispatcher/index.html#setting-the-default-subscriber">default</a> <a href="https://docs.rs/tracing-core/0.1.22/tracing_core/subscriber/trait.Subscriber.html"><code>Subscriber</code></a> to this type, returning a
<a href="https://docs.rs/tracing/0.1.37/tracing/instrument/struct.WithDispatch.html" title="WithDispatch"><code>WithDispatch</code></a> wrapper. <a href="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.WithSubscriber.html#method.with_current_subscriber">Read more</a></div></details></div></details><section id="impl-DeserializeOwned-for-BTreeSet%3CT%2C%20A%3E" class="impl has-srclink"><a class="srclink rightside" href="https://docs.rs/serde/1.0.160/src/serde/de/mod.rs.html#604">source</a><a href="#impl-DeserializeOwned-for-BTreeSet%3CT%2C%20A%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://docs.rs/serde/1.0.160/serde/de/trait.DeserializeOwned.html" title="trait serde::de::DeserializeOwned">DeserializeOwned</a> for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: for&lt;'de&gt; <a class="trait" href="https://docs.rs/serde/1.0.160/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt;,</span></h3></section></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="kanidmd_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.68.2 (9eb3afe9e 2023-03-27)" data-search-js="search-98d53477a794af0b.js" data-settings-js="settings-c3c521c753752a1a.js" data-settings-css="settings-08ddfdda51b8ee2e.css" ></div></body></html>