prost-enum

Crates.ioprost-enum
lib.rsprost-enum
version0.1.1
sourcesrc
created_at2023-06-05 06:44:00.88407
updated_at2024-10-29 17:43:48.654793
descriptionEnhance Enums of prost generated files to support serde and sea-orm.
homepage
repositoryhttps://github.com/zhengcan/prost-enum
max_upload_size
id882829
size10,674
Zheng Can (zhengcan)

documentation

README

Usage

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]",
);
// ...
Commit count: 12

cargo fmt