pub struct NetworkSpecPatch {Show 13 fields
pub enabled: Option<bool>,
pub interface: Option<InterfaceOverridesPatch>,
pub ports: Option<Vec<PublishedPortSpec>>,
pub policy: Option<NetworkPolicy>,
pub dns: Option<DnsConfigPatch>,
pub tls: Option<TlsConfigPatch>,
pub strict: Option<bool>,
pub secrets: Option<SecretsConfigPatch>,
pub max_tcp_connections: Option<usize>,
pub max_udp_connections: Option<usize>,
pub rate_limiter: Option<NetworkRateLimiterConfigPatch>,
pub trust_host_cas: Option<bool>,
pub outbound_proxy: Option<Option<OutboundProxy>>,
}Expand description
A sparse, presence-aware patch for NetworkSpec.
Fields§
§enabled: Option<bool>Pending update for enabled. Omitted values leave the target unchanged.
interface: Option<InterfaceOverridesPatch>Pending update for interface. Omitted values leave the target unchanged.
ports: Option<Vec<PublishedPortSpec>>Pending update for ports. Omitted values leave the target unchanged.
policy: Option<NetworkPolicy>Pending update for policy. Omitted values leave the target unchanged.
dns: Option<DnsConfigPatch>Pending update for dns. Omitted values leave the target unchanged.
tls: Option<TlsConfigPatch>Pending update for tls. Omitted values leave the target unchanged.
strict: Option<bool>Pending update for strict. Omitted values leave the target unchanged.
secrets: Option<SecretsConfigPatch>Pending update for secrets. Omitted values leave the target unchanged.
max_tcp_connections: Option<usize>Pending update for max_tcp_connections. Omitted values leave the target unchanged.
max_udp_connections: Option<usize>Pending update for max_udp_connections. Omitted values leave the target unchanged.
rate_limiter: Option<NetworkRateLimiterConfigPatch>Pending update for rate_limiter. Omitted values leave the target unchanged.
trust_host_cas: Option<bool>Pending update for trust_host_cas. Omitted values leave the target unchanged.
outbound_proxy: Option<Option<OutboundProxy>>Pending update for outbound_proxy. Omitted values leave the target unchanged.
Implementations§
Source§impl NetworkSpecPatch
impl NetworkSpecPatch
Sourcepub fn enabled_mut(&mut self, value: bool) -> &mut Self
pub fn enabled_mut(&mut self, value: bool) -> &mut Self
Set the enabled field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn interface(self, patch: InterfaceOverridesPatch) -> Self
pub fn interface(self, patch: InterfaceOverridesPatch) -> Self
Set the interface field in this patch.
Sourcepub fn interface_mut(&mut self, patch: InterfaceOverridesPatch) -> &mut Self
pub fn interface_mut(&mut self, patch: InterfaceOverridesPatch) -> &mut Self
Set the interface field in this patch.
Mutates this patch in place and returns it for chaining.
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 ports_mut(&mut self, value: Vec<PublishedPortSpec>) -> &mut Self
pub fn ports_mut(&mut self, value: Vec<PublishedPortSpec>) -> &mut Self
Set the ports field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn policy(self, value: NetworkPolicy) -> Self
pub fn policy(self, value: NetworkPolicy) -> Self
Set the policy field in this patch.
Sourcepub fn policy_mut(&mut self, value: NetworkPolicy) -> &mut Self
pub fn policy_mut(&mut self, value: NetworkPolicy) -> &mut Self
Set the policy field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn dns(self, patch: DnsConfigPatch) -> Self
pub fn dns(self, patch: DnsConfigPatch) -> Self
Set the dns field in this patch.
Sourcepub fn dns_mut(&mut self, patch: DnsConfigPatch) -> &mut Self
pub fn dns_mut(&mut self, patch: DnsConfigPatch) -> &mut Self
Set the dns field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn tls(self, patch: TlsConfigPatch) -> Self
pub fn tls(self, patch: TlsConfigPatch) -> Self
Set the tls field in this patch.
Sourcepub fn tls_mut(&mut self, patch: TlsConfigPatch) -> &mut Self
pub fn tls_mut(&mut self, patch: TlsConfigPatch) -> &mut Self
Set the tls field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn strict_mut(&mut self, value: bool) -> &mut Self
pub fn strict_mut(&mut self, value: bool) -> &mut Self
Set the strict field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn secrets(self, patch: SecretsConfigPatch) -> Self
pub fn secrets(self, patch: SecretsConfigPatch) -> Self
Set the secrets field in this patch.
Sourcepub fn secrets_mut(&mut self, patch: SecretsConfigPatch) -> &mut Self
pub fn secrets_mut(&mut self, patch: SecretsConfigPatch) -> &mut Self
Set the secrets field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn max_tcp_connections(self, value: usize) -> Self
pub fn max_tcp_connections(self, value: usize) -> Self
Set the max_tcp_connections field in this patch.
Sourcepub fn max_tcp_connections_mut(&mut self, value: usize) -> &mut Self
pub fn max_tcp_connections_mut(&mut self, value: usize) -> &mut Self
Set the max_tcp_connections field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn max_udp_connections(self, value: usize) -> Self
pub fn max_udp_connections(self, value: usize) -> Self
Set the max_udp_connections field in this patch.
Sourcepub fn max_udp_connections_mut(&mut self, value: usize) -> &mut Self
pub fn max_udp_connections_mut(&mut self, value: usize) -> &mut Self
Set the max_udp_connections field in this patch.
Mutates this patch in place and returns it for chaining.
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 rate_limiter_mut(
&mut self,
patch: NetworkRateLimiterConfigPatch,
) -> &mut Self
pub fn rate_limiter_mut( &mut self, patch: NetworkRateLimiterConfigPatch, ) -> &mut Self
Set the rate_limiter field in this patch.
Mutates this patch in place and returns it for chaining.
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 trust_host_cas_mut(&mut self, value: bool) -> &mut Self
pub fn trust_host_cas_mut(&mut self, value: bool) -> &mut Self
Set the trust_host_cas field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn set_outbound_proxy(self, value: Option<OutboundProxy>) -> Self
pub fn set_outbound_proxy(self, value: Option<OutboundProxy>) -> Self
Set or explicitly clear outbound_proxy.
Sourcepub fn set_outbound_proxy_mut(
&mut self,
value: Option<OutboundProxy>,
) -> &mut Self
pub fn set_outbound_proxy_mut( &mut self, value: Option<OutboundProxy>, ) -> &mut Self
Set or explicitly clear outbound_proxy.
Mutates this patch in place and returns it for chaining.
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 outbound_proxy_mut(&mut self, value: OutboundProxy) -> &mut Self
pub fn outbound_proxy_mut(&mut self, value: OutboundProxy) -> &mut Self
Set the outbound_proxy field in this patch.
Mutates this patch in place and returns it for chaining.
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_enabled_mut(&mut self) -> &mut Self
pub fn clear_enabled_mut(&mut self) -> &mut Self
Remove enabled from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
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_interface_mut(&mut self) -> &mut Self
pub fn clear_interface_mut(&mut self) -> &mut Self
Remove interface from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
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_ports_mut(&mut self) -> &mut Self
pub fn clear_ports_mut(&mut self) -> &mut Self
Remove ports from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
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_policy_mut(&mut self) -> &mut Self
pub fn clear_policy_mut(&mut self) -> &mut Self
Remove policy from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
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_dns_mut(&mut self) -> &mut Self
pub fn clear_dns_mut(&mut self) -> &mut Self
Remove dns from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
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_tls_mut(&mut self) -> &mut Self
pub fn clear_tls_mut(&mut self) -> &mut Self
Remove tls from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
Sourcepub fn clear_strict(self) -> Self
pub fn clear_strict(self) -> Self
Remove strict from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_strict_mut(&mut self) -> &mut Self
pub fn clear_strict_mut(&mut self) -> &mut Self
Remove strict 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_max_tcp_connections(self) -> Self
pub fn clear_max_tcp_connections(self) -> Self
Remove max_tcp_connections from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_max_tcp_connections_mut(&mut self) -> &mut Self
pub fn clear_max_tcp_connections_mut(&mut self) -> &mut Self
Remove max_tcp_connections from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
Sourcepub fn clear_max_udp_connections(self) -> Self
pub fn clear_max_udp_connections(self) -> Self
Remove max_udp_connections from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_max_udp_connections_mut(&mut self) -> &mut Self
pub fn clear_max_udp_connections_mut(&mut self) -> &mut Self
Remove max_udp_connections from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
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_rate_limiter_mut(&mut self) -> &mut Self
pub fn clear_rate_limiter_mut(&mut self) -> &mut Self
Remove rate_limiter from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
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_trust_host_cas_mut(&mut self) -> &mut Self
pub fn clear_trust_host_cas_mut(&mut self) -> &mut Self
Remove trust_host_cas from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
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 clear_outbound_proxy_mut(&mut self) -> &mut Self
pub fn clear_outbound_proxy_mut(&mut self) -> &mut Self
Remove outbound_proxy from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
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 NetworkSpec)
pub fn apply_to(self, target: &mut NetworkSpec)
Apply every present field to an existing value.
Sourcepub fn into_config(self) -> NetworkSpec
pub fn into_config(self) -> NetworkSpec
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: NetworkSpec) -> Self
pub fn from_present_fields(value: NetworkSpec) -> Self
Convert non-null fields into a changeset, treating Option::None as absent.