pub struct SecurityCounts {
pub secrets_redacted: u64,
pub shell_blocked: u64,
pub path_blocked: u64,
pub injection_flagged: u64,
pub pii_redacted: u64,
pub content_withheld: u64,
pub coverage_incomplete: u64,
}Expand description
Per-kind event counts. Persisted inside SessionStats, so every field is
serde(default) and old session files load unchanged.
The context-gateway kinds are written only when non-zero: every count
serialized before they existed keeps its exact bytes (signed tallies, see
Self::signed_tally_projection).
Fields§
§secrets_redacted: u64§shell_blocked: u64§path_blocked: u64§injection_flagged: u64§pii_redacted: u64§content_withheld: u64§coverage_incomplete: u64Implementations§
Source§impl SecurityCounts
impl SecurityCounts
pub const ZERO: SecurityCounts
Sourcepub fn signed_tally_projection(&self) -> SecurityCounts
pub fn signed_tally_projection(&self) -> SecurityCounts
The counts a signed savings-batch tally carries. Server mirrors verify the tally field by field and do not know the gateway kinds yet, so they are left out (zero, hence not serialized) instead of breaking the signature; the audit trail still proves them locally.
pub fn add(&mut self, kind: SecurityKind, n: u64)
pub fn merge(&mut self, other: &SecurityCounts)
Sourcepub fn since(&self, base: &SecurityCounts) -> SecurityCounts
pub fn since(&self, base: &SecurityCounts) -> SecurityCounts
Events since base (a counter never goes below zero).
pub fn total(&self) -> u64
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for SecurityCounts
impl Clone for SecurityCounts
Source§fn clone(&self) -> SecurityCounts
fn clone(&self) -> SecurityCounts
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SecurityCounts
Source§impl Debug for SecurityCounts
impl Debug for SecurityCounts
Source§impl Default for SecurityCounts
impl Default for SecurityCounts
Source§fn default() -> SecurityCounts
fn default() -> SecurityCounts
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SecurityCountswhere
SecurityCounts: Default,
impl<'de> Deserialize<'de> for SecurityCountswhere
SecurityCounts: Default,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SecurityCounts, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SecurityCounts, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SecurityCounts
Source§impl PartialEq for SecurityCounts
impl PartialEq for SecurityCounts
Source§impl Serialize for SecurityCounts
impl Serialize for SecurityCounts
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for SecurityCounts
Auto Trait Implementations§
impl Forget for SecurityCounts
impl Freeze for SecurityCounts
impl Move for SecurityCounts
impl RefUnwindSafe for SecurityCounts
impl Send for SecurityCounts
impl Sync for SecurityCounts
impl Unpin for SecurityCounts
impl UnsafeUnpin for SecurityCounts
impl UnwindSafe for SecurityCounts
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more