Skip to content

Commit

Permalink
Add TryFromBytes trait
Browse files Browse the repository at this point in the history
`TryFromBytes` can be implemented for types which are not `FromZeroes`
or `FromBytes`; it supports performing a runtime check to determine
whether a given byte sequence contains a valid instance of `Self`.

This is the first step of #5. Future commits will add support for a
custom derive and for implementing `TryFromBytes` on unsized types.

TODO: Add tests

Makes progress on #5
  • Loading branch information
joshlf committed Sep 5, 2023
1 parent 9bc7911 commit 9c4a7a4
Show file tree
Hide file tree
Showing 2 changed files with 721 additions and 145 deletions.
Loading

0 comments on commit 9c4a7a4

Please sign in to comment.