Skip to content

Glossary: Software Design Patterns in Rust

Flyweight / Bridge / Mediator / Memento / Visitor / Interpreter

Also written: Flyweight, Bridge, Mediator, Memento, Visitor, Interpreter

Six further Gang of Four design patterns. Flyweight shares objects to save memory, Bridge splits a concept from its implementation, Mediator has one object manage how others talk, Memento saves state to restore later, Visitor adds operations without editing types, and Interpreter models a small language's grammar as types.

Where the book teaches it

Related terms

Gang of FourDesign pattern