pub struct DnsConfigPatch {
pub rebind_protection: Option<bool>,
pub nameservers: Option<Vec<String>>,
pub query_timeout_ms: Option<u64>,
}Expand description
A sparse, presence-aware patch for DnsConfig.
Fields§
§rebind_protection: Option<bool>Pending update for rebind_protection. Omitted values leave the target unchanged.
nameservers: Option<Vec<String>>Pending update for nameservers. Omitted values leave the target unchanged.
query_timeout_ms: Option<u64>Pending update for query_timeout_ms. Omitted values leave the target unchanged.
Implementations§
Source§impl DnsConfigPatch
impl DnsConfigPatch
Sourcepub fn rebind_protection(self, value: bool) -> Self
pub fn rebind_protection(self, value: bool) -> Self
Set the rebind_protection field in this patch.
Sourcepub fn rebind_protection_mut(&mut self, value: bool) -> &mut Self
pub fn rebind_protection_mut(&mut self, value: bool) -> &mut Self
Set the rebind_protection field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn nameservers(self, value: Vec<String>) -> Self
pub fn nameservers(self, value: Vec<String>) -> Self
Set the nameservers field in this patch.
Sourcepub fn nameservers_mut(&mut self, value: Vec<String>) -> &mut Self
pub fn nameservers_mut(&mut self, value: Vec<String>) -> &mut Self
Set the nameservers field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn query_timeout_ms(self, value: u64) -> Self
pub fn query_timeout_ms(self, value: u64) -> Self
Set the query_timeout_ms field in this patch.
Sourcepub fn query_timeout_ms_mut(&mut self, value: u64) -> &mut Self
pub fn query_timeout_ms_mut(&mut self, value: u64) -> &mut Self
Set the query_timeout_ms field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn clear_rebind_protection(self) -> Self
pub fn clear_rebind_protection(self) -> Self
Remove rebind_protection from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_rebind_protection_mut(&mut self) -> &mut Self
pub fn clear_rebind_protection_mut(&mut self) -> &mut Self
Remove rebind_protection from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
Sourcepub fn clear_nameservers(self) -> Self
pub fn clear_nameservers(self) -> Self
Remove nameservers from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_nameservers_mut(&mut self) -> &mut Self
pub fn clear_nameservers_mut(&mut self) -> &mut Self
Remove nameservers from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
Sourcepub fn clear_query_timeout_ms(self) -> Self
pub fn clear_query_timeout_ms(self) -> Self
Remove query_timeout_ms from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_query_timeout_ms_mut(&mut self) -> &mut Self
pub fn clear_query_timeout_ms_mut(&mut self) -> &mut Self
Remove query_timeout_ms 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 into_config(self) -> DnsConfig
pub fn into_config(self) -> DnsConfig
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: DnsConfig) -> Self
pub fn from_present_fields(value: DnsConfig) -> Self
Convert non-null fields into a changeset, treating Option::None as absent.