pub enum EventData {
Opened {
finding_ref: FindingRef,
title: String,
severity: Severity,
impact: u8,
likelihood: u8,
affected_systems: Vec<String>,
sla_days: u32,
due_at: NaiveDate,
},
OwnerAssigned {
owner: String,
},
ScoreChanged {
impact: u8,
likelihood: u8,
severity: Severity,
reason: String,
},
SlaSet {
due_at: NaiveDate,
basis: String,
},
StatusChanged {
from: Status,
to: Status,
reason: String,
},
EvidenceLinked {
finding_ref: FindingRef,
},
ExternalLinked {
system: String,
external_id: String,
url: String,
},
ExternalStatusObserved {
system: String,
status: String,
observed_at: DateTime<Utc>,
},
Note {
text: String,
},
Remediated {
resolved_run_ref: Option<FindingRef>,
note: String,
},
Reopened {
reason: String,
},
ExceptionDocumented {
rationale: String,
approved_by: String,
expires_at: NaiveDate,
},
}Expand description
The per-type payload. Adjacently tagged so it serialises as
{"type": "...", "data": { ... }}, matching risk-event.schema.json.
Variants§
Opened
Creates the risk; status → open.
Fields
§
finding_ref: FindingRefOwnerAssigned
ScoreChanged
Supersedes the score.
SlaSet
Overrides the SLA due date.
StatusChanged
Moves through the status machine.
EvidenceLinked
Appends another finding ref — how a risk re-observed in a later run is recorded as persisting.
Fields
§
finding_ref: FindingRefExternalLinked
Records the tracker mirror created by sync-out.
ExternalStatusObserved
Advisory inbound status from a tracker. Never authoritative.
Note
Free-text note; no state change.
Remediated
Shorthand for status-changed → remediated with evidence.
Reopened
remediated → open.
ExceptionDocumented
Status → accepted-exception.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EventData
impl<'de> Deserialize<'de> for EventData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for EventData
impl StructuralPartialEq for EventData
Auto Trait Implementations§
impl Freeze for EventData
impl RefUnwindSafe for EventData
impl Send for EventData
impl Sync for EventData
impl Unpin for EventData
impl UnsafeUnpin for EventData
impl UnwindSafe for EventData
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.