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

Load multiple rules in a single attribute macro #11

Open
Forsworns opened this issue Sep 23, 2021 · 0 comments
Open

Load multiple rules in a single attribute macro #11

Forsworns opened this issue Sep 23, 2021 · 0 comments
Labels
help wanted Extra attention is needed kind/feature Category issues or prs related to feature request.

Comments

@Forsworns
Copy link
Member

Though attribute macro is supplied for easy sentinel construction, it can only wrap a single rule on a single "resource" (method/function). It would be much convenient if multiple rules can be defined in a single attribute macro.

Both parsing and design of this attribute macro bother me. I'm considering the following two potential formats, which are compatible with current attributes:

#[flow(...), flow(...), system(...)]
fn task()->u32{ 0 }
#[flow(...)]
#[flow(...)]
#[system(...)]
fn task()->u32{ 0 }

Either of them should load three rules (vec![flow::Rule, flow::Rule, system::Rule) on the method task().

@Forsworns Forsworns added kind/feature Category issues or prs related to feature request. help wanted Extra attention is needed labels Sep 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed kind/feature Category issues or prs related to feature request.
Projects
None yet
Development

No branches or pull requests

1 participant