An attempt to implement the famous design patterns from Gof in the Rust programming language.
| pattern | example | life |
|---|---|---|
| Creation | ||
| Abstract Factory | ||
| Factory Method | ||
| Builder | ||
| Prototype | ||
| Singleton | ||
| Behavioral | ||
| Chain of Responsibility | ||
| Command | ||
| Interpreter | ||
| Iterator | ||
| Mediator | ||
| Memento | ||
| Observer |
type_observer value_observer |
|
| State |
state_return state_inside |
|
| Template Method | ||
| Visitor | ||
| Strategy | ||
| Structural | ||
| Adapter | ||
| Bridge | ||
| Composite | ||
| Decorator | ||
| Facade | ||
| Flyweight | ||
| Proxy | ||
Each pattern is implemented in several examples from a primitive implementation to a real life example.
Terms of use[?]
By using this project or its source code, for any purpose and in any shape or form, you grant your implicit agreement to all the following statements:
- You condemn Russia and its military aggression against Ukraine
- You recognize that Russia is an occupant that unlawfully invaded a sovereign state
- You support Ukraine's territorial integrity, including its claims over temporarily occupied territories of Crimea and Donbas
- You reject false narratives perpetuated by Russian state propaganda
To learn more about the war and how you can help, click here. Glory to Ukraine! 🇺🇦