jhorstmann / compact-thrift

Thrift IDL parser and code generator for the compact protocol
Apache License 2.0
2 stars 0 forks source link

Add option to generator for skippable fields #3

Open jhorstmann opened 5 months ago

jhorstmann commented 5 months ago
match last_field_id {
    ...
    3 => if !config.skip_meta_data {
        self.meta_data.fill_field(input, field_type)?;
    }
jhorstmann commented 4 months ago

The config would have to be a generic parameter on the CompactThriftInput trait. That is a bit annoying since that parameter would be unused by all the implementations on standard types, and would cause additional code generation during monomorphization for different config types.