Module observer

Module observer 

Source
Expand description

Contains types which implement the “Observer” pattern, in which a single object is used to delegate notifications to a group of dynamic listening object.

![observer diagram][observer-diagram]

Modules§

hash_subject
Contains types which allow Observers (which implement the appropriate Hash and Eq traits) to be removed dynamically.
prelude
Exposes the Observer and Subject types at the library level.
vec_subject
Contains types which implement the Observer pattern via an internal Vec.

Structs§

HashSubject
Implements Subject backed by a HashSet<T>. T must implement PartialEq and Hash.
VecSubject
Implements Subject backed by a Vec<T>. If T implements Eq, then DetachableSubject is also provided. AttachableSubject is always provided.

Traits§

AttachableSubject
Allows Observers to be added to the implementing Subject.
DetachableSubject
Allows Observers to be removed from the implementing Subject.
Observer
An object notified by a Subject.
Subject
An object which notifies some group of Observers. When it is notified, all the listeners are notified.