pub struct AuditEvent {Show 19 fields
pub id: String,
pub timestamp: SystemTime,
pub event_type: AuditEventType,
pub user_id: Option<String>,
pub tenant_id: TenantId,
pub transaction_id: Option<String>,
pub factor_id: Option<String>,
pub success: bool,
pub ip_address: Option<String>,
pub user_agent: Option<String>,
pub error_code: Option<String>,
pub metadata: Value,
pub previous_hash: Option<String>,
pub entry_hash: Option<String>,
pub geo_country: Option<String>,
pub geo_region: Option<String>,
pub geo_city: Option<String>,
pub geo_latitude: Option<f64>,
pub geo_longitude: Option<f64>,
}Expand description
Audit event for compliance and security monitoring
Fields§
§id: String§timestamp: SystemTime§event_type: AuditEventType§user_id: Option<String>§tenant_id: TenantId§transaction_id: Option<String>§factor_id: Option<String>§success: bool§ip_address: Option<String>§user_agent: Option<String>§error_code: Option<String>§metadata: Value§previous_hash: Option<String>SHA-256 hash of the previous audit event in the chain (for tamper detection)
entry_hash: Option<String>SHA-256 hash of this audit event (includes previous_hash)
geo_country: Option<String>Geographic location - country code (ISO 3166-1 alpha-2)
geo_region: Option<String>Geographic location - region/state
geo_city: Option<String>Geographic location - city
geo_latitude: Option<f64>Geographic coordinates - latitude
geo_longitude: Option<f64>Geographic coordinates - longitude
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
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