pencil 0.1.2

A micro web framework for Rust.
<!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'>&#x2212;</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&lt;T: 'static&gt; {
    // 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&lt;T&gt; <a class='struct' href='../phf/set/struct.Set.html' title='phf::set::Set'>Set</a>&lt;T&gt;</code></h3><div class='impl-items'><h4 id='method.len' class='method'><code>fn <a href='#method.len' class='fnname'>len</a>(&amp;self) -&gt; <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>(&amp;self) -&gt; <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>&lt;U: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>&gt;(&amp;self, key: &amp;U) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;&amp;T&gt; <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>&lt;U&gt;</span></code></h4>
<div class='docblock'><p>Returns a reference to the set&#39;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>&lt;U: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>&gt;(&amp;self, value: &amp;U) -&gt; <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>&lt;U&gt;</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>&lt;'a&gt;(&amp;'a self) -&gt; <a class='struct' href='../phf/set/struct.Iter.html' title='phf::set::Iter'>Iter</a>&lt;'a, T&gt;</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&lt;T&gt; <a class='struct' href='../phf/set/struct.Set.html' title='phf::set::Set'>Set</a>&lt;T&gt; <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>(&amp;self, other: &amp;<a class='struct' href='../phf/set/struct.Set.html' title='phf::set::Set'>Set</a>&lt;T&gt;) -&gt; <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>(&amp;self, other: &amp;<a class='struct' href='../phf/set/struct.Set.html' title='phf::set::Set'>Set</a>&lt;T&gt;) -&gt; <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>(&amp;self, other: &amp;<a class='struct' href='../phf/set/struct.Set.html' title='phf::set::Set'>Set</a>&lt;T&gt;) -&gt; <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&lt;T&gt; <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>&lt;T&gt; <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>(&amp;self, fmt: &amp;mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -&gt; <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&lt;'a, T&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a> for &amp;'a <a class='struct' href='../phf/set/struct.Set.html' title='phf::set::Set'>Set</a>&lt;T&gt;</code></h3><div class='impl-items'><h4 id='assoc_type.Item' class='type'><code>type Item = &amp;'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>&lt;'a, T&gt;</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) -&gt; <a class='struct' href='../phf/set/struct.Iter.html' title='phf::set::Iter'>Iter</a>&lt;'a, T&gt;</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>&larrb;</dt>
                    <dd>Move up in search results</dd>
                    <dt>&rarrb;</dt>
                    <dd>Move down in search results</dd>
                    <dt>&#9166;</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>