pub struct AuditStorage { /* private fields */ }Expand description
Audit log storage for persisting logs to disk
Implementations§
Source§impl AuditStorage
impl AuditStorage
Sourcepub fn save_logs(&self, entries: &[AuditLogEntry]) -> Result<(), String>
pub fn save_logs(&self, entries: &[AuditLogEntry]) -> Result<(), String>
Save audit logs to a JSON file
Sourcepub fn append_logs(&self, new_entries: &[AuditLogEntry]) -> Result<(), String>
pub fn append_logs(&self, new_entries: &[AuditLogEntry]) -> Result<(), String>
Append audit logs to the existing file
Sourcepub fn clear_logs(&self) -> Result<(), String>
pub fn clear_logs(&self) -> Result<(), String>
Clear all logs from the file
Auto Trait Implementations§
impl Freeze for AuditStorage
impl RefUnwindSafe for AuditStorage
impl Send for AuditStorage
impl Sync for AuditStorage
impl Unpin for AuditStorage
impl UnwindSafe for AuditStorage
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