pub struct AuditEvent {
pub event_id: i64,
pub session_id: String,
pub event_type: String,
pub payload_json: Value,
pub redacted_text: Option<String>,
pub prev_hash: String,
pub event_hash: String,
pub created_at: i64,
}Expand description
append-only 事件条目。
不变量:
payload_json必须已由vigil-redaction脱敏,不得含原始 secret。event_hash = SHA256(prev_hash || canonical_json(payload) || created_at)(I01 实装)。
Fields§
§event_id: i64自增序号(由账本签发)。
session_id: String所属 session。
event_type: String事件类型(如 tool_call.evaluated / secret.lease_minted / approval.resolved)。
payload_json: Value已脱敏的负载。
redacted_text: Option<String>供 FTS 检索的脱敏纯文本摘要(可选)。
prev_hash: String前一条事件的 event_hash(创世块为空串)。
event_hash: String本条事件的 hash。
created_at: i64创建时间(Unix epoch 秒)。
Trait Implementations§
Source§impl Clone for AuditEvent
impl Clone for AuditEvent
Source§fn clone(&self) -> AuditEvent
fn clone(&self) -> AuditEvent
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 AuditEvent
impl Debug for AuditEvent
Source§impl<'de> Deserialize<'de> for AuditEvent
impl<'de> Deserialize<'de> for AuditEvent
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
impl Eq for AuditEvent
Source§impl PartialEq for AuditEvent
impl PartialEq for AuditEvent
Source§fn eq(&self, other: &AuditEvent) -> bool
fn eq(&self, other: &AuditEvent) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for AuditEvent
impl Serialize for AuditEvent
impl StructuralPartialEq for AuditEvent
Auto Trait Implementations§
impl Freeze for AuditEvent
impl RefUnwindSafe for AuditEvent
impl Send for AuditEvent
impl Sync for AuditEvent
impl Unpin for AuditEvent
impl UnsafeUnpin for AuditEvent
impl UnwindSafe for AuditEvent
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