Chapter 17. Collections in Rust
In the previous chapters, we implemented a range of data structures, something that rarely happens in reality. Especially in Rust, the excellent Vec<T>
covers a lot of cases, and if a map type structure is required, the HashMap<T>
covers most of these too. So what else is there? How are they implemented? Why were they implemented if they won't be used? These are all great questions, and they'll get answered in this chapter. You can look forward to learning about the following:
- Sequence data types such as
LinkedList<T>
,Vec<T>
, orVecDeque<T>
- Rust's
BinaryHeap<T>
implementation HashSet<T>
andBTreeSet<T>
- How to map things with the
BTreeMap<T>
andHashMap<T>