pub fn infer(samples: &[Doc], root_name: &str) -> Result<Schema, SchemaError>Expand description
Infers a record Schema (rooted at root_name) that accepts every
sample in samples. Every sample’s root must be an object (a record
shape) – an empty samples list, or any sample whose root is a bare
scalar, is a SchemaError. Always infers with allow_any: false –
see infer_with_report for the allow_any: true variant.