pub struct AuditEvent {
pub event_type: AuditEventType,
pub timestamp: u64,
pub pid: u64,
pub uid: u32,
pub action: AuditAction,
pub target: String,
pub result: bool,
pub extra_data: String,
}Expand description
Structured audit event record.
Fields are serialized in pipe-delimited format for persistent storage.
Fields§
§event_type: AuditEventTypeEvent type
timestamp: u64Timestamp (seconds since boot)
pid: u64Process ID
uid: u32User ID
action: AuditActionStructured action
target: StringTarget resource or object name
result: boolWhether the operation succeeded
extra_data: StringExtra data / details
Implementations§
Source§impl AuditEvent
impl AuditEvent
Sourcepub fn new(
event_type: AuditEventType,
pid: u64,
uid: u32,
action: AuditAction,
target: &str,
result: bool,
extra_data: &str,
) -> Self
pub fn new( event_type: AuditEventType, pid: u64, uid: u32, action: AuditAction, target: &str, result: bool, extra_data: &str, ) -> Self
Create a new structured audit event with automatic timestamp.
Sourcepub fn from_legacy(
event_type: AuditEventType,
pid: u64,
uid: u32,
result_code: i32,
data: u64,
) -> Self
pub fn from_legacy( event_type: AuditEventType, pid: u64, uid: u32, result_code: i32, data: u64, ) -> Self
Create from legacy parameters (backward compat with old AuditEvent::new).
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§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AuditEvent
impl RefUnwindSafe for AuditEvent
impl Send for AuditEvent
impl Sync for AuditEvent
impl Unpin for AuditEvent
impl UnwindSafe for AuditEvent
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)