native-theme-derive 0.6.0

Proc-macro derive for native-theme widget struct pairs
Documentation

native-theme-derive

This is an internal implementation detail of native-theme. You should not depend on this crate directly. Its only purpose is to provide the #[derive(ThemeWidget)] and #[derive(ThemeFields)] derive macros (with their #[theme], #[theme_layer] and #[theme_inherit] helper attributes) used by native-theme's own widget types. Add native-theme as your dependency instead — the macros are applied internally and do not appear in the public API surface you consume.

What it does

Generates, from a single annotated struct definition:

  • A paired Option / Resolved struct hierarchy (sparse source vs. fully populated output)
  • merge() logic for overlay composition
  • Range and presence validation
  • Field-level inheritance rules wired into the resolution pipeline

Also provides #[theme_inherit] — a codegen attribute for border/font inheritance rules previously written by hand across the crate.

Links

License

Licensed under any of

at your option.