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
// definitionpubenumMyEnum{Variable1(bool),Variable2(bool),}// testlet v = MyEnum::from_str("Variable2(true)");
Currently it only works for MyEnum::from_str("Variable2")" and it will generate v as the default value MyEnum::Variable2(false). And for the above test, I get a VariantNotFound error.
The text was updated successfully, but these errors were encountered:
Hi @wangxiaoying, this case isn't really supported, and I don't think there's a straightforward path to supporting it. There's the very limited case of Variable(true) that we could probably handle, but there's a huge number of formatting considerations that are all reasonable, but make this feature impractically large to support.
Is this case supported?
Currently it only works for
MyEnum::from_str("Variable2")"
and it will generatev
as the default valueMyEnum::Variable2(false)
. And for the above test, I get a VariantNotFound error.The text was updated successfully, but these errors were encountered: