Expand description
Contains the ObserverNumberProducer struct that maintains a number, along with a list of observers to changes in that number, as represented by the IObserverNumberChanged trait.
Structs
- Represents the Observer Subject in this example, in this case, a struct that contains a single number that is updated with a call to the update() method. Whenever update() is called, the number is incremented and all observers are notified. The observers are passed (“pushed”) the changed number through the IObserverNumberChanged trait.