Skip to main content

ToolAuditSink

Trait ToolAuditSink 

Source
pub trait ToolAuditSink: Send + Sync {
    // Required method
    fn write(&self, entry: &ToolAuditEntry);

    // Provided method
    fn flush(&self) { ... }
}
Expand description

Trait every audit sink implements.

Required Methods§

Source

fn write(&self, entry: &ToolAuditEntry)

Persist a single entry. Implementations must never block on network I/O (disk I/O is fine — JSONL writes are O(milliseconds) and buffered).

Provided Methods§

Source

fn flush(&self)

Flush any buffered entries to durable storage. Default no-op.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§