pub struct AuditEntry {
pub timestamp: f64,
pub app_id: String,
pub table: String,
pub record_id: String,
pub operation: AuditOp,
pub user: Option<String>,
pub after: Option<Value>,
pub before: Option<Value>,
pub interface: Option<String>,
}Expand description
A table-level audit entry emitted after successful CRUD operations.
Sent via try_send (fire-and-forget) on the audit channel — never blocks
the write path. Dropped silently if the channel is full.
Fields§
§timestamp: f64Epoch milliseconds
app_id: StringApplication that owns the table
table: StringTable name
record_id: StringRecord ID
operation: AuditOpWhat happened
user: Option<String>Who did it (username or “anonymous”)
after: Option<Value>Record state after the operation (for create/update)
before: Option<Value>Record state before the operation (only when capture_state: true)
interface: Option<String>Interface that triggered the operation (e.g., “rest”, “graphql”, “mcp”, “mqtt”)
Trait Implementations§
Source§impl Clone for AuditEntry
impl Clone for AuditEntry
Source§fn clone(&self) -> AuditEntry
fn clone(&self) -> AuditEntry
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 AuditEntry
impl Debug for AuditEntry
Source§impl<'de> Deserialize<'de> for AuditEntry
impl<'de> Deserialize<'de> for AuditEntry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AuditEntry
impl RefUnwindSafe for AuditEntry
impl Send for AuditEntry
impl Sync for AuditEntry
impl Unpin for AuditEntry
impl UnsafeUnpin for AuditEntry
impl UnwindSafe for AuditEntry
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