-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core: Add helpers for checking mechanisms at compile time
To be able to compare mechanism variants in const contexts, we use add a const_eq function. And to be able to indicate which mechanism is potentially missing, we add a const panic method that includes the mechanism variant in the panic message. To reduce the boilerplate code, we use a macro to generate the enum.
- Loading branch information
1 parent
5cba648
commit 872f9ab
Showing
1 changed file
with
107 additions
and
155 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