|
36 | 36 | #[allow(clippy::crate_in_macro_def)] |
37 | 37 | /// Macro used to generate rust enums from a Thrift `enum` definition. |
38 | 38 | /// |
39 | | -/// When utilizing this macro the Thrift serialization traits and structs need to be in scope. |
| 39 | +/// Note: |
| 40 | +/// - All enums generated with this macro will have `pub` visibility. |
| 41 | +/// - When utilizing this macro the Thrift serialization traits and structs need to be in scope. |
40 | 42 | macro_rules! thrift_enum { |
41 | 43 | ($(#[$($def_attrs:tt)*])* enum $identifier:ident { $($(#[$($field_attrs:tt)*])* $field_name:ident = $field_value:literal;)* }) => { |
42 | 44 | $(#[$($def_attrs)*])* |
@@ -91,7 +93,9 @@ macro_rules! thrift_enum { |
91 | 93 | /// |
92 | 94 | /// The resulting Rust enum will have all unit variants. |
93 | 95 | /// |
94 | | -/// When utilizing this macro the Thrift serialization traits and structs need to be in scope. |
| 96 | +/// Note: |
| 97 | +/// - All enums generated with this macro will have `pub` visibility. |
| 98 | +/// - When utilizing this macro the Thrift serialization traits and structs need to be in scope. |
95 | 99 | #[doc(hidden)] |
96 | 100 | #[macro_export] |
97 | 101 | #[allow(clippy::crate_in_macro_def)] |
@@ -162,9 +166,10 @@ macro_rules! thrift_union_all_empty { |
162 | 166 | /// non-empty type, the typename must be contained within parens (e.g. `1: MyType Var1;` becomes |
163 | 167 | /// `1: (MyType) Var1;`). |
164 | 168 | /// |
165 | | -/// This macro allows for specifying lifetime annotations for the resulting `enum` and its fields. |
166 | | -/// |
167 | | -/// When utilizing this macro the Thrift serialization traits and structs need to be in scope. |
| 169 | +/// Note: |
| 170 | +/// - All enums generated with this macro will have `pub` visibility. |
| 171 | +/// - This macro allows for specifying lifetime annotations for the resulting `enum` and its fields. |
| 172 | +/// - When utilizing this macro the Thrift serialization traits and structs need to be in scope. |
168 | 173 | #[doc(hidden)] |
169 | 174 | #[macro_export] |
170 | 175 | #[allow(clippy::crate_in_macro_def)] |
@@ -228,9 +233,11 @@ macro_rules! thrift_union { |
228 | 233 |
|
229 | 234 | /// Macro used to generate Rust structs from a Thrift `struct` definition. |
230 | 235 | /// |
231 | | -/// This macro allows for specifying lifetime annotations for the resulting `struct` and its fields. |
232 | | -/// |
233 | | -/// When utilizing this macro the Thrift serialization traits and structs need to be in scope. |
| 236 | +/// Note: |
| 237 | +/// - This macro allows for specifying the visibility of the resulting `struct` and its fields. |
| 238 | +/// + The `struct` and all fields will have the same visibility. |
| 239 | +/// - This macro allows for specifying lifetime annotations for the resulting `struct` and its fields. |
| 240 | +/// - When utilizing this macro the Thrift serialization traits and structs need to be in scope. |
234 | 241 | #[doc(hidden)] |
235 | 242 | #[macro_export] |
236 | 243 | macro_rules! thrift_struct { |
|
0 commit comments