Series 5: Working with Collections - Vectors, Strings, Hash Maps
This series dives into some of the most common and useful collection types provided by the Rust standard library. You will learn how to store and manage collections of data efficiently.
Articles in this Series
- Vectors (
Vec<T>): The Growable Array- Creating, updating, and reading elements from vectors.
- Storing UTF-8 Text with Strings (
String)- Creating and manipulating strings.
- Hash Maps (
HashMap<K, V>)- Storing key-value pairs.
- Iterating over Collections: The
IteratorTrait- Using the
iter(),iter_mut(), andinto_iter()methods.
- Using the
- Slices: A View into a Collection
- A view into a part of a collection.
- Common Collection Methods
- Sorting, filtering, mapping, and more.
- Project: Word Counter
- Using a hash map to count the frequency of words in a text.
- Project: To-Do List
- Using a vector to manage a list of tasks.
- Next Chapter: Ownership, Structs, and Error Handling in Rust