1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
use fmt;
/// Represent [Notification]'s interest
;
/// The definition for a PureMVC Notification.
///
/// PureMVC does not rely upon underlying event models such
/// as the one provided with Flash.
///
/// The Observer Pattern as implemented within PureMVC exists
/// to support event-driven communication between the
/// application and the actors of the MVC triad.
///
/// Notifications are not meant to be a replacement for Events.
/// Generally, [Mediator] implementors
/// place event listeners on their view components, which they
/// then handle in the usual way. This may lead to the broadcast of [Notification]'s to
/// trigger [Command]'s or to communicate with other [Mediator]'s. [Proxy] and [Command]
/// instances communicate with each other and [Mediator]'s
/// by broadcasting [Notification]'s.
///
/// A key difference between native event's and PureMVC
/// [Notification]'s is that event's follow the
/// 'Chain of Responsibility' pattern, 'bubbling' up the display hierarchy
/// until some parent component handles the event, while
/// PureMVC [Notification]'s follow a 'Publish/Subscribe'
/// pattern. PureMVC classes need not be related to each other in a
/// parent/child relationship in order to communicate with one another
/// using [Notification]'s.
///
/// Should implement fmt::Debug to get the string representation of
/// the [Notification] instance
///
/// [Mediator]: crate::prelude::Mediator
/// [Proxy]: crate::prelude::Proxy
/// [Command]: crate::prelude::Command