Tour of Rust Table of Contents

Multiple Return Values

Functions can return multiple values by returning a tuple of values.

Tuple elements can be referenced by their index number.

Rust supports various kinds of destructuring that we will see in many forms, allowing us to extract sub-pieces of data structures in ergonomic ways. Be on the lookout!