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

16. Using Iterators

Carlo Milanesi1 
(1)
Bergamo, Italy
 
In this chapter, you will learn:
  • How characters are stored in Rust strings, and why they do not allow direct access

  • How to read string characters or string bytes using iterators

  • How to read items from slices, arrays, and vectors using iterators

  • How to modify items from slices, arrays, and vectors using mutating iterators

  • How to use some iterator adapters: filter, map, and enumerate

  • How to use some iterator consumers: any, all, count, sum, min, max, and collect

  • The concept of lazy processing in iterator chains

String Characters

We already saw that Rust has both static strings and dynamic strings , and that ...

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.