pub struct AuditTrail { /* private fields */ }Expand description
The Audit Trail — append-only log backed by sled
Implementations§
Source§impl AuditTrail
impl AuditTrail
pub fn open(path: &str) -> CortexResult<Self>
Sourcepub fn record_session(
&mut self,
session: &AirlockSession,
query_hash: ContentHash,
response_hash: ContentHash,
) -> CortexResult<AuditEntry>
pub fn record_session( &mut self, session: &AirlockSession, query_hash: ContentHash, response_hash: ContentHash, ) -> CortexResult<AuditEntry>
Record an airlock session as an audit entry
Sourcepub fn record_event(
&mut self,
actor: &str,
jis_level: u8,
event_hash: ContentHash,
description: &str,
) -> CortexResult<AuditEntry>
pub fn record_event( &mut self, actor: &str, jis_level: u8, event_hash: ContentHash, description: &str, ) -> CortexResult<AuditEntry>
Record a custom audit event (e.g., system prompt modification)
Sourcepub fn verify_chain(&self) -> bool
pub fn verify_chain(&self) -> bool
Verify the entire audit chain is unbroken
Sourcepub fn stats(&self) -> CortexResult<AuditStats>
pub fn stats(&self) -> CortexResult<AuditStats>
Get audit statistics
Sourcepub fn chain(&self) -> &Provenance
pub fn chain(&self) -> &Provenance
Get the full provenance chain (for auditors with sufficient JIS level)
Auto Trait Implementations§
impl Freeze for AuditTrail
impl !RefUnwindSafe for AuditTrail
impl Send for AuditTrail
impl Sync for AuditTrail
impl Unpin for AuditTrail
impl UnsafeUnpin for AuditTrail
impl !UnwindSafe for AuditTrail
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