vector_core::serde

Function bool_or_struct

source
pub fn bool_or_struct<'de, T, D>(deserializer: D) -> Result<T, D::Error>
where T: Deserialize<'de> + From<bool>, D: Deserializer<'de>,
Expand description

Enables deserializing from a value that could be a bool or a struct.

Example: healthcheck: bool healthcheck.enabled: bool Both are accepted.

ยงErrors

Returns the error from deserializing the underlying struct.