<!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 `collections` crate.">
    <meta name="keywords" content="rust, rustlang, rust-lang, collections">

    <title>collections - Rust</title>

    <link rel="stylesheet" type="text/css" href="../rustdoc.css">
    <link rel="stylesheet" type="text/css" href="../main.css">

    <link rel="shortcut icon" href="https://doc.rust-lang.org/favicon.ico">
    
</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">
        <a href='../collections/index.html'><img src='https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png' alt='' width='100'></a>
        <p class='location'></p><script>window.sidebarCurrent = {name: 'collections', ty: 'mod', relpath: '../'};</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 mod">
<h1 class='fqn'><span class='in-band'>Crate <a class='mod' href=''>collections</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-0' class='srclink' href='../src/collections/lib.rs.html#11-139' title='goto source code'>[src]</a></span></h1>
<div class='stability'><em class='stab unstable'>Unstable (<code>collections</code> <a href="https://github.com/rust-lang/rust/issues/27783">#27783</a>)<p>: library is unlikely to be stabilized with the current layout and name, use std::collections instead</p>
</em></div><div class='docblock'><p>Collection types.</p>

<p>See <a href="../std/collections">std::collections</a> for a detailed discussion of
collections in Rust.</p>
</div><h2 id='reexports' class='section-header'><a href="#reexports">Reexports</a></h2>
<table><tr><td><code>pub use binary_heap::<a class='struct' href='../collections/binary_heap/struct.BinaryHeap.html' title='collections::binary_heap::BinaryHeap'>BinaryHeap</a>;</code></td></tr><tr><td><code>pub use linked_list::<a class='struct' href='../collections/linked_list/struct.LinkedList.html' title='collections::linked_list::LinkedList'>LinkedList</a>;</code></td></tr><tr><td><code>pub use enum_set::<a class='struct' href='../collections/enum_set/struct.EnumSet.html' title='collections::enum_set::EnumSet'>EnumSet</a>;</code></td></tr><tr><td><code>pub use vec_deque::<a class='struct' href='../collections/vec_deque/struct.VecDeque.html' title='collections::vec_deque::VecDeque'>VecDeque</a>;</code></td></tr><tr><td><code>pub use string::<a class='struct' href='../collections/string/struct.String.html' title='collections::string::String'>String</a>;</code></td></tr><tr><td><code>pub use vec::<a class='struct' href='../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a>;</code></td></tr></table><h2 id='modules' class='section-header'><a href="#modules">Modules</a></h2>
<table>
                    <tr class=' module-item'>
                        <td><a class='mod' href='binary_heap/index.html'
                               title='collections::binary_heap'>binary_heap</a></td>
                        <td class='docblock short'>
                             <p>A priority queue implemented with a binary heap.</p>

                        </td>
                    </tr>
                
                    <tr class=' module-item'>
                        <td><a class='mod' href='borrow/index.html'
                               title='collections::borrow'>borrow</a></td>
                        <td class='docblock short'>
                             <p>A module for working with borrowed data.</p>

                        </td>
                    </tr>
                
                    <tr class=' module-item'>
                        <td><a class='mod' href='boxed/index.html'
                               title='collections::boxed'>boxed</a></td>
                        <td class='docblock short'>
                             <p>A pointer type for heap allocation.</p>

                        </td>
                    </tr>
                
                    <tr class=' module-item'>
                        <td><a class='mod' href='btree_map/index.html'
                               title='collections::btree_map'>btree_map</a></td>
                        <td class='docblock short'>
                             
                        </td>
                    </tr>
                
                    <tr class=' module-item'>
                        <td><a class='mod' href='btree_set/index.html'
                               title='collections::btree_set'>btree_set</a></td>
                        <td class='docblock short'>
                             
                        </td>
                    </tr>
                
                    <tr class=' module-item'>
                        <td><a class='mod' href='fmt/index.html'
                               title='collections::fmt'>fmt</a></td>
                        <td class='docblock short'>
                             <p>Utilities for formatting and printing strings</p>

                        </td>
                    </tr>
                
                    <tr class=' module-item'>
                        <td><a class='mod' href='linked_list/index.html'
                               title='collections::linked_list'>linked_list</a></td>
                        <td class='docblock short'>
                             <p>A doubly-linked list with owned nodes.</p>

                        </td>
                    </tr>
                
                    <tr class=' module-item'>
                        <td><a class='mod' href='slice/index.html'
                               title='collections::slice'>slice</a></td>
                        <td class='docblock short'>
                             <p>A dynamically-sized view into a contiguous sequence, <code>[T]</code>.</p>

                        </td>
                    </tr>
                
                    <tr class=' module-item'>
                        <td><a class='mod' href='str/index.html'
                               title='collections::str'>str</a></td>
                        <td class='docblock short'>
                             <p>Unicode string slices</p>

                        </td>
                    </tr>
                
                    <tr class=' module-item'>
                        <td><a class='mod' href='string/index.html'
                               title='collections::string'>string</a></td>
                        <td class='docblock short'>
                             <p>A UTF-8 encoded, growable string.</p>

                        </td>
                    </tr>
                
                    <tr class=' module-item'>
                        <td><a class='mod' href='vec/index.html'
                               title='collections::vec'>vec</a></td>
                        <td class='docblock short'>
                             <p>A growable list type with heap-allocated contents, written <code>Vec&lt;T&gt;</code> but
pronounced &#39;vector.&#39;</p>

                        </td>
                    </tr>
                
                    <tr class=' module-item'>
                        <td><a class='mod' href='vec_deque/index.html'
                               title='collections::vec_deque'>vec_deque</a></td>
                        <td class='docblock short'>
                             <p>VecDeque is a double-ended queue, which is implemented with the help of a
growing ring buffer.</p>

                        </td>
                    </tr>
                
                    <tr class='unstable module-item'>
                        <td><a class='mod' href='enum_set/index.html'
                               title='collections::enum_set'>enum_set</a></td>
                        <td class='docblock short'>
                            [<em class='stab unstable'>Unstable</em>] <p>A structure for holding a set of enum variants.</p>

                        </td>
                    </tr>
                
                    <tr class='unstable module-item'>
                        <td><a class='mod' href='range/index.html'
                               title='collections::range'>range</a></td>
                        <td class='docblock short'>
                            [<em class='stab unstable'>Unstable</em>] <p>Range syntax.</p>

                        </td>
                    </tr>
                </table><h2 id='macros' class='section-header'><a href="#macros">Macros</a></h2>
<table>
                    <tr class=' module-item'>
                        <td><a class='macro' href='macro.format!.html'
                               title='collections::format!'>format!</a></td>
                        <td class='docblock short'>
                             <p>Use the syntax described in <code>std::fmt</code> to create a value of type <code>String</code>.
See <code>std::fmt</code> for more information.</p>

                        </td>
                    </tr>
                
                    <tr class=' module-item'>
                        <td><a class='macro' href='macro.vec!.html'
                               title='collections::vec!'>vec!</a></td>
                        <td class='docblock short'>
                             <p>Creates a <code>Vec</code> containing the arguments.</p>

                        </td>
                    </tr>
                </table><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
<table>
                    <tr class=' module-item'>
                        <td><a class='struct' href='struct.BTreeMap.html'
                               title='collections::BTreeMap'>BTreeMap</a></td>
                        <td class='docblock short'>
                             <p>A map based on a B-Tree.</p>

                        </td>
                    </tr>
                
                    <tr class=' module-item'>
                        <td><a class='struct' href='struct.BTreeSet.html'
                               title='collections::BTreeSet'>BTreeSet</a></td>
                        <td class='docblock short'>
                             <p>A set based on a B-Tree.</p>

                        </td>
                    </tr>
                </table><h2 id='enums' class='section-header'><a href="#enums">Enums</a></h2>
<table>
                    <tr class='unstable module-item'>
                        <td><a class='enum' href='enum.Bound.html'
                               title='collections::Bound'>Bound</a></td>
                        <td class='docblock short'>
                            [<em class='stab unstable'>Unstable</em>] <p>An endpoint of a range of keys.</p>

                        </td>
                    </tr>
                </table></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 = "collections";
        window.playgroundUrl = "https://play.rust-lang.org/";
    </script>
    <script src="../jquery.js"></script>
    <script src="../main.js"></script>
    <script src="../playpen.js"></script>
    <script defer src="../search-index.js"></script>
</body>
</html>