pub struct NoMonitor;Expand description
SecurityMonitor implementation that discards every event.
Use this when you want to construct a vault without configuring any
observability surface — anomaly events go nowhere, but the vault’s
own threshold detection (see
KeyVaultBuilder::with_failure_threshold)
still works and can still lock the vault out.
NoMonitor is the default when no monitor is configured. Calling
with_monitor(NoMonitor)
explicitly is equivalent to leaving the slot empty; the difference is
stylistic.
§Examples
use key_vault::{KeyVaultBuilder, NoMonitor};
let _vault = KeyVaultBuilder::new()
.with_monitor(NoMonitor)
.build();Trait Implementations§
Source§impl SecurityMonitor for NoMonitor
impl SecurityMonitor for NoMonitor
Source§fn on_decryption_failure(&self, _ctx: &FailureContext)
fn on_decryption_failure(&self, _ctx: &FailureContext)
Called when a decryption attempt fails.
Source§fn on_anomalous_access(&self, _ctx: &AccessContext)
fn on_anomalous_access(&self, _ctx: &AccessContext)
Called when an access pattern looks anomalous to the configured
detector.
Source§fn on_threshold_breach(&self, _ctx: &ThresholdContext)
fn on_threshold_breach(&self, _ctx: &ThresholdContext)
Called when a configured failure threshold is crossed.
impl Copy for NoMonitor
Auto Trait Implementations§
impl Freeze for NoMonitor
impl RefUnwindSafe for NoMonitor
impl Send for NoMonitor
impl Sync for NoMonitor
impl Unpin for NoMonitor
impl UnsafeUnpin for NoMonitor
impl UnwindSafe for NoMonitor
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