Module bytemuck::checked

source ·
Expand description

Checked versions of the casting functions exposed in crate root that support CheckedBitPattern types.



  • A marker trait that allows types that have some invalid bit patterns to be used in places that otherwise require AnyBitPattern or Pod types by performing a runtime check on a perticular set of bits. This is particularly useful for types like fieldless (‘C-style’) enums, char, bool, and structs containing them.