Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lpxxn/rust-design-pattern

rust design patterns
https://github.com/lpxxn/rust-design-pattern

awsome-rust design-patterns pattern rust rust-design-patterns

Last synced: about 2 months ago
JSON representation

rust design patterns

Awesome Lists containing this project

README

        




Rust Design Patterns

## Creational Patterns

| Pattern | Description | Status |
|:-------:|:----------- |:------:|
| [Factory Method](/creational/factory.rs) | Defers instantiation of an object to a specialized function for creating instances | ✔ |
| [Abstract Factory](/creational/abstract_factory.rs) | Provides an interface for creating families of releated objects | ✔ |
| [Builder](/creational/builder.rs) | Builds a complex object using simple objects | ✔ |
| [Singleton](/creational/singleton.rs) | Restricts instantiation of a type to one object | ✔ |

## Behavioral Patterns
| Pattern | Description | Status |
|:-------:|:----------- |:------:|
| [Strategy](/behavioral/strategy.rs) | Enables an algorithm's behavior to be selected at runtime | ✔ |
| [State](/behavioral/state.rs) | Encapsulates varying behavior for the same object based on its internal state | ✔ |
| [Command](/behavioral/command.rs) | Converts requests or simple operations into objects. | ✔ |
| [Iterator](/behavioral/iterator.rs) | Lets you traverse elements of a collection without exposing its underlying representation | ✔ |
| [Observer](/behavioral/observer.rs) | Allows one objects to notify other objects about changes in their state. | ✔ |
| [Chain of Responsibility](/behavioral/chain_of_responsibility.rs) | Avoids coupling a sender to receiver by giving more than object a chance to handle the request | ✔ |

## Structural Patterns

| Pattern | Description | Status |
|:-------:|:----------- |:------:|
| [Adapter](/structural/adapter.rs) | allows objects with incompatible interfaces to collaborate. | ✔ |
| [Decorator](/structural/decorator.rs) | Adds behavior to an object, statically or dynamically | ✔ |
| [Proxy](/structural/proxy.rs) | Provides a surrogate for an object to control it's actions | ✔ |