Arwalk / zig-protobuf

a protobuf 3 implementation for zig.
MIT License
188 stars 20 forks source link

Manage required fields through restrictions #13

Closed Arwalk closed 1 year ago

Arwalk commented 2 years ago

Can use a method check_validity(self: T) InvalidErrors!void { ... } to ensure the message adheres to restrictions and options before encoding and after decoding.

Can be a first step for required fields on proto2

Arwalk commented 1 year ago

We're not gonna bother with proto, job has been do to handle required fields similarly to other implementations.