Busca en todas las páginas de la documentación
12 pages in this section.
How Rust's lazy iterator chains work, how iter/iter_mut/into_iter map onto ownership, and what "zero-cost abstraction" actually buys you.
Learn to choose the right Rust collection: Vec, HashMap, BTreeMap, HashSet, VecDeque, and BinaryHeap with 8 practical examples.
Learn to use Rust's Vec for growable buffers and slices (&[T]) for contiguous views. Understand capacity, indexing, and common pitfalls.
Compare Rust's HashMap and BTreeMap for data storage. Learn when to use each, how to leverage the entry API, and avoid common pitfalls.
Explore Rust's VecDeque for double-ended queues and BinaryHeap for priority queues. Learn when to use each and avoid LinkedList.
Learn how to implement the Iterator trait in Rust, create custom iterators, and understand lazy evaluation and common pitfalls.
Learn how to use Rust iterator adapters like map, filter, zip, and flat_map for functional-style data transformations.
Learn how to consume Rust iterators using for, collect, sum, count, fold, and reduce. Understand common pitfalls and alternatives.
Learn how Rust's IntoIterator trait works with iter, iter_mut, and into_iter to control ownership and borrowing in loops.
Learn best practices for Rust collections and iterators, covering collection choice, efficient iteration, memory allocation, and correctness.
A single-page roundup of every highlight bullet from the 11 pages in the Collections section, grouped by source page so you can scan all 64 takeaways without opening each article individually.