pub struct DefenseTelemetry { /* private fields */ }Expand description
Telemetry data for monitoring
Uses interior mutability for thread-safe updates during checks.
Implementations§
Source§impl DefenseTelemetry
impl DefenseTelemetry
Sourcepub fn record_check(&self, passed: bool, layer_results: &[LayerResult])
pub fn record_check(&self, passed: bool, layer_results: &[LayerResult])
Record a check result
Sourcepub fn total_checks(&self) -> u64
pub fn total_checks(&self) -> u64
Get total checks
Sourcepub fn passed_checks(&self) -> u64
pub fn passed_checks(&self) -> u64
Get passed checks
Sourcepub fn blocked_checks(&self) -> u64
pub fn blocked_checks(&self) -> u64
Get blocked checks
Sourcepub fn block_rate(&self) -> f64
pub fn block_rate(&self) -> f64
Get block rate
Sourcepub fn layer_stats(&self) -> HashMap<String, LayerStats>
pub fn layer_stats(&self) -> HashMap<String, LayerStats>
Get per-layer statistics
Trait Implementations§
Source§impl Clone for DefenseTelemetry
impl Clone for DefenseTelemetry
Source§impl Debug for DefenseTelemetry
impl Debug for DefenseTelemetry
Source§impl Default for DefenseTelemetry
impl Default for DefenseTelemetry
Source§fn default() -> DefenseTelemetry
fn default() -> DefenseTelemetry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for DefenseTelemetry
impl !RefUnwindSafe for DefenseTelemetry
impl Send for DefenseTelemetry
impl Sync for DefenseTelemetry
impl Unpin for DefenseTelemetry
impl UnwindSafe for DefenseTelemetry
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