项目
在 GitHub 查看
lpxxn/rust-design-pattern
关于
Rust 设计模式
学习与教育实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- -1
- 1个月
- 0
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文
Rust Design Patterns
Creational Patterns
| Pattern | Description | Status |
|---|---|---|
| Factory Method | Defers instantiation of an object to a specialized function for creating instances | ✔ |
| Abstract Factory | Provides an interface for creating families of releated objects | ✔ |
| Builder | Builds a complex object using simple objects | ✔ |
| Singleton | Restricts instantiation of a type to one object | ✔ |
Behavioral Patterns
| Pattern | Description | Status |
|---|---|---|
| Strategy | Enables an algorithm's behavior to be selected at runtime | ✔ |
| State | Encapsulates varying behavior for the same object based on its internal state | ✔ |
| Command | Converts requests or simple operations into objects. | ✔ |
| Iterator | Lets you traverse elements of a collection without exposing its underlying representation | ✔ |
| Observer | Allows one objects to notify other objects about changes in their state. | ✔ |
| Chain of Responsibility | Avoids coupling a sender to receiver by giving more than object a chance to handle the request | ✔ |
Structural Patterns
| Pattern | Description | Status |
|---|---|---|
| Adapter | allows objects with incompatible interfaces to collaborate. | ✔ |
| Decorator | Adds behavior to an object, statically or dynamically | ✔ |
| Proxy | Provides a surrogate for an object to control it's actions | ✔ |
探索相关项目
加载中…