pub struct AuditLog { /* private fields */ }Expand description
Audit log manager with HMAC signing
Implementations§
Source§impl AuditLog
impl AuditLog
Sourcepub fn new(log_path: Option<&str>) -> Result<Self, String>
pub fn new(log_path: Option<&str>) -> Result<Self, String>
Create or load an audit log with HMAC signing
Sourcepub fn log(&self, event_type: &str, message: &str) -> Result<(), String>
pub fn log(&self, event_type: &str, message: &str) -> Result<(), String>
Append a signed entry to the audit log
Sourcepub fn verify(&self) -> Result<VerificationResult, String>
pub fn verify(&self) -> Result<VerificationResult, String>
Verify the integrity of all log entries
Auto Trait Implementations§
impl Freeze for AuditLog
impl RefUnwindSafe for AuditLog
impl Send for AuditLog
impl Sync for AuditLog
impl Unpin for AuditLog
impl UnsafeUnpin for AuditLog
impl UnwindSafe 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