<!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 `Vec` struct in crate `collections`.">
<meta name="keywords" content="rust, rustlang, rust-lang, Vec">
<title>collections::vec::Vec - Rust</title>
<link rel="stylesheet" type="text/css" href="../../main.css">
<link rel="shortcut icon" href="http://www.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]-->
<section class="sidebar">
<a href='../../collections/index.html'><img src='http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png' alt='' width='100'></a>
<p class='location'><a href='../index.html'>collections</a>::<wbr><a href='index.html'>vec</a></p><script>window.sidebarCurrent = {name: 'Vec', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
</section>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press 'S' to search, '?' for more options..."
type="search">
</div>
</form>
</nav>
<section id='main' class="content struct">
<h1 class='fqn'><span class='in-band'>Struct <a href='../index.html'>collections</a>::<wbr><a href='index.html'>vec</a>::<wbr><a class='struct' href=''>Vec</a></span><span class='out-of-band'><span id='render-detail'>
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
[<span class='inner'>−</span>]
</a>
</span><a id='src-29946' class='srclink' href='../../src/collections/vec.rs.html#154-158' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct Vec<T> {
// some fields omitted
}</pre><div class='docblock'><p>A growable list type, written <code>Vec<T></code> but pronounced 'vector.'</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1><span class='rusttest'>#![feature(collections)]
extern crate collections;
fn main() {
let mut vec = Vec::new();
vec.push(1);
vec.push(2);
assert_eq!(vec.len(), 2);
assert_eq!(vec[0], 1);
assert_eq!(vec.pop(), Some(2));
assert_eq!(vec.len(), 1);
vec[0] = 7;
assert_eq!(vec[0], 7);
vec.push_all(&[1, 2, 3]);
for x in vec.iter() {
println!("{}", x);
}
assert_eq!(vec, [7, 1, 2, 3]);
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='ident'>Vec</span>::<span class='ident'>new</span>();
<span class='ident'>vec</span>.<span class='ident'>push</span>(<span class='number'>1</span>);
<span class='ident'>vec</span>.<span class='ident'>push</span>(<span class='number'>2</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>.<span class='ident'>len</span>(), <span class='number'>2</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>[<span class='number'>0</span>], <span class='number'>1</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>.<span class='ident'>pop</span>(), <span class='prelude-val'>Some</span>(<span class='number'>2</span>));
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>.<span class='ident'>len</span>(), <span class='number'>1</span>);
<span class='ident'>vec</span>[<span class='number'>0</span>] <span class='op'>=</span> <span class='number'>7</span>;
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>[<span class='number'>0</span>], <span class='number'>7</span>);
<span class='ident'>vec</span>.<span class='ident'>push_all</span>(<span class='kw-2'>&</span>[<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>3</span>]);
<span class='kw'>for</span> <span class='ident'>x</span> <span class='kw'>in</span> <span class='ident'>vec</span>.<span class='ident'>iter</span>() {
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>"{}"</span>, <span class='ident'>x</span>);
}
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, [<span class='number'>7</span>, <span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>3</span>]);
</pre>
<p>The <code>vec!</code> macro is provided to make initialization more convenient:</p>
<span class='rusttest'>fn main() {
let mut vec = vec![1, 2, 3];
vec.push(4);
assert_eq!(vec, [1, 2, 3, 4]);
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>3</span>];
<span class='ident'>vec</span>.<span class='ident'>push</span>(<span class='number'>4</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, [<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>3</span>, <span class='number'>4</span>]);
</pre>
<p>Use a <code>Vec<T></code> as an efficient stack:</p>
<span class='rusttest'>fn main() {
let mut stack = Vec::new();
stack.push(1);
stack.push(2);
stack.push(3);
while let Some(top) = stack.pop() {
// Prints 3, 2, 1
println!("{}", top);
}
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>stack</span> <span class='op'>=</span> <span class='ident'>Vec</span>::<span class='ident'>new</span>();
<span class='ident'>stack</span>.<span class='ident'>push</span>(<span class='number'>1</span>);
<span class='ident'>stack</span>.<span class='ident'>push</span>(<span class='number'>2</span>);
<span class='ident'>stack</span>.<span class='ident'>push</span>(<span class='number'>3</span>);
<span class='kw'>while</span> <span class='kw'>let</span> <span class='prelude-val'>Some</span>(<span class='ident'>top</span>) <span class='op'>=</span> <span class='ident'>stack</span>.<span class='ident'>pop</span>() {
<span class='comment'>// Prints 3, 2, 1</span>
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>"{}"</span>, <span class='ident'>top</span>);
}
</pre>
<h1 id="capacity-and-reallocation" class='section-header'><a
href="#capacity-and-reallocation">Capacity and reallocation</a></h1>
<p>The capacity of a vector is the amount of space allocated for any future
elements that will be added onto the vector. This is not to be confused with
the <em>length</em> of a vector, which specifies the number of actual elements
within the vector. If a vector's length exceeds its capacity, its capacity
will automatically be increased, but its elements will have to be
reallocated.</p>
<p>For example, a vector with capacity 10 and length 0 would be an empty vector
with space for 10 more elements. Pushing 10 or fewer elements onto the
vector will not change its capacity or cause reallocation to occur. However,
if the vector's length is increased to 11, it will have to reallocate, which
can be slow. For this reason, it is recommended to use <code>Vec::with_capacity</code>
whenever possible to specify how big the vector is expected to get.</p>
</div><h2 id='methods'>Methods</h2><h3 class='impl'><code>impl<T> <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h3><div class='impl-items'><h4 id='method.new' class='method'><code>fn <a href='#method.new' class='fnname'>new</a>() -> <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h4>
<div class='docblock'><p>Constructs a new, empty <code>Vec<T></code>.</p>
<p>The vector will not allocate until elements are pushed onto it.</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1><span class='rusttest'>fn main() {
let mut vec: Vec<i32> = Vec::new();
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span>: <span class='ident'>Vec</span><span class='op'><</span><span class='ident'>i32</span><span class='op'>></span> <span class='op'>=</span> <span class='ident'>Vec</span>::<span class='ident'>new</span>();
</pre>
</div><h4 id='method.with_capacity' class='method'><code>fn <a href='#method.with_capacity' class='fnname'>with_capacity</a>(capacity: <a href='../../core/primitive.usize.html'>usize</a>) -> <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h4>
<div class='docblock'><p>Constructs a new, empty <code>Vec<T></code> with the specified capacity.</p>
<p>The vector will be able to hold exactly <code>capacity</code> elements without reallocating. If
<code>capacity</code> is 0, the vector will not allocate.</p>
<p>It is important to note that this function does not specify the <em>length</em> of the returned
vector, but only the <em>capacity</em>. (For an explanation of the difference between length and
capacity, see the main <code>Vec<T></code> docs above, 'Capacity and reallocation'.)</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1><span class='rusttest'>fn main() {
let mut vec = Vec::with_capacity(10);
// The vector contains no items, even though it has capacity for more
assert_eq!(vec.len(), 0);
// These are all done without reallocating...
for i in 0..10 {
vec.push(i);
}
// ...but this may make the vector reallocate
vec.push(11);
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='ident'>Vec</span>::<span class='ident'>with_capacity</span>(<span class='number'>10</span>);
<span class='comment'>// The vector contains no items, even though it has capacity for more</span>
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>.<span class='ident'>len</span>(), <span class='number'>0</span>);
<span class='comment'>// These are all done without reallocating...</span>
<span class='kw'>for</span> <span class='ident'>i</span> <span class='kw'>in</span> <span class='number'>0</span>..<span class='number'>10</span> {
<span class='ident'>vec</span>.<span class='ident'>push</span>(<span class='ident'>i</span>);
}
<span class='comment'>// ...but this may make the vector reallocate</span>
<span class='ident'>vec</span>.<span class='ident'>push</span>(<span class='number'>11</span>);
</pre>
</div><h4 id='method.from_raw_parts' class='method'><code>unsafe fn <a href='#method.from_raw_parts' class='fnname'>from_raw_parts</a>(ptr: <a href='../../core/primitive.pointer.html'>*mut T</a>, length: <a href='../../core/primitive.usize.html'>usize</a>, capacity: <a href='../../core/primitive.usize.html'>usize</a>) -> <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h4>
<div class='docblock'><p>Creates a <code>Vec<T></code> directly from the raw components of another vector.</p>
<p>This is highly unsafe, due to the number of invariants that aren't checked.</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1><span class='rusttest'>use std::ptr;
use std::mem;
fn main() {
let mut v = vec![1, 2, 3];
// Pull out the various important pieces of information about `v`
let p = v.as_mut_ptr();
let len = v.len();
let cap = v.capacity();
unsafe {
// Cast `v` into the void: no destructor run, so we are in
// complete control of the allocation to which `p` points.
mem::forget(v);
// Overwrite memory with 4, 5, 6
for i in 0..len as isize {
ptr::write(p.offset(i), 4 + i);
}
// Put everything back together into a Vec
let rebuilt = Vec::from_raw_parts(p, len, cap);
assert_eq!(rebuilt, [4, 5, 6]);
}
}
</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>ptr</span>;
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>mem</span>;
<span class='kw'>fn</span> <span class='ident'>main</span>() {
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>3</span>];
<span class='comment'>// Pull out the various important pieces of information about `v`</span>
<span class='kw'>let</span> <span class='ident'>p</span> <span class='op'>=</span> <span class='ident'>v</span>.<span class='ident'>as_mut_ptr</span>();
<span class='kw'>let</span> <span class='ident'>len</span> <span class='op'>=</span> <span class='ident'>v</span>.<span class='ident'>len</span>();
<span class='kw'>let</span> <span class='ident'>cap</span> <span class='op'>=</span> <span class='ident'>v</span>.<span class='ident'>capacity</span>();
<span class='kw'>unsafe</span> {
<span class='comment'>// Cast `v` into the void: no destructor run, so we are in</span>
<span class='comment'>// complete control of the allocation to which `p` points.</span>
<span class='ident'>mem</span>::<span class='ident'>forget</span>(<span class='ident'>v</span>);
<span class='comment'>// Overwrite memory with 4, 5, 6</span>
<span class='kw'>for</span> <span class='ident'>i</span> <span class='kw'>in</span> <span class='number'>0</span>..<span class='ident'>len</span> <span class='kw'>as</span> <span class='ident'>isize</span> {
<span class='ident'>ptr</span>::<span class='ident'>write</span>(<span class='ident'>p</span>.<span class='ident'>offset</span>(<span class='ident'>i</span>), <span class='number'>4</span> <span class='op'>+</span> <span class='ident'>i</span>);
}
<span class='comment'>// Put everything back together into a Vec</span>
<span class='kw'>let</span> <span class='ident'>rebuilt</span> <span class='op'>=</span> <span class='ident'>Vec</span>::<span class='ident'>from_raw_parts</span>(<span class='ident'>p</span>, <span class='ident'>len</span>, <span class='ident'>cap</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>rebuilt</span>, [<span class='number'>4</span>, <span class='number'>5</span>, <span class='number'>6</span>]);
}
}
</pre>
</div><h4 id='method.from_raw_buf' class='method'><code>unsafe fn <a href='#method.from_raw_buf' class='fnname'>from_raw_buf</a>(ptr: <a href='../../core/primitive.pointer.html'>*const T</a>, elts: <a href='../../core/primitive.usize.html'>usize</a>) -> <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h4>
<div class='stability'><em class='stab unstable'>Unstable<p>: may be better expressed via composition</p>
</em></div><div class='docblock'><p>Creates a vector by copying the elements from a raw pointer.</p>
<p>This function will copy <code>elts</code> contiguous elements starting at <code>ptr</code>
into a new allocation owned by the returned <code>Vec<T></code>. The elements of
the buffer are copied into the vector without cloning, as if
<code>ptr::read()</code> were called on them.</p>
</div><h4 id='method.capacity' class='method'><code>fn <a href='#method.capacity' class='fnname'>capacity</a>(&self) -> <a href='../../core/primitive.usize.html'>usize</a></code></h4>
<div class='docblock'><p>Returns the number of elements the vector can hold without
reallocating.</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1><span class='rusttest'>fn main() {
let vec: Vec<i32> = Vec::with_capacity(10);
assert_eq!(vec.capacity(), 10);
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='ident'>vec</span>: <span class='ident'>Vec</span><span class='op'><</span><span class='ident'>i32</span><span class='op'>></span> <span class='op'>=</span> <span class='ident'>Vec</span>::<span class='ident'>with_capacity</span>(<span class='number'>10</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>.<span class='ident'>capacity</span>(), <span class='number'>10</span>);
</pre>
</div><h4 id='method.reserve' class='method'><code>fn <a href='#method.reserve' class='fnname'>reserve</a>(&mut self, additional: <a href='../../core/primitive.usize.html'>usize</a>)</code></h4>
<div class='docblock'><p>Reserves capacity for at least <code>additional</code> more elements to be inserted
in the given <code>Vec<T></code>. The collection may reserve more space to avoid
frequent reallocations.</p>
<h1 id="panics" class='section-header'><a
href="#panics">Panics</a></h1>
<p>Panics if the new capacity overflows <code>usize</code>.</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1><span class='rusttest'>fn main() {
let mut vec = vec![1];
vec.reserve(10);
assert!(vec.capacity() >= 11);
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>];
<span class='ident'>vec</span>.<span class='ident'>reserve</span>(<span class='number'>10</span>);
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>vec</span>.<span class='ident'>capacity</span>() <span class='op'>>=</span> <span class='number'>11</span>);
</pre>
</div><h4 id='method.reserve_exact' class='method'><code>fn <a href='#method.reserve_exact' class='fnname'>reserve_exact</a>(&mut self, additional: <a href='../../core/primitive.usize.html'>usize</a>)</code></h4>
<div class='docblock'><p>Reserves the minimum capacity for exactly <code>additional</code> more elements to
be inserted in the given <code>Vec<T></code>. Does nothing if the capacity is already
sufficient.</p>
<p>Note that the allocator may give the collection more space than it
requests. Therefore capacity can not be relied upon to be precisely
minimal. Prefer <code>reserve</code> if future insertions are expected.</p>
<h1 id="panics" class='section-header'><a
href="#panics">Panics</a></h1>
<p>Panics if the new capacity overflows <code>usize</code>.</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1><span class='rusttest'>fn main() {
let mut vec = vec![1];
vec.reserve_exact(10);
assert!(vec.capacity() >= 11);
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>];
<span class='ident'>vec</span>.<span class='ident'>reserve_exact</span>(<span class='number'>10</span>);
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>vec</span>.<span class='ident'>capacity</span>() <span class='op'>>=</span> <span class='number'>11</span>);
</pre>
</div><h4 id='method.shrink_to_fit' class='method'><code>fn <a href='#method.shrink_to_fit' class='fnname'>shrink_to_fit</a>(&mut self)</code></h4>
<div class='docblock'><p>Shrinks the capacity of the vector as much as possible.</p>
<p>It will drop down as close as possible to the length but the allocator
may still inform the vector that there is space for a few more elements.</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1><span class='rusttest'>#![feature(collections)]
extern crate collections;
fn main() {
let mut vec = Vec::with_capacity(10);
vec.push_all(&[1, 2, 3]);
assert_eq!(vec.capacity(), 10);
vec.shrink_to_fit();
assert!(vec.capacity() >= 3);
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='ident'>Vec</span>::<span class='ident'>with_capacity</span>(<span class='number'>10</span>);
<span class='ident'>vec</span>.<span class='ident'>push_all</span>(<span class='kw-2'>&</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'>vec</span>.<span class='ident'>capacity</span>(), <span class='number'>10</span>);
<span class='ident'>vec</span>.<span class='ident'>shrink_to_fit</span>();
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>vec</span>.<span class='ident'>capacity</span>() <span class='op'>>=</span> <span class='number'>3</span>);
</pre>
</div><h4 id='method.into_boxed_slice' class='method'><code>fn <a href='#method.into_boxed_slice' class='fnname'>into_boxed_slice</a>(self) -> <a class='struct' href='../../collections/boxed/struct.Box.html' title='collections::boxed::Box'>Box</a><<a href='../primitive.slice.html'>[T]</a>></code></h4>
<div class='docblock'><p>Converts the vector into Box<[T]>.</p>
<p>Note that this will drop any excess capacity. Calling this and
converting back to a vector with <code>into_vec()</code> is equivalent to calling
<code>shrink_to_fit()</code>.</p>
</div><h4 id='method.truncate' class='method'><code>fn <a href='#method.truncate' class='fnname'>truncate</a>(&mut self, len: <a href='../../core/primitive.usize.html'>usize</a>)</code></h4>
<div class='docblock'><p>Shorten a vector, dropping excess elements.</p>
<p>If <code>len</code> is greater than the vector's current length, this has no
effect.</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1><span class='rusttest'>#![feature(collections)]
extern crate collections;
fn main() {
let mut vec = vec![1, 2, 3, 4];
vec.truncate(2);
assert_eq!(vec, [1, 2]);
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>3</span>, <span class='number'>4</span>];
<span class='ident'>vec</span>.<span class='ident'>truncate</span>(<span class='number'>2</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, [<span class='number'>1</span>, <span class='number'>2</span>]);
</pre>
</div><h4 id='method.as_slice' class='method'><code>fn <a href='#method.as_slice' class='fnname'>as_slice</a>(&self) -> <a href='../primitive.slice.html'>&[T]</a></code></h4>
<div class='stability'><em class='stab unstable'>Unstable<p>: waiting on RFC revision</p>
</em></div><div class='docblock'><p>Extracts a slice containing the entire vector.</p>
</div><h4 id='method.as_mut_slice' class='method'><code>fn <a href='#method.as_mut_slice' class='fnname'>as_mut_slice</a>(&mut self) -> <a href='../primitive.slice.html'>&mut [T]</a></code></h4>
<div class='stability'><em class='stab unstable'>Unstable<p>: waiting on RFC revision</p>
</em></div><div class='docblock'><p>Deprecated: use <code>&mut s[..]</code> instead.</p>
</div><h4 id='method.set_len' class='method'><code>unsafe fn <a href='#method.set_len' class='fnname'>set_len</a>(&mut self, len: <a href='../../core/primitive.usize.html'>usize</a>)</code></h4>
<div class='docblock'><p>Sets the length of a vector.</p>
<p>This will explicitly set the size of the vector, without actually
modifying its buffers, so it is up to the caller to ensure that the
vector is actually the specified size.</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1><span class='rusttest'>fn main() {
let mut v = vec![1, 2, 3, 4];
unsafe {
v.set_len(1);
}
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>3</span>, <span class='number'>4</span>];
<span class='kw'>unsafe</span> {
<span class='ident'>v</span>.<span class='ident'>set_len</span>(<span class='number'>1</span>);
}
</pre>
</div><h4 id='method.swap_remove' class='method'><code>fn <a href='#method.swap_remove' class='fnname'>swap_remove</a>(&mut self, index: <a href='../../core/primitive.usize.html'>usize</a>) -> T</code></h4>
<div class='docblock'><p>Removes an element from anywhere in the vector and return it, replacing
it with the last element.</p>
<p>This does not preserve ordering, but is O(1).</p>
<h1 id="panics" class='section-header'><a
href="#panics">Panics</a></h1>
<p>Panics if <code>index</code> is out of bounds.</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1><span class='rusttest'>fn main() {
let mut v = vec!["foo", "bar", "baz", "qux"];
assert_eq!(v.swap_remove(1), "bar");
assert_eq!(v, ["foo", "qux", "baz"]);
assert_eq!(v.swap_remove(0), "foo");
assert_eq!(v, ["baz", "qux"]);
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>"foo"</span>, <span class='string'>"bar"</span>, <span class='string'>"baz"</span>, <span class='string'>"qux"</span>];
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>.<span class='ident'>swap_remove</span>(<span class='number'>1</span>), <span class='string'>"bar"</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>"foo"</span>, <span class='string'>"qux"</span>, <span class='string'>"baz"</span>]);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>.<span class='ident'>swap_remove</span>(<span class='number'>0</span>), <span class='string'>"foo"</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>"baz"</span>, <span class='string'>"qux"</span>]);
</pre>
</div><h4 id='method.insert' class='method'><code>fn <a href='#method.insert' class='fnname'>insert</a>(&mut self, index: <a href='../../core/primitive.usize.html'>usize</a>, element: T)</code></h4>
<div class='docblock'><p>Inserts an element at position <code>index</code> within the vector, shifting all
elements after position <code>i</code> one position to the right.</p>
<h1 id="panics" class='section-header'><a
href="#panics">Panics</a></h1>
<p>Panics if <code>index</code> is greater than the vector's length.</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1><span class='rusttest'>fn main() {
let mut vec = vec![1, 2, 3];
vec.insert(1, 4);
assert_eq!(vec, [1, 4, 2, 3]);
vec.insert(4, 5);
assert_eq!(vec, [1, 4, 2, 3, 5]);
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>3</span>];
<span class='ident'>vec</span>.<span class='ident'>insert</span>(<span class='number'>1</span>, <span class='number'>4</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, [<span class='number'>1</span>, <span class='number'>4</span>, <span class='number'>2</span>, <span class='number'>3</span>]);
<span class='ident'>vec</span>.<span class='ident'>insert</span>(<span class='number'>4</span>, <span class='number'>5</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, [<span class='number'>1</span>, <span class='number'>4</span>, <span class='number'>2</span>, <span class='number'>3</span>, <span class='number'>5</span>]);
</pre>
</div><h4 id='method.remove' class='method'><code>fn <a href='#method.remove' class='fnname'>remove</a>(&mut self, index: <a href='../../core/primitive.usize.html'>usize</a>) -> T</code></h4>
<div class='docblock'><p>Removes and returns the element at position <code>index</code> within the vector,
shifting all elements after position <code>index</code> one position to the left.</p>
<h1 id="panics" class='section-header'><a
href="#panics">Panics</a></h1>
<p>Panics if <code>index</code> is out of bounds.</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1><span class='rusttest'>#![feature(collections)]
extern crate collections;
fn main() {
let mut v = vec![1, 2, 3];
assert_eq!(v.remove(1), 2);
assert_eq!(v, [1, 3]);
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</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'>v</span>.<span class='ident'>remove</span>(<span class='number'>1</span>), <span class='number'>2</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='number'>1</span>, <span class='number'>3</span>]);
</pre>
</div><h4 id='method.retain' class='method'><code>fn <a href='#method.retain' class='fnname'>retain</a><F>(&mut self, f: F) <span class='where'>where F: <a class='trait' href='../../core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&T) -> <a href='../../core/primitive.bool.html'>bool</a></span></code></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(&e)</code> returns false.
This method operates in place and preserves the order of the retained
elements.</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1><span class='rusttest'>fn main() {
let mut vec = vec![1, 2, 3, 4];
vec.retain(|&x| x%2 == 0);
assert_eq!(vec, [2, 4]);
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>3</span>, <span class='number'>4</span>];
<span class='ident'>vec</span>.<span class='ident'>retain</span>(<span class='op'>|</span><span class='kw-2'>&</span><span class='ident'>x</span><span class='op'>|</span> <span class='ident'>x</span><span class='op'>%</span><span class='number'>2</span> <span class='op'>==</span> <span class='number'>0</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, [<span class='number'>2</span>, <span class='number'>4</span>]);
</pre>
</div><h4 id='method.push' class='method'><code>fn <a href='#method.push' class='fnname'>push</a>(&mut self, value: T)</code></h4>
<div class='docblock'><p>Appends an element to the back of a collection.</p>
<h1 id="panics" class='section-header'><a
href="#panics">Panics</a></h1>
<p>Panics if the number of elements in the vector overflows a <code>usize</code>.</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1><span class='rusttest'>fn main() {
let mut vec = vec!(1, 2);
vec.push(3);
assert_eq!(vec, [1, 2, 3]);
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>(<span class='number'>1</span>, <span class='number'>2</span>);
<span class='ident'>vec</span>.<span class='ident'>push</span>(<span class='number'>3</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, [<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>3</span>]);
</pre>
</div><h4 id='method.pop' class='method'><code>fn <a href='#method.pop' class='fnname'>pop</a>(&mut self) -> <a class='enum' href='../../core/option/enum.Option.html' title='core::option::Option'>Option</a><T></code></h4>
<div class='docblock'><p>Removes the last element from a vector and returns it, or <code>None</code> if it is empty.</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1><span class='rusttest'>fn main() {
let mut vec = vec![1, 2, 3];
assert_eq!(vec.pop(), Some(3));
assert_eq!(vec, [1, 2]);
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</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'>vec</span>.<span class='ident'>pop</span>(), <span class='prelude-val'>Some</span>(<span class='number'>3</span>));
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, [<span class='number'>1</span>, <span class='number'>2</span>]);
</pre>
</div><h4 id='method.append' class='method'><code>fn <a href='#method.append' class='fnname'>append</a>(&mut self, other: &mut Self)</code></h4>
<div class='stability'><em class='stab unstable'>Unstable<p>: new API, waiting for dust to settle</p>
</em></div><div class='docblock'><p>Moves all the elements of <code>other</code> into <code>Self</code>, leaving <code>other</code> empty.</p>
<h1 id="panics" class='section-header'><a
href="#panics">Panics</a></h1>
<p>Panics if the number of elements in the vector overflows a <code>usize</code>.</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1><span class='rusttest'>#![feature(collections)]
extern crate collections;
fn main() {
let mut vec = vec![1, 2, 3];
let mut vec2 = vec![4, 5, 6];
vec.append(&mut vec2);
assert_eq!(vec, [1, 2, 3, 4, 5, 6]);
assert_eq!(vec2, []);
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>3</span>];
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec2</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>4</span>, <span class='number'>5</span>, <span class='number'>6</span>];
<span class='ident'>vec</span>.<span class='ident'>append</span>(<span class='kw-2'>&</span><span class='kw-2'>mut</span> <span class='ident'>vec2</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</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='number'>6</span>]);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec2</span>, []);
</pre>
</div><h4 id='method.drain' class='method'><code>fn <a href='#method.drain' class='fnname'>drain</a><R>(&mut self, range: R) -> <a class='struct' href='../../collections/vec/struct.Drain.html' title='collections::vec::Drain'>Drain</a><T> <span class='where'>where R: <a class='trait' href='../../collections/range/trait.RangeArgument.html' title='collections::range::RangeArgument'>RangeArgument</a><<a href='../../core/primitive.usize.html'>usize</a>></span></code></h4>
<div class='stability'><em class='stab unstable'>Unstable<p>: recently added, matches RFC</p>
</em></div><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>
<h1 id="panics" class='section-header'><a
href="#panics">Panics</a></h1>
<p>Panics if the starting point is greater than the end point or if
the end point is greater than the length of the vector.</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1><span class='rusttest'>#![feature(collections_drain, collections_range)]
extern crate collections;
fn main() {
// Draining using `..` clears the whole vector.
let mut v = vec![1, 2, 3];
let u: Vec<_> = v.drain(..).collect();
assert_eq!(v, &[]);
assert_eq!(u, &[1, 2, 3]);
}</span><pre id='rust-example-rendered' class='rust '>
<span class='comment'>// Draining using `..` clears the whole vector.</span>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</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'>Vec</span><span class='op'><</span>_<span class='op'>></span> <span class='op'>=</span> <span class='ident'>v</span>.<span class='ident'>drain</span>(..).<span class='ident'>collect</span>();
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, <span class='kw-2'>&</span>[]);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>u</span>, <span class='kw-2'>&</span>[<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>3</span>]);
</pre>
</div><h4 id='method.clear' class='method'><code>fn <a href='#method.clear' class='fnname'>clear</a>(&mut self)</code></h4>
<div class='docblock'><p>Clears the vector, removing all values.</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1><span class='rusttest'>fn main() {
let mut v = vec![1, 2, 3];
v.clear();
assert!(v.is_empty());
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>3</span>];
<span class='ident'>v</span>.<span class='ident'>clear</span>();
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>v</span>.<span class='ident'>is_empty</span>());
</pre>
</div><h4 id='method.len' class='method'><code>fn <a href='#method.len' class='fnname'>len</a>(&self) -> <a href='../../core/primitive.usize.html'>usize</a></code></h4>
<div class='docblock'><p>Returns the number of elements in the vector.</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1><span class='rusttest'>fn main() {
let a = vec![1, 2, 3];
assert_eq!(a.len(), 3);
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='ident'>a</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</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'>a</span>.<span class='ident'>len</span>(), <span class='number'>3</span>);
</pre>
</div><h4 id='method.is_empty' class='method'><code>fn <a href='#method.is_empty' class='fnname'>is_empty</a>(&self) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<div class='docblock'><p>Returns <code>true</code> if the vector contains no elements.</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1><span class='rusttest'>fn main() {
let mut v = Vec::new();
assert!(v.is_empty());
v.push(1);
assert!(!v.is_empty());
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</span> <span class='ident'>Vec</span>::<span class='ident'>new</span>();
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>v</span>.<span class='ident'>is_empty</span>());
<span class='ident'>v</span>.<span class='ident'>push</span>(<span class='number'>1</span>);
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='op'>!</span><span class='ident'>v</span>.<span class='ident'>is_empty</span>());
</pre>
</div><h4 id='method.map_in_place' class='method'><code>fn <a href='#method.map_in_place' class='fnname'>map_in_place</a><U, F>(self, f: F) -> <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><U> <span class='where'>where F: <a class='trait' href='../../core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(T) -> U</span></code></h4>
<div class='stability'><em class='stab unstable'>Unstable<p>: API may change to provide stronger guarantees</p>
</em></div><div class='docblock'><p>Converts a <code>Vec<T></code> to a <code>Vec<U></code> where <code>T</code> and <code>U</code> have the same
size and in case they are not zero-sized the same minimal alignment.</p>
<h1 id="panics" class='section-header'><a
href="#panics">Panics</a></h1>
<p>Panics if <code>T</code> and <code>U</code> have differing sizes or are not zero-sized and
have differing minimal alignments.</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1><span class='rusttest'>#![feature(collections, core)]
extern crate collections;
fn main() {
let v = vec![0, 1, 2];
let w = v.map_in_place(|i| i + 3);
assert_eq!(&w[..], &[3, 4, 5]);
#[derive(PartialEq, Debug)]
struct Newtype(u8);
let bytes = vec![0x11, 0x22];
let newtyped_bytes = bytes.map_in_place(|x| Newtype(x));
assert_eq!(&newtyped_bytes[..], &[Newtype(0x11), Newtype(0x22)]);
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='ident'>v</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>0</span>, <span class='number'>1</span>, <span class='number'>2</span>];
<span class='kw'>let</span> <span class='ident'>w</span> <span class='op'>=</span> <span class='ident'>v</span>.<span class='ident'>map_in_place</span>(<span class='op'>|</span><span class='ident'>i</span><span class='op'>|</span> <span class='ident'>i</span> <span class='op'>+</span> <span class='number'>3</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='kw-2'>&</span><span class='ident'>w</span>[..], <span class='kw-2'>&</span>[<span class='number'>3</span>, <span class='number'>4</span>, <span class='number'>5</span>]);
<span class='attribute'>#[<span class='ident'>derive</span>(<span class='ident'>PartialEq</span>, <span class='ident'>Debug</span>)]</span>
<span class='kw'>struct</span> <span class='ident'>Newtype</span>(<span class='ident'>u8</span>);
<span class='kw'>let</span> <span class='ident'>bytes</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>0x11</span>, <span class='number'>0x22</span>];
<span class='kw'>let</span> <span class='ident'>newtyped_bytes</span> <span class='op'>=</span> <span class='ident'>bytes</span>.<span class='ident'>map_in_place</span>(<span class='op'>|</span><span class='ident'>x</span><span class='op'>|</span> <span class='ident'>Newtype</span>(<span class='ident'>x</span>));
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='kw-2'>&</span><span class='ident'>newtyped_bytes</span>[..], <span class='kw-2'>&</span>[<span class='ident'>Newtype</span>(<span class='number'>0x11</span>), <span class='ident'>Newtype</span>(<span class='number'>0x22</span>)]);
</pre>
</div><h4 id='method.split_off' class='method'><code>fn <a href='#method.split_off' class='fnname'>split_off</a>(&mut self, at: <a href='../../core/primitive.usize.html'>usize</a>) -> Self</code></h4>
<div class='stability'><em class='stab unstable'>Unstable<p>: new API, waiting for dust to settle</p>
</em></div><div class='docblock'><p>Splits the collection into two at the given index.</p>
<p>Returns a newly allocated <code>Self</code>. <code>self</code> contains elements <code>[0, at)</code>,
and the returned <code>Self</code> contains elements <code>[at, len)</code>.</p>
<p>Note that the capacity of <code>self</code> does not change.</p>
<h1 id="panics" class='section-header'><a
href="#panics">Panics</a></h1>
<p>Panics if <code>at > len</code>.</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1><span class='rusttest'>#![feature(collections)]
extern crate collections;
fn main() {
let mut vec = vec![1,2,3];
let vec2 = vec.split_off(1);
assert_eq!(vec, [1]);
assert_eq!(vec2, [2, 3]);
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>,<span class='number'>2</span>,<span class='number'>3</span>];
<span class='kw'>let</span> <span class='ident'>vec2</span> <span class='op'>=</span> <span class='ident'>vec</span>.<span class='ident'>split_off</span>(<span class='number'>1</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, [<span class='number'>1</span>]);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec2</span>, [<span class='number'>2</span>, <span class='number'>3</span>]);
</pre>
</div></div><h3 class='impl'><code>impl<T: <a class='trait' href='../../core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a>> <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h3><div class='impl-items'><h4 id='method.resize' class='method'><code>fn <a href='#method.resize' class='fnname'>resize</a>(&mut self, new_len: <a href='../../core/primitive.usize.html'>usize</a>, value: T)</code></h4>
<div class='stability'><em class='stab unstable'>Unstable<p>: matches collection reform specification; waiting for dust to settle</p>
</em></div><div class='docblock'><p>Resizes the <code>Vec</code> in-place so that <code>len()</code> is equal to <code>new_len</code>.</p>
<p>Calls either <code>extend()</code> or <code>truncate()</code> depending on whether <code>new_len</code>
is larger than the current value of <code>len()</code> or not.</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1><span class='rusttest'>#![feature(collections)]
extern crate collections;
fn main() {
let mut vec = vec!["hello"];
vec.resize(3, "world");
assert_eq!(vec, ["hello", "world", "world"]);
let mut vec = vec![1, 2, 3, 4];
vec.resize(2, 0);
assert_eq!(vec, [1, 2]);
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>"hello"</span>];
<span class='ident'>vec</span>.<span class='ident'>resize</span>(<span class='number'>3</span>, <span class='string'>"world"</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, [<span class='string'>"hello"</span>, <span class='string'>"world"</span>, <span class='string'>"world"</span>]);
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>3</span>, <span class='number'>4</span>];
<span class='ident'>vec</span>.<span class='ident'>resize</span>(<span class='number'>2</span>, <span class='number'>0</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, [<span class='number'>1</span>, <span class='number'>2</span>]);
</pre>
</div><h4 id='method.push_all' class='method'><code>fn <a href='#method.push_all' class='fnname'>push_all</a>(&mut self, other: <a href='../primitive.slice.html'>&[T]</a>)</code></h4>
<div class='stability'><em class='stab unstable'>Unstable<p>: likely to be replaced by a more optimized extend</p>
</em></div><div class='docblock'><p>Appends all elements in a slice to the <code>Vec</code>.</p>
<p>Iterates over the slice <code>other</code>, clones each element, and then appends
it to this <code>Vec</code>. The <code>other</code> vector is traversed in-order.</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1><span class='rusttest'>#![feature(collections)]
extern crate collections;
fn main() {
let mut vec = vec![1];
vec.push_all(&[2, 3, 4]);
assert_eq!(vec, [1, 2, 3, 4]);
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>];
<span class='ident'>vec</span>.<span class='ident'>push_all</span>(<span class='kw-2'>&</span>[<span class='number'>2</span>, <span class='number'>3</span>, <span class='number'>4</span>]);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, [<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>3</span>, <span class='number'>4</span>]);
</pre>
</div></div><h3 class='impl'><code>impl<T: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a>> <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h3><div class='impl-items'><h4 id='method.dedup' class='method'><code>fn <a href='#method.dedup' class='fnname'>dedup</a>(&mut self)</code></h4>
<div class='docblock'><p>Removes consecutive repeated elements in the vector.</p>
<p>If the vector is sorted, this removes all duplicates.</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1><span class='rusttest'>fn main() {
let mut vec = vec![1, 2, 2, 3, 2];
vec.dedup();
assert_eq!(vec, [1, 2, 3, 2]);
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>2</span>, <span class='number'>3</span>, <span class='number'>2</span>];
<span class='ident'>vec</span>.<span class='ident'>dedup</span>();
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, [<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>3</span>, <span class='number'>2</span>]);
</pre>
</div></div><h2 id='deref-methods'>Methods from <a class='trait' href='../../core/ops/trait.Deref.html' title='core::ops::Deref'>Deref</a><Target=<a href='../primitive.slice.html'>[T]</a>></h2><div class='impl-items'><h4 id='method.sort_by' class='method'><code>fn <a href='#method.sort_by' class='fnname'>sort_by</a><F>(&mut self, compare: F) <span class='where'>where F: <a class='trait' href='../../core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&T, &T) -> <a class='enum' href='../../core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a></span></code></h4>
<div class='docblock'><p>Sorts the slice, in place, using <code>compare</code> to compare
elements.</p>
<p>This sort is <code>O(n log n)</code> worst-case and stable, but allocates
approximately <code>2 * n</code>, where <code>n</code> is the length of <code>self</code>.</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1><span class='rusttest'>fn main() {
let mut v = [5, 4, 1, 3, 2];
v.sort_by(|a, b| a.cmp(b));
assert!(v == [1, 2, 3, 4, 5]);
// reverse sorting
v.sort_by(|a, b| b.cmp(a));
assert!(v == [5, 4, 3, 2, 1]);
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</span> [<span class='number'>5</span>, <span class='number'>4</span>, <span class='number'>1</span>, <span class='number'>3</span>, <span class='number'>2</span>];
<span class='ident'>v</span>.<span class='ident'>sort_by</span>(<span class='op'>|</span><span class='ident'>a</span>, <span class='ident'>b</span><span class='op'>|</span> <span class='ident'>a</span>.<span class='ident'>cmp</span>(<span class='ident'>b</span>));
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>v</span> <span class='op'>==</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='comment'>// reverse sorting</span>
<span class='ident'>v</span>.<span class='ident'>sort_by</span>(<span class='op'>|</span><span class='ident'>a</span>, <span class='ident'>b</span><span class='op'>|</span> <span class='ident'>b</span>.<span class='ident'>cmp</span>(<span class='ident'>a</span>));
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>v</span> <span class='op'>==</span> [<span class='number'>5</span>, <span class='number'>4</span>, <span class='number'>3</span>, <span class='number'>2</span>, <span class='number'>1</span>]);
</pre>
</div><h4 id='method.move_from' class='method'><code>fn <a href='#method.move_from' class='fnname'>move_from</a>(&mut self, src: <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T>, start: <a href='../../core/primitive.usize.html'>usize</a>, end: <a href='../../core/primitive.usize.html'>usize</a>) -> <a href='../../core/primitive.usize.html'>usize</a></code></h4>
<div class='stability'><em class='stab unstable'>Unstable<p>: uncertain about this API approach</p>
</em></div><div class='docblock'><p>Consumes <code>src</code> and moves as many elements as it can into <code>self</code>
from the range [start,end).</p>
<p>Returns the number of elements copied (the shorter of <code>self.len()</code>
and <code>end - start</code>).</p>
<h1 id="arguments" class='section-header'><a
href="#arguments">Arguments</a></h1>
<ul>
<li>src - A mutable vector of <code>T</code></li>
<li>start - The index into <code>src</code> to start copying from</li>
<li>end - The index into <code>src</code> to stop copying from</li>
</ul>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1><span class='rusttest'>#![feature(collections)]
extern crate collections;
fn main() {
let mut a = [1, 2, 3, 4, 5];
let b = vec![6, 7, 8];
let num_moved = a.move_from(b, 0, 3);
assert_eq!(num_moved, 3);
assert!(a == [6, 7, 8, 4, 5]);
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>a</span> <span class='op'>=</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='kw'>let</span> <span class='ident'>b</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>6</span>, <span class='number'>7</span>, <span class='number'>8</span>];
<span class='kw'>let</span> <span class='ident'>num_moved</span> <span class='op'>=</span> <span class='ident'>a</span>.<span class='ident'>move_from</span>(<span class='ident'>b</span>, <span class='number'>0</span>, <span class='number'>3</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>num_moved</span>, <span class='number'>3</span>);
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>a</span> <span class='op'>==</span> [<span class='number'>6</span>, <span class='number'>7</span>, <span class='number'>8</span>, <span class='number'>4</span>, <span class='number'>5</span>]);
</pre>
</div><h4 id='method.split_at' class='method'><code>fn <a href='#method.split_at' class='fnname'>split_at</a>(&self, mid: <a href='../../core/primitive.usize.html'>usize</a>) -> <a href='../../core/primitive.tuple.html'>(<a href='../primitive.slice.html'>&[T]</a>, <a href='../primitive.slice.html'>&[T]</a>)</a></code></h4>
<div class='docblock'><p>Divides one slice into two at an index.</p>
<p>The first will contain all indices from <code>[0, mid)</code> (excluding
the index <code>mid</code> itself) and the second will contain all
indices from <code>[mid, len)</code> (excluding the index <code>len</code> itself).</p>
<p>Panics if <code>mid > len</code>.</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1><span class='rusttest'>fn main() {
let v = [10, 40, 30, 20, 50];
let (v1, v2) = v.split_at(2);
assert_eq!([10, 40], v1);
assert_eq!([30, 20, 50], v2);
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='ident'>v</span> <span class='op'>=</span> [<span class='number'>10</span>, <span class='number'>40</span>, <span class='number'>30</span>, <span class='number'>20</span>, <span class='number'>50</span>];
<span class='kw'>let</span> (<span class='ident'>v1</span>, <span class='ident'>v2</span>) <span class='op'>=</span> <span class='ident'>v</span>.<span class='ident'>split_at</span>(<span class='number'>2</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>([<span class='number'>10</span>, <span class='number'>40</span>], <span class='ident'>v1</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>([<span class='number'>30</span>, <span class='number'>20</span>, <span class='number'>50</span>], <span class='ident'>v2</span>);
</pre>
</div><h4 id='method.iter' class='method'><code>fn <a href='#method.iter' class='fnname'>iter</a>(&self) -> <a class='struct' href='../../collections/slice/struct.Iter.html' title='collections::slice::Iter'>Iter</a><T></code></h4>
<div class='docblock'><p>Returns an iterator over the slice.</p>
</div><h4 id='method.split' class='method'><code>fn <a href='#method.split' class='fnname'>split</a><F>(&self, pred: F) -> <a class='struct' href='../../collections/slice/struct.Split.html' title='collections::slice::Split'>Split</a><T, F> <span class='where'>where F: <a class='trait' href='../../core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&T) -> <a href='../../core/primitive.bool.html'>bool</a></span></code></h4>
<div class='docblock'><p>Returns an iterator over subslices separated by elements that match
<code>pred</code>. The matched element is not contained in the subslices.</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1>
<p>Print the slice split by numbers divisible by 3 (i.e. <code>[10, 40]</code>,
<code>[20]</code>, <code>[50]</code>):</p>
<span class='rusttest'>fn main() {
let v = [10, 40, 30, 20, 60, 50];
for group in v.split(|num| *num % 3 == 0) {
println!("{:?}", group);
}
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='ident'>v</span> <span class='op'>=</span> [<span class='number'>10</span>, <span class='number'>40</span>, <span class='number'>30</span>, <span class='number'>20</span>, <span class='number'>60</span>, <span class='number'>50</span>];
<span class='kw'>for</span> <span class='ident'>group</span> <span class='kw'>in</span> <span class='ident'>v</span>.<span class='ident'>split</span>(<span class='op'>|</span><span class='ident'>num</span><span class='op'>|</span> <span class='op'>*</span><span class='ident'>num</span> <span class='op'>%</span> <span class='number'>3</span> <span class='op'>==</span> <span class='number'>0</span>) {
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>"{:?}"</span>, <span class='ident'>group</span>);
}
</pre>
</div><h4 id='method.splitn' class='method'><code>fn <a href='#method.splitn' class='fnname'>splitn</a><F>(&self, n: <a href='../../core/primitive.usize.html'>usize</a>, pred: F) -> <a class='struct' href='../../collections/slice/struct.SplitN.html' title='collections::slice::SplitN'>SplitN</a><T, F> <span class='where'>where F: <a class='trait' href='../../core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&T) -> <a href='../../core/primitive.bool.html'>bool</a></span></code></h4>
<div class='docblock'><p>Returns an iterator over subslices separated by elements that match
<code>pred</code>, limited to returning at most <code>n</code> items. The matched element is
not contained in the subslices.</p>
<p>The last element returned, if any, will contain the remainder of the
slice.</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1>
<p>Print the slice split once by numbers divisible by 3 (i.e. <code>[10, 40]</code>,
<code>[20, 60, 50]</code>):</p>
<span class='rusttest'>fn main() {
let v = [10, 40, 30, 20, 60, 50];
for group in v.splitn(2, |num| *num % 3 == 0) {
println!("{:?}", group);
}
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='ident'>v</span> <span class='op'>=</span> [<span class='number'>10</span>, <span class='number'>40</span>, <span class='number'>30</span>, <span class='number'>20</span>, <span class='number'>60</span>, <span class='number'>50</span>];
<span class='kw'>for</span> <span class='ident'>group</span> <span class='kw'>in</span> <span class='ident'>v</span>.<span class='ident'>splitn</span>(<span class='number'>2</span>, <span class='op'>|</span><span class='ident'>num</span><span class='op'>|</span> <span class='op'>*</span><span class='ident'>num</span> <span class='op'>%</span> <span class='number'>3</span> <span class='op'>==</span> <span class='number'>0</span>) {
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>"{:?}"</span>, <span class='ident'>group</span>);
}
</pre>
</div><h4 id='method.rsplitn' class='method'><code>fn <a href='#method.rsplitn' class='fnname'>rsplitn</a><F>(&self, n: <a href='../../core/primitive.usize.html'>usize</a>, pred: F) -> <a class='struct' href='../../collections/slice/struct.RSplitN.html' title='collections::slice::RSplitN'>RSplitN</a><T, F> <span class='where'>where F: <a class='trait' href='../../core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&T) -> <a href='../../core/primitive.bool.html'>bool</a></span></code></h4>
<div class='docblock'><p>Returns an iterator over subslices separated by elements that match
<code>pred</code> limited to returning at most <code>n</code> items. This starts at the end of
the slice and works backwards. The matched element is not contained in
the subslices.</p>
<p>The last element returned, if any, will contain the remainder of the
slice.</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1>
<p>Print the slice split once, starting from the end, by numbers divisible
by 3 (i.e. <code>[50]</code>, <code>[10, 40, 30, 20]</code>):</p>
<span class='rusttest'>fn main() {
let v = [10, 40, 30, 20, 60, 50];
for group in v.rsplitn(2, |num| *num % 3 == 0) {
println!("{:?}", group);
}
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='ident'>v</span> <span class='op'>=</span> [<span class='number'>10</span>, <span class='number'>40</span>, <span class='number'>30</span>, <span class='number'>20</span>, <span class='number'>60</span>, <span class='number'>50</span>];
<span class='kw'>for</span> <span class='ident'>group</span> <span class='kw'>in</span> <span class='ident'>v</span>.<span class='ident'>rsplitn</span>(<span class='number'>2</span>, <span class='op'>|</span><span class='ident'>num</span><span class='op'>|</span> <span class='op'>*</span><span class='ident'>num</span> <span class='op'>%</span> <span class='number'>3</span> <span class='op'>==</span> <span class='number'>0</span>) {
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>"{:?}"</span>, <span class='ident'>group</span>);
}
</pre>
</div><h4 id='method.windows' class='method'><code>fn <a href='#method.windows' class='fnname'>windows</a>(&self, size: <a href='../../core/primitive.usize.html'>usize</a>) -> <a class='struct' href='../../collections/slice/struct.Windows.html' title='collections::slice::Windows'>Windows</a><T></code></h4>
<div class='docblock'><p>Returns an iterator over all contiguous windows of length
<code>size</code>. The windows overlap. If the slice is shorter than
<code>size</code>, the iterator returns no values.</p>
<h1 id="panics" class='section-header'><a
href="#panics">Panics</a></h1>
<p>Panics if <code>size</code> is 0.</p>
<h1 id="example" class='section-header'><a
href="#example">Example</a></h1>
<p>Print the adjacent pairs of a slice (i.e. <code>[1,2]</code>, <code>[2,3]</code>,
<code>[3,4]</code>):</p>
<span class='rusttest'>fn main() {
let v = &[1, 2, 3, 4];
for win in v.windows(2) {
println!("{:?}", win);
}
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='ident'>v</span> <span class='op'>=</span> <span class='kw-2'>&</span>[<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>3</span>, <span class='number'>4</span>];
<span class='kw'>for</span> <span class='ident'>win</span> <span class='kw'>in</span> <span class='ident'>v</span>.<span class='ident'>windows</span>(<span class='number'>2</span>) {
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>"{:?}"</span>, <span class='ident'>win</span>);
}
</pre>
</div><h4 id='method.chunks' class='method'><code>fn <a href='#method.chunks' class='fnname'>chunks</a>(&self, size: <a href='../../core/primitive.usize.html'>usize</a>) -> <a class='struct' href='../../collections/slice/struct.Chunks.html' title='collections::slice::Chunks'>Chunks</a><T></code></h4>
<div class='docblock'><p>Returns an iterator over <code>size</code> elements of the slice at a
time. The chunks do not overlap. If <code>size</code> does not divide the
length of the slice, then the last chunk will not have length
<code>size</code>.</p>
<h1 id="panics" class='section-header'><a
href="#panics">Panics</a></h1>
<p>Panics if <code>size</code> is 0.</p>
<h1 id="example" class='section-header'><a
href="#example">Example</a></h1>
<p>Print the slice two elements at a time (i.e. <code>[1,2]</code>,
<code>[3,4]</code>, <code>[5]</code>):</p>
<span class='rusttest'>fn main() {
let v = &[1, 2, 3, 4, 5];
for win in v.chunks(2) {
println!("{:?}", win);
}
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='ident'>v</span> <span class='op'>=</span> <span class='kw-2'>&</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='kw'>for</span> <span class='ident'>win</span> <span class='kw'>in</span> <span class='ident'>v</span>.<span class='ident'>chunks</span>(<span class='number'>2</span>) {
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>"{:?}"</span>, <span class='ident'>win</span>);
}
</pre>
</div><h4 id='method.get' class='method'><code>fn <a href='#method.get' class='fnname'>get</a>(&self, index: <a href='../../core/primitive.usize.html'>usize</a>) -> <a class='enum' href='../../core/option/enum.Option.html' title='core::option::Option'>Option</a><&T></code></h4>
<div class='docblock'><p>Returns the element of a slice at the given index, or <code>None</code> if the
index is out of bounds.</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1><span class='rusttest'>fn main() {
let v = [10, 40, 30];
assert_eq!(Some(&40), v.get(1));
assert_eq!(None, v.get(3));
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='ident'>v</span> <span class='op'>=</span> [<span class='number'>10</span>, <span class='number'>40</span>, <span class='number'>30</span>];
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='prelude-val'>Some</span>(<span class='kw-2'>&</span><span class='number'>40</span>), <span class='ident'>v</span>.<span class='ident'>get</span>(<span class='number'>1</span>));
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='prelude-val'>None</span>, <span class='ident'>v</span>.<span class='ident'>get</span>(<span class='number'>3</span>));
</pre>
</div><h4 id='method.first' class='method'><code>fn <a href='#method.first' class='fnname'>first</a>(&self) -> <a class='enum' href='../../core/option/enum.Option.html' title='core::option::Option'>Option</a><&T></code></h4>
<div class='docblock'><p>Returns the first element of a slice, or <code>None</code> if it is empty.</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1><span class='rusttest'>fn main() {
let v = [10, 40, 30];
assert_eq!(Some(&10), v.first());
let w: &[i32] = &[];
assert_eq!(None, w.first());
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='ident'>v</span> <span class='op'>=</span> [<span class='number'>10</span>, <span class='number'>40</span>, <span class='number'>30</span>];
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='prelude-val'>Some</span>(<span class='kw-2'>&</span><span class='number'>10</span>), <span class='ident'>v</span>.<span class='ident'>first</span>());
<span class='kw'>let</span> <span class='ident'>w</span>: <span class='kw-2'>&</span>[<span class='ident'>i32</span>] <span class='op'>=</span> <span class='kw-2'>&</span>[];
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='prelude-val'>None</span>, <span class='ident'>w</span>.<span class='ident'>first</span>());
</pre>
</div><h4 id='method.tail' class='method'><code>fn <a href='#method.tail' class='fnname'>tail</a>(&self) -> <a href='../primitive.slice.html'>&[T]</a></code></h4>
<div class='stability'><em class='stab unstable'>Unstable<p>: likely to be renamed</p>
</em></div><div class='docblock'><p>Returns all but the first element of a slice.</p>
</div><h4 id='method.init' class='method'><code>fn <a href='#method.init' class='fnname'>init</a>(&self) -> <a href='../primitive.slice.html'>&[T]</a></code></h4>
<div class='stability'><em class='stab unstable'>Unstable<p>: likely to be renamed</p>
</em></div><div class='docblock'><p>Returns all but the last element of a slice.</p>
</div><h4 id='method.last' class='method'><code>fn <a href='#method.last' class='fnname'>last</a>(&self) -> <a class='enum' href='../../core/option/enum.Option.html' title='core::option::Option'>Option</a><&T></code></h4>
<div class='docblock'><p>Returns the last element of a slice, or <code>None</code> if it is empty.</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1><span class='rusttest'>fn main() {
let v = [10, 40, 30];
assert_eq!(Some(&30), v.last());
let w: &[i32] = &[];
assert_eq!(None, w.last());
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='ident'>v</span> <span class='op'>=</span> [<span class='number'>10</span>, <span class='number'>40</span>, <span class='number'>30</span>];
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='prelude-val'>Some</span>(<span class='kw-2'>&</span><span class='number'>30</span>), <span class='ident'>v</span>.<span class='ident'>last</span>());
<span class='kw'>let</span> <span class='ident'>w</span>: <span class='kw-2'>&</span>[<span class='ident'>i32</span>] <span class='op'>=</span> <span class='kw-2'>&</span>[];
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='prelude-val'>None</span>, <span class='ident'>w</span>.<span class='ident'>last</span>());
</pre>
</div><h4 id='method.get_unchecked' class='method'><code>unsafe fn <a href='#method.get_unchecked' class='fnname'>get_unchecked</a>(&self, index: <a href='../../core/primitive.usize.html'>usize</a>) -> &T</code></h4>
<div class='docblock'><p>Returns a pointer to the element at the given index, without doing
bounds checking.</p>
</div><h4 id='method.as_ptr' class='method'><code>fn <a href='#method.as_ptr' class='fnname'>as_ptr</a>(&self) -> <a href='../../core/primitive.pointer.html'>*const T</a></code></h4>
<div class='docblock'><p>Returns an unsafe pointer to the slice's buffer</p>
<p>The caller must ensure that the slice outlives the pointer this
function returns, or else it will end up pointing to garbage.</p>
<p>Modifying the slice may cause its buffer to be reallocated, which
would also make any pointers to it invalid.</p>
</div><h4 id='method.binary_search_by' class='method'><code>fn <a href='#method.binary_search_by' class='fnname'>binary_search_by</a><F>(&self, f: F) -> <a class='enum' href='../../core/result/enum.Result.html' title='core::result::Result'>Result</a><<a href='../../core/primitive.usize.html'>usize</a>, <a href='../../core/primitive.usize.html'>usize</a>> <span class='where'>where F: <a class='trait' href='../../core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&T) -> <a class='enum' href='../../core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a></span></code></h4>
<div class='docblock'><p>Binary search a sorted slice with a comparator function.</p>
<p>The comparator function should implement an order consistent
with the sort order of the underlying slice, returning an
order code that indicates whether its argument is <code>Less</code>,
<code>Equal</code> or <code>Greater</code> the desired target.</p>
<p>If a matching value is found then returns <code>Ok</code>, containing
the index for the matched element; if no match is found then
<code>Err</code> is returned, containing the index where a matching
element could be inserted while maintaining sorted order.</p>
<h1 id="example" class='section-header'><a
href="#example">Example</a></h1>
<p>Looks up a series of four elements. The first is found, with a
uniquely determined position; the second and third are not
found; the fourth could match any position in <code>[1,4]</code>.</p>
<span class='rusttest'>#![feature(core)]
fn main() {
let s = [0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55];
let seek = 13;
assert_eq!(s.binary_search_by(|probe| probe.cmp(&seek)), Ok(9));
let seek = 4;
assert_eq!(s.binary_search_by(|probe| probe.cmp(&seek)), Err(7));
let seek = 100;
assert_eq!(s.binary_search_by(|probe| probe.cmp(&seek)), Err(13));
let seek = 1;
let r = s.binary_search_by(|probe| probe.cmp(&seek));
assert!(match r { Ok(1...4) => true, _ => false, });
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='ident'>s</span> <span class='op'>=</span> [<span class='number'>0</span>, <span class='number'>1</span>, <span class='number'>1</span>, <span class='number'>1</span>, <span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>3</span>, <span class='number'>5</span>, <span class='number'>8</span>, <span class='number'>13</span>, <span class='number'>21</span>, <span class='number'>34</span>, <span class='number'>55</span>];
<span class='kw'>let</span> <span class='ident'>seek</span> <span class='op'>=</span> <span class='number'>13</span>;
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>s</span>.<span class='ident'>binary_search_by</span>(<span class='op'>|</span><span class='ident'>probe</span><span class='op'>|</span> <span class='ident'>probe</span>.<span class='ident'>cmp</span>(<span class='kw-2'>&</span><span class='ident'>seek</span>)), <span class='prelude-val'>Ok</span>(<span class='number'>9</span>));
<span class='kw'>let</span> <span class='ident'>seek</span> <span class='op'>=</span> <span class='number'>4</span>;
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>s</span>.<span class='ident'>binary_search_by</span>(<span class='op'>|</span><span class='ident'>probe</span><span class='op'>|</span> <span class='ident'>probe</span>.<span class='ident'>cmp</span>(<span class='kw-2'>&</span><span class='ident'>seek</span>)), <span class='prelude-val'>Err</span>(<span class='number'>7</span>));
<span class='kw'>let</span> <span class='ident'>seek</span> <span class='op'>=</span> <span class='number'>100</span>;
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>s</span>.<span class='ident'>binary_search_by</span>(<span class='op'>|</span><span class='ident'>probe</span><span class='op'>|</span> <span class='ident'>probe</span>.<span class='ident'>cmp</span>(<span class='kw-2'>&</span><span class='ident'>seek</span>)), <span class='prelude-val'>Err</span>(<span class='number'>13</span>));
<span class='kw'>let</span> <span class='ident'>seek</span> <span class='op'>=</span> <span class='number'>1</span>;
<span class='kw'>let</span> <span class='ident'>r</span> <span class='op'>=</span> <span class='ident'>s</span>.<span class='ident'>binary_search_by</span>(<span class='op'>|</span><span class='ident'>probe</span><span class='op'>|</span> <span class='ident'>probe</span>.<span class='ident'>cmp</span>(<span class='kw-2'>&</span><span class='ident'>seek</span>));
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='kw'>match</span> <span class='ident'>r</span> { <span class='prelude-val'>Ok</span>(<span class='number'>1</span>...<span class='number'>4</span>) <span class='op'>=></span> <span class='boolval'>true</span>, _ <span class='op'>=></span> <span class='boolval'>false</span>, });
</pre>
</div><h4 id='method.len' class='method'><code>fn <a href='#method.len' class='fnname'>len</a>(&self) -> <a href='../../core/primitive.usize.html'>usize</a></code></h4>
<div class='docblock'><p>Returns the number of elements in the slice.</p>
<h1 id="example" class='section-header'><a
href="#example">Example</a></h1><span class='rusttest'>fn main() {
let a = [1, 2, 3];
assert_eq!(a.len(), 3);
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='ident'>a</span> <span class='op'>=</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'>a</span>.<span class='ident'>len</span>(), <span class='number'>3</span>);
</pre>
</div><h4 id='method.is_empty' class='method'><code>fn <a href='#method.is_empty' class='fnname'>is_empty</a>(&self) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<div class='docblock'><p>Returns true if the slice has a length of 0</p>
<h1 id="example" class='section-header'><a
href="#example">Example</a></h1><span class='rusttest'>fn main() {
let a = [1, 2, 3];
assert!(!a.is_empty());
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='ident'>a</span> <span class='op'>=</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='op'>!</span><span class='ident'>a</span>.<span class='ident'>is_empty</span>());
</pre>
</div><h4 id='method.get_mut' class='method'><code>fn <a href='#method.get_mut' class='fnname'>get_mut</a>(&mut self, index: <a href='../../core/primitive.usize.html'>usize</a>) -> <a class='enum' href='../../core/option/enum.Option.html' title='core::option::Option'>Option</a><&mut T></code></h4>
<div class='docblock'><p>Returns a mutable reference to the element at the given index,
or <code>None</code> if the index is out of bounds</p>
</div><h4 id='method.iter_mut' class='method'><code>fn <a href='#method.iter_mut' class='fnname'>iter_mut</a>(&mut self) -> <a class='struct' href='../../collections/slice/struct.IterMut.html' title='collections::slice::IterMut'>IterMut</a><T></code></h4>
<div class='docblock'><p>Returns an iterator that allows modifying each value</p>
</div><h4 id='method.first_mut' class='method'><code>fn <a href='#method.first_mut' class='fnname'>first_mut</a>(&mut self) -> <a class='enum' href='../../core/option/enum.Option.html' title='core::option::Option'>Option</a><&mut T></code></h4>
<div class='docblock'><p>Returns a mutable pointer to the first element of a slice, or <code>None</code> if it is empty</p>
</div><h4 id='method.tail_mut' class='method'><code>fn <a href='#method.tail_mut' class='fnname'>tail_mut</a>(&mut self) -> <a href='../primitive.slice.html'>&mut [T]</a></code></h4>
<div class='stability'><em class='stab unstable'>Unstable<p>: likely to be renamed or removed</p>
</em></div><div class='docblock'><p>Returns all but the first element of a mutable slice</p>
</div><h4 id='method.init_mut' class='method'><code>fn <a href='#method.init_mut' class='fnname'>init_mut</a>(&mut self) -> <a href='../primitive.slice.html'>&mut [T]</a></code></h4>
<div class='stability'><em class='stab unstable'>Unstable<p>: likely to be renamed or removed</p>
</em></div><div class='docblock'><p>Returns all but the last element of a mutable slice</p>
</div><h4 id='method.last_mut' class='method'><code>fn <a href='#method.last_mut' class='fnname'>last_mut</a>(&mut self) -> <a class='enum' href='../../core/option/enum.Option.html' title='core::option::Option'>Option</a><&mut T></code></h4>
<div class='docblock'><p>Returns a mutable pointer to the last item in the slice.</p>
</div><h4 id='method.split_mut' class='method'><code>fn <a href='#method.split_mut' class='fnname'>split_mut</a><F>(&mut self, pred: F) -> <a class='struct' href='../../collections/slice/struct.SplitMut.html' title='collections::slice::SplitMut'>SplitMut</a><T, F> <span class='where'>where F: <a class='trait' href='../../core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&T) -> <a href='../../core/primitive.bool.html'>bool</a></span></code></h4>
<div class='docblock'><p>Returns an iterator over mutable subslices separated by elements that
match <code>pred</code>. The matched element is not contained in the subslices.</p>
</div><h4 id='method.splitn_mut' class='method'><code>fn <a href='#method.splitn_mut' class='fnname'>splitn_mut</a><F>(&mut self, n: <a href='../../core/primitive.usize.html'>usize</a>, pred: F) -> <a class='struct' href='../../collections/slice/struct.SplitNMut.html' title='collections::slice::SplitNMut'>SplitNMut</a><T, F> <span class='where'>where F: <a class='trait' href='../../core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&T) -> <a href='../../core/primitive.bool.html'>bool</a></span></code></h4>
<div class='docblock'><p>Returns an iterator over subslices separated by elements that match
<code>pred</code>, limited to returning at most <code>n</code> items. The matched element is
not contained in the subslices.</p>
<p>The last element returned, if any, will contain the remainder of the
slice.</p>
</div><h4 id='method.rsplitn_mut' class='method'><code>fn <a href='#method.rsplitn_mut' class='fnname'>rsplitn_mut</a><F>(&mut self, n: <a href='../../core/primitive.usize.html'>usize</a>, pred: F) -> <a class='struct' href='../../collections/slice/struct.RSplitNMut.html' title='collections::slice::RSplitNMut'>RSplitNMut</a><T, F> <span class='where'>where F: <a class='trait' href='../../core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&T) -> <a href='../../core/primitive.bool.html'>bool</a></span></code></h4>
<div class='docblock'><p>Returns an iterator over subslices separated by elements that match
<code>pred</code> limited to returning at most <code>n</code> items. This starts at the end of
the slice and works backwards. The matched element is not contained in
the subslices.</p>
<p>The last element returned, if any, will contain the remainder of the
slice.</p>
</div><h4 id='method.chunks_mut' class='method'><code>fn <a href='#method.chunks_mut' class='fnname'>chunks_mut</a>(&mut self, chunk_size: <a href='../../core/primitive.usize.html'>usize</a>) -> <a class='struct' href='../../collections/slice/struct.ChunksMut.html' title='collections::slice::ChunksMut'>ChunksMut</a><T></code></h4>
<div class='docblock'><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time.
The chunks are mutable and do not overlap. If <code>chunk_size</code> does
not divide the length of the slice, then the last chunk will not
have length <code>chunk_size</code>.</p>
<h1 id="panics" class='section-header'><a
href="#panics">Panics</a></h1>
<p>Panics if <code>chunk_size</code> is 0.</p>
</div><h4 id='method.swap' class='method'><code>fn <a href='#method.swap' class='fnname'>swap</a>(&mut self, a: <a href='../../core/primitive.usize.html'>usize</a>, b: <a href='../../core/primitive.usize.html'>usize</a>)</code></h4>
<div class='docblock'><p>Swaps two elements in a slice.</p>
<h1 id="arguments" class='section-header'><a
href="#arguments">Arguments</a></h1>
<ul>
<li>a - The index of the first element</li>
<li>b - The index of the second element</li>
</ul>
<h1 id="panics" class='section-header'><a
href="#panics">Panics</a></h1>
<p>Panics if <code>a</code> or <code>b</code> are out of bounds.</p>
<h1 id="example" class='section-header'><a
href="#example">Example</a></h1><span class='rusttest'>fn main() {
let mut v = ["a", "b", "c", "d"];
v.swap(1, 3);
assert!(v == ["a", "d", "c", "b"]);
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</span> [<span class='string'>"a"</span>, <span class='string'>"b"</span>, <span class='string'>"c"</span>, <span class='string'>"d"</span>];
<span class='ident'>v</span>.<span class='ident'>swap</span>(<span class='number'>1</span>, <span class='number'>3</span>);
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>v</span> <span class='op'>==</span> [<span class='string'>"a"</span>, <span class='string'>"d"</span>, <span class='string'>"c"</span>, <span class='string'>"b"</span>]);
</pre>
</div><h4 id='method.split_at_mut' class='method'><code>fn <a href='#method.split_at_mut' class='fnname'>split_at_mut</a>(&mut self, mid: <a href='../../core/primitive.usize.html'>usize</a>) -> <a href='../../core/primitive.tuple.html'>(<a href='../primitive.slice.html'>&mut [T]</a>, <a href='../primitive.slice.html'>&mut [T]</a>)</a></code></h4>
<div class='docblock'><p>Divides one <code>&mut</code> into two at an index.</p>
<p>The first will contain all indices from <code>[0, mid)</code> (excluding
the index <code>mid</code> itself) and the second will contain all
indices from <code>[mid, len)</code> (excluding the index <code>len</code> itself).</p>
<h1 id="panics" class='section-header'><a
href="#panics">Panics</a></h1>
<p>Panics if <code>mid > len</code>.</p>
<h1 id="example" class='section-header'><a
href="#example">Example</a></h1><span class='rusttest'>fn main() {
let mut v = [1, 2, 3, 4, 5, 6];
// scoped to restrict the lifetime of the borrows
{
let (left, right) = v.split_at_mut(0);
assert!(left == []);
assert!(right == [1, 2, 3, 4, 5, 6]);
}
{
let (left, right) = v.split_at_mut(2);
assert!(left == [1, 2]);
assert!(right == [3, 4, 5, 6]);
}
{
let (left, right) = v.split_at_mut(6);
assert!(left == [1, 2, 3, 4, 5, 6]);
assert!(right == []);
}
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</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='number'>6</span>];
<span class='comment'>// scoped to restrict the lifetime of the borrows</span>
{
<span class='kw'>let</span> (<span class='ident'>left</span>, <span class='ident'>right</span>) <span class='op'>=</span> <span class='ident'>v</span>.<span class='ident'>split_at_mut</span>(<span class='number'>0</span>);
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>left</span> <span class='op'>==</span> []);
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>right</span> <span class='op'>==</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='number'>6</span>]);
}
{
<span class='kw'>let</span> (<span class='ident'>left</span>, <span class='ident'>right</span>) <span class='op'>=</span> <span class='ident'>v</span>.<span class='ident'>split_at_mut</span>(<span class='number'>2</span>);
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>left</span> <span class='op'>==</span> [<span class='number'>1</span>, <span class='number'>2</span>]);
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>right</span> <span class='op'>==</span> [<span class='number'>3</span>, <span class='number'>4</span>, <span class='number'>5</span>, <span class='number'>6</span>]);
}
{
<span class='kw'>let</span> (<span class='ident'>left</span>, <span class='ident'>right</span>) <span class='op'>=</span> <span class='ident'>v</span>.<span class='ident'>split_at_mut</span>(<span class='number'>6</span>);
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>left</span> <span class='op'>==</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='number'>6</span>]);
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>right</span> <span class='op'>==</span> []);
}
</pre>
</div><h4 id='method.reverse' class='method'><code>fn <a href='#method.reverse' class='fnname'>reverse</a>(&mut self)</code></h4>
<div class='docblock'><p>Reverse the order of elements in a slice, in place.</p>
<h1 id="example" class='section-header'><a
href="#example">Example</a></h1><span class='rusttest'>fn main() {
let mut v = [1, 2, 3];
v.reverse();
assert!(v == [3, 2, 1]);
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</span> [<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>3</span>];
<span class='ident'>v</span>.<span class='ident'>reverse</span>();
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>v</span> <span class='op'>==</span> [<span class='number'>3</span>, <span class='number'>2</span>, <span class='number'>1</span>]);
</pre>
</div><h4 id='method.get_unchecked_mut' class='method'><code>unsafe fn <a href='#method.get_unchecked_mut' class='fnname'>get_unchecked_mut</a>(&mut self, index: <a href='../../core/primitive.usize.html'>usize</a>) -> &mut T</code></h4>
<div class='docblock'><p>Returns an unsafe mutable pointer to the element in index</p>
</div><h4 id='method.as_mut_ptr' class='method'><code>fn <a href='#method.as_mut_ptr' class='fnname'>as_mut_ptr</a>(&mut self) -> <a href='../../core/primitive.pointer.html'>*mut T</a></code></h4>
<div class='docblock'><p>Returns an unsafe mutable pointer to the slice's buffer.</p>
<p>The caller must ensure that the slice outlives the pointer this
function returns, or else it will end up pointing to garbage.</p>
<p>Modifying the slice may cause its buffer to be reallocated, which
would also make any pointers to it invalid.</p>
</div><h4 id='method.to_vec' class='method'><code>fn <a href='#method.to_vec' class='fnname'>to_vec</a>(&self) -> <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T> <span class='where'>where T: <a class='trait' href='../../core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span></code></h4>
<div class='docblock'><p>Copies <code>self</code> into a new <code>Vec</code>.</p>
</div><h4 id='method.permutations' class='method'><code>fn <a href='#method.permutations' class='fnname'>permutations</a>(&self) -> <a class='struct' href='../../collections/slice/struct.Permutations.html' title='collections::slice::Permutations'>Permutations</a><T> <span class='where'>where T: <a class='trait' href='../../core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span></code></h4>
<div class='stability'><em class='stab unstable'>Unstable</em></div><div class='docblock'><p>Creates an iterator that yields every possible permutation of the
vector in succession.</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1><span class='rusttest'>#![feature(collections)]
extern crate collections;
fn main() {
let v = [1, 2, 3];
let mut perms = v.permutations();
for p in perms {
println!("{:?}", p);
}
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='ident'>v</span> <span class='op'>=</span> [<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>3</span>];
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>perms</span> <span class='op'>=</span> <span class='ident'>v</span>.<span class='ident'>permutations</span>();
<span class='kw'>for</span> <span class='ident'>p</span> <span class='kw'>in</span> <span class='ident'>perms</span> {
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>"{:?}"</span>, <span class='ident'>p</span>);
}
</pre>
<p>Iterating through permutations one by one.</p>
<span class='rusttest'>#![feature(collections)]
extern crate collections;
fn main() {
let v = [1, 2, 3];
let mut perms = v.permutations();
assert_eq!(Some(vec![1, 2, 3]), perms.next());
assert_eq!(Some(vec![1, 3, 2]), perms.next());
assert_eq!(Some(vec![3, 1, 2]), perms.next());
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='ident'>v</span> <span class='op'>=</span> [<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>3</span>];
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>perms</span> <span class='op'>=</span> <span class='ident'>v</span>.<span class='ident'>permutations</span>();
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='prelude-val'>Some</span>(<span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>3</span>]), <span class='ident'>perms</span>.<span class='ident'>next</span>());
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='prelude-val'>Some</span>(<span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>, <span class='number'>3</span>, <span class='number'>2</span>]), <span class='ident'>perms</span>.<span class='ident'>next</span>());
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='prelude-val'>Some</span>(<span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>3</span>, <span class='number'>1</span>, <span class='number'>2</span>]), <span class='ident'>perms</span>.<span class='ident'>next</span>());
</pre>
</div><h4 id='method.clone_from_slice' class='method'><code>fn <a href='#method.clone_from_slice' class='fnname'>clone_from_slice</a>(&mut self, src: <a href='../primitive.slice.html'>&[T]</a>) -> <a href='../../core/primitive.usize.html'>usize</a> <span class='where'>where T: <a class='trait' href='../../core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span></code></h4>
<div class='stability'><em class='stab unstable'>Unstable</em></div><div class='docblock'><p>Copies as many elements from <code>src</code> as it can into <code>self</code> (the
shorter of <code>self.len()</code> and <code>src.len()</code>). Returns the number
of elements copied.</p>
<h1 id="example" class='section-header'><a
href="#example">Example</a></h1><span class='rusttest'>#![feature(collections)]
extern crate collections;
fn main() {
let mut dst = [0, 0, 0];
let src = [1, 2];
assert!(dst.clone_from_slice(&src) == 2);
assert!(dst == [1, 2, 0]);
let src2 = [3, 4, 5, 6];
assert!(dst.clone_from_slice(&src2) == 3);
assert!(dst == [3, 4, 5]);
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>dst</span> <span class='op'>=</span> [<span class='number'>0</span>, <span class='number'>0</span>, <span class='number'>0</span>];
<span class='kw'>let</span> <span class='ident'>src</span> <span class='op'>=</span> [<span class='number'>1</span>, <span class='number'>2</span>];
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>dst</span>.<span class='ident'>clone_from_slice</span>(<span class='kw-2'>&</span><span class='ident'>src</span>) <span class='op'>==</span> <span class='number'>2</span>);
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>dst</span> <span class='op'>==</span> [<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>0</span>]);
<span class='kw'>let</span> <span class='ident'>src2</span> <span class='op'>=</span> [<span class='number'>3</span>, <span class='number'>4</span>, <span class='number'>5</span>, <span class='number'>6</span>];
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>dst</span>.<span class='ident'>clone_from_slice</span>(<span class='kw-2'>&</span><span class='ident'>src2</span>) <span class='op'>==</span> <span class='number'>3</span>);
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>dst</span> <span class='op'>==</span> [<span class='number'>3</span>, <span class='number'>4</span>, <span class='number'>5</span>]);
</pre>
</div><h4 id='method.sort' class='method'><code>fn <a href='#method.sort' class='fnname'>sort</a>(&mut self) <span class='where'>where T: <a class='trait' href='../../core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
<div class='docblock'><p>Sorts the slice, in place.</p>
<p>This is equivalent to <code>self.sort_by(|a, b| a.cmp(b))</code>.</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1><span class='rusttest'>fn main() {
let mut v = [-5, 4, 1, -3, 2];
v.sort();
assert!(v == [-5, -3, 1, 2, 4]);
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</span> [<span class='op'>-</span><span class='number'>5</span>, <span class='number'>4</span>, <span class='number'>1</span>, <span class='op'>-</span><span class='number'>3</span>, <span class='number'>2</span>];
<span class='ident'>v</span>.<span class='ident'>sort</span>();
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>v</span> <span class='op'>==</span> [<span class='op'>-</span><span class='number'>5</span>, <span class='op'>-</span><span class='number'>3</span>, <span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>4</span>]);
</pre>
</div><h4 id='method.binary_search' class='method'><code>fn <a href='#method.binary_search' class='fnname'>binary_search</a>(&self, x: &T) -> <a class='enum' href='../../core/result/enum.Result.html' title='core::result::Result'>Result</a><<a href='../../core/primitive.usize.html'>usize</a>, <a href='../../core/primitive.usize.html'>usize</a>> <span class='where'>where T: <a class='trait' href='../../core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
<div class='docblock'><p>Binary search a sorted slice for a given element.</p>
<p>If the value is found then <code>Ok</code> is returned, containing the
index of the matching element; if the value is not found then
<code>Err</code> is returned, containing the index where a matching
element could be inserted while maintaining sorted order.</p>
<h1 id="example" class='section-header'><a
href="#example">Example</a></h1>
<p>Looks up a series of four elements. The first is found, with a
uniquely determined position; the second and third are not
found; the fourth could match any position in <code>[1,4]</code>.</p>
<span class='rusttest'>#![feature(core)]
fn main() {
let s = [0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55];
assert_eq!(s.binary_search(&13), Ok(9));
assert_eq!(s.binary_search(&4), Err(7));
assert_eq!(s.binary_search(&100), Err(13));
let r = s.binary_search(&1);
assert!(match r { Ok(1...4) => true, _ => false, });
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='ident'>s</span> <span class='op'>=</span> [<span class='number'>0</span>, <span class='number'>1</span>, <span class='number'>1</span>, <span class='number'>1</span>, <span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>3</span>, <span class='number'>5</span>, <span class='number'>8</span>, <span class='number'>13</span>, <span class='number'>21</span>, <span class='number'>34</span>, <span class='number'>55</span>];
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>s</span>.<span class='ident'>binary_search</span>(<span class='kw-2'>&</span><span class='number'>13</span>), <span class='prelude-val'>Ok</span>(<span class='number'>9</span>));
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>s</span>.<span class='ident'>binary_search</span>(<span class='kw-2'>&</span><span class='number'>4</span>), <span class='prelude-val'>Err</span>(<span class='number'>7</span>));
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>s</span>.<span class='ident'>binary_search</span>(<span class='kw-2'>&</span><span class='number'>100</span>), <span class='prelude-val'>Err</span>(<span class='number'>13</span>));
<span class='kw'>let</span> <span class='ident'>r</span> <span class='op'>=</span> <span class='ident'>s</span>.<span class='ident'>binary_search</span>(<span class='kw-2'>&</span><span class='number'>1</span>);
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='kw'>match</span> <span class='ident'>r</span> { <span class='prelude-val'>Ok</span>(<span class='number'>1</span>...<span class='number'>4</span>) <span class='op'>=></span> <span class='boolval'>true</span>, _ <span class='op'>=></span> <span class='boolval'>false</span>, });
</pre>
</div><h4 id='method.next_permutation' class='method'><code>fn <a href='#method.next_permutation' class='fnname'>next_permutation</a>(&mut self) -> <a href='../../core/primitive.bool.html'>bool</a> <span class='where'>where T: <a class='trait' href='../../core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
<div class='stability'><em class='stab unstable'>Unstable<p>: uncertain if this merits inclusion in std</p>
</em></div><div class='docblock'><p>Mutates the slice to the next lexicographic permutation.</p>
<p>Returns <code>true</code> if successful and <code>false</code> if the slice is at the
last-ordered permutation.</p>
<h1 id="example" class='section-header'><a
href="#example">Example</a></h1><span class='rusttest'>#![feature(collections)]
extern crate collections;
fn main() {
let v: &mut [_] = &mut [0, 1, 2];
v.next_permutation();
let b: &mut [_] = &mut [0, 2, 1];
assert!(v == b);
v.next_permutation();
let b: &mut [_] = &mut [1, 0, 2];
assert!(v == b);
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='ident'>v</span>: <span class='kw-2'>&</span><span class='kw-2'>mut</span> [_] <span class='op'>=</span> <span class='kw-2'>&</span><span class='kw-2'>mut</span> [<span class='number'>0</span>, <span class='number'>1</span>, <span class='number'>2</span>];
<span class='ident'>v</span>.<span class='ident'>next_permutation</span>();
<span class='kw'>let</span> <span class='ident'>b</span>: <span class='kw-2'>&</span><span class='kw-2'>mut</span> [_] <span class='op'>=</span> <span class='kw-2'>&</span><span class='kw-2'>mut</span> [<span class='number'>0</span>, <span class='number'>2</span>, <span class='number'>1</span>];
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>v</span> <span class='op'>==</span> <span class='ident'>b</span>);
<span class='ident'>v</span>.<span class='ident'>next_permutation</span>();
<span class='kw'>let</span> <span class='ident'>b</span>: <span class='kw-2'>&</span><span class='kw-2'>mut</span> [_] <span class='op'>=</span> <span class='kw-2'>&</span><span class='kw-2'>mut</span> [<span class='number'>1</span>, <span class='number'>0</span>, <span class='number'>2</span>];
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>v</span> <span class='op'>==</span> <span class='ident'>b</span>);
</pre>
</div><h4 id='method.prev_permutation' class='method'><code>fn <a href='#method.prev_permutation' class='fnname'>prev_permutation</a>(&mut self) -> <a href='../../core/primitive.bool.html'>bool</a> <span class='where'>where T: <a class='trait' href='../../core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
<div class='stability'><em class='stab unstable'>Unstable<p>: uncertain if this merits inclusion in std</p>
</em></div><div class='docblock'><p>Mutates the slice to the previous lexicographic permutation.</p>
<p>Returns <code>true</code> if successful and <code>false</code> if the slice is at the
first-ordered permutation.</p>
<h1 id="example" class='section-header'><a
href="#example">Example</a></h1><span class='rusttest'>#![feature(collections)]
extern crate collections;
fn main() {
let v: &mut [_] = &mut [1, 0, 2];
v.prev_permutation();
let b: &mut [_] = &mut [0, 2, 1];
assert!(v == b);
v.prev_permutation();
let b: &mut [_] = &mut [0, 1, 2];
assert!(v == b);
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='ident'>v</span>: <span class='kw-2'>&</span><span class='kw-2'>mut</span> [_] <span class='op'>=</span> <span class='kw-2'>&</span><span class='kw-2'>mut</span> [<span class='number'>1</span>, <span class='number'>0</span>, <span class='number'>2</span>];
<span class='ident'>v</span>.<span class='ident'>prev_permutation</span>();
<span class='kw'>let</span> <span class='ident'>b</span>: <span class='kw-2'>&</span><span class='kw-2'>mut</span> [_] <span class='op'>=</span> <span class='kw-2'>&</span><span class='kw-2'>mut</span> [<span class='number'>0</span>, <span class='number'>2</span>, <span class='number'>1</span>];
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>v</span> <span class='op'>==</span> <span class='ident'>b</span>);
<span class='ident'>v</span>.<span class='ident'>prev_permutation</span>();
<span class='kw'>let</span> <span class='ident'>b</span>: <span class='kw-2'>&</span><span class='kw-2'>mut</span> [_] <span class='op'>=</span> <span class='kw-2'>&</span><span class='kw-2'>mut</span> [<span class='number'>0</span>, <span class='number'>1</span>, <span class='number'>2</span>];
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>v</span> <span class='op'>==</span> <span class='ident'>b</span>);
</pre>
</div><h4 id='method.position_elem' class='method'><code>fn <a href='#method.position_elem' class='fnname'>position_elem</a>(&self, t: &T) -> <a class='enum' href='../../core/option/enum.Option.html' title='core::option::Option'>Option</a><<a href='../../core/primitive.usize.html'>usize</a>> <span class='where'>where T: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a></span></code></h4>
<div class='stability'><em class='stab unstable'>Unstable</em></div><div class='docblock'><p>Find the first index containing a matching value.</p>
</div><h4 id='method.rposition_elem' class='method'><code>fn <a href='#method.rposition_elem' class='fnname'>rposition_elem</a>(&self, t: &T) -> <a class='enum' href='../../core/option/enum.Option.html' title='core::option::Option'>Option</a><<a href='../../core/primitive.usize.html'>usize</a>> <span class='where'>where T: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a></span></code></h4>
<div class='stability'><em class='stab unstable'>Unstable</em></div><div class='docblock'><p>Find the last index containing a matching value.</p>
</div><h4 id='method.contains' class='method'><code>fn <a href='#method.contains' class='fnname'>contains</a>(&self, x: &T) -> <a href='../../core/primitive.bool.html'>bool</a> <span class='where'>where T: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a></span></code></h4>
<div class='docblock'><p>Returns true if the slice contains an element with the given value.</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1><span class='rusttest'>fn main() {
let v = [10, 40, 30];
assert!(v.contains(&30));
assert!(!v.contains(&50));
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='ident'>v</span> <span class='op'>=</span> [<span class='number'>10</span>, <span class='number'>40</span>, <span class='number'>30</span>];
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>v</span>.<span class='ident'>contains</span>(<span class='kw-2'>&</span><span class='number'>30</span>));
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='op'>!</span><span class='ident'>v</span>.<span class='ident'>contains</span>(<span class='kw-2'>&</span><span class='number'>50</span>));
</pre>
</div><h4 id='method.starts_with' class='method'><code>fn <a href='#method.starts_with' class='fnname'>starts_with</a>(&self, needle: <a href='../primitive.slice.html'>&[T]</a>) -> <a href='../../core/primitive.bool.html'>bool</a> <span class='where'>where T: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a></span></code></h4>
<div class='docblock'><p>Returns true if <code>needle</code> is a prefix of the slice.</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1><span class='rusttest'>fn main() {
let v = [10, 40, 30];
assert!(v.starts_with(&[10]));
assert!(v.starts_with(&[10, 40]));
assert!(!v.starts_with(&[50]));
assert!(!v.starts_with(&[10, 50]));
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='ident'>v</span> <span class='op'>=</span> [<span class='number'>10</span>, <span class='number'>40</span>, <span class='number'>30</span>];
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>v</span>.<span class='ident'>starts_with</span>(<span class='kw-2'>&</span>[<span class='number'>10</span>]));
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>v</span>.<span class='ident'>starts_with</span>(<span class='kw-2'>&</span>[<span class='number'>10</span>, <span class='number'>40</span>]));
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='op'>!</span><span class='ident'>v</span>.<span class='ident'>starts_with</span>(<span class='kw-2'>&</span>[<span class='number'>50</span>]));
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='op'>!</span><span class='ident'>v</span>.<span class='ident'>starts_with</span>(<span class='kw-2'>&</span>[<span class='number'>10</span>, <span class='number'>50</span>]));
</pre>
</div><h4 id='method.ends_with' class='method'><code>fn <a href='#method.ends_with' class='fnname'>ends_with</a>(&self, needle: <a href='../primitive.slice.html'>&[T]</a>) -> <a href='../../core/primitive.bool.html'>bool</a> <span class='where'>where T: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a></span></code></h4>
<div class='docblock'><p>Returns true if <code>needle</code> is a suffix of the slice.</p>
<h1 id="examples" class='section-header'><a
href="#examples">Examples</a></h1><span class='rusttest'>fn main() {
let v = [10, 40, 30];
assert!(v.ends_with(&[30]));
assert!(v.ends_with(&[40, 30]));
assert!(!v.ends_with(&[50]));
assert!(!v.ends_with(&[50, 30]));
}</span><pre id='rust-example-rendered' class='rust '>
<span class='kw'>let</span> <span class='ident'>v</span> <span class='op'>=</span> [<span class='number'>10</span>, <span class='number'>40</span>, <span class='number'>30</span>];
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>v</span>.<span class='ident'>ends_with</span>(<span class='kw-2'>&</span>[<span class='number'>30</span>]));
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>v</span>.<span class='ident'>ends_with</span>(<span class='kw-2'>&</span>[<span class='number'>40</span>, <span class='number'>30</span>]));
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='op'>!</span><span class='ident'>v</span>.<span class='ident'>ends_with</span>(<span class='kw-2'>&</span>[<span class='number'>50</span>]));
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='op'>!</span><span class='ident'>v</span>.<span class='ident'>ends_with</span>(<span class='kw-2'>&</span>[<span class='number'>50</span>, <span class='number'>30</span>]));
</pre>
</div><h4 id='method.into_vec' class='method'><code>fn <a href='#method.into_vec' class='fnname'>into_vec</a>(self: <a class='struct' href='../../collections/boxed/struct.Box.html' title='collections::boxed::Box'>Box</a><Self>) -> <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h4>
<div class='docblock'><p>Converts <code>self</code> into a vector without clones or allocation.</p>
</div></div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl<T> <a class='trait' href='../../collections/borrow/trait.Borrow.html' title='collections::borrow::Borrow'>Borrow</a><<a href='../primitive.slice.html'>[T]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h3><div class='impl-items'><h4 id='method.borrow' class='method'><code>fn <a href='../../collections/borrow/trait.Borrow.html#method.borrow' class='fnname'>borrow</a>(&self) -> <a href='../primitive.slice.html'>&[T]</a></code></h4>
</div><h3 class='impl'><code>impl<T> <a class='trait' href='../../collections/borrow/trait.BorrowMut.html' title='collections::borrow::BorrowMut'>BorrowMut</a><<a href='../primitive.slice.html'>[T]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h3><div class='impl-items'><h4 id='method.borrow_mut' class='method'><code>fn <a href='../../collections/borrow/trait.BorrowMut.html#method.borrow_mut' class='fnname'>borrow_mut</a>(&mut self) -> <a href='../primitive.slice.html'>&mut [T]</a></code></h4>
</div><h3 class='impl'><code>impl<T: <a class='trait' href='../../core/marker/trait.Send.html' title='core::marker::Send'>Send</a>> <a class='trait' href='../../core/marker/trait.Send.html' title='core::marker::Send'>Send</a> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h3><div class='impl-items'></div><h3 class='impl'><code>impl<T: <a class='trait' href='../../core/marker/trait.Sync.html' title='core::marker::Sync'>Sync</a>> <a class='trait' href='../../core/marker/trait.Sync.html' title='core::marker::Sync'>Sync</a> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h3><div class='impl-items'></div><h3 class='impl'><code>impl<T: <a class='trait' href='../../core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a>> <a class='trait' href='../../core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h3><div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='../../core/clone/trait.Clone.html#method.clone' class='fnname'>clone</a>(&self) -> <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h4>
<h4 id='method.clone_from' class='method'><code>fn <a href='../../core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, other: &<a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T>)</code></h4>
</div><h3 class='impl'><code>impl<T: <a class='trait' href='../../core/hash/trait.Hash.html' title='core::hash::Hash'>Hash</a>> <a class='trait' href='../../core/hash/trait.Hash.html' title='core::hash::Hash'>Hash</a> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h3><div class='impl-items'><h4 id='method.hash' class='method'><code>fn <a href='../../core/hash/trait.Hash.html#method.hash' class='fnname'>hash</a><H: <a class='trait' href='../../core/hash/trait.Hasher.html' title='core::hash::Hasher'>Hasher</a>>(&self, state: &mut H)</code></h4>
<h4 id='method.hash_slice' class='method'><code>fn <a href='../../core/hash/trait.Hash.html#method.hash_slice' class='fnname'>hash_slice</a><H>(data: <a href='../primitive.slice.html'>&[Self]</a>, state: &mut H) <span class='where'>where H: <a class='trait' href='../../core/hash/trait.Hasher.html' title='core::hash::Hasher'>Hasher</a></span></code></h4>
</div><h3 class='impl'><code>impl<T> <a class='trait' href='../../core/ops/trait.Index.html' title='core::ops::Index'>Index</a><<a href='../../core/primitive.usize.html'>usize</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h3><div class='impl-items'><h4 id='assoc_type.Output' class='type'><code>type Output = T</code></h4>
<h4 id='method.index' class='method'><code>fn <a href='../../core/ops/trait.Index.html#method.index' class='fnname'>index</a>(&self, index: <a href='../../core/primitive.usize.html'>usize</a>) -> &T</code></h4>
</div><h3 class='impl'><code>impl<T> <a class='trait' href='../../core/ops/trait.IndexMut.html' title='core::ops::IndexMut'>IndexMut</a><<a href='../../core/primitive.usize.html'>usize</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h3><div class='impl-items'><h4 id='method.index_mut' class='method'><code>fn <a href='../../core/ops/trait.IndexMut.html#method.index_mut' class='fnname'>index_mut</a>(&mut self, index: <a href='../../core/primitive.usize.html'>usize</a>) -> &mut T</code></h4>
</div><h3 class='impl'><code>impl<T> <a class='trait' href='../../core/ops/trait.Index.html' title='core::ops::Index'>Index</a><<a class='struct' href='../../core/ops/struct.Range.html' title='core::ops::Range'>Range</a><<a href='../../core/primitive.usize.html'>usize</a>>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h3><div class='impl-items'><h4 id='assoc_type.Output' class='type'><code>type Output = <a href='../primitive.slice.html'>[T]</a></code></h4>
<h4 id='method.index' class='method'><code>fn <a href='../../core/ops/trait.Index.html#method.index' class='fnname'>index</a>(&self, index: <a class='struct' href='../../core/ops/struct.Range.html' title='core::ops::Range'>Range</a><<a href='../../core/primitive.usize.html'>usize</a>>) -> <a href='../primitive.slice.html'>&[T]</a></code></h4>
</div><h3 class='impl'><code>impl<T> <a class='trait' href='../../core/ops/trait.Index.html' title='core::ops::Index'>Index</a><<a class='struct' href='../../core/ops/struct.RangeTo.html' title='core::ops::RangeTo'>RangeTo</a><<a href='../../core/primitive.usize.html'>usize</a>>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h3><div class='impl-items'><h4 id='assoc_type.Output' class='type'><code>type Output = <a href='../primitive.slice.html'>[T]</a></code></h4>
<h4 id='method.index' class='method'><code>fn <a href='../../core/ops/trait.Index.html#method.index' class='fnname'>index</a>(&self, index: <a class='struct' href='../../core/ops/struct.RangeTo.html' title='core::ops::RangeTo'>RangeTo</a><<a href='../../core/primitive.usize.html'>usize</a>>) -> <a href='../primitive.slice.html'>&[T]</a></code></h4>
</div><h3 class='impl'><code>impl<T> <a class='trait' href='../../core/ops/trait.Index.html' title='core::ops::Index'>Index</a><<a class='struct' href='../../core/ops/struct.RangeFrom.html' title='core::ops::RangeFrom'>RangeFrom</a><<a href='../../core/primitive.usize.html'>usize</a>>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h3><div class='impl-items'><h4 id='assoc_type.Output' class='type'><code>type Output = <a href='../primitive.slice.html'>[T]</a></code></h4>
<h4 id='method.index' class='method'><code>fn <a href='../../core/ops/trait.Index.html#method.index' class='fnname'>index</a>(&self, index: <a class='struct' href='../../core/ops/struct.RangeFrom.html' title='core::ops::RangeFrom'>RangeFrom</a><<a href='../../core/primitive.usize.html'>usize</a>>) -> <a href='../primitive.slice.html'>&[T]</a></code></h4>
</div><h3 class='impl'><code>impl<T> <a class='trait' href='../../core/ops/trait.Index.html' title='core::ops::Index'>Index</a><<a class='struct' href='../../core/ops/struct.RangeFull.html' title='core::ops::RangeFull'>RangeFull</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h3><div class='impl-items'><h4 id='assoc_type.Output' class='type'><code>type Output = <a href='../primitive.slice.html'>[T]</a></code></h4>
<h4 id='method.index' class='method'><code>fn <a href='../../core/ops/trait.Index.html#method.index' class='fnname'>index</a>(&self, _index: <a class='struct' href='../../core/ops/struct.RangeFull.html' title='core::ops::RangeFull'>RangeFull</a>) -> <a href='../primitive.slice.html'>&[T]</a></code></h4>
</div><h3 class='impl'><code>impl<T> <a class='trait' href='../../core/ops/trait.IndexMut.html' title='core::ops::IndexMut'>IndexMut</a><<a class='struct' href='../../core/ops/struct.Range.html' title='core::ops::Range'>Range</a><<a href='../../core/primitive.usize.html'>usize</a>>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h3><div class='impl-items'><h4 id='method.index_mut' class='method'><code>fn <a href='../../core/ops/trait.IndexMut.html#method.index_mut' class='fnname'>index_mut</a>(&mut self, index: <a class='struct' href='../../core/ops/struct.Range.html' title='core::ops::Range'>Range</a><<a href='../../core/primitive.usize.html'>usize</a>>) -> <a href='../primitive.slice.html'>&mut [T]</a></code></h4>
</div><h3 class='impl'><code>impl<T> <a class='trait' href='../../core/ops/trait.IndexMut.html' title='core::ops::IndexMut'>IndexMut</a><<a class='struct' href='../../core/ops/struct.RangeTo.html' title='core::ops::RangeTo'>RangeTo</a><<a href='../../core/primitive.usize.html'>usize</a>>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h3><div class='impl-items'><h4 id='method.index_mut' class='method'><code>fn <a href='../../core/ops/trait.IndexMut.html#method.index_mut' class='fnname'>index_mut</a>(&mut self, index: <a class='struct' href='../../core/ops/struct.RangeTo.html' title='core::ops::RangeTo'>RangeTo</a><<a href='../../core/primitive.usize.html'>usize</a>>) -> <a href='../primitive.slice.html'>&mut [T]</a></code></h4>
</div><h3 class='impl'><code>impl<T> <a class='trait' href='../../core/ops/trait.IndexMut.html' title='core::ops::IndexMut'>IndexMut</a><<a class='struct' href='../../core/ops/struct.RangeFrom.html' title='core::ops::RangeFrom'>RangeFrom</a><<a href='../../core/primitive.usize.html'>usize</a>>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h3><div class='impl-items'><h4 id='method.index_mut' class='method'><code>fn <a href='../../core/ops/trait.IndexMut.html#method.index_mut' class='fnname'>index_mut</a>(&mut self, index: <a class='struct' href='../../core/ops/struct.RangeFrom.html' title='core::ops::RangeFrom'>RangeFrom</a><<a href='../../core/primitive.usize.html'>usize</a>>) -> <a href='../primitive.slice.html'>&mut [T]</a></code></h4>
</div><h3 class='impl'><code>impl<T> <a class='trait' href='../../core/ops/trait.IndexMut.html' title='core::ops::IndexMut'>IndexMut</a><<a class='struct' href='../../core/ops/struct.RangeFull.html' title='core::ops::RangeFull'>RangeFull</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h3><div class='impl-items'><h4 id='method.index_mut' class='method'><code>fn <a href='../../core/ops/trait.IndexMut.html#method.index_mut' class='fnname'>index_mut</a>(&mut self, _index: <a class='struct' href='../../core/ops/struct.RangeFull.html' title='core::ops::RangeFull'>RangeFull</a>) -> <a href='../primitive.slice.html'>&mut [T]</a></code></h4>
</div><h3 class='impl'><code>impl<T> <a class='trait' href='../../core/ops/trait.Deref.html' title='core::ops::Deref'>Deref</a> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h3><div class='impl-items'><h4 id='assoc_type.Target' class='type'><code>type Target = <a href='../primitive.slice.html'>[T]</a></code></h4>
<h4 id='method.deref' class='method'><code>fn <a href='../../core/ops/trait.Deref.html#method.deref' class='fnname'>deref</a>(&self) -> <a href='../primitive.slice.html'>&[T]</a></code></h4>
</div><h3 class='impl'><code>impl<T> <a class='trait' href='../../core/ops/trait.DerefMut.html' title='core::ops::DerefMut'>DerefMut</a> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h3><div class='impl-items'><h4 id='method.deref_mut' class='method'><code>fn <a href='../../core/ops/trait.DerefMut.html#method.deref_mut' class='fnname'>deref_mut</a>(&mut self) -> <a href='../primitive.slice.html'>&mut [T]</a></code></h4>
</div><h3 class='impl'><code>impl<T> <a class='trait' href='../../core/iter/trait.FromIterator.html' title='core::iter::FromIterator'>FromIterator</a><T> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h3><div class='impl-items'><h4 id='method.from_iter' class='method'><code>fn <a href='../../core/iter/trait.FromIterator.html#method.from_iter' class='fnname'>from_iter</a><I: <a class='trait' href='../../core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a><Item=T>>(iterable: I) -> <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h4>
</div><h3 class='impl'><code>impl<T> <a class='trait' href='../../core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h3><div class='impl-items'><h4 id='assoc_type.Item' class='type'><code>type Item = T</code></h4>
<h4 id='assoc_type.IntoIter' class='type'><code>type IntoIter = <a class='struct' href='../../collections/vec/struct.IntoIter.html' title='collections::vec::IntoIter'>IntoIter</a><T></code></h4>
<h4 id='method.into_iter' class='method'><code>fn <a href='../../core/iter/trait.IntoIterator.html#method.into_iter' class='fnname'>into_iter</a>(self) -> <a class='struct' href='../../collections/vec/struct.IntoIter.html' title='collections::vec::IntoIter'>IntoIter</a><T></code></h4>
</div><h3 class='impl'><code>impl<'a, T> <a class='trait' href='../../core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a> for &'a <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h3><div class='impl-items'><h4 id='assoc_type.Item' class='type'><code>type Item = &'a T</code></h4>
<h4 id='assoc_type.IntoIter' class='type'><code>type IntoIter = <a class='struct' href='../../collections/slice/struct.Iter.html' title='collections::slice::Iter'>Iter</a><'a, T></code></h4>
<h4 id='method.into_iter' class='method'><code>fn <a href='../../core/iter/trait.IntoIterator.html#method.into_iter' class='fnname'>into_iter</a>(self) -> <a class='struct' href='../../collections/slice/struct.Iter.html' title='collections::slice::Iter'>Iter</a><'a, T></code></h4>
</div><h3 class='impl'><code>impl<'a, T> <a class='trait' href='../../core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a> for &'a mut <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h3><div class='impl-items'><h4 id='assoc_type.Item' class='type'><code>type Item = &'a mut T</code></h4>
<h4 id='assoc_type.IntoIter' class='type'><code>type IntoIter = <a class='struct' href='../../collections/slice/struct.IterMut.html' title='collections::slice::IterMut'>IterMut</a><'a, T></code></h4>
<h4 id='method.into_iter' class='method'><code>fn <a href='../../core/iter/trait.IntoIterator.html#method.into_iter' class='fnname'>into_iter</a>(self) -> <a class='struct' href='../../collections/slice/struct.IterMut.html' title='collections::slice::IterMut'>IterMut</a><'a, T></code></h4>
</div><h3 class='impl'><code>impl<T> <a class='trait' href='../../core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a><T> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h3><div class='impl-items'><h4 id='method.extend' class='method'><code>fn <a href='../../core/iter/trait.Extend.html#method.extend' class='fnname'>extend</a><I: <a class='trait' href='../../core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a><Item=T>>(&mut self, iterable: I)</code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><<a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><B>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &<a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><B>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><B>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><<a href='../primitive.slice.html'>&'b [B]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &<a href='../primitive.slice.html'>&'b [B]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a href='../primitive.slice.html'>&'b [B]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><<a href='../primitive.slice.html'>&'b mut [B]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &<a href='../primitive.slice.html'>&'b mut [B]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a href='../primitive.slice.html'>&'b mut [B]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><<a href='../../core/primitive.array.html'>[B; 0]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 0]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 0]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><&'b <a href='../../core/primitive.array.html'>[B; 0]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 0]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 0]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><<a href='../../core/primitive.array.html'>[B; 1]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 1]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 1]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><&'b <a href='../../core/primitive.array.html'>[B; 1]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 1]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 1]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><<a href='../../core/primitive.array.html'>[B; 2]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 2]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 2]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><&'b <a href='../../core/primitive.array.html'>[B; 2]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 2]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 2]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><<a href='../../core/primitive.array.html'>[B; 3]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 3]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 3]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><&'b <a href='../../core/primitive.array.html'>[B; 3]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 3]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 3]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><<a href='../../core/primitive.array.html'>[B; 4]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 4]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 4]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><&'b <a href='../../core/primitive.array.html'>[B; 4]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 4]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 4]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><<a href='../../core/primitive.array.html'>[B; 5]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 5]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 5]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><&'b <a href='../../core/primitive.array.html'>[B; 5]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 5]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 5]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><<a href='../../core/primitive.array.html'>[B; 6]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 6]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 6]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><&'b <a href='../../core/primitive.array.html'>[B; 6]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 6]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 6]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><<a href='../../core/primitive.array.html'>[B; 7]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 7]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 7]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><&'b <a href='../../core/primitive.array.html'>[B; 7]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 7]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 7]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><<a href='../../core/primitive.array.html'>[B; 8]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 8]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 8]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><&'b <a href='../../core/primitive.array.html'>[B; 8]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 8]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 8]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><<a href='../../core/primitive.array.html'>[B; 9]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 9]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 9]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><&'b <a href='../../core/primitive.array.html'>[B; 9]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 9]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 9]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><<a href='../../core/primitive.array.html'>[B; 10]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 10]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 10]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><&'b <a href='../../core/primitive.array.html'>[B; 10]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 10]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 10]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><<a href='../../core/primitive.array.html'>[B; 11]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 11]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 11]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><&'b <a href='../../core/primitive.array.html'>[B; 11]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 11]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 11]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><<a href='../../core/primitive.array.html'>[B; 12]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 12]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 12]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><&'b <a href='../../core/primitive.array.html'>[B; 12]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 12]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 12]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><<a href='../../core/primitive.array.html'>[B; 13]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 13]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 13]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><&'b <a href='../../core/primitive.array.html'>[B; 13]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 13]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 13]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><<a href='../../core/primitive.array.html'>[B; 14]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 14]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 14]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><&'b <a href='../../core/primitive.array.html'>[B; 14]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 14]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 14]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><<a href='../../core/primitive.array.html'>[B; 15]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 15]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 15]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><&'b <a href='../../core/primitive.array.html'>[B; 15]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 15]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 15]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><<a href='../../core/primitive.array.html'>[B; 16]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 16]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 16]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><&'b <a href='../../core/primitive.array.html'>[B; 16]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 16]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 16]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><<a href='../../core/primitive.array.html'>[B; 17]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 17]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 17]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><&'b <a href='../../core/primitive.array.html'>[B; 17]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 17]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 17]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><<a href='../../core/primitive.array.html'>[B; 18]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 18]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 18]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><&'b <a href='../../core/primitive.array.html'>[B; 18]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 18]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 18]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><<a href='../../core/primitive.array.html'>[B; 19]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 19]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 19]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><&'b <a href='../../core/primitive.array.html'>[B; 19]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 19]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 19]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><<a href='../../core/primitive.array.html'>[B; 20]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 20]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 20]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><&'b <a href='../../core/primitive.array.html'>[B; 20]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 20]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 20]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><<a href='../../core/primitive.array.html'>[B; 21]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 21]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 21]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><&'b <a href='../../core/primitive.array.html'>[B; 21]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 21]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 21]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><<a href='../../core/primitive.array.html'>[B; 22]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 22]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 22]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><&'b <a href='../../core/primitive.array.html'>[B; 22]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 22]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 22]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><<a href='../../core/primitive.array.html'>[B; 23]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 23]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 23]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><&'b <a href='../../core/primitive.array.html'>[B; 23]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 23]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 23]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><<a href='../../core/primitive.array.html'>[B; 24]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 24]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 24]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><&'b <a href='../../core/primitive.array.html'>[B; 24]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 24]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 24]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><<a href='../../core/primitive.array.html'>[B; 25]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 25]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 25]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><&'b <a href='../../core/primitive.array.html'>[B; 25]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 25]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 25]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><<a href='../../core/primitive.array.html'>[B; 26]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 26]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 26]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><&'b <a href='../../core/primitive.array.html'>[B; 26]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 26]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 26]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><<a href='../../core/primitive.array.html'>[B; 27]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 27]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 27]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><&'b <a href='../../core/primitive.array.html'>[B; 27]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 27]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 27]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><<a href='../../core/primitive.array.html'>[B; 28]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 28]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 28]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><&'b <a href='../../core/primitive.array.html'>[B; 28]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 28]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 28]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><<a href='../../core/primitive.array.html'>[B; 29]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 29]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 29]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><&'b <a href='../../core/primitive.array.html'>[B; 29]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 29]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 29]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><<a href='../../core/primitive.array.html'>[B; 30]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 30]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 30]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><&'b <a href='../../core/primitive.array.html'>[B; 30]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 30]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 30]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><<a href='../../core/primitive.array.html'>[B; 31]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 31]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 31]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><&'b <a href='../../core/primitive.array.html'>[B; 31]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 31]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 31]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><<a href='../../core/primitive.array.html'>[B; 32]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 32]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a href='../../core/primitive.array.html'>[B; 32]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<'a, 'b, A: <a class='trait' href='../../core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, B> <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><&'b <a href='../../core/primitive.array.html'>[B; 32]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><A> <span class='where'>where A: <a class='trait' href='../../core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><B></span></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 32]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='../../core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &&'b <a href='../../core/primitive.array.html'>[B; 32]</a>) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<T: <a class='trait' href='../../core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>> <a class='trait' href='../../core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h3><div class='impl-items'><h4 id='method.partial_cmp' class='method'><code>fn <a href='../../core/cmp/trait.PartialOrd.html#method.partial_cmp' class='fnname'>partial_cmp</a>(&self, other: &<a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T>) -> <a class='enum' href='../../core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='enum' href='../../core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a>></code></h4>
<h4 id='method.lt' class='method'><code>fn <a href='../../core/cmp/trait.PartialOrd.html#method.lt' class='fnname'>lt</a>(&self, other: &Rhs) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.le' class='method'><code>fn <a href='../../core/cmp/trait.PartialOrd.html#method.le' class='fnname'>le</a>(&self, other: &Rhs) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.gt' class='method'><code>fn <a href='../../core/cmp/trait.PartialOrd.html#method.gt' class='fnname'>gt</a>(&self, other: &Rhs) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ge' class='method'><code>fn <a href='../../core/cmp/trait.PartialOrd.html#method.ge' class='fnname'>ge</a>(&self, other: &Rhs) -> <a href='../../core/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl<T: <a class='trait' href='../../core/cmp/trait.Eq.html' title='core::cmp::Eq'>Eq</a>> <a class='trait' href='../../core/cmp/trait.Eq.html' title='core::cmp::Eq'>Eq</a> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h3><div class='impl-items'></div><h3 class='impl'><code>impl<T: <a class='trait' href='../../core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a>> <a class='trait' href='../../core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h3><div class='impl-items'><h4 id='method.cmp' class='method'><code>fn <a href='../../core/cmp/trait.Ord.html#method.cmp' class='fnname'>cmp</a>(&self, other: &<a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T>) -> <a class='enum' href='../../core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a></code></h4>
</div><h3 class='impl'><code>impl<T> <a class='trait' href='../../core/ops/trait.Drop.html' title='core::ops::Drop'>Drop</a> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h3><div class='impl-items'><h4 id='method.drop' class='method'><code>fn <a href='../../core/ops/trait.Drop.html#method.drop' class='fnname'>drop</a>(&mut self)</code></h4>
</div><h3 class='impl'><code>impl<T> <a class='trait' href='../../core/default/trait.Default.html' title='core::default::Default'>Default</a> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h3><div class='impl-items'><h4 id='method.default' class='method'><code>fn <a href='../../core/default/trait.Default.html#method.default' class='fnname'>default</a>() -> <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h4>
</div><h3 class='impl'><code>impl<T: <a class='trait' href='../../collections/fmt/trait.Debug.html' title='collections::fmt::Debug'>Debug</a>> <a class='trait' href='../../collections/fmt/trait.Debug.html' title='collections::fmt::Debug'>Debug</a> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h3><div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='../../collections/fmt/trait.Debug.html#method.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class='struct' href='../../collections/fmt/struct.Formatter.html' title='collections::fmt::Formatter'>Formatter</a>) -> <a class='type' href='../../collections/fmt/type.Result.html' title='collections::fmt::Result'>Result</a></code></h4>
</div><h3 class='impl'><code>impl<T> <a class='trait' href='../../core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a><<a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h3><div class='impl-items'><h4 id='method.as_ref' class='method'><code>fn <a href='../../core/convert/trait.AsRef.html#method.as_ref' class='fnname'>as_ref</a>(&self) -> &<a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h4>
</div><h3 class='impl'><code>impl<T> <a class='trait' href='../../core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a><<a href='../primitive.slice.html'>[T]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h3><div class='impl-items'><h4 id='method.as_ref' class='method'><code>fn <a href='../../core/convert/trait.AsRef.html#method.as_ref' class='fnname'>as_ref</a>(&self) -> <a href='../primitive.slice.html'>&[T]</a></code></h4>
</div><h3 class='impl'><code>impl<'a, T: <a class='trait' href='../../core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a>> <a class='trait' href='../../core/convert/trait.From.html' title='core::convert::From'>From</a><<a href='../primitive.slice.html'>&'a [T]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h3><div class='impl-items'><h4 id='method.from' class='method'><code>fn <a href='../../core/convert/trait.From.html#method.from' class='fnname'>from</a>(s: <a href='../primitive.slice.html'>&'a [T]</a>) -> <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T></code></h4>
</div><h3 class='impl'><code>impl<'a> <a class='trait' href='../../core/convert/trait.From.html' title='core::convert::From'>From</a><&'a <a href='../primitive.str.html'>str</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><<a href='../../core/primitive.u8.html'>u8</a>></code></h3><div class='impl-items'><h4 id='method.from' class='method'><code>fn <a href='../../core/convert/trait.From.html#method.from' class='fnname'>from</a>(s: &'a <a href='../primitive.str.html'>str</a>) -> <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><<a href='../../core/primitive.u8.html'>u8</a>></code></h4>
</div><h3 class='impl'><code>impl<'a, T: 'a> <a class='trait' href='../../collections/borrow/trait.IntoCow.html' title='collections::borrow::IntoCow'>IntoCow</a><'a, <a href='../primitive.slice.html'>[T]</a>> for <a class='struct' href='../../collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><T> <span class='where'>where T: <a class='trait' href='../../core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span></code></h3><div class='impl-items'><h4 id='method.into_cow' class='method'><code>fn <a href='../../collections/borrow/trait.IntoCow.html#method.into_cow' class='fnname'>into_cow</a>(self) -> <a class='enum' href='../../collections/borrow/enum.Cow.html' title='collections::borrow::Cow'>Cow</a><'a, <a href='../primitive.slice.html'>[T]</a>></code></h4>
</div></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<div id="help" class="hidden">
<div class="shortcuts">
<h1>Keyboard shortcuts</h1>
<dl>
<dt>?</dt>
<dd>Show this help dialog</dd>
<dt>S</dt>
<dd>Focus the search field</dd>
<dt>⇤</dt>
<dd>Move up in search results</dd>
<dt>⇥</dt>
<dd>Move down in search results</dd>
<dt>⏎</dt>
<dd>Go to active search result</dd>
</dl>
</div>
<div class="infos">
<h1>Search tricks</h1>
<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>typedef</code> (or
<code>tdef</code>).
</p>
<p>
Search functions by type signature (e.g.
<code>vec -> usize</code>)
</p>
</div>
</div>
<script>
window.rootPath = "../../";
window.currentCrate = "collections";
window.playgroundUrl = "http://play.rust-lang.org/";
</script>
<script src="../../jquery.js"></script>
<script src="../../main.js"></script>
<script src="../../playpen.js"></script>
<script async src="../../search-index.js"></script>
</body>
</html>