Spring SALE

Strategy in Rust

Strategy is a behavioral design pattern that turns a set of behaviors into objects and makes them interchangeable inside original context object.

The original object, called context, holds a reference to a strategy object. The context delegates executing the behavior to the linked strategy object. In order to change the way the context performs its work, other objects may replace the currently linked strategy object with another one.

Strategy in Other Languages

Strategy in C# Strategy in C++ Strategy in Go Strategy in Java Strategy in PHP Strategy in Python Strategy in Ruby Strategy in Swift Strategy in TypeScript