pub enum AuditEntry {
SecurityDecision {
subject: String,
capability: String,
granted: bool,
timestamp_ms: u64,
},
ToolExecution {
agent_id: String,
tool_name: String,
params_summary: String,
success: bool,
duration_ms: u64,
timestamp_ms: u64,
},
Lifecycle {
agent_id: String,
event: String,
timestamp_ms: u64,
},
Custom {
category: String,
message: String,
metadata: HashMap<String, Value>,
timestamp_ms: u64,
},
}Expand description
An audit trail entry.
Variants§
SecurityDecision
A security capability check.
ToolExecution
A tool execution event.
Fields
Lifecycle
An agent lifecycle event.
Custom
A custom entry with arbitrary metadata.
Implementations§
Source§impl AuditEntry
impl AuditEntry
Sourcepub fn security_decision(
subject: String,
cap: String,
granted: bool,
) -> AuditEntry
pub fn security_decision( subject: String, cap: String, granted: bool, ) -> AuditEntry
Log a security decision.
Sourcepub fn tool_execution(
agent_id: String,
tool_name: String,
params_summary: String,
success: bool,
duration_ms: u64,
) -> AuditEntry
pub fn tool_execution( agent_id: String, tool_name: String, params_summary: String, success: bool, duration_ms: u64, ) -> AuditEntry
Log a tool execution.
Sourcepub fn lifecycle(agent_id: String, event: String) -> AuditEntry
pub fn lifecycle(agent_id: String, event: String) -> AuditEntry
Log a lifecycle event.
Sourcepub fn custom(category: String, message: String) -> AuditEntry
pub fn custom(category: String, message: String) -> AuditEntry
Log a custom entry.
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 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<AuditEntry, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AuditEntry, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for AuditEntry
impl Serialize for AuditEntry
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. 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