mentat/arrayvec/struct.ArrayVec.html

544 lines
91 KiB
HTML
Raw Permalink Normal View History

2018-08-22 17:04:13 +00:00
<!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 `ArrayVec` struct in crate `arrayvec`.">
<meta name="keywords" content="rust, rustlang, rust-lang, ArrayVec">
<title>arrayvec::ArrayVec - Rust</title>
<link rel="stylesheet" type="text/css" href="../normalize.css">
<link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle">
<link rel="stylesheet" type="text/css" href="../dark.css">
<link rel="stylesheet" type="text/css" href="../main.css" id="themeStyle">
<script src="../storage.js"></script>
</head>
<body class="rustdoc struct">
<!--[if lte IE 8]>
<div class="warning">
This old browser is unsupported and will most likely display funky
things.
</div>
<![endif]-->
<nav class="sidebar">
<div class="sidebar-menu">&#9776;</div>
<p class='location'>Struct ArrayVec</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.new">new</a><a href="#method.len">len</a><a href="#method.capacity">capacity</a><a href="#method.is_full">is_full</a><a href="#method.push">push</a><a href="#method.try_push">try_push</a><a href="#method.push_unchecked">push_unchecked</a><a href="#method.insert">insert</a><a href="#method.try_insert">try_insert</a><a href="#method.pop">pop</a><a href="#method.swap_remove">swap_remove</a><a href="#method.swap_pop">swap_pop</a><a href="#method.remove">remove</a><a href="#method.pop_at">pop_at</a><a href="#method.truncate">truncate</a><a href="#method.clear">clear</a><a href="#method.retain">retain</a><a href="#method.set_len">set_len</a><a href="#method.drain">drain</a><a href="#method.into_inner">into_inner</a><a href="#method.dispose">dispose</a><a href="#method.as_slice">as_slice</a><a href="#method.as_mut_slice">as_mut_slice</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Drop">Drop</a><a href="#impl-Deref">Deref</a><a href="#impl-DerefMut">DerefMut</a><a href="#impl-From%3CA%3E">From&lt;A&gt;</a><a href="#impl-IntoIterator">IntoIterator</a><a href="#impl-Extend%3CA%3A%3AItem%3E">Extend&lt;A::Item&gt;</a><a href="#impl-FromIterator%3CA%3A%3AItem%3E">FromIterator&lt;A::Item&gt;</a><a href="#impl-Clone">Clone</a><a href="#impl-Hash">Hash</a><a href="#impl-PartialEq">PartialEq</a><a href="#impl-PartialEq%3C%5BA%3A%3AItem%5D%3E">PartialEq&lt;[A::Item]&gt;</a><a href="#impl-Eq">Eq</a><a href="#impl-Borrow%3C%5BA%3A%3AItem%5D%3E">Borrow&lt;[A::Item]&gt;</a><a href="#impl-BorrowMut%3C%5BA%3A%3AItem%5D%3E">BorrowMut&lt;[A::Item]&gt;</a><a href="#impl-AsRef%3C%5BA%3A%3AItem%5D%3E">AsRef&lt;[A::Item]&gt;</a><a href="#impl-AsMut%3C%5BA%3A%3AItem%5D%3E">AsMut&lt;[A::Item]&gt;</a><a href="#impl-Debug">Debug</a><a href="#impl-Default">Default</a><a href="#impl-PartialOrd">PartialOrd</a><a href="#impl-Ord">Ord</a></div></div><p class='location'><a href='index.html'>arrayvec</a></p><script>window.sidebarCurrent = {name: 'ArrayVec', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div>
</nav>
<div class="theme-picker">
<button id="theme-picker" aria-label="Pick another theme!">
<img src="../brush.svg" width="18" alt="Pick another theme!">
</button>
<div id="theme-choices"></div>
</div>
<script src="../theme.js"></script>
<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">
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>arrayvec</a>::<wbr><a class="struct" href=''>ArrayVec</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 class='srclink' href='../src/arrayvec/lib.rs.html#95-98' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct ArrayVec&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&gt; { /* fields omitted */ }</pre><div class='docblock'><p>A vector with a fixed capacity.</p>
<p>The <code>ArrayVec</code> is a vector backed by a fixed size array. It keeps track of
the number of initialized elements.</p>
<p>The vector is a contiguous value that you can store directly on the stack
if needed.</p>
<p>It offers a simple API but also dereferences to a slice, so
that the full slice API is available.</p>
<p>ArrayVec can be converted into a by value iterator.</p>
</div>
<h2 id='methods' class='small-section-header'>
Methods<a href='#methods' class='anchor'></a>
</h2>
<h3 id='impl' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&gt; <a class="struct" href="../arrayvec/struct.ArrayVec.html" title="struct arrayvec::ArrayVec">ArrayVec</a>&lt;A&gt;</code><a href='#impl' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#117-598' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.new' class="method"><span id='new.v' class='invisible'><code>pub fn <a href='#method.new' class='fnname'>new</a>() -&gt; <a class="struct" href="../arrayvec/struct.ArrayVec.html" title="struct arrayvec::ArrayVec">ArrayVec</a>&lt;A&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#131-135' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Create a new empty <code>ArrayVec</code>.</p>
<p>Capacity is inferred from the type parameter.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">arrayvec</span>::<span class="ident">ArrayVec</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">array</span> <span class="op">=</span> <span class="ident">ArrayVec</span>::<span class="op">&lt;</span>[_; <span class="number">16</span>]<span class="op">&gt;</span>::<span class="ident">new</span>();
<span class="ident">array</span>.<span class="ident">push</span>(<span class="number">1</span>);
<span class="ident">array</span>.<span class="ident">push</span>(<span class="number">2</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">array</span>[..], <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">2</span>]);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">array</span>.<span class="ident">capacity</span>(), <span class="number">16</span>);</pre>
</div><h4 id='method.len' class="method"><span id='len.v' class='invisible'><code>pub fn <a href='#method.len' class='fnname'>len</a>(&amp;self) -&gt; usize</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#147' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Return the number of elements in the <code>ArrayVec</code>.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">arrayvec</span>::<span class="ident">ArrayVec</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">array</span> <span class="op">=</span> <span class="ident">ArrayVec</span>::<span class="ident">from</span>([<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]);
<span class="ident">array</span>.<span class="ident">pop</span>();
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">array</span>.<span class="ident">len</span>(), <span class="number">2</span>);</pre>
</div><h4 id='method.capacity' class="method"><span id='capacity.v' class='invisible'><code>pub fn <a href='#method.capacity' class='fnname'>capacity</a>(&amp;self) -&gt; usize</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#158' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Return the capacity of the <code>ArrayVec</code>.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">arrayvec</span>::<span class="ident">ArrayVec</span>;
<span class="kw">let</span> <span class="ident">array</span> <span class="op">=</span> <span class="ident">ArrayVec</span>::<span class="ident">from</span>([<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">array</span>.<span class="ident">capacity</span>(), <span class="number">3</span>);</pre>
</div><h4 id='method.is_full' class="method"><span id='is_full.v' class='invisible'><code>pub fn <a href='#method.is_full' class='fnname'>is_full</a>(&amp;self) -&gt; bool</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#170' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Return if the <code>ArrayVec</code> is completely filled.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">arrayvec</span>::<span class="ident">ArrayVec</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">array</span> <span class="op">=</span> <span class="ident">ArrayVec</span>::<span class="op">&lt;</span>[_; <span class="number">1</span>]<span class="op">&gt;</span>::<span class="ident">new</span>();
<span class="macro">assert</span><span class="macro">!</span>(<span class="op">!</span><span class="ident">array</span>.<span class="ident">is_full</span>());
<span class="ident">array</span>.<span class="ident">push</span>(<span class="number">1</span>);
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">array</span>.<span class="ident">is_full</span>());</pre>
</div><h4 id='method.push' class="method"><span id='push.v' class='invisible'><code>pub fn <a href='#method.push' class='fnname'>push</a>(&amp;mut self, element: A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#186-188' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Push <code>element</code> to the end of the vector.</p>
<p><strong><em>Panics</em></strong> if the vector is already full.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">arrayvec</span>::<span class="ident">ArrayVec</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">array</span> <span class="op">=</span> <span class="ident">ArrayVec</span>::<span class="op">&lt;</span>[_; <span class="number">2</span>]<span class="op">&gt;</span>::<span class="ident">new</span>();
<span class="ident">array</span>.<span class="ident">push</span>(<span class="number">1</span>);
<span class="ident">array</span>.<span class="ident">push</span>(<span class="number">2</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">array</span>[..], <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">2</span>]);</pre>
</div><h4 id='method.try_push' class="method"><span id='try_push.v' class='invisible'><code>pub fn <a href='#method.try_push' class='fnname'>try_push</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;element: A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(), <a class="struct" href="../arrayvec/struct.CapacityError.html" title="struct arrayvec::CapacityError">CapacityError</a>&lt;A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>&gt;&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#212-221' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Push <code>element</code> to the end of the vector.</p>
<p>Return <code>Ok</code> if the push succeeds, or return an error if the vector
is already full.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">arrayvec</span>::<span class="ident">ArrayVec</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">array</span> <span class="op">=</span> <span class="ident">ArrayVec</span>::<span class="op">&lt;</span>[_; <span class="number">2</span>]<span class="op">&gt;</span>::<span class="ident">new</span>();
<span class="kw">let</span> <span class="ident">push1</span> <span class="op">=</span> <span class="ident">array</span>.<span class="ident">try_push</span>(<span class="number">1</span>);
<span class="kw">let</span> <span class="ident">push2</span> <span class="op">=</span> <span class="ident">array</span>.<span class="ident">try_push</span>(<span class="number">2</span>);
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">push1</span>.<span class="ident">is_ok</span>());
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">push2</span>.<span class="ident">is_ok</span>());
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">array</span>[..], <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">2</span>]);
<span class="kw">let</span> <span class="ident">overflow</span> <span class="op">=</span> <span class="ident">array</span>.<span class="ident">try_push</span>(<span class="number">3</span>);
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">overflow</span>.<span class="ident">is_err</span>());</pre>
</div><h4 id='method.push_unchecked' class="method"><span id='push_unchecked.v' class='invisible'><code>pub unsafe fn <a href='#method.push_unchecked' class='fnname'>push_unchecked</a>(&amp;mut self, element: A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#246-251' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Push <code>element</code> to the end of the vector without checking the capacity.</p>
<p>It is up to the caller to ensure the capacity of the vector is
sufficiently large.</p>
<p>This method uses <em>debug assertions</em> to check that the arrayvec is not full.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">arrayvec</span>::<span class="ident">ArrayVec</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">array</span> <span class="op">=</span> <span class="ident">ArrayVec</span>::<span class="op">&lt;</span>[_; <span class="number">2</span>]<span class="op">&gt;</span>::<span class="ident">new</span>();
<span class="kw">if</span> <span class="ident">array</span>.<span class="ident">len</span>() <span class="op">+</span> <span class="number">2</span> <span class="op">&lt;=</span> <span class="ident">array</span>.<span class="ident">capacity</span>() {
<span class="kw">unsafe</span> {
<span class="ident">array</span>.<span class="ident">push_unchecked</span>(<span class="number">1</span>);
<span class="ident">array</span>.<span class="ident">push_unchecked</span>(<span class="number">2</span>);
}
}
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">array</span>[..], <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">2</span>]);</pre>
</div><h4 id='method.insert' class="method"><span id='insert.v' class='invisible'><code>pub fn <a href='#method.insert' class='fnname'>insert</a>(&amp;mut self, index: usize, element: A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#272-274' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Insert <code>element</code> at position <code>index</code>.</p>
<p>Shift up all elements after <code>index</code>.</p>
<p>It is an error if the index is greater than the length or if the
arrayvec is full.</p>
<p><strong><em>Panics</em></strong> on errors. See <code>try_result</code> for fallible version.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">arrayvec</span>::<span class="ident">ArrayVec</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">array</span> <span class="op">=</span> <span class="ident">ArrayVec</span>::<span class="op">&lt;</span>[_; <span class="number">2</span>]<span class="op">&gt;</span>::<span class="ident">new</span>();
<span class="ident">array</span>.<span class="ident">insert</span>(<span class="number">0</span>, <span class="string">&quot;x&quot;</span>);
<span class="ident">array</span>.<span class="ident">insert</span>(<span class="number">0</span>, <span class="string">&quot;y&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">array</span>[..], <span class="kw-2">&amp;</span>[<span class="string">&quot;y&quot;</span>, <span class="string">&quot;x&quot;</span>]);
</pre>
</div><h4 id='method.try_insert' class="method"><span id='try_insert.v' class='invisible'><code>pub fn <a href='#method.try_insert' class='fnname'>try_insert</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;index: usize, <br>&nbsp;&nbsp;&nbsp;&nbsp;element: A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(), <a class="struct" href="../arrayvec/struct.CapacityError.html" title="struct arrayvec::CapacityError">CapacityError</a>&lt;A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>&gt;&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#296-320' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Insert <code>element</code> at position <code>index</code>.</p>
<p>Shift up all elements after <code>index</code>; the <code>index</code> must be less than
or equal to the length.</p>
<p>Returns an error if vector is already at full capacity.</p>
<p><strong><em>Panics</em></strong> <code>index</code> is out of bounds.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">arrayvec</span>::<span class="ident">ArrayVec</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">array</span> <span class="op">=</span> <span class="ident">ArrayVec</span>::<span class="op">&lt;</span>[_; <span class="number">2</span>]<span class="op">&gt;</span>::<span class="ident">new</span>();
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">array</span>.<span class="ident">try_insert</span>(<span class="number">0</span>, <span class="string">&quot;x&quot;</span>).<span class="ident">is_ok</span>());
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">array</span>.<span class="ident">try_insert</span>(<span class="number">0</span>, <span class="string">&quot;y&quot;</span>).<span class="ident">is_ok</span>());
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">array</span>.<span class="ident">try_insert</span>(<span class="number">0</span>, <span class="string">&quot;z&quot;</span>).<span class="ident">is_err</span>());
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">array</span>[..], <span class="kw-2">&amp;</span>[<span class="string">&quot;y&quot;</span>, <span class="string">&quot;x&quot;</span>]);
</pre>
</div><h4 id='method.pop' class="method"><span id='pop.v' class='invisible'><code>pub fn <a href='#method.pop' class='fnname'>pop</a>(&amp;mut self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#336-345' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Remove the last element in the vector and return it.</p>
<p>Return <code>Some(</code> <em>element</em> <code>)</code> if the vector is non-empty, else <code>None</code>.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">arrayvec</span>::<span class="ident">ArrayVec</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">array</span> <span class="op">=</span> <span class="ident">ArrayVec</span>::<span class="op">&lt;</span>[_; <span class="number">2</span>]<span class="op">&gt;</span>::<span class="ident">new</span>();
<span class="ident">array</span>.<span class="ident">push</span>(<span class="number">1</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">array</span>.<span class="ident">pop</span>(), <span class="prelude-val">Some</span>(<span class="number">1</span>));
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">array</span>.<span class="ident">pop</span>(), <span class="prelude-val">None</span>);</pre>
</div><h4 id='method.swap_remove' class="method"><span id='swap_remove.v' class='invisible'><code>pub fn <a href='#method.swap_remove' class='fnname'>swap_remove</a>(&amp;mut self, index: usize) -&gt; A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#366-371' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Remove the element at <code>index</code> and swap the last element into its place.</p>
<p>This operation is O(1).</p>
<p>Return the <em>element</em> if the index is in bounds, else panic.</p>
<p><strong><em>Panics</em></strong> if the <code>index</code> is out of bounds.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">arrayvec</span>::<span class="ident">ArrayVec</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">array</span> <span class="op">=</span> <span class="ident">ArrayVec</span>::<span class="ident">from</span>([<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">array</span>.<span class="ident">swap_remove</span>(<span class="number">0</span>), <span class="number">1</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">array</span>[..], <span class="kw-2">&amp;</span>[<span class="number">3</span>, <span class="number">2</span>]);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">array</span>.<span class="ident">swap_remove</span>(<span class="number">1</span>), <span class="number">2</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">array</span>[..], <span class="kw-2">&amp;</span>[<span class="number">3</span>]);</pre>
</div><h4 id='method.swap_pop' class="method"><span id='swap_pop.v' class='invisible'><code>pub fn <a href='#method.swap_pop' class='fnname'>swap_pop</a>(&amp;mut self, index: usize) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#390-397' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Remove the element at <code>index</code> and swap the last element into its place.</p>
<p>This is a checked version of <code>.swap_remove</code>.<br />
This operation is O(1).</p>
<p>Return <code>Some(</code> <em>element</em> <code>)</code> if the index is in bounds, else <code>None</code>.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">arrayvec</span>::<span class="ident">ArrayVec</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">array</span> <span class="op">=</span> <span class="ident">ArrayVec</span>::<span class="ident">from</span>([<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">array</span>.<span class="ident">swap_pop</span>(<span class="number">0</span>), <span class="prelude-val">Some</span>(<span class="number">1</span>));
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">array</span>[..], <span class="kw-2">&amp;</span>[<span class="number">3</span>, <span class="number">2</span>]);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">array</span>.<span class="ident">swap_pop</span>(<span class="number">10</span>), <span class="prelude-val">None</span>);</pre>
</div><h4 id='method.remove' class="method"><span id='remove.v' class='invisible'><code>pub fn <a href='#method.remove' class='fnname'>remove</a>(&amp;mut self, index: usize) -&gt; A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#414-419' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Remove the element at <code>index</code> and shift down the following elements.</p>
<p>The <code>index</code> must be strictly less than the length of the vector.</p>
<p><strong><em>Panics</em></strong> if the <code>index</code> is out of bounds.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">arrayvec</span>::<span class="ident">ArrayVec</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">array</span> <span class="op">=</span> <span class="ident">ArrayVec</span>::<span class="ident">from</span>([<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]);
<span class="kw">let</span> <span class="ident">removed_elt</span> <span class="op">=</span> <span class="ident">array</span>.<span class="ident">remove</span>(<span class="number">0</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">removed_elt</span>, <span class="number">1</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">array</span>[..], <span class="kw-2">&amp;</span>[<span class="number">2</span>, <span class="number">3</span>]);</pre>
</div><h4 id='method.pop_at' class="method"><span id='pop_at.v' class='invisible'><code>pub fn <a href='#method.pop_at' class='fnname'>pop_at</a>(&amp;mut self, index: usize) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#437-443' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Remove the element at <code>index</code> and shift down the following elements.</p>
<p>This is a checked version of <code>.remove(index)</code>. Returns <code>None</code> if there
is no element at <code>index</code>. Otherwise, return the element inside <code>Some</code>.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">arrayvec</span>::<span class="ident">ArrayVec</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">array</span> <span class="op">=</span> <span class="ident">ArrayVec</span>::<span class="ident">from</span>([<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]);
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">array</span>.<span class="ident">pop_at</span>(<span class="number">0</span>).<span class="ident">is_some</span>());
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">array</span>[..], <span class="kw-2">&amp;</span>[<span class="number">2</span>, <span class="number">3</span>]);
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">array</span>.<span class="ident">pop_at</span>(<span class="number">2</span>).<span class="ident">is_none</span>());
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">array</span>.<span class="ident">pop_at</span>(<span class="number">10</span>).<span class="ident">is_none</span>());</pre>
</div><h4 id='method.truncate' class="method"><span id='truncate.v' class='invisible'><code>pub fn <a href='#method.truncate' class='fnname'>truncate</a>(&amp;mut self, len: usize)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#460-462' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Shortens the vector, keeping the first <code>len</code> elements and dropping
the rest.</p>
<p>If <code>len</code> is greater than the vectors current length this has no
effect.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">arrayvec</span>::<span class="ident">ArrayVec</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">array</span> <span class="op">=</span> <span class="ident">ArrayVec</span>::<span class="ident">from</span>([<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="ident">array</span>.<span class="ident">truncate</span>(<span class="number">3</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">array</span>[..], <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]);
<span class="ident">array</span>.<span class="ident">truncate</span>(<span class="number">4</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">array</span>[..], <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]);</pre>
</div><h4 id='method.clear' class="method"><span id='clear.v' class='invisible'><code>pub fn <a href='#method.clear' class='fnname'>clear</a>(&amp;mut self)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#465-467' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Remove all elements in the vector.</p>
</div><h4 id='method.retain' class="method"><span id='retain.v' class='invisible'><code>pub fn <a href='#method.retain' class='fnname'>retain</a>&lt;F&gt;(&amp;mut self, f: F) <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&amp;mut A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>) -&gt; bool,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#482-501' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Retains only the elements specified by the predicate.</p>
<p>In other words, remove all elements <code>e</code> such that <code>f(&amp;mut e)</code> returns false.
This method operates in place and preserves the order of the retained
elements.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">arrayvec</span>::<span class="ident">ArrayVec</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">array</span> <span class="op">=</span> <span class="ident">ArrayVec</span>::<span class="ident">from</span>([<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]);
<span class="ident">array</span>.<span class="ident">retain</span>(<span class="op">|</span><span class="ident">x</span><span class="op">|</span> <span class="kw-2">*</span><span class="ident">x</span> <span class="op">&amp;</span> <span class="number">1</span> <span class="op">!=</span> <span class="number">0</span> );
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">array</span>[..], <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">3</span>]);</pre>
</div><h4 id='method.set_len' class="method"><span id='set_len.v' class='invisible'><code>pub unsafe fn <a href='#method.set_len' class='fnname'>set_len</a>(&amp;mut self, length: usize)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#511-514' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Set the vectors length without dropping or moving out elements</p>
<p>This method is <code>unsafe</code> because it changes the notion of the
number of “valid” elements in the vector. Use with care.</p>
<p>This method uses <em>debug assertions</em> to check that check that <code>length</code> is
not greater than the capacity.</p>
</div><h4 id='method.drain' class="method"><div class="important-traits"><div class='tooltip'><span class='tooltiptext'>Important traits for <a class="struct" href="../arrayvec/struct.Drain.html" title="struct arrayvec::Drain">Drain</a>&lt;'a, A&gt;</span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../arrayvec/struct.Drain.html" title="struct arrayvec::Drain">Drain</a>&lt;'a, A&gt;</h3><code class="content"><span class="where fmt-newline">impl&lt;'a, A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../arrayvec/struct.Drain.html" title="struct arrayvec::Drain">Drain</a>&lt;'a, A&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>: 'a,&nbsp;</span></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>;</span></code></div></div><span id='drain.v' class='invisible'><code>pub fn <a href='#method.drain' class='fnname'>drain</a>&lt;R:&nbsp;<a class="trait" href="../arrayvec/trait.RangeArgument.html" title="trait arrayvec::RangeArgument">RangeArgument</a>&gt;(&amp;mut self, range: R) -&gt; <a class="struct" href="../arrayvec/struct.Drain.html" title="struct arrayvec::Drain">Drain</a>&lt;A&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#535-562' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Create a draining iterator that removes the specified range in the vector
and yields the removed items from start to end. The element range is
removed even if the iterator is not consumed until the end.</p>
<p>Note: It is unspecified how many elements are removed from the vector,
if the <code>Drain</code> value is leaked.</p>
<p><strong>Panics</strong> if the starting point is greater than the end point or if
the end point is greater than the length of the vector.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">arrayvec</span>::<span class="ident">ArrayVec</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">v</span> <span class="op">=</span> <span class="ident">ArrayVec</span>::<span class="ident">from</span>([<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]);
<span class="kw">let</span> <span class="ident">u</span>: <span class="ident">ArrayVec</span><span class="op">&lt;</span>[_; <span class="number">3</span>]<span class="op">&gt;</span> <span class="op">=</span> <span class="ident">v</span>.<span class="ident">drain</span>(<span class="number">0</span>..<span class="number">2</span>).<span class="ident">collect</span>();
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">v</span>[..], <span class="kw-2">&amp;</span>[<span class="number">3</span>]);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">u</span>[..], <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">2</span>]);</pre>
</div><h4 id='method.into_inner' class="method"><span id='into_inner.v' class='invisible'><code>pub fn <a href='#method.into_inner' class='fnname'>into_inner</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;A, Self&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#571-581' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Return the inner fixed size array, if it is full to its capacity.</p>
<p>Return an <code>Ok</code> value with the array if length equals capacity,
return an <code>Err</code> with self otherwise.</p>
<p><code>Note:</code> This function may incur unproportionally large overhead
to move the array out, its performance is not optimal.</p>
</div><h4 id='method.dispose' class="method"><span id='dispose.v' class='invisible'><code>pub fn <a href='#method.dispose' class='fnname'>dispose</a>(self)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#584-587' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Dispose of <code>self</code> without the overwriting that is needed in Drop.</p>
</div><h4 id='method.as_slice' class="method"><span id='as_slice.v' class='invisible'><code>pub fn <a href='#method.as_slice' class='fnname'>as_slice</a>(&amp;self) -&gt; &amp;[A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>]</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#590-592' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Return a slice containing all elements of the vector.</p>
</div><h4 id='method.as_mut_slice' class="method"><span id='as_mut_slice.v' class='invisible'><code>pub fn <a href='#method.as_mut_slice' class='fnname'>as_mut_slice</a>(&amp;mut self) -&gt; &amp;mut [A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>]</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#595-597' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Return a mutable slice containing all elements of the vector.</p>
</div></div>
<h2 id='implementations' class='small-section-header'>
Trait Implementations<a href='#implementations' class='anchor'></a>
</h2>
<h3 id='impl-Drop' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html" title="trait core::ops::drop::Drop">Drop</a> for <a class="struct" href="../arrayvec/struct.ArrayVec.html" title="struct arrayvec::ArrayVec">ArrayVec</a>&lt;A&gt;</code><a href='#impl-Drop' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#100-108' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.drop' class="method"><span id='drop.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html#tymethod.drop' class='fnname'>drop</a>(&amp;mut self)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#101-107' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Executes the destructor for this type. <a href="https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html#tymethod.drop">Read more</a></p>
</div></div><h3 id='impl-Deref' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a> for <a class="struct" href="../arrayvec/struct.ArrayVec.html" title="struct arrayvec::ArrayVec">ArrayVec</a>&lt;A&gt;</code><a href='#impl-Deref' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#600-608' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='associatedtype.Target' class="type"><span id='Target.t' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#associatedtype.Target' class="type">Target</a> = [A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>]</code></span></h4>
<div class='docblock'><p>The resulting type after dereferencing.</p>
</div><h4 id='method.deref' class="method"><span id='deref.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#tymethod.deref' class='fnname'>deref</a>(&amp;self) -&gt; &amp;[A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>]</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#603-607' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Dereferences the value.</p>
</div></div><h3 id='impl-DerefMut' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html" title="trait core::ops::deref::DerefMut">DerefMut</a> for <a class="struct" href="../arrayvec/struct.ArrayVec.html" title="struct arrayvec::ArrayVec">ArrayVec</a>&lt;A&gt;</code><a href='#impl-DerefMut' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#610-618' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.deref_mut' class="method"><span id='deref_mut.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html#tymethod.deref_mut' class='fnname'>deref_mut</a>(&amp;mut self) -&gt; &amp;mut [A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>]</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#612-617' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Mutably dereferences the value.</p>
</div></div><h3 id='impl-From%3CA%3E' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;A&gt; for <a class="struct" href="../arrayvec/struct.ArrayVec.html" title="struct arrayvec::ArrayVec">ArrayVec</a>&lt;A&gt;</code><a href='#impl-From%3CA%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#629-633' title='goto source code'>[src]</a></span></h3>
<div class='docblock'><p>Create an <code>ArrayVec</code> from an array.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">arrayvec</span>::<span class="ident">ArrayVec</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">array</span> <span class="op">=</span> <span class="ident">ArrayVec</span>::<span class="ident">from</span>([<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">array</span>.<span class="ident">len</span>(), <span class="number">3</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">array</span>.<span class="ident">capacity</span>(), <span class="number">3</span>);</pre>
</div><div class='impl-items'><h4 id='method.from' class="method"><span id='from.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(array: A) -&gt; Self</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#630-632' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Performs the conversion.</p>
</div></div><h3 id='impl-IntoIterator' class='impl'><span class='in-band'><code>impl&lt;'a, A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a> for &amp;'a <a class="struct" href="../arrayvec/struct.ArrayVec.html" title="struct arrayvec::ArrayVec">ArrayVec</a>&lt;A&gt;</code><a href='#impl-IntoIterator' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#647-651' title='goto source code'>[src]</a></span></h3>
<div class='docblock'><p>Iterate the <code>ArrayVec</code> with references to each element.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">arrayvec</span>::<span class="ident">ArrayVec</span>;
<span class="kw">let</span> <span class="ident">array</span> <span class="op">=</span> <span class="ident">ArrayVec</span>::<span class="ident">from</span>([<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]);
<span class="kw">for</span> <span class="ident">elt</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">array</span> {
<span class="comment">// ...</span>
}</pre>
</div><div class='impl-items'><h4 id='associatedtype.Item' class="type"><span id='Item.t' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.Item' class="type">Item</a> = &amp;'a A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a></code></span></h4>
<div class='docblock'><p>The type of the elements being iterated over.</p>
</div><h4 id='associatedtype.IntoIter' class="type"><span id='IntoIter.t' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.IntoIter' class="type">IntoIter</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/struct.Iter.html" title="struct core::slice::Iter">Iter</a>&lt;'a, A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>&gt;</code></span></h4>
<div class='docblock'><p>Which kind of iterator are we turning this into?</p>
</div><h4 id='method.into_iter' class="method"><span id='into_iter.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#tymethod.into_iter' class='fnname'>into_iter</a>(self) -&gt; Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::IntoIterator::IntoIter">IntoIter</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#650' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Creates an iterator from a value. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#tymethod.into_iter">Read more</a></p>
</div></div><h3 id='impl-IntoIterator-1' class='impl'><span class='in-band'><code>impl&lt;'a, A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a> for &amp;'a mut <a class="struct" href="../arrayvec/struct.ArrayVec.html" title="struct arrayvec::ArrayVec">ArrayVec</a>&lt;A&gt;</code><a href='#impl-IntoIterator-1' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#664-668' title='goto source code'>[src]</a></span></h3>
<div class='docblock'><p>Iterate the <code>ArrayVec</code> with mutable references to each element.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">arrayvec</span>::<span class="ident">ArrayVec</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">array</span> <span class="op">=</span> <span class="ident">ArrayVec</span>::<span class="ident">from</span>([<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]);
<span class="kw">for</span> <span class="ident">elt</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">array</span> {
<span class="comment">// ...</span>
}</pre>
</div><div class='impl-items'><h4 id='associatedtype.Item-1' class="type"><span id='Item.t-1' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.Item' class="type">Item</a> = &amp;'a mut A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a></code></span></h4>
<div class='docblock'><p>The type of the elements being iterated over.</p>
</div><h4 id='associatedtype.IntoIter-1' class="type"><span id='IntoIter.t-1' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.IntoIter' class="type">IntoIter</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/struct.IterMut.html" title="struct core::slice::IterMut">IterMut</a>&lt;'a, A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>&gt;</code></span></h4>
<div class='docblock'><p>Which kind of iterator are we turning this into?</p>
</div><h4 id='method.into_iter-1' class="method"><span id='into_iter.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#tymethod.into_iter' class='fnname'>into_iter</a>(self) -&gt; Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::IntoIterator::IntoIter">IntoIter</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#667' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Creates an iterator from a value. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#tymethod.into_iter">Read more</a></p>
</div></div><h3 id='impl-IntoIterator-2' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a> for <a class="struct" href="../arrayvec/struct.ArrayVec.html" title="struct arrayvec::ArrayVec">ArrayVec</a>&lt;A&gt;</code><a href='#impl-IntoIterator-2' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#681-687' title='goto source code'>[src]</a></span></h3>
<div class='docblock'><p>Iterate the <code>ArrayVec</code> with each element by value.</p>
<p>The vector is consumed by this operation.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">arrayvec</span>::<span class="ident">ArrayVec</span>;
<span class="kw">for</span> <span class="ident">elt</span> <span class="kw">in</span> <span class="ident">ArrayVec</span>::<span class="ident">from</span>([<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]) {
<span class="comment">// ...</span>
}</pre>
</div><div class='impl-items'><h4 id='associatedtype.Item-2' class="type"><span id='Item.t-2' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.Item' class="type">Item</a> = A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a></code></span></h4>
<div class='docblock'><p>The type of the elements being iterated over.</p>
</div><h4 id='associatedtype.IntoIter-2' class="type"><span id='IntoIter.t-2' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.IntoIter' class="type">IntoIter</a> = <a class="struct" href="../arrayvec/struct.IntoIter.html" title="struct arrayvec::IntoIter">IntoIter</a>&lt;A&gt;</code></span></h4>
<div class='docblock'><p>Which kind of iterator are we turning this into?</p>
</div><h4 id='method.into_iter-2' class="method"><div class="important-traits"><div class='tooltip'><span class='tooltiptext'>Important traits for <a class="struct" href="../arrayvec/struct.IntoIter.html" title="struct arrayvec::IntoIter">IntoIter</a>&lt;A&gt;</span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../arrayvec/struct.IntoIter.html" title="struct arrayvec::IntoIter">IntoIter</a>&lt;A&gt;</h3><code class="content"><span class="where fmt-newline">impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../arrayvec/struct.IntoIter.html" title="struct arrayvec::IntoIter">IntoIter</a>&lt;A&gt;</span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>;</span></code></div></div><span id='into_iter.v-2' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#tymethod.into_iter' class='fnname'>into_iter</a>(self) -&gt; <a class="struct" href="../arrayvec/struct.IntoIter.html" title="struct arrayvec::IntoIter">IntoIter</a>&lt;A&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#684-686' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Creates an iterator from a value. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#tymethod.into_iter">Read more</a></p>
</div></div><h3 id='impl-Extend%3CA%3A%3AItem%3E' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.Extend.html" title="trait core::iter::traits::Extend">Extend</a>&lt;A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>&gt; for <a class="struct" href="../arrayvec/struct.ArrayVec.html" title="struct arrayvec::ArrayVec">ArrayVec</a>&lt;A&gt;</code><a href='#impl-Extend%3CA%3A%3AItem%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#848-872' title='goto source code'>[src]</a></span></h3>
<div class='docblock'><p>Extend the <code>ArrayVec</code> with an iterator.</p>
<p>Does not extract more items than there is space for. No error
occurs if there are more iterator elements.</p>
</div><div class='impl-items'><h4 id='method.extend' class="method"><span id='extend.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.Extend.html#tymethod.extend' class='fnname'>extend</a>&lt;T:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a>&lt;Item = A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>&gt;&gt;(&amp;mut self, iter: T)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#849-871' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Extends a collection with the contents of an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.Extend.html#tymethod.extend">Read more</a></p>
</div></div><h3 id='impl-FromIterator%3CA%3A%3AItem%3E' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.FromIterator.html" title="trait core::iter::traits::FromIterator">FromIterator</a>&lt;A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>&gt; for <a class="struct" href="../arrayvec/struct.ArrayVec.html" title="struct arrayvec::ArrayVec">ArrayVec</a>&lt;A&gt;</code><a href='#impl-FromIterator%3CA%3A%3AItem%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#878-884' title='goto source code'>[src]</a></span></h3>
<div class='docblock'><p>Create an <code>ArrayVec</code> from an iterator.</p>
<p>Does not extract more items than there is space for. No error
occurs if there are more iterator elements.</p>
</div><div class='impl-items'><h4 id='method.from_iter' class="method"><span id='from_iter.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.FromIterator.html#tymethod.from_iter' class='fnname'>from_iter</a>&lt;T:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a>&lt;Item = A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>&gt;&gt;(iter: T) -&gt; Self</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#879-883' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Creates a value from an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.FromIterator.html#tymethod.from_iter">Read more</a></p>
</div></div><h3 id='impl-Clone' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../arrayvec/struct.ArrayVec.html" title="struct arrayvec::ArrayVec">ArrayVec</a>&lt;A&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,&nbsp;</span></code><a href='#impl-Clone' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#886-914' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.clone' class="method"><span id='clone.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; Self</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#889-891' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id='method.clone_from' class="method"><span id='clone_from.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, rhs: &amp;Self)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#893-913' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div><h3 id='impl-Hash' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> for <a class="struct" href="../arrayvec/struct.ArrayVec.html" title="struct arrayvec::ArrayVec">ArrayVec</a>&lt;A&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a>,&nbsp;</span></code><a href='#impl-Hash' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#916-922' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.hash' class="method"><span id='hash.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#tymethod.hash' class='fnname'>hash</a>&lt;H:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>&gt;(&amp;self, state: &amp;mut H)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#919-921' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Feeds this value into the given [<code>Hasher</code>]. <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#tymethod.hash">Read more</a></p>
</div><h4 id='method.hash_slice' class="method"><span id='hash_slice.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice' class='fnname'>hash_slice</a>&lt;H&gt;(data: &amp;[Self], state: &amp;mut H) <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;H: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.3.0'>1.3.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/hash/mod.rs.html#202-208' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Feeds a slice of this type into the given [<code>Hasher</code>]. <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice">Read more</a></p>
</div></div><h3 id='impl-PartialEq' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="struct" href="../arrayvec/struct.ArrayVec.html" title="struct arrayvec::ArrayVec">ArrayVec</a>&lt;A&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>,&nbsp;</span></code><a href='#impl-PartialEq' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#924-930' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.eq' class="method"><span id='eq.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;Self) -&gt; bool</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#927-929' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne' class="method"><span id='ne.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: &amp;Rhs) -&gt; bool</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#121' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-PartialEq%3C%5BA%3A%3AItem%5D%3E' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;[A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>]&gt; for <a class="struct" href="../arrayvec/struct.ArrayVec.html" title="struct arrayvec::ArrayVec">ArrayVec</a>&lt;A&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>,&nbsp;</span></code><a href='#impl-PartialEq%3C%5BA%3A%3AItem%5D%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#932-938' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.eq-1' class="method"><span id='eq.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;[A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>]) -&gt; bool</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#935-937' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne-1' class="method"><span id='ne.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: &amp;Rhs) -&gt; bool</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#121' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-Eq' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="../arrayvec/struct.ArrayVec.html" title="struct arrayvec::ArrayVec">ArrayVec</a>&lt;A&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a>,&nbsp;</span></code><a href='#impl-Eq' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#940' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'></div><h3 id='impl-Borrow%3C%5BA%3A%3AItem%5D%3E' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;[A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>]&gt; for <a class="struct" href="../arrayvec/struct.ArrayVec.html" title="struct arrayvec::ArrayVec">ArrayVec</a>&lt;A&gt;</code><a href='#impl-Borrow%3C%5BA%3A%3AItem%5D%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#942-944' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.borrow' class="method"><span id='borrow.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&amp;self) -&gt; &amp;[A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>]</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#943' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id='impl-BorrowMut%3C%5BA%3A%3AItem%5D%3E' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;[A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>]&gt; for <a class="struct" href="../arrayvec/struct.ArrayVec.html" title="struct arrayvec::ArrayVec">ArrayVec</a>&lt;A&gt;</code><a href='#impl-BorrowMut%3C%5BA%3A%3AItem%5D%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#946-948' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.borrow_mut' class="method"><span id='borrow_mut.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_mut</a>(&amp;mut self) -&gt; &amp;mut [A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>]</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#947' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></div><h3 id='impl-AsRef%3C%5BA%3A%3AItem%5D%3E' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;[A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>]&gt; for <a class="struct" href="../arrayvec/struct.ArrayVec.html" title="struct arrayvec::ArrayVec">ArrayVec</a>&lt;A&gt;</code><a href='#impl-AsRef%3C%5BA%3A%3AItem%5D%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#950-952' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.as_ref' class="method"><span id='as_ref.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html#tymethod.as_ref' class='fnname'>as_ref</a>(&amp;self) -&gt; &amp;[A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>]</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#951' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Performs the conversion.</p>
</div></div><h3 id='impl-AsMut%3C%5BA%3A%3AItem%5D%3E' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a>&lt;[A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>]&gt; for <a class="struct" href="../arrayvec/struct.ArrayVec.html" title="struct arrayvec::ArrayVec">ArrayVec</a>&lt;A&gt;</code><a href='#impl-AsMut%3C%5BA%3A%3AItem%5D%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#954-956' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.as_mut' class="method"><span id='as_mut.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html#tymethod.as_mut' class='fnname'>as_mut</a>(&amp;mut self) -&gt; &amp;mut [A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>]</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#955' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Performs the conversion.</p>
</div></div><h3 id='impl-Debug' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../arrayvec/struct.ArrayVec.html" title="struct arrayvec::ArrayVec">ArrayVec</a>&lt;A&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>,&nbsp;</span></code><a href='#impl-Debug' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#958-960' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.fmt' class="method"><span id='fmt.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#959' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id='impl-Default' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="../arrayvec/struct.ArrayVec.html" title="struct arrayvec::ArrayVec">ArrayVec</a>&lt;A&gt;</code><a href='#impl-Default' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#962-967' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.default' class="method"><span id='default.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default' class='fnname'>default</a>() -&gt; <a class="struct" href="../arrayvec/struct.ArrayVec.html" title="struct arrayvec::ArrayVec">ArrayVec</a>&lt;A&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#964-966' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Return an empty array</p>
</div></div><h3 id='impl-PartialOrd' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a> for <a class="struct" href="../arrayvec/struct.ArrayVec.html" title="struct arrayvec::ArrayVec">ArrayVec</a>&lt;A&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>,&nbsp;</span></code><a href='#impl-PartialOrd' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#969-994' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.partial_cmp' class="method"><span id='partial_cmp.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp' class='fnname'>partial_cmp</a>(&amp;self, other: &amp;<a class="struct" href="../arrayvec/struct.ArrayVec.html" title="struct arrayvec::ArrayVec">ArrayVec</a>&lt;A&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#971-973' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></p>
</div><h4 id='method.lt' class="method"><span id='lt.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt' class='fnname'>lt</a>(&amp;self, other: &amp;Self) -&gt; bool</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#976-978' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>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/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></p>
</div><h4 id='method.le' class="method"><span id='le.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le' class='fnname'>le</a>(&amp;self, other: &amp;Self) -&gt; bool</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#981-983' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></p>
</div><h4 id='method.ge' class="method"><span id='ge.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge' class='fnname'>ge</a>(&amp;self, other: &amp;Self) -&gt; bool</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#986-988' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>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/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></p>
</div><h4 id='method.gt' class="method"><span id='gt.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt' class='fnname'>gt</a>(&amp;self, other: &amp;Self) -&gt; bool</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#991-993' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>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/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></p>
</div></div><h3 id='impl-Ord' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="struct" href="../arrayvec/struct.ArrayVec.html" title="struct arrayvec::ArrayVec">ArrayVec</a>&lt;A&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Item" title="type arrayvec::Array::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,&nbsp;</span></code><a href='#impl-Ord' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#996-1000' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.cmp' class="method"><span id='cmp.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp' class='fnname'>cmp</a>(&amp;self, other: &amp;<a class="struct" href="../arrayvec/struct.ArrayVec.html" title="struct arrayvec::ArrayVec">ArrayVec</a>&lt;A&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/lib.rs.html#997-999' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method returns an <code>Ordering</code> between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></p>
</div><h4 id='method.max' class="method"><span id='max.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max' class='fnname'>max</a>(self, other: Self) -&gt; Self</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.21.0'>1.21.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#460-463' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Compares and returns the maximum of two values. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max">Read more</a></p>
</div><h4 id='method.min' class="method"><span id='min.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min' class='fnname'>min</a>(self, other: Self) -&gt; Self</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.21.0'>1.21.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#476-479' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Compares and returns the minimum of two values. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min">Read more</a></p>
</div></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><kbd>?</kbd></dt>
<dd>Show this help dialog</dd>
<dt><kbd>S</kbd></dt>
<dd>Focus the search field</dd>
<dt><kbd></kbd></dt>
<dd>Move up in search results</dd>
<dt><kbd></kbd></dt>
<dd>Move down in search results</dd>
<dt><kbd></kbd></dt>
<dd>Switch tab</dd>
<dt><kbd>&#9166;</kbd></dt>
<dd>Go to active search result</dd>
<dt><kbd>+</kbd></dt>
<dd>Expand all sections</dd>
<dt><kbd>-</kbd></dt>
<dd>Collapse all sections</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> or <code>* -> vec</code>)
</p>
</div>
</div>
</aside>
<script>
window.rootPath = "../";
window.currentCrate = "arrayvec";
</script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>