pub fn reject_unknown_keys<V: Source>(
object: Fields<'_, V>,
declared: &[String],
path: &str,
) -> Result<(), ProbeError>Expand description
Refuse a key that names nothing the type declares.
An error and not a warning: a misspelled member name would otherwise silently test the default value, and the two emitters that skipped it produced a sample the third one refused.
§Errors
ProbeError::Unknown, naming the offending key’s path.