pub struct FieldRule {
pub table_pattern: String,
pub field_name: String,
pub algorithm: EncryptionAlgorithm,
pub key_id: Option<String>,
pub mask_in_logs: bool,
}Expand description
Field encryption rule.
Fields§
§table_pattern: StringTable pattern (glob)
field_name: StringField name
algorithm: EncryptionAlgorithmEncryption algorithm
key_id: Option<String>Key ID to use
mask_in_logs: boolWhether to mask in logs
Implementations§
Source§impl FieldRule
impl FieldRule
Sourcepub fn new(table: impl Into<String>, field: impl Into<String>) -> Self
pub fn new(table: impl Into<String>, field: impl Into<String>) -> Self
Create a new field rule.
Sourcepub fn with_algorithm(self, algorithm: EncryptionAlgorithm) -> Self
pub fn with_algorithm(self, algorithm: EncryptionAlgorithm) -> Self
Set encryption algorithm.
Sourcepub fn with_key_id(self, key_id: impl Into<String>) -> Self
pub fn with_key_id(self, key_id: impl Into<String>) -> Self
Set key ID.
Sourcepub fn without_log_masking(self) -> Self
pub fn without_log_masking(self) -> Self
Disable log masking.
Sourcepub fn matches_table(&self, table: &str) -> bool
pub fn matches_table(&self, table: &str) -> bool
Check if this rule matches a table.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FieldRule
impl RefUnwindSafe for FieldRule
impl Send for FieldRule
impl Sync for FieldRule
impl Unpin for FieldRule
impl UnsafeUnpin for FieldRule
impl UnwindSafe for FieldRule
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