Skip to content

2.3.0

Compare
Choose a tag to compare
@KodrAus KodrAus released this 17 May 02:55
· 118 commits to main since this release
31d3e4a

Major changes

BitFlags trait deprecated in favor of Flags trait

This release introduces the Flags trait and deprecates the BitFlags trait. These two traits are semver compatible so if you have public API code depending on BitFlags you can move to Flags without breaking end-users. This is possible because the BitFlags trait was never publicly implementable, so it now carries Flags as a supertrait. All implementations of Flags additionally implement BitFlags.

The Flags trait is a publicly implementable version of the old BitFlags trait. The original BitFlags trait carried some macro baggage that made it difficult to implement, so a new Flags trait has been introduced as the One True Trait for interacting with flags types generically. See the the macro_free and custom_derive examples for more details.

Bits trait publicly exposed

The Bits trait for the underlying storage of flags values is also now publicly implementable. This lets you define your own exotic backing storage for flags. See the custom_bits_type example for more details.

What's Changed

  • Use explicit hashes for actions steps by @KodrAus in #350
  • Support ejecting flags types from the bitflags macro by @KodrAus in #351

Full Changelog: 2.2.1...2.3.0