thrift_struct

Macro thrift_struct 

Source
macro_rules! thrift_struct {
    ($(#[$($def_attrs:tt)*])* $vis:vis struct $identifier:ident $(< $lt:lifetime >)? { $($(#[$($field_attrs:tt)*])* $field_id:literal : $required_or_optional:ident $field_type:ident $(< $field_lt:lifetime >)? $(< $element_type:ident >)? $field_name:ident $(= $default_value:literal)? $(;)?)* }) => { ... };
}
Expand description

Macro used to generate Rust structs from a Thrift struct definition.

This macro allows for specifying lifetime annotations for the resulting struct and its fields.

When utilizing this macro the Thrift serialization traits and structs need to be in scope.