pub struct KeyAuditLog { /* private fields */ }Expand description
密钥审计日志
Implementations§
Source§impl KeyAuditLog
impl KeyAuditLog
Sourcepub fn record(
&mut self,
event: KeyEvent,
key_id: String,
key_name: String,
details: impl Into<String>,
)
pub fn record( &mut self, event: KeyEvent, key_id: String, key_name: String, details: impl Into<String>, )
记录事件
Sourcepub fn entries(&self) -> &[KeyAuditEntry]
pub fn entries(&self) -> &[KeyAuditEntry]
返回所有日志条目
Sourcepub fn by_event(&self, event: KeyEvent) -> Vec<&KeyAuditEntry>
pub fn by_event(&self, event: KeyEvent) -> Vec<&KeyAuditEntry>
按事件类型过滤
Sourcepub fn by_key_name(&self, name: &str) -> Vec<&KeyAuditEntry>
pub fn by_key_name(&self, name: &str) -> Vec<&KeyAuditEntry>
按密钥名称过滤
Trait Implementations§
Source§impl Clone for KeyAuditLog
impl Clone for KeyAuditLog
Source§fn clone(&self) -> KeyAuditLog
fn clone(&self) -> KeyAuditLog
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 KeyAuditLog
impl Debug for KeyAuditLog
Source§impl Default for KeyAuditLog
impl Default for KeyAuditLog
Source§fn default() -> KeyAuditLog
fn default() -> KeyAuditLog
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for KeyAuditLog
impl RefUnwindSafe for KeyAuditLog
impl Send for KeyAuditLog
impl Sync for KeyAuditLog
impl Unpin for KeyAuditLog
impl UnsafeUnpin for KeyAuditLog
impl UnwindSafe for KeyAuditLog
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