Skip to main content

TlsConfigPatch

Struct TlsConfigPatch 

Source
pub struct TlsConfigPatch {
    pub enabled: Option<bool>,
    pub intercepted_ports: Option<Vec<u16>>,
    pub bypass: Option<Vec<String>>,
    pub verify_upstream: Option<bool>,
    pub block_quic_on_intercept: Option<bool>,
    pub upstream_ca_cert: Option<Vec<PathBuf>>,
    pub scoped_upstream_ca_cert: Option<Vec<ScopedUpstreamCaCert>>,
    pub scoped_verify_upstream: Option<Vec<ScopedVerifyUpstream>>,
    pub intercept_ca: Option<InterceptCaConfig>,
    pub cache: Option<CertCacheConfig>,
}
Expand description

A sparse, presence-aware patch for TlsConfig.

Fields§

§enabled: Option<bool>

Pending update for enabled. Omitted values leave the target unchanged.

§intercepted_ports: Option<Vec<u16>>

Pending update for intercepted_ports. Omitted values leave the target unchanged.

§bypass: Option<Vec<String>>

Pending update for bypass. Omitted values leave the target unchanged.

§verify_upstream: Option<bool>

Pending update for verify_upstream. Omitted values leave the target unchanged.

§block_quic_on_intercept: Option<bool>

Pending update for block_quic_on_intercept. Omitted values leave the target unchanged.

§upstream_ca_cert: Option<Vec<PathBuf>>

Pending update for upstream_ca_cert. Omitted values leave the target unchanged.

§scoped_upstream_ca_cert: Option<Vec<ScopedUpstreamCaCert>>

Pending update for scoped_upstream_ca_cert. Omitted values leave the target unchanged.

§scoped_verify_upstream: Option<Vec<ScopedVerifyUpstream>>

Pending update for scoped_verify_upstream. Omitted values leave the target unchanged.

§intercept_ca: Option<InterceptCaConfig>

Pending update for intercept_ca. Omitted values leave the target unchanged.

§cache: Option<CertCacheConfig>

Pending update for cache. Omitted values leave the target unchanged.

Implementations§

Source§

impl TlsConfigPatch

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 intercepted_ports(self, value: Vec<u16>) -> Self

Set the intercepted_ports field in this patch.

Source

pub fn intercepted_ports_mut(&mut self, value: Vec<u16>) -> &mut Self

Set the intercepted_ports field in this patch. Mutates this patch in place and returns it for chaining.

Source

pub fn bypass(self, value: Vec<String>) -> Self

Set the bypass field in this patch.

Source

pub fn bypass_mut(&mut self, value: Vec<String>) -> &mut Self

Set the bypass field in this patch. Mutates this patch in place and returns it for chaining.

Source

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

Set the verify_upstream field in this patch.

Source

pub fn verify_upstream_mut(&mut self, value: bool) -> &mut Self

Set the verify_upstream field in this patch. Mutates this patch in place and returns it for chaining.

Source

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

Set the block_quic_on_intercept field in this patch.

Source

pub fn block_quic_on_intercept_mut(&mut self, value: bool) -> &mut Self

Set the block_quic_on_intercept field in this patch. Mutates this patch in place and returns it for chaining.

Source

pub fn upstream_ca_cert(self, value: Vec<PathBuf>) -> Self

Set the upstream_ca_cert field in this patch.

Source

pub fn upstream_ca_cert_mut(&mut self, value: Vec<PathBuf>) -> &mut Self

Set the upstream_ca_cert field in this patch. Mutates this patch in place and returns it for chaining.

Source

pub fn scoped_upstream_ca_cert(self, value: Vec<ScopedUpstreamCaCert>) -> Self

Set the scoped_upstream_ca_cert field in this patch.

Source

pub fn scoped_upstream_ca_cert_mut( &mut self, value: Vec<ScopedUpstreamCaCert>, ) -> &mut Self

Set the scoped_upstream_ca_cert field in this patch. Mutates this patch in place and returns it for chaining.

Source

pub fn scoped_verify_upstream(self, value: Vec<ScopedVerifyUpstream>) -> Self

Set the scoped_verify_upstream field in this patch.

Source

pub fn scoped_verify_upstream_mut( &mut self, value: Vec<ScopedVerifyUpstream>, ) -> &mut Self

Set the scoped_verify_upstream field in this patch. Mutates this patch in place and returns it for chaining.

Source

pub fn intercept_ca(self, value: InterceptCaConfig) -> Self

Set the intercept_ca field in this patch.

Source

pub fn intercept_ca_mut(&mut self, value: InterceptCaConfig) -> &mut Self

Set the intercept_ca field in this patch. Mutates this patch in place and returns it for chaining.

Source

pub fn cache(self, value: CertCacheConfig) -> Self

Set the cache field in this patch.

Source

pub fn cache_mut(&mut self, value: CertCacheConfig) -> &mut Self

Set the cache 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_intercepted_ports(self) -> Self

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

Source

pub fn clear_intercepted_ports_mut(&mut self) -> &mut Self

Remove intercepted_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_bypass(self) -> Self

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

Source

pub fn clear_bypass_mut(&mut self) -> &mut Self

Remove bypass from this patch so applying it leaves the target unchanged. Mutates this patch in place and returns it for chaining.

Source

pub fn clear_verify_upstream(self) -> Self

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

Source

pub fn clear_verify_upstream_mut(&mut self) -> &mut Self

Remove verify_upstream from this patch so applying it leaves the target unchanged. Mutates this patch in place and returns it for chaining.

Source

pub fn clear_block_quic_on_intercept(self) -> Self

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

Source

pub fn clear_block_quic_on_intercept_mut(&mut self) -> &mut Self

Remove block_quic_on_intercept from this patch so applying it leaves the target unchanged. Mutates this patch in place and returns it for chaining.

Source

pub fn clear_upstream_ca_cert(self) -> Self

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

Source

pub fn clear_upstream_ca_cert_mut(&mut self) -> &mut Self

Remove upstream_ca_cert from this patch so applying it leaves the target unchanged. Mutates this patch in place and returns it for chaining.

Source

pub fn clear_scoped_upstream_ca_cert(self) -> Self

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

Source

pub fn clear_scoped_upstream_ca_cert_mut(&mut self) -> &mut Self

Remove scoped_upstream_ca_cert from this patch so applying it leaves the target unchanged. Mutates this patch in place and returns it for chaining.

Source

pub fn clear_scoped_verify_upstream(self) -> Self

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

Source

pub fn clear_scoped_verify_upstream_mut(&mut self) -> &mut Self

Remove scoped_verify_upstream from this patch so applying it leaves the target unchanged. Mutates this patch in place and returns it for chaining.

Source

pub fn clear_intercept_ca(self) -> Self

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

Source

pub fn clear_intercept_ca_mut(&mut self) -> &mut Self

Remove intercept_ca from this patch so applying it leaves the target unchanged. Mutates this patch in place and returns it for chaining.

Source

pub fn clear_cache(self) -> Self

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

Source

pub fn clear_cache_mut(&mut self) -> &mut Self

Remove cache 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 TlsConfig)

Apply every present field to an existing value.

Source

pub fn into_config(self) -> TlsConfig

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: TlsConfig) -> Self

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

Trait Implementations§

Source§

impl Clone for TlsConfigPatch

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 TlsConfigPatch

Source§

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

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

impl Default for TlsConfigPatch

Source§

fn default() -> Self

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

impl From<TlsConfig> for TlsConfigPatch

Source§

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