bytemuck/derive
Gray Olson b472189ff8
Add NoPadding, AnyBitPattern, and CheckedBitPattern traits (#91)
* add MaybePod and NoPadding traits

* MaybePod and NoPadding derive macros

* fix doctest

* fmt

* fix bad doc link

* move new casting functions into separate modules

* fmt

* fix doctest and derive test

* remove relaxed module, add anybitpattern

* rename MaybePod to CheckedCastFromPod

* rename checked casting functions

* rework CheckedCastFromPod into CheckedBitPattern

* add anybitpattern derive, fix up other derives

* fix doctest

* fix derive trait of bits type

* export AnyBitPattern derive

* export anybitpattern from traits

* actually export derive macro for AnyBitPattern

* make bits struct pub because of type leaking rules

* allow clippy lint in derive

* add copy bound to CheckedBitPattern

* - replace Pod bounds with NoPadding+AnyBitPattern
- add try and panic versions of checked cast functions
- slightly update docs

* fix derive tests

* - adapt the allocation module cast functions as well
- as part of that, make AnyBitPattern a subtrait of Zeroable
- AnyBitPattern derive also derives Zeroable

* @JakobDegen and @zakarumych nits

* superset -> subset on CheckedBitPattern and NoPadding docs

* derive Debug on generated `Bits` structs, which can be useful for debugging failures

* don't derive debug on spirv target arch

* make it work on 1.34

* merge conflicts

* fix erroneous behavior in doctest
2022-03-29 17:01:02 -06:00
..
src Add NoPadding, AnyBitPattern, and CheckedBitPattern traits (#91) 2022-03-29 17:01:02 -06:00
tests Add NoPadding, AnyBitPattern, and CheckedBitPattern traits (#91) 2022-03-29 17:01:02 -06:00
Cargo.toml Add NoPadding, AnyBitPattern, and CheckedBitPattern traits (#91) 2022-03-29 17:01:02 -06:00
changelog.md Create changelog.md 2020-10-21 14:19:13 -06:00
LICENSE-APACHE Include LICENSE files in published bytemuck_derive crates (#47) 2020-11-27 08:31:40 -07:00
LICENSE-MIT Include LICENSE files in published bytemuck_derive crates (#47) 2020-11-27 08:31:40 -07:00
LICENSE-ZLIB Include LICENSE files in published bytemuck_derive crates (#47) 2020-11-27 08:31:40 -07:00
README.md bytemuck_derive: readme 2020-08-20 19:46:22 -06:00

bytemuck_derive

Derive macros for bytemuck traits.