mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-03-17 23:13:55 +01:00
This commit adds an extend_enum! macro and some unit tests to provide an ergonomic way to specialize configs for specific (sub)widgets. The macro takes the name of the existing enum, the desired name of the new, extended enum, and a list of variants which should be added to the extended enum. The macro will add new variants to a new enum definition first, before wrapping the existing enum in an Existing variant and tagging it with the `#[serde(untagged)]` annotation. From is also implemented for ergonomic from/into calls between shared variants of the existing and extended enums.