I'm stuck on a simple problem.
There is this string enum of MIME types:
enum BodyType: string {
PlainText = "text/plain",
JSON = "apllication/json",
FormUrlencoded = "application/x-www-form-urlencoded",
Multipart = "multipart/form-data",
Other = "Other",
None = "None"
}
Q: how can I iterate its values? With keys it's relatively easy:
auto keys = [EnumMembers!BodyType]
.map!(el => to!string(el))
.array;
With values, though, I'm kinda stuck. Reading Ali's book and https://dlang.org/spec/enum.html did not bring enlightening