pub struct MemoryAuditLogger { /* private fields */ }Expand description
In-memory audit logger (for testing)
Implementations§
Source§impl MemoryAuditLogger
impl MemoryAuditLogger
Sourcepub fn entries(&self) -> Vec<AuditLogEntry>
pub fn entries(&self) -> Vec<AuditLogEntry>
Get all logged entries
Sourcepub fn entries_by_type(&self, event_type: AuditEventType) -> Vec<AuditLogEntry>
pub fn entries_by_type(&self, event_type: AuditEventType) -> Vec<AuditLogEntry>
Get entries filtered by event type
Trait Implementations§
Source§impl AuditLogger for MemoryAuditLogger
impl AuditLogger for MemoryAuditLogger
Source§fn log_authentication(
&self,
entity_id: &str,
success: bool,
reason: Option<&str>,
)
fn log_authentication( &self, entity_id: &str, success: bool, reason: Option<&str>, )
Log authentication event
Source§fn log_grant(&self, entity_id: &str, permission: Permission, target: &str)
fn log_grant(&self, entity_id: &str, permission: Permission, target: &str)
Log authorization grant
Source§fn log_denial(
&self,
entity_id: &str,
permission: &str,
target: &str,
reason: &str,
)
fn log_denial( &self, entity_id: &str, permission: &str, target: &str, reason: &str, )
Log authorization denial
Source§fn log_operation(
&self,
entity_id: &str,
operation: &str,
target: &str,
success: bool,
)
fn log_operation( &self, entity_id: &str, operation: &str, target: &str, success: bool, )
Log data operation
Source§fn log_violation(
&self,
entity_id: &str,
violation: SecurityViolation,
details: &str,
)
fn log_violation( &self, entity_id: &str, violation: SecurityViolation, details: &str, )
Log security violation
Source§fn log_cell_event(
&self,
entity_id: &str,
cell_id: &str,
action: &str,
success: bool,
)
fn log_cell_event( &self, entity_id: &str, cell_id: &str, action: &str, success: bool, )
Log cell formation event
Source§fn log_key_exchange(&self, entity_id: &str, peer_id: &str, success: bool)
fn log_key_exchange(&self, entity_id: &str, peer_id: &str, success: bool)
Log key exchange event
Source§fn log_session(
&self,
entity_id: &str,
session_id: &str,
action: &str,
success: bool,
)
fn log_session( &self, entity_id: &str, session_id: &str, action: &str, success: bool, )
Log session event (create, expire, invalidate)
Source§fn log_encryption(
&self,
entity_id: &str,
operation: &str,
target: &str,
success: bool,
)
fn log_encryption( &self, entity_id: &str, operation: &str, target: &str, success: bool, )
Log encryption event
Source§fn entry_count(&self) -> u64
fn entry_count(&self) -> u64
Get the number of entries logged
Source§impl Debug for MemoryAuditLogger
impl Debug for MemoryAuditLogger
Auto Trait Implementations§
impl Freeze for MemoryAuditLogger
impl RefUnwindSafe for MemoryAuditLogger
impl Send for MemoryAuditLogger
impl Sync for MemoryAuditLogger
impl Unpin for MemoryAuditLogger
impl UnsafeUnpin for MemoryAuditLogger
impl UnwindSafe for MemoryAuditLogger
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