© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
C. MilanesiBeginning Rusthttps://doi.org/10.1007/978-1-4842-7208-4_21

21. Standard Library Collections

Carlo Milanesi1  
(1)
Bergamo, Italy
 
In this chapter, you will learn:
  • How to measure the time spent running portions of Rust code

  • How performance reasons suggest which kind of collection to use

  • Which is the best collection for various kinds of operations: sequential scan, insertion and removal of items at both ends, removal of the largest item, search by value, search by key, or scan in order

  • Which collections in the Rust standard library correspond to the collections in the C++ standard library

Collections

Arrays, vectors, structs, tuple-structs, tuples, and enums ...

Get Beginning Rust: Get Started with Rust 2021 Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.