pub struct AuditEvent {
pub timestamp: String,
pub container_id: String,
pub container_name: String,
pub event_type: AuditEventType,
pub detail: String,
pub is_error: bool,
pub security_posture: Option<SecurityPosture>,
}Expand description
A structured audit event emitted as JSON for post-incident analysis.
Fields§
§timestamp: StringUnix epoch timestamp with millisecond precision (e.g. “1712345678.123”)
container_id: StringContainer ID (correlation ID for all events in a lifecycle)
container_name: StringContainer name
event_type: AuditEventTypeEvent type
detail: StringHuman-readable detail message
is_error: boolWhether this event represents a failure
security_posture: Option<SecurityPosture>Security posture details (populated for security-related events)
Implementations§
Source§impl AuditEvent
impl AuditEvent
Sourcepub fn new(
container_id: &str,
container_name: &str,
event_type: AuditEventType,
detail: impl Into<String>,
) -> Self
pub fn new( container_id: &str, container_name: &str, event_type: AuditEventType, detail: impl Into<String>, ) -> Self
Create a new audit event for the given container.
Sourcepub fn with_security_posture(self, posture: SecurityPosture) -> Self
pub fn with_security_posture(self, posture: SecurityPosture) -> Self
Attach security posture to this event.
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 · 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
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