Skip to main content

One doc tagged with "iterators"

View all tags

Common Collection Methods

We've now learned about the three most common collection types in Rust: Vec, String, and HashMap. While each has its own specific use case, they share a common foundation through the Iterator trait. This means they have a rich set of methods for performing common operations like sorting, filtering, and mapping. In this article, we'll explore some of these useful methods.