Skip to main content

Module ignored

Module ignored 

Source
Expand description

Finds configuration settings that deserialization ignores.

serde_ignored cannot see keys inside #[serde(flatten)] structs, and PipelineConfig flattens RuntimeConfig, so this module uses a round trip instead:

  1. Deserialize the input, serialize it again, and list each key in the input that is not in the output. A key can disappear because it is unknown, but also because it is an alias or a default value that serialization skips.

  2. For each such key, replace its value with a string that no setting accepts as is. If the result deserializes to the same configuration, the key is ignored. If deserialization fails or the configuration changes, then something read the key.

Functionsยง

ignored_settings
Returns the paths of the keys in input that have no effect when it is deserialized as a T, such as inputs.t.transport.config.foo.