Skip to content

Feature Request: Create Wrapped Struct types #4

Description

@vinaychandra

Currently, the crate only creates a new types and provides conversion methods to the enum. I think it would be advantageous to convert even the struct variants to contain the struct.

pub enum SomeEnum { variant1 { field_1 ..} } 

->
pub struct Variant1 {field_1...}
pub enum SomeEnum { variant1(Variant1) }

This would allow borrows of the inner fields directly as well. An example is where we have a &SomeEnum and we want a &Variant1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions