This library allows the use of enums for structs on projects that are using the library rpa. Basically we allow the mapping of enums as strings on the database. So if we have for example the enum:
And then we have an structure that has a field using that as a type Rpa doesn't allow us to map that enum into strings since diesel doesn't support that. With this library we can do that.
How to use it
First you need to import this library like this:
 = "0.1.2"
Then we only need to use the derive RpaEnum to make things work, so the example above should look like this:
As you can see we only need to use
#[repr(u32)] as the representation and then derive RpaEnum using the trait
from the crate like this
Please visit rpa for more information on how rpa works.