pub fn activeTag(u: anytype) Tag(@TypeOf(u))
Returns the active tag of a tagged union
u
576 577 578 579
pub fn activeTag(u: anytype) Tag(@TypeOf(u)) { const T = @TypeOf(u); return @as(Tag(T), u); }
Returns the active tag of a tagged union