pub struct HttpConfigPatch {
pub deny_response: Option<bool>,
pub deny_response_format: Option<HttpDenyResponseFormat>,
pub deny_message: Option<String>,
pub network_deny_message: Option<String>,
pub secret_deny_message: Option<String>,
}Expand description
A sparse, presence-aware patch for HttpConfig.
Fields§
§deny_response: Option<bool>Pending update for deny_response. Omitted values leave the target unchanged.
deny_response_format: Option<HttpDenyResponseFormat>Pending update for deny_response_format. Omitted values leave the target unchanged.
deny_message: Option<String>Pending update for deny_message. Omitted values leave the target unchanged.
network_deny_message: Option<String>Pending update for network_deny_message. Omitted values leave the target unchanged.
secret_deny_message: Option<String>Pending update for secret_deny_message. Omitted values leave the target unchanged.
Implementations§
Source§impl HttpConfigPatch
impl HttpConfigPatch
Sourcepub fn deny_response(self, value: bool) -> Self
pub fn deny_response(self, value: bool) -> Self
Set the deny_response field in this patch.
Sourcepub fn deny_response_mut(&mut self, value: bool) -> &mut Self
pub fn deny_response_mut(&mut self, value: bool) -> &mut Self
Set the deny_response field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn deny_response_format(self, value: HttpDenyResponseFormat) -> Self
pub fn deny_response_format(self, value: HttpDenyResponseFormat) -> Self
Set the deny_response_format field in this patch.
Sourcepub fn deny_response_format_mut(
&mut self,
value: HttpDenyResponseFormat,
) -> &mut Self
pub fn deny_response_format_mut( &mut self, value: HttpDenyResponseFormat, ) -> &mut Self
Set the deny_response_format field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn deny_message(self, value: String) -> Self
pub fn deny_message(self, value: String) -> Self
Set the deny_message field in this patch.
Sourcepub fn deny_message_mut(&mut self, value: String) -> &mut Self
pub fn deny_message_mut(&mut self, value: String) -> &mut Self
Set the deny_message field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn network_deny_message(self, value: String) -> Self
pub fn network_deny_message(self, value: String) -> Self
Set the network_deny_message field in this patch.
Sourcepub fn network_deny_message_mut(&mut self, value: String) -> &mut Self
pub fn network_deny_message_mut(&mut self, value: String) -> &mut Self
Set the network_deny_message field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn secret_deny_message(self, value: String) -> Self
pub fn secret_deny_message(self, value: String) -> Self
Set the secret_deny_message field in this patch.
Sourcepub fn secret_deny_message_mut(&mut self, value: String) -> &mut Self
pub fn secret_deny_message_mut(&mut self, value: String) -> &mut Self
Set the secret_deny_message field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn clear_deny_response(self) -> Self
pub fn clear_deny_response(self) -> Self
Remove deny_response from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_deny_response_mut(&mut self) -> &mut Self
pub fn clear_deny_response_mut(&mut self) -> &mut Self
Remove deny_response from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
Sourcepub fn clear_deny_response_format(self) -> Self
pub fn clear_deny_response_format(self) -> Self
Remove deny_response_format from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_deny_response_format_mut(&mut self) -> &mut Self
pub fn clear_deny_response_format_mut(&mut self) -> &mut Self
Remove deny_response_format from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
Sourcepub fn clear_deny_message(self) -> Self
pub fn clear_deny_message(self) -> Self
Remove deny_message from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_deny_message_mut(&mut self) -> &mut Self
pub fn clear_deny_message_mut(&mut self) -> &mut Self
Remove deny_message from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
Sourcepub fn clear_network_deny_message(self) -> Self
pub fn clear_network_deny_message(self) -> Self
Remove network_deny_message from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_network_deny_message_mut(&mut self) -> &mut Self
pub fn clear_network_deny_message_mut(&mut self) -> &mut Self
Remove network_deny_message from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
Sourcepub fn clear_secret_deny_message(self) -> Self
pub fn clear_secret_deny_message(self) -> Self
Remove secret_deny_message from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_secret_deny_message_mut(&mut self) -> &mut Self
pub fn clear_secret_deny_message_mut(&mut self) -> &mut Self
Remove secret_deny_message 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 HttpConfig)
pub fn apply_to(self, target: &mut HttpConfig)
Apply every present field to an existing value.
Sourcepub fn into_config(self) -> HttpConfig
pub fn into_config(self) -> HttpConfig
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: HttpConfig) -> Self
pub fn from_present_fields(value: HttpConfig) -> Self
Convert non-null fields into a changeset, treating Option::None as absent.