Expand description
Building blocks used by #[derive(Validate)] for structs with named
fields. They are public so hand-written models can use them too; the
reference model in this module’s tests shows the exact shape the derive
generates.
Structs§
- Field
Spec - Static description of one field of a model.
Enums§
- Constraint
- A field constraint checked on the (already coerced) raw value.
Functions§
- check
- Apply
constrainttovalue, reporting at the current location. - prepare_
object - Prepare a model object: installs
config, checks the input is an object, resolves aliases, reports missing and extra keys, and callsfieldfor each present field with the location set to the key the client sent.