<!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="API documentation for the Rust `Set` struct in crate `phf`.">
<meta name="keywords" content="rust, rustlang, rust-lang, Set">
<title>phf::Set - Rust</title>
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
<link rel="stylesheet" type="text/css" href="../main.css">
</head>
<body class="rustdoc">
<!--[if lte IE 8]>
<div class="warning">
This old browser is unsupported and will most likely display funky
things.
</div>
<![endif]-->
<nav class="sidebar">
<p class='location'><a href='index.html'>phf</a></p><script>window.sidebarCurrent = {name: 'Set', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
</nav>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content struct">
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>phf</a>::<wbr><a class='struct' href=''>Set</a></span><span class='out-of-band'><span id='render-detail'>
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
[<span class='inner'>−</span>]
</a>
</span><a id='src-182' class='srclink' href='../src/phf/set.rs.html#17-20' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct Set<T: 'static> {
// some fields omitted
}</pre><div class='docblock'><p>An immutable set constructed at compile time.</p>
<h2 id='note' class='section-header'><a href='#note'>Note</a></h2>
<p>The fields of this struct are public so that they may be initialized by the
<code>phf_set!</code> macro and code generation. They are subject to change at any
time and should never be accessed directly.</p>
</div><h2 id='methods'>Methods</h2><h3 class='impl'><code>impl<T> <a class='struct' href='../phf/set/struct.Set.html' title='phf::set::Set'>Set</a><T></code></h3><div class='impl-items'><h4 id='method.len' class='method'><code>fn <a href='#method.len' class='fnname'>len</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
<div class='docblock'><p>Returns the number of elements in the <code>Set</code>.</p>
</div><h4 id='method.is_empty' class='method'><code>fn <a href='#method.is_empty' class='fnname'>is_empty</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<div class='docblock'><p>Returns true if the <code>Set</code> contains no elements.</p>
</div><h4 id='method.get_key' class='method'><code>fn <a href='#method.get_key' class='fnname'>get_key</a><U: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>>(&self, key: &U) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><&T> <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html' title='core::cmp::Eq'>Eq</a> + <a class='trait' href='../phf/trait.PhfHash.html' title='phf::PhfHash'>PhfHash</a>, T: <a class='trait' href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html' title='core::borrow::Borrow'>Borrow</a><U></span></code></h4>
<div class='docblock'><p>Returns a reference to the set's internal static instance of the given
key.</p>
<p>This can be useful for interning schemes.</p>
</div><h4 id='method.contains' class='method'><code>fn <a href='#method.contains' class='fnname'>contains</a><U: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>>(&self, value: &U) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html' title='core::cmp::Eq'>Eq</a> + <a class='trait' href='../phf/trait.PhfHash.html' title='phf::PhfHash'>PhfHash</a>, T: <a class='trait' href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html' title='core::borrow::Borrow'>Borrow</a><U></span></code></h4>
<div class='docblock'><p>Returns true if <code>value</code> is in the <code>Set</code>.</p>
</div><h4 id='method.iter' class='method'><code>fn <a href='#method.iter' class='fnname'>iter</a><'a>(&'a self) -> <a class='struct' href='../phf/set/struct.Iter.html' title='phf::set::Iter'>Iter</a><'a, T></code></h4>
<div class='docblock'><p>Returns an iterator over the values in the set.</p>
<p>Values are returned in an arbitrary but fixed order.</p>
</div></div><h3 class='impl'><code>impl<T> <a class='struct' href='../phf/set/struct.Set.html' title='phf::set::Set'>Set</a><T> <span class='where'>where T: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html' title='core::cmp::Eq'>Eq</a> + <a class='trait' href='../phf/trait.PhfHash.html' title='phf::PhfHash'>PhfHash</a></span></code></h3><div class='impl-items'><h4 id='method.is_disjoint' class='method'><code>fn <a href='#method.is_disjoint' class='fnname'>is_disjoint</a>(&self, other: &<a class='struct' href='../phf/set/struct.Set.html' title='phf::set::Set'>Set</a><T>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<div class='docblock'><p>Returns true if <code>other</code> shares no elements with <code>self</code>.</p>
</div><h4 id='method.is_subset' class='method'><code>fn <a href='#method.is_subset' class='fnname'>is_subset</a>(&self, other: &<a class='struct' href='../phf/set/struct.Set.html' title='phf::set::Set'>Set</a><T>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<div class='docblock'><p>Returns true if <code>other</code> contains all values in <code>self</code>.</p>
</div><h4 id='method.is_superset' class='method'><code>fn <a href='#method.is_superset' class='fnname'>is_superset</a>(&self, other: &<a class='struct' href='../phf/set/struct.Set.html' title='phf::set::Set'>Set</a><T>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<div class='docblock'><p>Returns true if <code>self</code> contains all values in <code>other</code>.</p>
</div></div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl<T> <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='../phf/set/struct.Set.html' title='phf::set::Set'>Set</a><T> <span class='where'>where T: <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a></span></code></h3><div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#method.fmt' class='fnname'>fmt</a>(&self, fmt: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
</div><h3 class='impl'><code>impl<'a, T> <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a> for &'a <a class='struct' href='../phf/set/struct.Set.html' title='phf::set::Set'>Set</a><T></code></h3><div class='impl-items'><h4 id='assoc_type.Item' class='type'><code>type Item = &'a T</code></h4>
<h4 id='assoc_type.IntoIter' class='type'><code>type IntoIter = <a class='struct' href='../phf/set/struct.Iter.html' title='phf::set::Iter'>Iter</a><'a, T></code></h4>
<h4 id='method.into_iter' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html#method.into_iter' class='fnname'>into_iter</a>(self) -> <a class='struct' href='../phf/set/struct.Iter.html' title='phf::set::Iter'>Iter</a><'a, T></code></h4>
</div></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<aside id="help" class="hidden">
<div>
<h1 class="hidden">Help</h1>
<div class="shortcuts">
<h2>Keyboard Shortcuts</h2>
<dl>
<dt>?</dt>
<dd>Show this help dialog</dd>
<dt>S</dt>
<dd>Focus the search field</dd>
<dt>⇤</dt>
<dd>Move up in search results</dd>
<dt>⇥</dt>
<dd>Move down in search results</dd>
<dt>⏎</dt>
<dd>Go to active search result</dd>
</dl>
</div>
<div class="infos">
<h2>Search Tricks</h2>
<p>
Prefix searches with a type followed by a colon (e.g.
<code>fn:</code>) to restrict the search to a given type.
</p>
<p>
Accepted types are: <code>fn</code>, <code>mod</code>,
<code>struct</code>, <code>enum</code>,
<code>trait</code>, <code>type</code>, <code>macro</code>,
and <code>const</code>.
</p>
<p>
Search functions by type signature (e.g.
<code>vec -> usize</code>)
</p>
</div>
</div>
</aside>
<script>
window.rootPath = "../";
window.currentCrate = "phf";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>