macro_rules! thrift_struct {
($(#[$($def_attrs:meta)*])* struct $identifier:ident { $($(#[$($field_attrs:meta)*])* $field_id:literal : $required_or_optional:ident $field_type:ident $(< $element_type:ident >)? $field_name:ident $(= $default_value:literal)? $(;)?)* }) => { ... };
}Expand description
Generate the type and CompactThriftProtocol implementation for a thrift struct.
Syntax (square brackets indicate optional parts or alternatives):
[ doc_comment ]
struct struct_name {
[ doc_comment ]
field_id: [ required | optional ] field_type [ < element_type > ] field_name [ = default_value ] [ ; ]
...
}