Design Patterns for Rust

Design Patterns for Rust

39mIntermediate2023-11-20

Authors

Tim McNamara

Tim McNamara

Rust Software Architect and Author

Course details

Rust is an increasingly popular—and even loved—programming language, which has led to many developers learning the language. If you’ve learned the basics of Rust, this course with Tim McNamara shows you how to take what you’ve learned to the next level and apply Rust to solve real problems. Tim shows you how classic design patterns can be used in Rust to make the most of its type system, memory safety, and performance guarantees. He also covers some patterns unique to Rust, including creational patterns, behavioral patterns, and anti-patterns—where he shows you how to avoid bad practices with Rust design patterns.

Skills covered

RustSoftware DesignProgramming LanguagesOpen SourceSoftware DevelopmentOne-Off

Concepts

Introduction

  • Apply design patterns to Rust

Creational Patterns

  • Introducing creational patterns
  • Default
  • Typed constructors
  • Builder

Behavioral Patterns

  • Introducing behavioral patterns
  • Newtype
  • Guard
  • Visitor
  • Strategy

Anti-patterns

  • Avoiding bad practices
  • Overusing Clone
  • Overusing Deref

Conclusion

  • Next steps
40,000 Toman