pub struct AuditLog { /* private fields */ }Expand description
Bounded process-local audit log.
Implementations§
Source§impl AuditLog
impl AuditLog
Sourcepub fn attach_journal(&self, journal: Arc<FileOperationalJournal>)
pub fn attach_journal(&self, journal: Arc<FileOperationalJournal>)
Attaches a durable journal and loads its retained audit entries.
Sourcepub fn durability_error(&self) -> Option<String>
pub fn durability_error(&self) -> Option<String>
Returns the last durable journal failure, when persistence degraded.
Sourcepub fn push(&self, record: AuditRecord)
pub fn push(&self, record: AuditRecord)
Appends a command record and its generic audit projection.
Sourcepub fn push_entry(&self, entry: AuditEntry)
pub fn push_entry(&self, entry: AuditEntry)
Appends one generic audit entry after redaction.
Sourcepub fn records(&self) -> Vec<AuditRecord>
pub fn records(&self) -> Vec<AuditRecord>
Returns a point-in-time copy of command records.
Sourcepub fn entries(&self) -> Vec<AuditEntry>
pub fn entries(&self) -> Vec<AuditEntry>
Returns a point-in-time copy of generic audit entries.
Sourcepub fn export_jsonl(&self) -> Result<String, Error>
pub fn export_jsonl(&self) -> Result<String, Error>
Exports generic entries as newline-delimited JSON.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for AuditLog
impl !RefUnwindSafe for AuditLog
impl !UnwindSafe for AuditLog
impl Send for AuditLog
impl Sync for AuditLog
impl Unpin for AuditLog
impl UnsafeUnpin for AuditLog
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