# design_pattern
**Repository Path**: r31oad3d/design_pattern
## Basic Information
- **Project Name**: design_pattern
- **Description**: design patterns in Rust
- **Primary Language**: Rust
- **License**: MPL-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 14
- **Forks**: 0
- **Created**: 2020-09-16
- **Last Updated**: 2024-03-20
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
### Design pattern(GoF) in Rust
> **某些设计模式对于Rust语言来说是无必要的(个人理解)。**
> **本Repo的目的最直接的是通过模式的Rust实现来提高对Rust的理解。**
> **代码中包含了一些Rust的反模式,比如Deref多态。**
>
> 其中包含的文字讲解部分来自:
> https://www.runoob.com/design-pattern/design-pattern-tutorial.html
### 设计模式的类型
序号 | 模式 & 描述 | 包括 |
---|---|---|
1 | 创建型模式 这些设计模式提供了一种在创建对象的同时隐藏创建逻辑的方式,而不是使用 new 运算符直接实例化对象。这使得程序在判断针对某个给定实例需要创建哪些对象时更加灵活。 |
|
2 | 结构型模式 这些设计模式关注类和对象的组合。继承的概念被用来组合接口和定义组合对象获得新功能的方式。 |
|
3 | 行为型模式 这些设计模式特别关注对象之间的通信。 |
|