pub struct SecretsConfigPatch {
pub passthrough_hosts: Option<Vec<HostPattern>>,
pub violation_action: Option<SecretViolationAction>,
/* private fields */
}Expand description
A sparse, presence-aware patch for SecretsConfig.
Fields§
§passthrough_hosts: Option<Vec<HostPattern>>Pending update for passthrough_hosts. Omitted values leave the target unchanged.
violation_action: Option<SecretViolationAction>Pending update for violation_action. Omitted values leave the target unchanged.
Implementations§
Source§impl SecretsConfigPatch
impl SecretsConfigPatch
Sourcepub fn get_secrets(&self) -> Option<&Vec<SecretEntry>>
pub fn get_secrets(&self) -> Option<&Vec<SecretEntry>>
Borrow the pending collection for secrets without its merge/replacement state.
Sourcepub fn passthrough_hosts(self, value: Vec<HostPattern>) -> Self
pub fn passthrough_hosts(self, value: Vec<HostPattern>) -> Self
Set the passthrough_hosts field in this patch.
Sourcepub fn passthrough_hosts_mut(&mut self, value: Vec<HostPattern>) -> &mut Self
pub fn passthrough_hosts_mut(&mut self, value: Vec<HostPattern>) -> &mut Self
Set the passthrough_hosts field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn secrets(self, value: Vec<SecretEntry>) -> Self
pub fn secrets(self, value: Vec<SecretEntry>) -> Self
Merge value into the secrets field.
Sourcepub fn secrets_mut(&mut self, value: Vec<SecretEntry>) -> &mut Self
pub fn secrets_mut(&mut self, value: Vec<SecretEntry>) -> &mut Self
Merge value into the secrets field.
Mutates this patch in place and returns it for chaining.
Sourcepub fn violation_action(self, value: SecretViolationAction) -> Self
pub fn violation_action(self, value: SecretViolationAction) -> Self
Set the violation_action field in this patch.
Sourcepub fn violation_action_mut(
&mut self,
value: SecretViolationAction,
) -> &mut Self
pub fn violation_action_mut( &mut self, value: SecretViolationAction, ) -> &mut Self
Set the violation_action field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn replace_secrets(self, value: Vec<SecretEntry>) -> Self
pub fn replace_secrets(self, value: Vec<SecretEntry>) -> Self
Replace the complete secrets field.
Sourcepub fn replace_secrets_mut(&mut self, value: Vec<SecretEntry>) -> &mut Self
pub fn replace_secrets_mut(&mut self, value: Vec<SecretEntry>) -> &mut Self
Replace the complete secrets field.
Mutates this patch in place and returns it for chaining.
Sourcepub fn clear_passthrough_hosts(self) -> Self
pub fn clear_passthrough_hosts(self) -> Self
Remove passthrough_hosts from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_passthrough_hosts_mut(&mut self) -> &mut Self
pub fn clear_passthrough_hosts_mut(&mut self) -> &mut Self
Remove passthrough_hosts from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
Sourcepub fn clear_secrets(self) -> Self
pub fn clear_secrets(self) -> Self
Remove secrets from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_secrets_mut(&mut self) -> &mut Self
pub fn clear_secrets_mut(&mut self) -> &mut Self
Remove secrets from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
Sourcepub fn clear_violation_action(self) -> Self
pub fn clear_violation_action(self) -> Self
Remove violation_action from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_violation_action_mut(&mut self) -> &mut Self
pub fn clear_violation_action_mut(&mut self) -> &mut Self
Remove violation_action from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
Sourcepub fn get_secrets_mut(&mut self) -> &mut Vec<SecretEntry>
pub fn get_secrets_mut(&mut self) -> &mut Vec<SecretEntry>
Borrow the pending secrets collection mutably. Initializes an absent collection empty in merge mode and preserves an existing replacement mode. Edits pending values directly without running the merge strategy.
Sourcepub fn overlay(self, higher: Self) -> Self
pub fn overlay(self, higher: Self) -> Self
Overlay a higher-precedence patch using each field’s declared strategy.
Sourcepub fn overlay_mut(&mut self, higher: Self) -> &mut Self
pub fn overlay_mut(&mut self, higher: Self) -> &mut Self
Overlay a higher-precedence patch using each field’s declared strategy. Mutates this patch in place and returns it for chaining.
Sourcepub fn apply_to(self, target: &mut SecretsConfig)
pub fn apply_to(self, target: &mut SecretsConfig)
Apply every present field to an existing value.
Sourcepub fn into_config(self) -> SecretsConfig
pub fn into_config(self) -> SecretsConfig
Apply this patch to the configuration’s defaults.
Compose all overlays first. This conversion does not validate the result.
Sourcepub fn from_present_fields(value: SecretsConfig) -> Self
pub fn from_present_fields(value: SecretsConfig) -> Self
Convert non-null fields into a changeset, treating Option::None as absent.