Skip to main content

SecretsConfigPatch

Struct SecretsConfigPatch 

Source
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

Source

pub fn get_secrets(&self) -> Option<&Vec<SecretEntry>>

Borrow the pending collection for secrets without its merge/replacement state.

Source

pub fn new() -> Self

Create an empty patch that leaves every target field unchanged.

Source

pub fn passthrough_hosts(self, value: Vec<HostPattern>) -> Self

Set the passthrough_hosts field in this patch.

Source

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.

Source

pub fn secrets(self, value: Vec<SecretEntry>) -> Self

Merge value into the secrets field.

Source

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.

Source

pub fn violation_action(self, value: SecretViolationAction) -> Self

Set the violation_action field in this patch.

Source

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.

Source

pub fn replace_secrets(self, value: Vec<SecretEntry>) -> Self

Replace the complete secrets field.

Source

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.

Source

pub fn clear_passthrough_hosts(self) -> Self

Remove passthrough_hosts from this patch so applying it leaves the target unchanged.

Source

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.

Source

pub fn clear_secrets(self) -> Self

Remove secrets from this patch so applying it leaves the target unchanged.

Source

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.

Source

pub fn clear_violation_action(self) -> Self

Remove violation_action from this patch so applying it leaves the target unchanged.

Source

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.

Source

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.

Source

pub fn overlay(self, higher: Self) -> Self

Overlay a higher-precedence patch using each field’s declared strategy.

Source

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.

Source

pub fn apply_to(self, target: &mut SecretsConfig)

Apply every present field to an existing value.

Source

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.

Source

pub fn from_present_fields(value: SecretsConfig) -> Self

Convert non-null fields into a changeset, treating Option::None as absent.

Trait Implementations§

Source§

impl Clone for SecretsConfigPatch

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SecretsConfigPatch

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SecretsConfigPatch

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl From<SecretsConfig> for SecretsConfigPatch

Source§

fn from(value: SecretsConfig) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.