• 2.3.0 31d3e4afef

    2.3.0 Stable

    archiver-bot released this 2023-05-16 21:44:08 -05:00 | 280 commits to main since this release

    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

    Full Changelog: https://github.com/bitflags/bitflags/compare/2.2.1...2.3.0

    Downloads