Set the macro context with struct name and debug flag.
(name: &str, debug_enabled: bool)
| 70 | |
| 71 | /// Set the macro context with struct name and debug flag. |
| 72 | pub(super) fn set_struct_context(name: &str, debug_enabled: bool) { |
| 73 | MACRO_CONTEXT.with(|ctx| { |
| 74 | *ctx.borrow_mut() = Some(MacroContext { |
| 75 | struct_name: name.to_string(), |
| 76 | debug_enabled, |
| 77 | }); |
| 78 | }); |
| 79 | } |
| 80 | |
| 81 | pub(super) fn clear_struct_context() { |
| 82 | MACRO_CONTEXT.with(|ctx| { |
no test coverage detected