Skip to content

Load multiple rules in a single attribute macro #11

Open
@Forsworns

Description

@Forsworns

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().

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is neededkind/featureCategory issues or prs related to feature request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions