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
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.
This would allow borrows of the inner fields directly as well. An example is where we have a
&SomeEnumand we want a&Variant1