Skip to content
This repository has been archived by the owner on Mar 17, 2023. It is now read-only.

Add guaranteed input validation for the Grouping type #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lava
Copy link
Member

@lava lava commented Aug 12, 2021

This is a PoC for input validation. This specific example ensures that a 'Grouping' will not have the 'defanged' value set.

The basic idea is to to create a private "shadow struct" for the raw serialization/deserialization and then to use serde's try_from to add a post-parse validation step to create the real struct.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant