Expand description
Checked versions of the casting functions exposed in crate root
that support CheckedBitPattern types.
Enums§
- The things that can go wrong when casting between
CheckedBitPatterndata forms.
Traits§
- A marker trait that allows types that have some invalid bit patterns to be used in places that otherwise require
AnyBitPatternorPodtypes 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.
Functions§
- Cast
TintoU - Cast
&mut Tinto&mut U. - Cast
&Tinto&U. - Cast
&[A]into&[B]. - Cast
&mut [T]into&mut [U]. - Re-interprets
&[u8]as&T. - Re-interprets
&mut [u8]as&mut T. - Reads the slice into a
Tvalue. - Try to cast
TintoU. - Try to convert a
&mut Tinto&mut U. - Try to convert a
&Tinto&U. - Try to convert
&[A]into&[B](possibly with a change in length). - Try to convert
&mut [A]into&mut [B](possibly with a change in length). - Re-interprets
&[u8]as&T. - Re-interprets
&mut [u8]as&mut T. - Reads from the bytes as if they were a
T.