Expand description
PackedChar stores either a char or a U22 in 32 bits of space.
§Examples
use packed_char::{PackedChar, U22, Contents};
assert_eq!(PackedChar::from('a').contents(), Contents::Char('a'));
assert_eq!(PackedChar::try_from(42)?.contents(), Contents::U22(U22::from_u32(42)?));Structs§
- Packed
Char - Stores either a
charor aU22in 32 bits of space. - U22
- A 22-bit unsigned integer.
- U22From
U32Error - Error type for 32-bit to 22-bit integer conversion.
Enums§
- Contents
- The contents of a
PackedChar.