* 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
* just pointer to how to set the crate feature
helps the Cargo newbies to enable the feature easily while reading the documentation.
* Update allocation.rs
* update rustfmt.toml
replace `merge_imports = true` (deprecated) with `imports_granularity = "Crate"`
* run `cargo +nightly fmt`
* rewrite docs and rename `Wrapped` to `Inner`
rewriting some docs for conciseness
rename `Wrapped` to `Inner`, because it's hard to visually differentiate between
`Wrapper` and `Wrapped`
* impl missing `TransparentWrapper::wrap_{}` fns
Implement 3 new wrapping functions on `TransparentWrapper` providing new
conversions.
- `TransparentWrapper::wrap(s: Inner) -> Self`
- `TransparentWrapper::wrap_slice(s: &[Inner]) -> &[Self]`
- `TransparentWrapper::wrap_slice_mut(s: &mut [Inner]) -> &mut [Self]`
* impl `TransparentWrapper::unwrap_{}` fns
Implement counterparts to `TransparentWrapper::wrap_{}` functions
providing reverse conversions.
- `TransparentWrapper::unwrap(self) -> Inner`
- `TransparentWrapper::unwrap_ref(&self) -> &Inner`
- `TransparentWrapper::unwrap_mut(&mut self) -> &mut Inner`
- `TransparentWrapper::unwrap_slice(s: &[Self]) -> &[Inner]`
- `TransparentWrapper::unwrap_slice_mut(s: &mut [Self]) -> &mut [Inner]`
* add `TransparentWrapper` UB test
This test is only for MIRI to check all trait functions on
`TransparentWrapper` if they cause any UB.
The output of the functions is not checked.
* small `TransparentWrapper` doc adjustments
* change fn signature on `TransparentWrapper`
Methods on `TransparentWrapper` trait are now associated functions.
They now take `Self` instead of `self` as argument)
- `TransparentWrapper::unwrap(s: Self)`
- `TransparentWrapper::unwrap_ref(s: &Self)`
- `TransparentWrapper::unwrap_mut(s: &mut Self)`