Currently, serde, provides a neat #[serde(deny_unknown_fields)] attribute that makes the parser fail if it encounters any field that is not properly handled in the defined struct/enum or so.
This allows to easily add conforms tests that all the possible tags are supported. This is very useful when writing a library to parse a specific xml format.
Currently, serde, provides a neat
#[serde(deny_unknown_fields)]
attribute that makes the parser fail if it encounters any field that is not properly handled in the defined struct/enum or so.This allows to easily add conforms tests that all the possible tags are supported. This is very useful when writing a library to parse a specific xml format.