-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[authz-macros] accept an optional input_key argument (#4707)
In some cases including composite keys, it can be better to make the outside representation of the primary key some kind of struct, rather than passing around tuples of various types. Enable that in the `authz_resource` macro by allowing users to specify an optional `input_key` argument, which represents a better view into the primary key. I'm not entirely sure that the `From` trait is the right thing to use here, but it seems like a pretty low-cost decision to change in the future. As part of this PR I also switched to the prettyplease crate, which as the README explains is more suitable for generated code than rustfmt: https://crates.io/crates/prettyplease
- Loading branch information
1 parent
ae7c2ed
commit b19c61a
Showing
6 changed files
with
103 additions
and
21 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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