docx-codegen 0.1.1

Code generation for docx-rs.
Documentation
  • docx-codegen

Code generation for docx-rs.

** Motivation

docx-rs is using quick-xml for parsing and generating xml content.

However, quick-xml is a pull parser which means it's verbose to serialize and deserialize data type manually. To keep the project DRY (don't repeat yourself), I created this crate to provide proc_macro.

** Struct Attribute

#+BEGIN_SRC rust // <foo ... > ...

#[xml(event = "Start")] #[xml(tag = "foo")] struct Foo { // ... }

// <foo ... />

#[xml(event = "Start")] #[xml(tag = "foo")] struct Bar { // ... } #+END_SRC

** Struct Field Attribute

#+BEGIN_SRC rust

#+END_SRC

** Enum Attribute

** Enum Variant Attribute