Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

derive: Add options for ExtensionDispatch #153

Merged
merged 3 commits into from
May 17, 2024

Conversation

robin-nitrokey
Copy link
Member

@robin-nitrokey robin-nitrokey commented Mar 25, 2024

This patch adds more options to the ExtensionDispatch derive macro so that it can be used for nitrokey-3-firmware:

  • delegate_to makes it possible to create an alias for a backend using a different set of extensions. To avoid misunderstandings, delegating backends are forced to use the unit type ().
  • skip ignores fields.
  • no_core skips backends when dispatching core requests.

@robin-nitrokey robin-nitrokey marked this pull request as draft March 25, 2024 15:44
@robin-nitrokey robin-nitrokey changed the title derive: Add delegate_to option for ExtensionDispatch derive: Add options for ExtensionDispatch Apr 16, 2024
@robin-nitrokey robin-nitrokey marked this pull request as ready for review April 16, 2024 20:43
@robin-nitrokey
Copy link
Member Author

ping @daringer @sosthene-nitrokey

This patch adds a delegate_to option to the ExtensionDispatch derive
macro that makes it possible to create an alias for a backend using a
different set of extensions.  To avoid misunderstandings, delegating
backends are forced to use the unit type ().
This patch adds a skip option to the ExtensionDispatch macro that makes
it possible to ignore some fields.
This patch adds an option to skip a backend when dispatching core
requests.
@robin-nitrokey robin-nitrokey merged commit 5eed121 into trussed-dev:main May 17, 2024
2 checks passed
@robin-nitrokey robin-nitrokey deleted the derive-delegate branch May 17, 2024 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants