Skip to main content

NetworkSpecPatch

Struct NetworkSpecPatch 

Source
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

Source

pub fn new() -> Self

Create an empty patch that leaves every target field unchanged.

Source

pub fn enabled(self, value: bool) -> Self

Set the enabled field in this patch.

Source

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.

Source

pub fn interface(self, patch: InterfaceOverridesPatch) -> Self

Set the interface field in this patch.

Source

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.

Source

pub fn ports(self, value: Vec<PublishedPortSpec>) -> Self

Set the ports field in this patch.

Source

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.

Source

pub fn policy(self, value: NetworkPolicy) -> Self

Set the policy field in this patch.

Source

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.

Source

pub fn dns(self, patch: DnsConfigPatch) -> Self

Set the dns field in this patch.

Source

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.

Source

pub fn tls(self, patch: TlsConfigPatch) -> Self

Set the tls field in this patch.

Source

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.

Source

pub fn strict(self, value: bool) -> Self

Set the strict field in this patch.

Source

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.

Source

pub fn secrets(self, patch: SecretsConfigPatch) -> Self

Set the secrets field in this patch.

Source

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.

Source

pub fn max_tcp_connections(self, value: usize) -> Self

Set the max_tcp_connections field in this patch.

Source

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.

Source

pub fn max_udp_connections(self, value: usize) -> Self

Set the max_udp_connections field in this patch.

Source

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.

Source

pub fn rate_limiter(self, patch: NetworkRateLimiterConfigPatch) -> Self

Set the rate_limiter field in this patch.

Source

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.

Source

pub fn trust_host_cas(self, value: bool) -> Self

Set the trust_host_cas field in this patch.

Source

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.

Source

pub fn set_outbound_proxy(self, value: Option<OutboundProxy>) -> Self

Set or explicitly clear outbound_proxy.

Source

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.

Source

pub fn outbound_proxy(self, value: OutboundProxy) -> Self

Set the outbound_proxy field in this patch.

Source

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.

Source

pub fn clear_enabled(self) -> Self

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

Source

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.

Source

pub fn clear_interface(self) -> Self

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

Source

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.

Source

pub fn clear_ports(self) -> Self

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

Source

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.

Source

pub fn clear_policy(self) -> Self

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

Source

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.

Source

pub fn clear_dns(self) -> Self

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

Source

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.

Source

pub fn clear_tls(self) -> Self

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

Source

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.

Source

pub fn clear_strict(self) -> Self

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

Source

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.

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_max_tcp_connections(self) -> Self

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

Source

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.

Source

pub fn clear_max_udp_connections(self) -> Self

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

Source

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.

Source

pub fn clear_rate_limiter(self) -> Self

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

Source

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.

Source

pub fn clear_trust_host_cas(self) -> Self

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

Source

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.

Source

pub fn clear_outbound_proxy(self) -> Self

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

Source

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.

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 NetworkSpec)

Apply every present field to an existing value.

Source

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.

Source

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

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 NetworkSpecPatch

Source§

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

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

impl Default for NetworkSpecPatch

Source§

fn default() -> Self

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

impl From<NetworkSpec> for NetworkSpecPatch

Source§

fn from(value: NetworkSpec) -> 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.