Module std::vecExperimental
[-]
[+]
[src]
A growable list type, written Vec<T> but pronounced 'vector.'
Vectors have O(1) indexing, push (to the end) and pop (from the end).
Examples
Explicitly creating a Vec<T> with new():
let xs: Vec<i32> = Vec::new();
Using the vec! macro:
let ys: Vec<i32> = vec![]; let zs = vec![1i32, 2, 3, 4, 5];
Push:
fn main() { let mut xs = vec![1i32, 2]; xs.push(3); }let mut xs = vec![1i32, 2]; xs.push(3);
And pop:
fn main() { let mut xs = vec![1i32, 2]; let two = xs.pop(); }let mut xs = vec![1i32, 2]; let two = xs.pop();
Modules
| raw | Unsafe vector operations. |
Structs
| DerefVec | Wrapper type providing a |
| Drain | An iterator that drains a vector. |
| IntoIter | An iterator that moves out of a vector. |
| Vec | A growable list type, written |
Functions
| as_vec | Convert a slice to a wrapper type providing a |
| unzip | Deprecated: use |
Type Definitions
| CowVec | |
| MoveItems |