Closed zjp-CN closed 10 months ago
Related to https://github.com/jmcnamara/rust_xlsxwriter/issues/66
$ cargo expand -F serde --test integration serde14::create_new_xlsx_file_2 // for this #[derive(Serialize, ExcelSerialize)] #[serde(rename_all = "PascalCase")] struct MyStruct { field_1: u8, field_2: i8, } // macro expansion #[doc(hidden)] const _: () = { impl ::rust_xlsxwriter::ExcelSerialize for MyStruct { fn to_serialize_field_options() -> ::rust_xlsxwriter::SerializeFieldOptions { let custom_headers = [ ::rust_xlsxwriter::CustomSerializeField::new("Field1"), ::rust_xlsxwriter::CustomSerializeField::new("Field2"), ]; ::rust_xlsxwriter::SerializeFieldOptions::new() .set_struct_name("MyStruct") .set_custom_headers(&custom_headers) } } };
Thank you. Those are good changes.
Related to https://github.com/jmcnamara/rust_xlsxwriter/issues/66