Reference
v0.1.6
The reference pages list the facts of GuardedStruct: every DSL option, the derive string syntax, the built-in sanitize and validate ops, the API of each module, the error shapes and actions, and the configuration keys, packages and message callbacks.
- DSL reference Every option of the guardedstruct section and of field, virtual_field, dynamic_field, sub_field and conditional_field in GuardedStruct.
- Derive string syntax Everything a derive string can contain: groups, op forms, enum and equal operands, regex patterns, combinators, and the checks made at compile time.
- Sanitize ops All 23 built-in sanitize ops of GuardedStruct: text, HTML, number, list and default ops, with what each one does to a value.
- Validate ops All 65 built-in validate ops of GuardedStruct: types, size, format, date and combinator ops, with what each accepts and the packages some need.
- API reference Functions generated on a guarded module, and the public modules Validate, Info, Diff, Errors, Extension and AshResource, with telemetry events.
- Error shapes and actions The shapes of GuardedStruct error maps and every action, such as required_fields, dependent_keys, conditionals and type, with default messages.
- Configuration Configure GuardedStruct with config keys and the options you pass to use GuardedStruct, and see its optional packages and error message callbacks.