| Crates.io | prost-enum |
| lib.rs | prost-enum |
| version | 0.1.1 |
| created_at | 2023-06-05 06:44:00.88407+00 |
| updated_at | 2024-10-29 17:43:48.654793+00 |
| description | Enhance Enums of prost generated files to support serde and sea-orm. |
| homepage | |
| repository | https://github.com/zhengcan/prost-enum |
| max_upload_size | |
| id | 882829 |
| size | 10,674 |
Use prost_enum::enhance to make protobuf enums support better serialize / deserialize.
(Optional) Make enums to be used in Sea-ORM, which will be treated as i32 / Integer.
// In build.rs
let mut config = prost_build::Config::new();
// ...
config.enum_attribute(
".",
"#[prost_enum::enhance]",
);
// ...