pub struct FileAuditSink { /* private fields */ }Expand description
File-based audit sink that writes JSONL (one JSON line per event).
Supports optional cryptographic chaining — when enabled, each event includes the SHA-256 hash of the previous event’s JSON representation, creating an append-only tamper-evident log.
Implementations§
Source§impl FileAuditSink
impl FileAuditSink
Trait Implementations§
Source§impl AuditSink for FileAuditSink
impl AuditSink for FileAuditSink
Source§fn log<'life0, 'async_trait>(
&'life0 self,
event: AuditEvent,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn log<'life0, 'async_trait>(
&'life0 self,
event: AuditEvent,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Log a single audit event.
Source§fn log_batch<'life0, 'async_trait>(
&'life0 self,
events: Vec<AuditEvent>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn log_batch<'life0, 'async_trait>(
&'life0 self,
events: Vec<AuditEvent>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Log a batch of audit events atomically. Read more
Source§fn query<'life0, 'life1, 'async_trait>(
&'life0 self,
_filter: &'life1 AuditFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<AuditEvent>, AuthError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn query<'life0, 'life1, 'async_trait>(
&'life0 self,
_filter: &'life1 AuditFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<AuditEvent>, AuthError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Query audit events matching the given filter. Read more
Auto Trait Implementations§
impl !Freeze for FileAuditSink
impl RefUnwindSafe for FileAuditSink
impl Send for FileAuditSink
impl Sync for FileAuditSink
impl Unpin for FileAuditSink
impl UnsafeUnpin for FileAuditSink
impl UnwindSafe for FileAuditSink
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