Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,19 @@ Please make sure to add your changes to the appropriate categories:

- Added dedicated `trait AsVariant<T>` for `AsVariantRef<T>`'s removed `fn as_variant(&self) -> Option<T>`.
- Added dedicated `AsVariant` derive macro for `trait AsVariant<T>`.
- Added enum-level `#[enumcapsulate(exclude)]`/`#[enumcapsulate(exclude(…))]` helper attribute.
- Added optional selection list to variant-level `#[enumcapsulate(exclude(…))]` helper attribute.
- Added optional selection list to variant-level `#[enumcapsulate(include(…))]` helper attribute.

### Changed

- Removed `enumcapsulate::macros` and its redundant `enumcapsulate::derive` module in favor of re-exporting its items directly from `crate::*`, thus eliminating the need for individually importing trait + derive macro pairs:
- Before: `use enumcapsulate::{derive::FromVariant, FromVariant};`
- After: `use enumcapsulate::FromVariant;`
- Made `Encapsulate` derive macro derive also derive `AsVariant<T>`.
- Promoted `field` value of `include(field = …)` to its own top-level variant attribute with name/index variants:
- `#[enumcapsulate(field(index = …))]`
- `#[enumcapsulate(field(name = "…"))]`

### Deprecated

Expand Down
Loading
Loading