pub struct AuditEntry {
pub id: i64,
pub timestamp: String,
pub event_type: AuditEventType,
pub subject: String,
pub details: Value,
pub operator: String,
pub entry_hash: String,
pub prev_hash: String,
}Expand description
A single append-only entry in the audit log.
Entries form a SHA-256 hash chain for tamper detection:
entry_hash = SHA256(prev_hash + timestamp + event_type + subject + details).
Fields§
§id: i64Auto-increment primary key from SQLite.
timestamp: StringISO 8601 timestamp with millisecond precision (e.g. "2025-01-01T00:00:00.000Z").
event_type: AuditEventTypeDiscriminator for the kind of event recorded.
subject: StringAsset or workspace identifier — what the event is about.
details: ValueStructured detail blob; arbitrary JSON payload.
operator: StringWho initiated the action: "system", "headless", or a user identifier.
entry_hash: StringSHA-256 of prev_hash || timestamp || event_type || subject || details.
prev_hash: StringHash of the immediately preceding entry (empty string for the first entry).
Trait Implementations§
Source§impl Clone for AuditEntry
impl Clone for AuditEntry
Source§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more