pub struct AuditConfig {
pub operations: HashSet<AuditOp>,
pub retention_days: u64,
pub capture_state: bool,
pub log_reads: bool,
pub log_writes: bool,
}Expand description
Audit configuration from @audit directive.
Bare @audit enables auditing with defaults: all mutations, 90-day retention,
no state capture. Read auditing excluded from default (opt in with read: true).
Fields§
§operations: HashSet<AuditOp>Which operations to audit (default: create, update, delete).
retention_days: u64Retention period in days (default: 90, 0 = forever).
capture_state: boolCapture before/after record state on mutations (default: false).
log_reads: boolLog read operations to the TransactionLog (default: false).
@audit(read: true) enables read auditing for this table.
Reads that scope WriteContext are gated by this flag so the
TransactionLog stays clean by default.
log_writes: boolLog write operations to the TransactionLog (default: true).
@audit(write: false) disables write auditing for this table.
Trait Implementations§
Source§impl Clone for AuditConfig
impl Clone for AuditConfig
Source§fn clone(&self) -> AuditConfig
fn clone(&self) -> AuditConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AuditConfig
impl Debug for AuditConfig
Auto Trait Implementations§
impl Freeze for AuditConfig
impl RefUnwindSafe for AuditConfig
impl Send for AuditConfig
impl Sync for AuditConfig
impl Unpin for AuditConfig
impl UnsafeUnpin for AuditConfig
impl UnwindSafe for AuditConfig
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