pub struct AnonymizerConfig {
pub strategy: AnonymizationStrategy,
pub mask_char: char,
pub mask_start_chars: usize,
pub mask_end_chars: usize,
pub encryption_key: Option<String>,
pub hash_salt: Option<String>,
pub preserve_format: bool,
}Expand description
Configuration for anonymization
Fields§
§strategy: AnonymizationStrategyDefault strategy to use
mask_char: charMasking character (for mask strategy)
mask_start_chars: usizeNumber of characters to show at start (for mask strategy)
mask_end_chars: usizeNumber of characters to show at end (for mask strategy)
encryption_key: Option<String>Encryption key (for encrypt strategy)
hash_salt: Option<String>Salt for hashing (for hash strategy)
preserve_format: boolWhether to preserve format (e.g., XXX-XX-XXXX for SSN)
Trait Implementations§
Source§impl Clone for AnonymizerConfig
impl Clone for AnonymizerConfig
Source§fn clone(&self) -> AnonymizerConfig
fn clone(&self) -> AnonymizerConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 AnonymizerConfig
impl Debug for AnonymizerConfig
Source§impl Default for AnonymizerConfig
impl Default for AnonymizerConfig
Source§impl<'de> Deserialize<'de> for AnonymizerConfig
impl<'de> Deserialize<'de> for AnonymizerConfig
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 AnonymizerConfig
impl RefUnwindSafe for AnonymizerConfig
impl Send for AnonymizerConfig
impl Sync for AnonymizerConfig
impl Unpin for AnonymizerConfig
impl UnwindSafe for AnonymizerConfig
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