pub struct ComplianceScoreInputs {
pub total_receipts: u64,
pub deny_receipts: u64,
pub observed_capabilities: u64,
pub revoked_capabilities: u64,
pub any_revoked: bool,
pub velocity_windows: u64,
pub anomalous_velocity_windows: u64,
pub attestation_age_secs: Option<u64>,
}Expand description
Observed compliance inputs that are not carried by ComplianceReport.
The raw ComplianceReport tracks lineage and checkpoint coverage
but does not carry deny counts, revocation state, or velocity
anomaly counts. ComplianceScoreInputs is the additive surface that
callers populate from adjacent stores (receipt analytics,
revocation store, velocity guard telemetry).
Fields§
§total_receipts: u64Total receipts observed in the scoring window.
deny_receipts: u64Receipts with a deny decision in the scoring window.
observed_capabilities: u64Number of capabilities exercised (or observed) in the window.
revoked_capabilities: u64Number of those capabilities that are currently revoked.
any_revoked: boolWhether any capability exercised by this agent is currently revoked. Fast-path fallback when per-capability counts aren’t available.
velocity_windows: u64Number of velocity windows evaluated.
anomalous_velocity_windows: u64Windows flagged as anomalous by velocity / behavioral guards.
attestation_age_secs: Option<u64>Age (in seconds) of the most recent kernel-signed attestation
(checkpoint, receipt, or dpop nonce) at scoring time. When
None, freshness is treated as maximally stale.
Implementations§
Source§impl ComplianceScoreInputs
impl ComplianceScoreInputs
Sourcepub fn new(
total_receipts: u64,
deny_receipts: u64,
observed_capabilities: u64,
revoked_capabilities: u64,
velocity_windows: u64,
anomalous_velocity_windows: u64,
attestation_age_secs: Option<u64>,
) -> Self
pub fn new( total_receipts: u64, deny_receipts: u64, observed_capabilities: u64, revoked_capabilities: u64, velocity_windows: u64, anomalous_velocity_windows: u64, attestation_age_secs: Option<u64>, ) -> Self
Build an inputs struct from a ComplianceReport plus the
ambient inputs the report does not track.
This helper keeps callers from duplicating the “zero checkpoint coverage still counts” logic when no receipts are observed.
Trait Implementations§
Source§impl Clone for ComplianceScoreInputs
impl Clone for ComplianceScoreInputs
Source§fn clone(&self) -> ComplianceScoreInputs
fn clone(&self) -> ComplianceScoreInputs
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ComplianceScoreInputs
impl Debug for ComplianceScoreInputs
Source§impl Default for ComplianceScoreInputs
impl Default for ComplianceScoreInputs
Source§fn default() -> ComplianceScoreInputs
fn default() -> ComplianceScoreInputs
Source§impl<'de> Deserialize<'de> for ComplianceScoreInputs
impl<'de> Deserialize<'de> for ComplianceScoreInputs
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>,
Source§impl PartialEq for ComplianceScoreInputs
impl PartialEq for ComplianceScoreInputs
Source§impl Serialize for ComplianceScoreInputs
impl Serialize for ComplianceScoreInputs
impl Eq for ComplianceScoreInputs
impl StructuralPartialEq for ComplianceScoreInputs
Auto Trait Implementations§
impl Freeze for ComplianceScoreInputs
impl RefUnwindSafe for ComplianceScoreInputs
impl Send for ComplianceScoreInputs
impl Sync for ComplianceScoreInputs
impl Unpin for ComplianceScoreInputs
impl UnsafeUnpin for ComplianceScoreInputs
impl UnwindSafe for ComplianceScoreInputs
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
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
key and return true if they are equal.