pub struct MaskingConfig { /* private fields */ }Expand description
脱敏配置:自定义掩码字符、最小掩码长度、兜底值
Implementations§
Source§impl MaskingConfig
impl MaskingConfig
Sourcepub fn with_mask_char(self, c: char) -> Self
pub fn with_mask_char(self, c: char) -> Self
设置掩码字符(链式)
Sourcepub fn min_mask_length(&self) -> usize
pub fn min_mask_length(&self) -> usize
最小掩码长度
Sourcepub fn with_min_mask_length(self, min: usize) -> Self
pub fn with_min_mask_length(self, min: usize) -> Self
设置最小掩码长度(链式)
Sourcepub fn fallback_value(&self) -> &str
pub fn fallback_value(&self) -> &str
兜底值
Sourcepub fn with_fallback_value(self, value: &str) -> Self
pub fn with_fallback_value(self, value: &str) -> Self
设置兜底值(链式)
Trait Implementations§
Source§impl Clone for MaskingConfig
impl Clone for MaskingConfig
Source§fn clone(&self) -> MaskingConfig
fn clone(&self) -> MaskingConfig
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 MaskingConfig
impl Debug for MaskingConfig
Auto Trait Implementations§
impl Freeze for MaskingConfig
impl RefUnwindSafe for MaskingConfig
impl Send for MaskingConfig
impl Sync for MaskingConfig
impl Unpin for MaskingConfig
impl UnsafeUnpin for MaskingConfig
impl UnwindSafe for MaskingConfig
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