Array AKA Vector
Collection of values (objects) of the same data type in a continuous block of memory.
- A concrete or implementation-constrained type. A particular kind of a Sequence
- Usually stack-allocated (implementation-dependent).
- The size is known (and could be checked) at compile-time.
- Some languages (Go and Rust) has the type of a
Array(usually a pointer and size).
let xs: [i32; 5] = [1, 2, 3, 4, 5];
let ys = &xs; // shadowing let ys = &xs[1..4];
Note: See TracWiki for help on using the wiki.