pub struct HttpConfigPatch {
pub deny_response: Option<bool>,
pub 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_message: Option<String>Pending update for 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_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 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_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 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.