Skip to content

Glossary: Software Design Patterns in Rust

Observer

Also written: observer pattern

A pattern where the code where something happens (the subject) keeps listeners and calls each without knowing what they do. A new reaction, like Alex's packing slip, is one more `on` line.

Where the book teaches it

Related terms

ListenerSubjectPublish/subscribe