Skip to content

Glossary: Software Design Patterns in Rust

Strategy

Also written: strategies

One interchangeable way of doing a job, where all versions share a shape. In Rust it is a function or closure, like the discount functions taking a subtotal and returning a discounted one.

Where the book teaches it

Related terms

ClosureFunction pointerTemplate method