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
/// Notifications generated by [NotificationHandler].
/// These notifications identify the type of message and its content.
/// In addition, the message is accompanied by the data used to construct
/// the message, so that it can be used to construct customized messages.
#[derive(Clone, Debug)]
pub enum Notification {
    /// A new subject has been generated
    NewSubject { subject_id: String },
    /// A new event has been generated
    NewEvent { sn: u64, subject_id: String },
    /// A subject has been synchronized
    StateUpdated { sn: u64, subject_id: String },
    /// An approval request has been received
    ApprovalReceived {
        id: String,
        subject_id: String,
        sn: u64,
    },
    /// Approval Obsoleted because gov version changed or event confirmed without us
    ObsoletedApproval {
        id: String,
        subject_id: String,
        sn: u64,
    },
}