Module mini_macro_magic::example
source · Expand description
Example of using export. (This module is not part of the crate’s public API)
Code used for this module:
pub mod example {
use mini_macro_magic::export;
export! {
/// Inspect demo struct.
pub inspect_demo$
/// Demo struct for inspection.
pub struct Demo {
/// The X value.
pub x: i32,
/// The Y value.
pub y: i32,
}
}
}Demo is a struct definition exported by export.
As you can see it exists as expected as a normal struct.
inspect_demo is the inspection macro that was generated by export.
This is the macro you would call to inspect the tokens of Demo.
Macros
- Inspect demo struct.
Structs
- Demo struct for inspection.