Skip to content

Add support for differently shaped enums variants #12

@hobofan

Description

@hobofan

Support specifying per-variant attributes on enum variants that are shaped differently. E.g:

#[derive(Delegate)]
#[delegate(Shout)]
enum {
  Bar(Cat), // will automatically be delegated to first field
  #[delegate(Shout, target = "bar")]
  Foo { bar: Cat, baz: Dog },
}

This will also most likely require more precise error output, or else it will be hard to explain to the user which variant is missing an attribute.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions