Converting C-Like Enums to String values in Rust
Suppose you have a C-Like Enum in Rust like the one below:
enum Foo {
SomeValue,
OtherValue
}
Note: C-Like enumerations in Rust have no parameters (i.e. SomeValue(~str)), and can have their discriminator values explicitly set to a constant value (i.e. SomeValue = 0). See http://static.rust-lang.org/doc ...
more ...