pub struct LogMonitor;Available on crate feature
monitor-tracing only.Expand description
SecurityMonitor implementation that emits tracing events.
Construct with LogMonitor::new; the type holds no state and is
Copy. Each event becomes a tracing log entry with structured
fields suitable for filtering in tracing-subscriber.
§Examples
use key_vault::{KeyVaultBuilder, LogMonitor};
let _vault = KeyVaultBuilder::new()
.with_monitor(LogMonitor::new())
.build();Implementations§
Source§impl LogMonitor
impl LogMonitor
Trait Implementations§
Source§impl Clone for LogMonitor
impl Clone for LogMonitor
Source§fn clone(&self) -> LogMonitor
fn clone(&self) -> LogMonitor
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 moreSource§impl Debug for LogMonitor
impl Debug for LogMonitor
Source§impl Default for LogMonitor
impl Default for LogMonitor
Source§fn default() -> LogMonitor
fn default() -> LogMonitor
Returns the “default value” for a type. Read more
Source§impl SecurityMonitor for LogMonitor
impl SecurityMonitor for LogMonitor
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 LogMonitor
Auto Trait Implementations§
impl Freeze for LogMonitor
impl RefUnwindSafe for LogMonitor
impl Send for LogMonitor
impl Sync for LogMonitor
impl Unpin for LogMonitor
impl UnsafeUnpin for LogMonitor
impl UnwindSafe for LogMonitor
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