Say I have a tagged union, all entries having the same type :
pub const Tags = enum {
a,
b,
c,
};
pub const Data = union(Tags) {
a: u32,
b: u32,
c: u32,
};
Is there a way to define a type that corresponds to a Data with a given tag?
For example, I would like to be able to express that a function always returns a Data with the active tag a. What would be the type of this return type?