pub struct AuditEntry {Show 17 fields
pub id: Uuid,
pub timestamp: DateTime<Utc>,
pub session_id: String,
pub workflow_id: Option<String>,
pub action_type: ActionType,
pub action_detail: String,
pub model_used: Option<String>,
pub cost: Option<f64>,
pub input_hash: String,
pub output_summary: String,
pub decision: ActionDecision,
pub approved_by: Option<String>,
pub duration_ms: u64,
pub success: bool,
pub error: Option<String>,
pub prev_hash: String,
pub entry_hash: String,
}Expand description
A single audit log entry with hash chain linkage.
Fields§
§id: UuidUnique ID for this audit entry.
timestamp: DateTime<Utc>Timestamp of this entry.
session_id: StringSession that generated this entry.
workflow_id: Option<String>Workflow being executed (if any).
action_type: ActionTypeType of action performed.
action_detail: StringHuman-readable description of the action.
model_used: Option<String>AI model used (if any).
cost: Option<f64>API cost incurred (if any).
input_hash: StringSHA-256 hash of the input (privacy: don’t store raw input).
output_summary: StringSummary of the output.
decision: ActionDecisionConstitution decision for this action.
approved_by: Option<String>Who approved this action (“user”, “auto”, “constitution”).
duration_ms: u64Duration in milliseconds.
success: boolWhether the action succeeded.
error: Option<String>Error message if the action failed.
prev_hash: StringSHA-256 hash of the previous entry (forms the hash chain).
entry_hash: StringSHA-256 hash of this entry’s content + 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