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: Self
Sourcepub fn signed_tally_projection(&self) -> Self
pub fn signed_tally_projection(&self) -> Self
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: &Self)
pub fn total(&self) -> u64
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for SecurityCounts
impl Clone for SecurityCounts
impl Copy for SecurityCounts
Source§impl Debug for SecurityCounts
impl Debug for SecurityCounts
Source§impl Default for SecurityCounts
impl Default for SecurityCounts
Source§impl<'de> Deserialize<'de> for SecurityCountswhere
SecurityCounts: Default,
impl<'de> Deserialize<'de> for SecurityCountswhere
SecurityCounts: Default,
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 SecurityCounts
Source§impl PartialEq for SecurityCounts
impl PartialEq for SecurityCounts
Source§impl Serialize for SecurityCounts
impl Serialize for SecurityCounts
impl StructuralPartialEq for SecurityCounts
Auto Trait Implementations§
impl Freeze 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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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