-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WIP][derive] Support custom TryFromBytes validator
TODO: - Cleaner way to pass name of validator to `impl_block`? - Cleaner way to parse validator attribute? - Safety comment in emitted call to `validate` - Tests (especially including tests for the error message resulting from passing a validator with the wrong type signature - test for both argument types and return types) - Also test for invalid zerocopy attributes - Also test for hygiene - that the validator can't access variables from the `is_bit_valid` function body scope - Other misc TODO comments in code
- Loading branch information
Showing
3 changed files
with
125 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters