# rust-design-pattern **Repository Path**: mirrors_lpxxn/rust-design-pattern ## Basic Information - **Project Name**: rust-design-pattern - **Description**: Rust Design Patterns - **Primary Language**: Unknown - **License**: MPL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 7 - **Forks**: 1 - **Created**: 2022-01-11 - **Last Updated**: 2025-06-14 ## Categories & Tags **Categories**: sample-code **Tags**: None ## 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 | ✔ |