© Carlo Milanesi 2018
Carlo MilanesiBeginning Rusthttps://doi.org/10.1007/978-1-4842-3468-6_20

20. 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 the use of several kinds of collections

  • 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, search by key, keeping items sorted

Collections

Arrays, vectors, structs, tuple-structs, tuples, and enums are data types whose objects may contain several other objects. However, for structs, tuple-structs, tuples, and enums, for each contained object a specific clause ...

Get Beginning Rust: From Novice to Professional 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.