pub struct MaskingValidator;Expand description
脱敏验证器:检查脱敏结果是否泄露了原始信息。
Implementations§
Source§impl MaskingValidator
impl MaskingValidator
Sourcepub fn contains_mask_char(masked: &str) -> bool
pub fn contains_mask_char(masked: &str) -> bool
验证脱敏后的值包含掩码字符 *
Sourcepub fn no_sensitive_substring(masked: &str, sensitive: &str) -> bool
pub fn no_sensitive_substring(masked: &str, sensitive: &str) -> bool
验证脱敏后不再包含原始敏感子串
Trait Implementations§
Source§impl Clone for MaskingValidator
impl Clone for MaskingValidator
Source§fn clone(&self) -> MaskingValidator
fn clone(&self) -> MaskingValidator
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 MaskingValidator
impl Debug for MaskingValidator
Source§impl Default for MaskingValidator
impl Default for MaskingValidator
Source§fn default() -> MaskingValidator
fn default() -> MaskingValidator
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MaskingValidator
impl RefUnwindSafe for MaskingValidator
impl Send for MaskingValidator
impl Sync for MaskingValidator
impl Unpin for MaskingValidator
impl UnsafeUnpin for MaskingValidator
impl UnwindSafe for MaskingValidator
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