You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great to have OneOf source generators for struct.
Something like:
[GenerateOneOf(typeof(String), typeof(Int)]
public readonly partial struct MyStruct {}
public readonly partial struct MyStruct {
private readonly String _value0;
private readonly Int _value1;
private readonly int _index;
public IsString => ...
public IsInt => ...
public string AsString => ...
public int AsInt => ...
}
The text was updated successfully, but these errors were encountered:
This looks close to how I built my union library https://github.com/AterraEngine/unions-cs as it is fully built on using ValueTypes. There is a lot of performance gained with how I approached it, maybe something OneOf can definitly implement?
It would be great to have OneOf source generators for struct.
Something like:
The text was updated successfully, but these errors were encountered: