pub struct HealthCheckUpdate {
pub timeout_secs: Option<u64>,
pub check_interval_secs: Option<u64>,
pub success_threshold: Option<u32>,
pub failure_threshold: Option<u32>,
pub disable_health_check: Option<bool>,
}Expand description
Partial health check config for PATCH-style updates.
Each None field means “keep the existing value”. This avoids the problem
where #[serde(default)] on HealthCheckConfig would silently reset
unspecified fields to defaults.
Fields§
§timeout_secs: Option<u64>§check_interval_secs: Option<u64>§success_threshold: Option<u32>§failure_threshold: Option<u32>§disable_health_check: Option<bool>Implementations§
Source§impl HealthCheckUpdate
impl HealthCheckUpdate
Sourcepub fn apply_to(&self, existing: &HealthCheckConfig) -> HealthCheckConfig
pub fn apply_to(&self, existing: &HealthCheckConfig) -> HealthCheckConfig
Merge this update into an existing HealthCheckConfig, returning a new config.
Only Some fields are applied; None fields keep the existing value.
Trait Implementations§
Source§impl Clone for HealthCheckUpdate
impl Clone for HealthCheckUpdate
Source§fn clone(&self) -> HealthCheckUpdate
fn clone(&self) -> HealthCheckUpdate
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HealthCheckUpdate
impl Debug for HealthCheckUpdate
Source§impl Default for HealthCheckUpdate
impl Default for HealthCheckUpdate
Source§fn default() -> HealthCheckUpdate
fn default() -> HealthCheckUpdate
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for HealthCheckUpdate
impl<'de> Deserialize<'de> for HealthCheckUpdate
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for HealthCheckUpdate
impl JsonSchema for HealthCheckUpdate
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for HealthCheckUpdate
impl RefUnwindSafe for HealthCheckUpdate
impl Send for HealthCheckUpdate
impl Sync for HealthCheckUpdate
impl Unpin for HealthCheckUpdate
impl UnsafeUnpin for HealthCheckUpdate
impl UnwindSafe for HealthCheckUpdate
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more