pub struct AuditManager { /* private fields */ }Expand description
Comprehensive audit trail system for enterprise compliance
Implementations§
Source§impl AuditManager
impl AuditManager
Sourcepub fn with_compliance(frameworks: HashSet<ComplianceTag>) -> Self
pub fn with_compliance(frameworks: HashSet<ComplianceTag>) -> Self
Create audit manager with specific compliance requirements
Sourcepub fn log_audit_event(
&mut self,
event_type: AuditEventType,
user_id: String,
action: String,
resource: String,
outcome: AuditOutcome,
metadata: Option<HashMap<String, String>>,
) -> Result<String>
pub fn log_audit_event( &mut self, event_type: AuditEventType, user_id: String, action: String, resource: String, outcome: AuditOutcome, metadata: Option<HashMap<String, String>>, ) -> Result<String>
Log an audit event with comprehensive tracking
Sourcepub fn log_authentication_event(
&mut self,
user_id: String,
session_id: Option<String>,
ip_address: Option<String>,
user_agent: Option<String>,
success: bool,
failure_reason: Option<String>,
) -> Result<String>
pub fn log_authentication_event( &mut self, user_id: String, session_id: Option<String>, ip_address: Option<String>, user_agent: Option<String>, success: bool, failure_reason: Option<String>, ) -> Result<String>
Log authentication event with enhanced details
Sourcepub fn log_data_access_event(
&mut self,
user_id: String,
resource: String,
resource_id: Option<String>,
operation: String,
data_classification: DataClassification,
success: bool,
) -> Result<String>
pub fn log_data_access_event( &mut self, user_id: String, resource: String, resource_id: Option<String>, operation: String, data_classification: DataClassification, success: bool, ) -> Result<String>
Log data access event with privacy compliance
Sourcepub fn search_audit_entries(
&self,
criteria: &AuditSearchCriteria,
limit: Option<usize>,
) -> Vec<&AuditTrailEntry>
pub fn search_audit_entries( &self, criteria: &AuditSearchCriteria, limit: Option<usize>, ) -> Vec<&AuditTrailEntry>
Search audit entries with flexible criteria
Sourcepub fn generate_compliance_report(
&self,
framework: ComplianceTag,
start_time: DateTime<Utc>,
end_time: DateTime<Utc>,
) -> Result<ComplianceReport>
pub fn generate_compliance_report( &self, framework: ComplianceTag, start_time: DateTime<Utc>, end_time: DateTime<Utc>, ) -> Result<ComplianceReport>
Generate compliance report for specific framework
Sourcepub fn verify_integrity(&self) -> IntegrityStatus
pub fn verify_integrity(&self) -> IntegrityStatus
Verify integrity of audit trail using cryptographic hashes
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AuditManager
impl RefUnwindSafe for AuditManager
impl Send for AuditManager
impl Sync for AuditManager
impl Unpin for AuditManager
impl UnwindSafe for AuditManager
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more