pub trait AuditSink {
// Required method
fn record(&self, event: CodeAuthEvent);
}Expand description
A recipient of security audit events (RFC-012 §3).
Implement this trait to connect codlet events to a logging backend, an audit database, or a metrics pipeline. The implementation must not block the calling thread for extended periods; use a background channel if the backend is slow.
The implementation must not log the event in a way that violates the redaction contract — i.e., it must not attempt to extract or store plaintext secrets from the event fields.
Required Methods§
Sourcefn record(&self, event: CodeAuthEvent)
fn record(&self, event: CodeAuthEvent)
Receive a security event. Called synchronously in the hot path; must return quickly. Fire-and-forget semantics: codlet does not retry on failure.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".