Skip to main content

check

Function check 

Source
pub fn check<T>(spec: &LoadSpec<'_>, fields: &[&str]) -> Result<Report, Error>
Expand description

Builds a report for spec.

fields are the struct’s field names, used for unknown-key detection; pass an empty slice to skip it. The generated check() passes the real ones.

§Errors

Only if the sources cannot be read or parsed at all. A configuration that parses but would not deserialize is a successful report with failure set — that is the case worth reporting on.