pub struct AuditLog { /* private fields */ }Expand description
Blockchain-style audit log
Provides tamper-evident logging of all AI actions and decisions. Each entry is cryptographically linked to the previous one.
Implementations§
Source§impl AuditLog
impl AuditLog
Sourcepub fn with_storage(keypair: KeyPair, path: impl AsRef<Path>) -> Result<Self>
pub fn with_storage(keypair: KeyPair, path: impl AsRef<Path>) -> Result<Self>
Create a new audit log with file persistence
Sourcepub fn append(
&mut self,
action: Action,
proof: IntegrityProof,
decision: Decision,
) -> Result<()>
pub fn append( &mut self, action: Action, proof: IntegrityProof, decision: Decision, ) -> Result<()>
Append a new entry to the audit log
Sourcepub fn verify_chain(&self) -> Result<()>
pub fn verify_chain(&self) -> Result<()>
Verify the entire chain integrity
Sourcepub fn entries(&self) -> &[AuditEntry]
pub fn entries(&self) -> &[AuditEntry]
Get all 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 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