pub struct NetworkSpecPatch { /* private fields */ }Expand description
A sparse, presence-aware patch for NetworkSpec.
Implementations§
Source§impl NetworkSpecPatch
impl NetworkSpecPatch
Sourcepub fn interface(self, patch: InterfaceOverridesPatch) -> Self
pub fn interface(self, patch: InterfaceOverridesPatch) -> Self
Set the interface field in this patch.
Sourcepub fn ports(self, value: Vec<PublishedPortSpec>) -> Self
pub fn ports(self, value: Vec<PublishedPortSpec>) -> Self
Set the ports field in this patch.
Sourcepub fn policy(self, value: NetworkPolicy) -> Self
pub fn policy(self, value: NetworkPolicy) -> Self
Set the policy field in this patch.
Sourcepub fn dns(self, patch: DnsConfigPatch) -> Self
pub fn dns(self, patch: DnsConfigPatch) -> Self
Set the dns field in this patch.
Sourcepub fn tls(self, patch: TlsConfigPatch) -> Self
pub fn tls(self, patch: TlsConfigPatch) -> Self
Set the tls field in this patch.
Sourcepub fn secrets(self, patch: SecretsConfigPatch) -> Self
pub fn secrets(self, patch: SecretsConfigPatch) -> Self
Set the secrets field in this patch.
Sourcepub fn max_connections(self, value: usize) -> Self
pub fn max_connections(self, value: usize) -> Self
Set the max_connections field in this patch.
Sourcepub fn rate_limiter(self, patch: NetworkRateLimiterConfigPatch) -> Self
pub fn rate_limiter(self, patch: NetworkRateLimiterConfigPatch) -> Self
Set the rate_limiter field in this patch.
Sourcepub fn trust_host_cas(self, value: bool) -> Self
pub fn trust_host_cas(self, value: bool) -> Self
Set the trust_host_cas field in this patch.
Sourcepub fn outbound_proxy(self, value: OutboundProxy) -> Self
pub fn outbound_proxy(self, value: OutboundProxy) -> Self
Set the outbound_proxy field in this patch.
Sourcepub fn clear_enabled(self) -> Self
pub fn clear_enabled(self) -> Self
Remove enabled from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_interface(self) -> Self
pub fn clear_interface(self) -> Self
Remove interface from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_ports(self) -> Self
pub fn clear_ports(self) -> Self
Remove ports from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_policy(self) -> Self
pub fn clear_policy(self) -> Self
Remove policy from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_dns(self) -> Self
pub fn clear_dns(self) -> Self
Remove dns from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_tls(self) -> Self
pub fn clear_tls(self) -> Self
Remove tls from this patch so applying it leaves the target unchanged.
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_max_connections(self) -> Self
pub fn clear_max_connections(self) -> Self
Remove max_connections from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_rate_limiter(self) -> Self
pub fn clear_rate_limiter(self) -> Self
Remove rate_limiter from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_trust_host_cas(self) -> Self
pub fn clear_trust_host_cas(self) -> Self
Remove trust_host_cas from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_outbound_proxy(self) -> Self
pub fn clear_outbound_proxy(self) -> Self
Remove outbound_proxy from this patch so applying it leaves the target unchanged.
Sourcepub fn modify_interface(
self,
modify: impl FnOnce(InterfaceOverridesPatch) -> InterfaceOverridesPatch,
) -> Self
pub fn modify_interface( self, modify: impl FnOnce(InterfaceOverridesPatch) -> InterfaceOverridesPatch, ) -> Self
Transform the current nested interface patch.
Sourcepub fn modify_dns(
self,
modify: impl FnOnce(DnsConfigPatch) -> DnsConfigPatch,
) -> Self
pub fn modify_dns( self, modify: impl FnOnce(DnsConfigPatch) -> DnsConfigPatch, ) -> Self
Transform the current nested dns patch.
Sourcepub fn modify_tls(
self,
modify: impl FnOnce(TlsConfigPatch) -> TlsConfigPatch,
) -> Self
pub fn modify_tls( self, modify: impl FnOnce(TlsConfigPatch) -> TlsConfigPatch, ) -> Self
Transform the current nested tls patch.
Sourcepub fn modify_secrets(
self,
modify: impl FnOnce(SecretsConfigPatch) -> SecretsConfigPatch,
) -> Self
pub fn modify_secrets( self, modify: impl FnOnce(SecretsConfigPatch) -> SecretsConfigPatch, ) -> Self
Transform the current nested secrets patch.
Sourcepub fn modify_rate_limiter(
self,
modify: impl FnOnce(NetworkRateLimiterConfigPatch) -> NetworkRateLimiterConfigPatch,
) -> Self
pub fn modify_rate_limiter( self, modify: impl FnOnce(NetworkRateLimiterConfigPatch) -> NetworkRateLimiterConfigPatch, ) -> Self
Transform the current nested rate_limiter patch.
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 apply_to(self, target: &mut NetworkSpec)
pub fn apply_to(self, target: &mut NetworkSpec)
Apply every present field to an existing value.
Sourcepub fn from_present_fields(value: NetworkSpec) -> Self
pub fn from_present_fields(value: NetworkSpec) -> Self
Convert non-null fields into a changeset, treating Option::None as absent.
Trait Implementations§
Source§impl Clone for NetworkSpecPatch
impl Clone for NetworkSpecPatch
Source§fn clone(&self) -> NetworkSpecPatch
fn clone(&self) -> NetworkSpecPatch
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more