bincode-org / virtue

A sinless derive helper
MIT License
48 stars 10 forks source link

`GenStruct` and `GenEnum` are missing methods to add generic parameters to the struct/enum #83

Closed NightEule5 closed 5 months ago

NightEule5 commented 5 months ago

I would like to generate a struct or enum which inherits the generic parameters of the target type:

#[derive(MyDerive)]
struct Struct<'a, T> {
    // ...
}

#[derive(MyDerive)]
enum Enum<'a, T> {
    // ...
}

// generates:

struct OtherStruct<'a, T> {
    // ...
}

enum OtherEnum<'a, T> {
    // ...
}

But currently there is no way to add generic parameters to the generated types.