pub enum MaskingRule {
Phone,
Email,
IdCard,
BankCard,
Name,
Address,
Ip,
Imei,
Plate,
Custom(String),
}Expand description
Masking rules supported by DataMasker.
Custom(String) expects a configuration of the form "prefix,suffix"
where prefix and suffix are the number of characters (Unicode scalar
values) to retain from the start and end of the input. Example:
Custom("3,2".to_string()) keeps the first 3 and last 2 characters and
replaces everything in between with *.
Variants§
Trait Implementations§
Source§impl Clone for MaskingRule
impl Clone for MaskingRule
Source§fn clone(&self) -> MaskingRule
fn clone(&self) -> MaskingRule
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 MaskingRule
impl Debug for MaskingRule
Source§impl<'de> Deserialize<'de> for MaskingRule
impl<'de> Deserialize<'de> for MaskingRule
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 MaskingRule
impl RefUnwindSafe for MaskingRule
impl Send for MaskingRule
impl Sync for MaskingRule
impl Unpin for MaskingRule
impl UnsafeUnpin for MaskingRule
impl UnwindSafe for MaskingRule
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