With this definition of Strct
, it is possible for values
to hold any variant of the Test
enum:
enum Test {
A,
B,
C,
}
struct Strct {
values: Vec<Test>,
}
Is there a way to enforce it to hold only a specific variant of the enum? E.g. Vec<A>
or Vec<B>
or Vec<C>
for that specific case.