lesurp / OptionalStruct

Macro copying a struct with Option fields. Useful for config initialization
Apache License 2.0
36 stars 12 forks source link

Refacto: refresh codebase, clean the API #15

Closed lesurp closed 1 year ago

lesurp commented 1 year ago

So since this has actually gotten some attention, I've decided to clean the codebase, mostly due to how old it is, but also because some of the decisions back at the time were rather debatable.

Feature wise:

  1. Added support for nested Option<OptionalFoo> as implemented in #10
  2. Add support for tuple structures #4

API wise:

  1. Use an attribute rather than a derive macro (derive macro might confuse the user)
  2. Add flags for skipping / including fields as needed (see readme)
  3. Simplify renaming fields (see readme)