#[non_exhaustive]pub enum MaskRule {
UnsaltedSha256,
Redact(String),
Null,
Truncate(usize),
Passthrough,
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UnsaltedSha256
Deterministic SHA-256 hash (no salt).
Provides obfuscation only — not GDPR-safe pseudonymization for low-cardinality fields.
Use [MaskRule::HmacSha256] or [MaskRule::Encrypt] for keyed pseudonymization.
Redact(String)
Null
Truncate(usize)
Passthrough
Leave the field value unchanged.
This is the default_rule for MaskHashConfig, meaning fields not
explicitly listed in mask_rules pass through unmodified unless you
call MaskHashConfig::hash_all.
Trait Implementations§
impl Eq for MaskRule
impl StructuralPartialEq for MaskRule
Auto Trait Implementations§
impl Freeze for MaskRule
impl RefUnwindSafe for MaskRule
impl Send for MaskRule
impl Sync for MaskRule
impl Unpin for MaskRule
impl UnsafeUnpin for MaskRule
impl UnwindSafe for MaskRule
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