Function vector::serde::bool_or_struct

source ·
pub fn bool_or_struct<'de, T, D>(
    deserializer: D,
) -> Result<T, <D as Deserializer<'de>>::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.