-
Book Overview & Buying
-
Table Of Contents
Design Patterns and Best Practices in Rust
By :
Design Patterns and Best Practices in Rust
By:
Overview of this book
Many Rust developers run into problems when they try to apply familiar object-oriented or cross-language patterns to Rust projects. These mismatches often lead to confusing compiler errors, awkward workarounds, or brittle code. This book helps you avoid those traps by thinking in Rust and applying idiomatic design patterns that embrace ownership, borrowing, and type safety.
The book begins with anti-patterns and common mistakes Rust developers often encounter, including misusing object-oriented thinking, over-relying on Clone, or treating the borrow checker as an obstacle. From there, you’ll explore how to rethink traditional design solutions for Rust, including creational, structural, and behavioral design patterns. You’ll also dive into architectural strategies, type-driven design, and Rust-specific techniques such as TypeState. The final chapter brings these ideas together into a design mindset rooted in idiomatic Rust.
By the end of this book, you’ll know how to avoid costly mistakes, apply effective patterns confidently, and design Rust applications that are clean, scalable, and reliable.
*Email sign-up and proof of purchase required
Table of Contents (20 chapters)
Preface
Chapter 1: Why Is Rust Different?
Chapter 2: Anti-Pattern: Designing for Object Orientation
Chapter 3: Anti-Pattern: Using Clone and Rc Everywhere
Chapter 4: Don't Fight the Borrow Checker
Part 2: Replacing Traditional Design Patterns
Chapter 5: Creational Patterns: Making Things
Chapter 6: Structural Patterns: Connecting and Aggregating Components
Chapter 7: Behavioral Patterns 1: Taking Action
Chapter 8: Behavioral Patterns 2: Keeping Track
Part 3: New Patterns for Rust
Chapter 9: Architectural Patterns
Chapter 10: Patterns That Leverage the Type System
Chapter 11: Patterns from Functional Programming
Chapter 12: Patterns Emerging from Rust's Core Features
Chapter 13: Leaning into Rust
Chapter 14: Unlock Your Exclusive Benefits
Other Books You May Enjoy
Index