pub struct DefenseObservationContext { /* private fields */ }Expand description
Immutable provenance a projected defense observation is stamped with.
Every emitted evidence record carries the producer, the resource it concerns, and the action/case correlation in their dedicated fields. The observation sequence and supporting response receipt bind the record through the evidence id, which is a versioned SHA-256 digest of the canonical identity — the raw values never appear in the id itself. Supplying the timestamp keeps the projection deterministic and idempotent.
Implementations§
Source§impl DefenseObservationContext
impl DefenseObservationContext
Sourcepub fn new(
producer_id: impl Into<String>,
resource: EntityId,
correlation_id: impl Into<String>,
sequence: u64,
response_receipt: impl Into<String>,
observed_at_ms: u64,
) -> Result<Self, ReasoningModelError>
pub fn new( producer_id: impl Into<String>, resource: EntityId, correlation_id: impl Into<String>, sequence: u64, response_receipt: impl Into<String>, observed_at_ms: u64, ) -> Result<Self, ReasoningModelError>
Creates a validated observation context.
producer_id, correlation_id, and response_receipt must be non-empty.
Sourcepub fn producer_id(&self) -> &str
pub fn producer_id(&self) -> &str
Returns the producing component identity.
Sourcepub fn correlation_id(&self) -> &str
pub fn correlation_id(&self) -> &str
Returns the action/case correlation identity.
Sourcepub fn response_receipt(&self) -> &str
pub fn response_receipt(&self) -> &str
Returns the supporting response receipt reference.
Sourcepub const fn observed_at_ms(&self) -> u64
pub const fn observed_at_ms(&self) -> u64
Returns the observation timestamp in Unix milliseconds.
Trait Implementations§
Source§impl Clone for DefenseObservationContext
impl Clone for DefenseObservationContext
Source§fn clone(&self) -> DefenseObservationContext
fn clone(&self) -> DefenseObservationContext
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more