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 appropriateHashandEqtraits) to be removed dynamically. - prelude
- Exposes the
ObserverandSubjecttypes at the library level. - vec_
subject - Contains types which implement the Observer
pattern via an internal
Vec.
Structs§
- Hash
Subject - Implements
Subjectbacked by aHashSet<T>.Tmust implementPartialEqandHash. - VecSubject
- Implements
Subjectbacked by aVec<T>. IfTimplementsEq, thenDetachableSubjectis also provided.AttachableSubjectis always provided.
Traits§
- Attachable
Subject - Allows
Observers to be added to the implementingSubject. - Detachable
Subject - Allows
Observers to be removed from the implementingSubject. - 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.