pub struct MaskingAuditEntry { /* private fields */ }Expand description
脱敏审计条目:记录单次脱敏操作的完整信息。
Implementations§
Source§impl MaskingAuditEntry
impl MaskingAuditEntry
Sourcepub fn new(
field: &str,
rule: &str,
original_len: usize,
masked_len: usize,
timestamp: u64,
) -> Self
pub fn new( field: &str, rule: &str, original_len: usize, masked_len: usize, timestamp: u64, ) -> Self
创建审计条目
Sourcepub fn with_operator(self, operator: &str) -> Self
pub fn with_operator(self, operator: &str) -> Self
设置操作者(链式)
Sourcepub fn with_session(self, session_id: &str) -> Self
pub fn with_session(self, session_id: &str) -> Self
设置会话 ID(链式)
Sourcepub fn original_len(&self) -> usize
pub fn original_len(&self) -> usize
原始值长度
Sourcepub fn masked_len(&self) -> usize
pub fn masked_len(&self) -> usize
脱敏后长度
Sourcepub fn session_id(&self) -> &str
pub fn session_id(&self) -> &str
会话 ID
Sourcepub fn masked_chars(&self) -> usize
pub fn masked_chars(&self) -> usize
被掩码的字符数
Sourcepub fn was_truncated(&self) -> bool
pub fn was_truncated(&self) -> bool
是否被截断
Sourcepub fn was_extended(&self) -> bool
pub fn was_extended(&self) -> bool
是否被扩展(脱敏后更长)
Trait Implementations§
Source§impl Clone for MaskingAuditEntry
impl Clone for MaskingAuditEntry
Source§fn clone(&self) -> MaskingAuditEntry
fn clone(&self) -> MaskingAuditEntry
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 MaskingAuditEntry
impl Debug for MaskingAuditEntry
Source§impl<'de> Deserialize<'de> for MaskingAuditEntry
impl<'de> Deserialize<'de> for MaskingAuditEntry
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 MaskingAuditEntry
impl RefUnwindSafe for MaskingAuditEntry
impl Send for MaskingAuditEntry
impl Sync for MaskingAuditEntry
impl Unpin for MaskingAuditEntry
impl UnsafeUnpin for MaskingAuditEntry
impl UnwindSafe for MaskingAuditEntry
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