pub struct FieldEncryption {
pub key_vault_namespace: String,
pub kms_providers: KmsProviders,
pub schema_map: Map<String, Value>,
}Expand description
Field-level encryption configuration.
Fields§
§key_vault_namespace: StringKey vault namespace (db.collection).
kms_providers: KmsProvidersKMS providers configuration.
schema_map: Map<String, Value>Schema map for automatic encryption.
Implementations§
Source§impl FieldEncryption
impl FieldEncryption
Sourcepub fn new(key_vault_namespace: impl Into<String>, kms: KmsProviders) -> Self
pub fn new(key_vault_namespace: impl Into<String>, kms: KmsProviders) -> Self
Create a new field encryption config.
Sourcepub fn encrypt_field(
self,
namespace: impl Into<String>,
field: impl Into<String>,
algorithm: EncryptionAlgorithm,
key_id: impl Into<String>,
) -> Self
pub fn encrypt_field( self, namespace: impl Into<String>, field: impl Into<String>, algorithm: EncryptionAlgorithm, key_id: impl Into<String>, ) -> Self
Add encrypted field to schema map.
Sourcepub fn to_options(&self) -> JsonValue
pub fn to_options(&self) -> JsonValue
Convert to client encryption options.
Trait Implementations§
Source§impl Clone for FieldEncryption
impl Clone for FieldEncryption
Source§fn clone(&self) -> FieldEncryption
fn clone(&self) -> FieldEncryption
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 FieldEncryption
impl Debug for FieldEncryption
Source§impl<'de> Deserialize<'de> for FieldEncryption
impl<'de> Deserialize<'de> for FieldEncryption
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
Source§impl PartialEq for FieldEncryption
impl PartialEq for FieldEncryption
Source§impl Serialize for FieldEncryption
impl Serialize for FieldEncryption
impl StructuralPartialEq for FieldEncryption
Auto Trait Implementations§
impl Freeze for FieldEncryption
impl RefUnwindSafe for FieldEncryption
impl Send for FieldEncryption
impl Sync for FieldEncryption
impl Unpin for FieldEncryption
impl UnwindSafe for FieldEncryption
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