1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
use make_pub::make_pub; // Testable via `cargo expand --bin make_pub` #[make_pub] #[derive(Debug)] struct Conf { field1: i32, field2: f32, } fn main() { let test = Conf{field1: 42, field2: 0.1}; println!("Conf: {:?}", test); }