1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725
|
<!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>
|