pub struct AuditEntry {
pub id: Uuid,
pub sequence: u64,
pub timestamp: DateTime<Utc>,
pub action: AuditAction,
pub actor: String,
pub metadata: Value,
pub prev_hash: String,
pub hash: String,
}Expand description
A single, hash-chained record in the bout log.
Each entry’s hash is computed over its content and
the previous entry’s hash, making the log tamper-evident.
Fields§
§id: UuidUnique identifier for this record.
sequence: u64Monotonically increasing sequence number within the bout log.
timestamp: DateTime<Utc>When the action occurred.
action: AuditActionWhat happened.
actor: StringWho performed the action (fighter ID, “system”, “user”, etc.).
metadata: ValueAdditional context attached to this record.
prev_hash: StringHex-encoded SHA-256 hash of the previous entry (empty string for the genesis entry).
hash: StringHex-encoded SHA-256 hash of this entry’s content plus prev_hash.
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 · 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