dropbox / pb-jelly

A protobuf code generation framework for the Rust language developed at Dropbox.
Apache License 2.0
611 stars 25 forks source link

Add a [(rust.closed_enum)=true] option. #92

Closed goffrie closed 3 years ago

goffrie commented 3 years ago

This option replaces the normally generated open enum with its _Closed variant. That means the enum is required to be a known variant at deserialization time. This makes using enums more ergonomic for situations where version skew is not relevant, or is dealt with some other way (e.g. migrations)

ParkMyCar commented 3 years ago

Nice! This looks good!