pub trait AuditSink: Send + Sync {
// Required method
fn emit(&self, event: &AuditEvent);
// Provided method
fn flush(&self, _timeout: Duration) { ... }
}Expand description
A destination for audit events.
emit is called on the request path and must not block: queue the
event and return. Failures are the sink’s to log; they never reach
the request.
Required Methods§
Sourcefn emit(&self, event: &AuditEvent)
fn emit(&self, event: &AuditEvent)
Hand one event to the destination.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".