pub struct AuditLogger { /* private fields */ }Expand description
Manages audit trails for all file operations
Logs all file operations persistently in JSON format and provides access to change history with timestamps.
Implementations§
Source§impl AuditLogger
impl AuditLogger
Sourcepub fn with_default_dir() -> Self
pub fn with_default_dir() -> Self
Creates a new AuditLogger with default audit directory
Uses .ricecoder/audit/ as the default audit directory
Sourcepub fn log_operation(&self, entry: AuditEntry) -> Result<(), FileError>
pub fn log_operation(&self, entry: AuditEntry) -> Result<(), FileError>
Sourcepub fn get_change_history(
&self,
path: &Path,
) -> Result<Vec<AuditEntry>, FileError>
pub fn get_change_history( &self, path: &Path, ) -> Result<Vec<AuditEntry>, FileError>
Sourcepub fn get_all_entries(&self) -> Result<Vec<AuditEntry>, FileError>
pub fn get_all_entries(&self) -> Result<Vec<AuditEntry>, FileError>
Retrieves all audit entries
Returns all audit entries in the audit trail, ordered by timestamp.
§Returns
A vector of all audit entries ordered by timestamp (oldest first)
Trait Implementations§
Source§impl Debug for AuditLogger
impl Debug for AuditLogger
Auto Trait Implementations§
impl Freeze for AuditLogger
impl RefUnwindSafe for AuditLogger
impl Send for AuditLogger
impl Sync for AuditLogger
impl Unpin for AuditLogger
impl UnwindSafe for AuditLogger
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