Skip to content

Glossary: Software Design Patterns in Rust

Command

Also written: command pattern

A pattern that turns an action into an object with `execute` and `undo`, so actions can be stored, queued and reversed. The cart's AddItem is an example.

Where the book teaches it

Related terms

Undo stack