pub struct NetworkRateLimiterConfigPatch {
pub egress: Option<RateLimiterConfig>,
pub ingress: Option<RateLimiterConfig>,
}Expand description
A sparse, presence-aware patch for NetworkRateLimiterConfig.
Fields§
§egress: Option<RateLimiterConfig>Pending update for egress. Omitted values leave the target unchanged.
ingress: Option<RateLimiterConfig>Pending update for ingress. Omitted values leave the target unchanged.
Implementations§
Source§impl NetworkRateLimiterConfigPatch
impl NetworkRateLimiterConfigPatch
Sourcepub fn egress(self, value: RateLimiterConfig) -> Self
pub fn egress(self, value: RateLimiterConfig) -> Self
Set the egress field in this patch.
Sourcepub fn egress_mut(&mut self, value: RateLimiterConfig) -> &mut Self
pub fn egress_mut(&mut self, value: RateLimiterConfig) -> &mut Self
Set the egress field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn ingress(self, value: RateLimiterConfig) -> Self
pub fn ingress(self, value: RateLimiterConfig) -> Self
Set the ingress field in this patch.
Sourcepub fn ingress_mut(&mut self, value: RateLimiterConfig) -> &mut Self
pub fn ingress_mut(&mut self, value: RateLimiterConfig) -> &mut Self
Set the ingress field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn clear_egress(self) -> Self
pub fn clear_egress(self) -> Self
Remove egress from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_egress_mut(&mut self) -> &mut Self
pub fn clear_egress_mut(&mut self) -> &mut Self
Remove egress from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
Sourcepub fn clear_ingress(self) -> Self
pub fn clear_ingress(self) -> Self
Remove ingress from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_ingress_mut(&mut self) -> &mut Self
pub fn clear_ingress_mut(&mut self) -> &mut Self
Remove ingress 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 NetworkRateLimiterConfig)
pub fn apply_to(self, target: &mut NetworkRateLimiterConfig)
Apply every present field to an existing value.
Sourcepub fn into_config(self) -> NetworkRateLimiterConfig
pub fn into_config(self) -> NetworkRateLimiterConfig
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: NetworkRateLimiterConfig) -> Self
pub fn from_present_fields(value: NetworkRateLimiterConfig) -> Self
Convert non-null fields into a changeset, treating Option::None as absent.