Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/fadeevab/design-patterns-rust
/ types & classes
Types & classes
119 in github.com/fadeevab/design-patterns-rust
⨍
Functions
277
◇
Types & classes
119
Class
Account
structural/facade/account.rs:1
Class
AdvancedRemote
structural/bridge/remotes/advanced.rs:5
Class
AppContext
behavioral/command/main.rs:14
Class
Application
structural/proxy/server/application.rs:3
Class
BasicRemote
structural/bridge/remotes/basic.rs:5
Interface
Builder
Builder defines how to assemble a car.
creational/builder/builders/mod.rs:7
Interface
Button
creational/abstract-factory/gui/lib.rs:1
Interface
Button
creational/simple-factory/button/mod.rs:4
Interface
Button
creational/factory-method/render-dialog/gui.rs:1
Class
Car
creational/builder/cars/car.rs:3
Class
CarBuilder
creational/builder/builders/car.rs:11
Class
CarManualBuilder
creational/builder/builders/car_manual.rs:9
Enum
CarType
creational/builder/components.rs:2
Class
Cashier
behavioral/chain-of-responsibility/department/cashier.rs:4
Interface
Checkbox
creational/abstract-factory/gui/lib.rs:5
Class
Circle
creational/prototype/main.rs:2
Interface
Command
Declares a method for executing (and undoing) a command. Each command receives an application context to access visual components (e.g. edit view) an
behavioral/command/command.rs:13
Interface
Component
structural/composite/fs/mod.rs:7
Class
ConcreteStruct1
behavioral/template-method/main.rs:31
Class
ConcreteStruct2
behavioral/template-method/main.rs:43
Class
CopyCommand
behavioral/command/command/copy.rs:7
Class
CutCommand
behavioral/command/command/cut.rs:7
Interface
Department
A single role of objects that make up a chain. A typical trait implementation must have `handle` and `next` methods, while `execute` is implemented by
behavioral/chain-of-responsibility/department.rs:17
Interface
Deserializer
`Deserializer` trait defines methods that can parse either a string or a vector, it accepts a visitor which knows how to construct a new object of a d
behavioral/visitor/main.rs:29
Interface
Device
structural/bridge/device/mod.rs:7
Interface
Dialog
Dialog has a factory method `create_button`. It creates different buttons depending on a factory implementation.
creational/factory-method/render-dialog/gui.rs:9
Class
Director
Director knows how to build a car. However, a builder can build a car manual instead of an actual car, everything depends on the concrete builder.
creational/builder/director.rs:10
Class
Doctor
behavioral/chain-of-responsibility/department/doctor.rs:3
Class
Editor
behavioral/observer/editor.rs:6
Class
Engine
creational/builder/components.rs:16
Enum
Event
behavioral/observer/observer.rs:5
Class
File
structural/composite/fs/file.rs:3
Class
Folder
structural/composite/fs/folder.rs:3
Class
Forest
structural/flyweight/forest.rs:22
Class
FreightTrain
behavioral/mediator/mediator-rc-refcell/trains/freight_train.rs:6
Class
FreightTrain
behavioral/mediator/mediator-top-down/trains/freight_train.rs:4
Class
GpsNavigator
creational/builder/components.rs:60
Interface
GuiFactory
Abstract Factory defined using generics.
creational/abstract-factory/gui/lib.rs:10
Interface
GuiFactoryDynamic
Abstract Factory defined using Box pointer.
creational/abstract-factory/gui/lib.rs:19
Interface
HasMutableDevice
structural/bridge/remotes/mod.rs:9
Class
HtmlButton
creational/factory-method/render-dialog/html_gui.rs:3
Class
HtmlDialog
creational/factory-method/render-dialog/html_gui.rs:16
Class
IdButton
creational/simple-factory/button/id.rs:3
Class
Ledger
structural/facade/ledger.rs:1
Enum
Level
creational/singleton/logger/log.rs:19
Interface
Log
creational/singleton/logger/log.rs:25
Class
MacButton
creational/abstract-factory/macos-gui/button.rs:3
Class
MacCheckbox
creational/abstract-factory/macos-gui/checkbox.rs:3
Class
MacFactory
creational/abstract-factory/macos-gui/factory.rs:5
Class
MagicMaze
creational/factory-method/maze-game/magic_maze.rs:20
Class
MagicRoom
creational/factory-method/maze-game/magic_maze.rs:4
Class
Manual
creational/builder/cars/manual.rs:3
Interface
MazeGame
Maze game has a factory method producing different rooms.
creational/factory-method/maze-game/game.rs:7
Interface
Mediator
behavioral/mediator/mediator-rc-refcell/train_station.rs:9
Interface
Mediator
Mediator has notification methods.
behavioral/mediator/mediator-top-down/train_station.rs:6
Class
Medical
behavioral/chain-of-responsibility/department/medical.rs:3
Interface
Memento
behavioral/memento/conceptual.rs:1
Class
Navigator
behavioral/strategy/conceptual.rs:25
Class
Navigator
behavioral/strategy/functional.rs:14
Class
NginxServer
NGINX server is a proxy to an application server.
structural/proxy/server/nginx.rs:6
Class
Notification
structural/facade/notification.rs:1
Class
OrdinaryMaze
creational/factory-method/maze-game/ordinary_maze.rs:20
Class
OrdinaryRoom
creational/factory-method/maze-game/ordinary_maze.rs:4
Class
OrdinaryTarget
structural/adapter/target.rs:5
Class
Originator
behavioral/memento/serde.rs:7
Class
Originator
behavioral/memento/conceptual.rs:6
Class
OriginatorBackup
behavioral/memento/conceptual.rs:18
Class
PassengerTrain
behavioral/mediator/mediator-rc-refcell/trains/passenger_train.rs:6
Class
PassengerTrain
behavioral/mediator/mediator-top-down/trains/passenger_train.rs:4
Class
PasteCommand
behavioral/command/command/paste.rs:7
Class
Patient
behavioral/chain-of-responsibility/patient.rs:2
Class
PausedState
behavioral/state/state.rs:6
Class
Player
A music player holds a playlist and it can do basic operations over it.
behavioral/state/player.rs:19
Class
PlayerApplication
Application context: a music player and a state.
behavioral/state/main.rs:14
Class
PlayingState
behavioral/state/state.rs:7
Class
PublicTransportStrategy
behavioral/strategy/conceptual.rs:14
Class
Publisher
behavioral/observer/observer.rs:15
Class
Radio
structural/bridge/device/radio.rs:4
Class
Reception
behavioral/chain-of-responsibility/department/reception.rs:4
Interface
Remote
structural/bridge/remotes/mod.rs:13
Interface
Room
Maze room that is going to be instantiated with a factory method.
creational/factory-method/maze-game/game.rs:2
Interface
RouteStrategy
Defines an injectable strategy for building routes.
behavioral/strategy/conceptual.rs:2
Class
SecurityCode
structural/facade/security_code.rs:1
Interface
Server
structural/proxy/server.rs:6
Class
SetLoggerError
creational/singleton/logger/log.rs:8
Class
SimpleLogger
creational/singleton/logger/simple_logger.rs:3
Class
SpecificTarget
structural/adapter/adaptee.rs:1
Interface
State
There is a base `State` trait with methods `play` and `stop` which make state transitions. There are also `next` and `prev` methods in a separate `imp
behavioral/state/state.rs:22
Class
StationManager
behavioral/mediator/mediator-rc-refcell/train_station.rs:15
Class
StoppedState
behavioral/state/state.rs:5
Class
StringDeserializer
behavioral/visitor/main.rs:39
Interface
Target
structural/adapter/target.rs:1
Class
TargetAdapter
Converts adaptee's specific interface to a compatible `Target` output.
structural/adapter/adapter.rs:4
Interface
TemplateMethod
behavioral/template-method/main.rs:1
Class
TitleButton
creational/simple-factory/button/title.rs:3
Class
Track
A music track.
behavioral/state/player.rs:2
Interface
Train
behavioral/mediator/mediator-rc-refcell/trains/mod.rs:7
Interface
Train
A train gets a mediator object by reference.
behavioral/mediator/mediator-top-down/trains/mod.rs:10
Class
TrainStation
behavioral/mediator/mediator-top-down/train_station.rs:12
Enum
Transmission
creational/builder/components.rs:9
next →
1–100 of 119, ranked by callers