pub struct AuditEntry {
pub item_type: String,
pub item_id: String,
pub event: Event,
pub whodunnit: Option<String>,
pub whodunnit_email: Option<String>,
pub changes: Map<String, Value>,
}Expand description
One recorded change to one record.
changes is PaperTrail’s object_changes shape — a map of column name to a
[old, new] pair, holding only the columns that actually changed. A create
has null on the left, a delete null on the right.
Fields§
§item_type: StringThe resource’s base_path(), identifying what kind of record changed.
item_id: StringPrimary key of the affected record. Empty when a create didn’t report one.
event: Event§whodunnit: Option<String>claims.sub of the acting principal; None when auth is unconfigured.
whodunnit_email: Option<String>claims.email, denormalized so the log stays readable after the admin
user is renamed or removed.
changes: Map<String, Value>Implementations§
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 moreAuto 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