Skip to content

Commit 4052f05

Browse files
committed
---
yaml --- r: 69477 b: refs/heads/auto c: 8695bc7 h: refs/heads/master i: 69475: 07139c0 v: v3
1 parent ae56176 commit 4052f05

File tree

2 files changed

+48
-2
lines changed

2 files changed

+48
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: e94e4d51ca01db908748ab79bafe3254bede645b
17+
refs/heads/auto: 8695bc74a0dcedcdce3f9bb9c312347511a88ce5
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/src/libstd/vec.rs

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,53 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
//! Vectors
11+
/*!
12+
13+
The `vec` module contains useful code to help work with vector values. Vectors are Rust's list
14+
type. Vectors contain zero or more values of homogeneous types:
15+
16+
~~~ {.rust}
17+
let int_vector = [1,2,3];
18+
let str_vector = ["one", "two", "three"];
19+
~~~
20+
21+
This is a big module, but for a high-level overview:
22+
23+
## Structs
24+
25+
Several structs that are useful for vectors, such as `VecIterator`, which
26+
represents iteration over a vector.
27+
28+
## Traits
29+
30+
A number of traits that allow you to accomplish tasks with vectors, like the
31+
`MutableVector` and `ImmutableVector` traits.
32+
33+
## Implementations of other traits
34+
35+
Vectors are a very useful type, and so there's tons of implementations of
36+
traits found elsewhere. Some notable examples:
37+
38+
* `Clone`
39+
* `Iterator`
40+
* `Zero`
41+
42+
## Function definitions
43+
44+
There are a number of different functions that take vectors, here are some
45+
broad categories:
46+
47+
* Modifying a vector, like `append` and `grow`.
48+
* Searching in a vector, like `bsearch`.
49+
* Iterating over vectors, like `each_permutation`.
50+
* Functional transformations on vectors, like `map` and `partition`.
51+
* Stack/queue operations, like `push`/`pop` and `shift`/`unshift`.
52+
* Cons-y operations, like `head` and `tail`.
53+
* Zipper operations, like `zip` and `unzip`.
54+
55+
And much, much more.
56+
57+
*/
1258

1359
#[warn(non_camel_case_types)];
1460

0 commit comments

Comments
 (0)