Design Patterns in Rust
Course objectives
You will learn how to:
- use idioms and design patterns
- recognize anti-patterns
- implement classic GoF patterns in Rust
- design modules, traits, and generics to ensure code extensibility and safety
Course syllabus
Introduction to Design Patterns
- Idioms
- Design Patterns
- Anti‑patterns
Idioms
- Iterators and Pipelines (Iterator Pipelines)
- Newtype Pattern
- RAII – Resource Management in Rust
- Enums and Pattern Matching
Polymorphism in Rust
- Static and Dynamic Polymorphism
GoF Design Patterns
- Builder – Constructing Complex Objects
- Factories – Idiomatic Implementation in Rust
- Decorator
- Composite
- Bridge
- Flyweight
- Strategy
- State – Implementations of State Machines
- Observer & Chain of Responsibility - event handling
- Command
- Interpreter
- Visitor
Functional Patterns
- Monads in Rust –
Option,Result - Combinators –
map,and_then,filter - Fold
Anti‑patterns in Rust
Prerequisites
Working knowledge of Rust.