Skip to Content
Idiomatic Rust
book

Idiomatic Rust

by Brenden Matthews
September 2024
Intermediate to advanced
256 pages
6h 40m
English
Manning Publications
Content preview from Idiomatic Rust

3 Code flow

This chapter covers

  • Discussing pattern matching
  • Handling errors with pattern matching
  • Reviewing Rust’s functional programming patterns

We need to continue to review more of Rust’s core language features—its building blocks—before diving into design patterns. In this chapter, we’ll start by discussing pattern matching and functional programming. Pattern matching allows us to control the code flow, unwrap or destructure values, and handle optional cases. Functional programming lets us build software around the unit of a function, which is one of the most basic and easiest-to-understand abstractions.

These building blocks are distinct but can be combined in many ways to create new abstractions. We’ll tie these building blocks ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Rust in Action

Rust in Action

Tim McNamara
Effective Rust

Effective Rust

David Drysdale
The Rust Programming Language, 2nd Edition

The Rust Programming Language, 2nd Edition

Steve Klabnik, Carol Nichols

Publisher Resources

ISBN: 9781633437463Supplemental ContentPublisher SupportOtherPublisher WebsiteSupplemental ContentPurchase Link