pub struct MemoryDecryptBrokerConfig {
pub provider: String,
pub runtime_principal_id: String,
pub secret_family: MemorySecretFamily,
pub hosted_required: bool,
}Fields§
§provider: String§runtime_principal_id: String§secret_family: MemorySecretFamily§hosted_required: boolImplementations§
Source§impl MemoryDecryptBrokerConfig
impl MemoryDecryptBrokerConfig
pub fn local_disabled() -> Self
pub fn hosted( provider: impl Into<String>, runtime_principal_id: impl Into<String>, ) -> MemoryResult<Self>
pub fn from_env() -> MemoryResult<Self>
pub fn validate(&self) -> MemoryResult<()>
Sourcepub fn crypto_mode(&self) -> MemoryCryptoMode
pub fn crypto_mode(&self) -> MemoryCryptoMode
Classify the effective memory crypto mode for operator diagnostics and guard checks. Hosted mode is selected whenever hosted encryption is required or a non-local KMS provider is configured; otherwise the runtime is local (plaintext, or a local file/passphrase-backed provider).
Sourcepub fn describe(&self) -> String
pub fn describe(&self) -> String
Human-readable startup diagnostic so operators know whether memory is local plaintext, local encrypted, or hosted-KMS encrypted.
Sourcepub fn describe_validated(&self) -> String
pub fn describe_validated(&self) -> String
Like describe, but surfaces a fail-closed
misconfiguration instead of claiming a protected mode when the config is
invalid (e.g. hosted encryption is required but no valid KMS provider /
principal is configured). Boot diagnostics should use this so operators
see the hosted misconfiguration rather than a false “hosted KMS” claim.
Source§impl MemoryDecryptBrokerConfig
impl MemoryDecryptBrokerConfig
pub fn build_dek_unwrap_provider( &self, ) -> MemoryResult<Option<MemoryDekUnwrapProviderBox>>
Trait Implementations§
Source§impl Clone for MemoryDecryptBrokerConfig
impl Clone for MemoryDecryptBrokerConfig
Source§fn clone(&self) -> MemoryDecryptBrokerConfig
fn clone(&self) -> MemoryDecryptBrokerConfig
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 MemoryDecryptBrokerConfig
impl Debug for MemoryDecryptBrokerConfig
Source§impl<'de> Deserialize<'de> for MemoryDecryptBrokerConfig
impl<'de> Deserialize<'de> for MemoryDecryptBrokerConfig
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
impl Eq for MemoryDecryptBrokerConfig
Source§impl PartialEq for MemoryDecryptBrokerConfig
impl PartialEq for MemoryDecryptBrokerConfig
Source§fn eq(&self, other: &MemoryDecryptBrokerConfig) -> bool
fn eq(&self, other: &MemoryDecryptBrokerConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for MemoryDecryptBrokerConfig
Auto Trait Implementations§
impl Freeze for MemoryDecryptBrokerConfig
impl RefUnwindSafe for MemoryDecryptBrokerConfig
impl Send for MemoryDecryptBrokerConfig
impl Sync for MemoryDecryptBrokerConfig
impl Unpin for MemoryDecryptBrokerConfig
impl UnsafeUnpin for MemoryDecryptBrokerConfig
impl UnwindSafe for MemoryDecryptBrokerConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.